diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-12-18 11:20:47 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-05 16:07:12 -0500 |
commit | 21f83589644bb2ed98079bf1e2154c8e70ca6a6c (patch) | |
tree | ede391a8c788a43f7c4ea3baa3367e020d45f179 /net/mac80211/iface.c | |
parent | c96e96354a6c9456cdf1f150eca504e2ea35301e (diff) |
mac80211: implement hardware offload for remain-on-channel
This allows drivers to support remain-on-channel
offload if they implement smarter timing or need
to use a device implementation like iwlwifi.
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.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index b6db237672ff..8acba456744e 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -1264,7 +1264,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
1264 | { | 1264 | { |
1265 | struct ieee80211_sub_if_data *sdata; | 1265 | struct ieee80211_sub_if_data *sdata; |
1266 | int count = 0; | 1266 | int count = 0; |
1267 | bool working = false, scanning = false; | 1267 | bool working = false, scanning = false, hw_roc = false; |
1268 | struct ieee80211_work *wk; | 1268 | struct ieee80211_work *wk; |
1269 | unsigned int led_trig_start = 0, led_trig_stop = 0; | 1269 | unsigned int led_trig_start = 0, led_trig_stop = 0; |
1270 | 1270 | ||
@@ -1308,6 +1308,9 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
1308 | local->scan_sdata->vif.bss_conf.idle = false; | 1308 | local->scan_sdata->vif.bss_conf.idle = false; |
1309 | } | 1309 | } |
1310 | 1310 | ||
1311 | if (local->hw_roc_channel) | ||
1312 | hw_roc = true; | ||
1313 | |||
1311 | list_for_each_entry(sdata, &local->interfaces, list) { | 1314 | list_for_each_entry(sdata, &local->interfaces, list) { |
1312 | if (sdata->old_idle == sdata->vif.bss_conf.idle) | 1315 | if (sdata->old_idle == sdata->vif.bss_conf.idle) |
1313 | continue; | 1316 | continue; |
@@ -1316,7 +1319,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
1316 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE); | 1319 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE); |
1317 | } | 1320 | } |
1318 | 1321 | ||
1319 | if (working || scanning) | 1322 | if (working || scanning || hw_roc) |
1320 | led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK; | 1323 | led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK; |
1321 | else | 1324 | else |
1322 | led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK; | 1325 | led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK; |
@@ -1328,6 +1331,8 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
1328 | 1331 | ||
1329 | ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop); | 1332 | ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop); |
1330 | 1333 | ||
1334 | if (hw_roc) | ||
1335 | return ieee80211_idle_off(local, "hw remain-on-channel"); | ||
1331 | if (working) | 1336 | if (working) |
1332 | return ieee80211_idle_off(local, "working"); | 1337 | return ieee80211_idle_off(local, "working"); |
1333 | if (scanning) | 1338 | if (scanning) |