summaryrefslogtreecommitdiff
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-05 16:28:40 +0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-06 23:20:33 +0400
commit196ac1c13d4db6c276dbb1c9190c8d7d45a83f1f (patch)
tree68d2a1b99ec08d685381c812e38d0f18553e1cee /net/mac80211/cfg.c
parent491b26b40222cc769c163e77177697dd7a63c316 (diff)
downloadlinux-196ac1c13d4db6c276dbb1c9190c8d7d45a83f1f.tar.xz
mac80211: do remain-on-channel while idle
The IDLE handling in HW off-channel is broken right now since we turn off IDLE only when the off-channel period already started. Therefore, all drivers that use it today (only iwlwifi!) must support off-channel while idle, so playing with idle isn't needed at all. Off-channel in general, since it's no longer used for authentication/association, shouldn't affect PS, so also remove that logic. Also document a small caveat for reporting TX status from off-channel frames in HW remain-on-channel. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index d99359a6f76d..a16907919709 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2187,8 +2187,6 @@ static int ieee80211_cancel_remain_on_channel_hw(struct ieee80211_local *local,
local->hw_roc_cookie = 0;
local->hw_roc_channel = NULL;
- ieee80211_recalc_idle(local);
-
return 0;
}
@@ -2248,7 +2246,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
struct ieee80211_work *wk;
const struct ieee80211_mgmt *mgmt = (void *)buf;
u32 flags;
- bool is_offchan = false;
+ bool is_offchan = false, in_hw_roc = false;
if (dont_wait_for_ack)
flags = IEEE80211_TX_CTL_NO_ACK;
@@ -2268,6 +2266,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
if (chan == local->hw_roc_channel) {
/* TODO: check channel type? */
is_offchan = false;
+ in_hw_roc = true;
flags |= IEEE80211_TX_CTL_TX_OFFCHAN;
}
@@ -2370,7 +2369,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
* wait is involved, we might otherwise not be on
* the right channel for long enough!
*/
- if (!is_offchan && !wait && !sdata->vif.bss_conf.idle) {
+ if (!is_offchan && !wait && (in_hw_roc || !sdata->vif.bss_conf.idle)) {
ieee80211_tx_skb(sdata, skb);
return 0;
}