On Thu, Feb 20, 2014 at 10:27:48AM +0100, Johannes Berg wrote: > On Thu, 2014-02-20 at 10:21 +0100, Stanislaw Gruszka wrote: > > On Thu, Feb 20, 2014 at 09:52:45AM +0100, Johannes Berg wrote: > > > + > > > + /* sync with ieee80211_sta_ps_deliver_wakeup */ > > > + spin_lock(&sta->ps_lock); > > > + /* > > > + * STA woke up the meantime and all the frames on ps_tx_buf have > > > + * been queued to pending queue. No reordering can happen, go > > > + * ahead and Tx the packet. > > > + */ > > > + if (!test_sta_flag(sta, WLAN_STA_PS_STA)) { > > > + spin_unlock(&sta->ps_lock); > > > > Actually I'm not sure if we should check if both WLAN_STA_PS_DRIVER > > and WLAN_STA_PS_STA flags are clear ? > > This area is a bit confusing, but I don't think WLAN_STA_PS_STA will be > clear until after WLAN_STA_PS_DRIVER is? Hmm, actually looks like we call ps_deliver_wakeup() with WLAN_STA_PS_STA flag currently cleared. tatic void sta_unblock(struct work_struct *wk) { if (!test_sta_flag(sta, WLAN_STA_PS_STA)) { local_bh_disable(); ieee80211_sta_ps_deliver_wakeup(sta); local_bh_enable(); so on TX we should rather check WLAN_STA_PS_DRIVER flag . Stanislaw -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html