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>
This commit is contained in:

committed by
John W. Linville

parent
491b26b402
commit
196ac1c13d
@@ -1456,7 +1456,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
int count = 0;
|
||||
bool working = false, scanning = false, hw_roc = false;
|
||||
bool working = false, scanning = false;
|
||||
struct ieee80211_work *wk;
|
||||
unsigned int led_trig_start = 0, led_trig_stop = 0;
|
||||
|
||||
@@ -1493,9 +1493,11 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
|
||||
count++;
|
||||
}
|
||||
|
||||
list_for_each_entry(wk, &local->work_list, list) {
|
||||
working = true;
|
||||
wk->sdata->vif.bss_conf.idle = false;
|
||||
if (!local->ops->remain_on_channel) {
|
||||
list_for_each_entry(wk, &local->work_list, list) {
|
||||
working = true;
|
||||
wk->sdata->vif.bss_conf.idle = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (local->scan_sdata &&
|
||||
@@ -1504,9 +1506,6 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
|
||||
local->scan_sdata->vif.bss_conf.idle = false;
|
||||
}
|
||||
|
||||
if (local->hw_roc_channel)
|
||||
hw_roc = true;
|
||||
|
||||
list_for_each_entry(sdata, &local->interfaces, list) {
|
||||
if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
|
||||
sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
|
||||
@@ -1518,7 +1517,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
|
||||
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE);
|
||||
}
|
||||
|
||||
if (working || scanning || hw_roc)
|
||||
if (working || scanning)
|
||||
led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK;
|
||||
else
|
||||
led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK;
|
||||
@@ -1530,8 +1529,6 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
|
||||
|
||||
ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop);
|
||||
|
||||
if (hw_roc)
|
||||
return ieee80211_idle_off(local, "hw remain-on-channel");
|
||||
if (working)
|
||||
return ieee80211_idle_off(local, "working");
|
||||
if (scanning)
|
||||
|
Reference in New Issue
Block a user