aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-05 08:28:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-06 15:20:33 -0400
commit196ac1c13d4db6c276dbb1c9190c8d7d45a83f1f (patch)
tree68d2a1b99ec08d685381c812e38d0f18553e1cee /net/mac80211/iface.c
parent491b26b40222cc769c163e77177697dd7a63c316 (diff)
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/iface.c')
-rw-r--r--net/mac80211/iface.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index ede5f4959904..968d71c50713 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1456,7 +1456,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
1456{ 1456{
1457 struct ieee80211_sub_if_data *sdata; 1457 struct ieee80211_sub_if_data *sdata;
1458 int count = 0; 1458 int count = 0;
1459 bool working = false, scanning = false, hw_roc = false; 1459 bool working = false, scanning = false;
1460 struct ieee80211_work *wk; 1460 struct ieee80211_work *wk;
1461 unsigned int led_trig_start = 0, led_trig_stop = 0; 1461 unsigned int led_trig_start = 0, led_trig_stop = 0;
1462 1462
@@ -1493,9 +1493,11 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
1493 count++; 1493 count++;
1494 } 1494 }
1495 1495
1496 list_for_each_entry(wk, &local->work_list, list) { 1496 if (!local->ops->remain_on_channel) {
1497 working = true; 1497 list_for_each_entry(wk, &local->work_list, list) {
1498 wk->sdata->vif.bss_conf.idle = false; 1498 working = true;
1499 wk->sdata->vif.bss_conf.idle = false;
1500 }
1499 } 1501 }
1500 1502
1501 if (local->scan_sdata && 1503 if (local->scan_sdata &&
@@ -1504,9 +1506,6 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
1504 local->scan_sdata->vif.bss_conf.idle = false; 1506 local->scan_sdata->vif.bss_conf.idle = false;
1505 } 1507 }
1506 1508
1507 if (local->hw_roc_channel)
1508 hw_roc = true;
1509
1510 list_for_each_entry(sdata, &local->interfaces, list) { 1509 list_for_each_entry(sdata, &local->interfaces, list) {
1511 if (sdata->vif.type == NL80211_IFTYPE_MONITOR || 1510 if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
1512 sdata->vif.type == NL80211_IFTYPE_AP_VLAN) 1511 sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
@@ -1518,7 +1517,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
1518 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE); 1517 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE);
1519 } 1518 }
1520 1519
1521 if (working || scanning || hw_roc) 1520 if (working || scanning)
1522 led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK; 1521 led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK;
1523 else 1522 else
1524 led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK; 1523 led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK;
@@ -1530,8 +1529,6 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
1530 1529
1531 ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop); 1530 ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop);
1532 1531
1533 if (hw_roc)
1534 return ieee80211_idle_off(local, "hw remain-on-channel");
1535 if (working) 1532 if (working)
1536 return ieee80211_idle_off(local, "working"); 1533 return ieee80211_idle_off(local, "working");
1537 if (scanning) 1534 if (scanning)