diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-25 12:46:37 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-25 12:46:37 -0700 |
commit | 345578d97c549995ddbcc178f16f710602cc06bb (patch) | |
tree | ce05e39a01ffce847f6f7f65f19b1e8e20dbf0c2 /net/mac80211/mlme.c | |
parent | fe2a70eefa18a3e419dd9a23e16af14258b7cc20 (diff) | |
parent | cfef6047c4027a8448ec8dafeaf2bb362cc882e4 (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 865fed4cc18..a41f234bd48 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -761,15 +761,16 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work) if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) && (!(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED))) { netif_tx_stop_all_queues(sdata->dev); - /* - * Flush all the frames queued in the driver before - * going to power save - */ - drv_flush(local, false); - ieee80211_send_nullfunc(local, sdata, 1); - /* Flush once again to get the tx status of nullfunc frame */ - drv_flush(local, false); + if (drv_tx_frames_pending(local)) + mod_timer(&local->dynamic_ps_timer, jiffies + + msecs_to_jiffies( + local->hw.conf.dynamic_ps_timeout)); + else { + ieee80211_send_nullfunc(local, sdata, 1); + /* Flush to get the tx status of nullfunc frame */ + drv_flush(local, false); + } } if (!((local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) && |