Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: chromeos/compat-wireless/net/mac80211/offchannel.c

Issue 3436007: CHROMIUMOS: mac80211: reset connection idle when going offchannel (Closed) Base URL: ssh://gitrw.chromium.org/kernel.git
Patch Set: Distill after parent push Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Off-channel operation helpers 2 * Off-channel operation helpers
3 * 3 *
4 * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi> 4 * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi>
5 * Copyright 2004, Instant802 Networks, Inc. 5 * Copyright 2004, Instant802 Networks, Inc.
6 * Copyright 2005, Devicescape Software, Inc. 6 * Copyright 2005, Devicescape Software, Inc.
7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> 8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
9 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net> 9 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as 12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation. 13 * published by the Free Software Foundation.
14 */ 14 */
15 #include <net/mac80211.h> 15 #include <net/mac80211.h>
16 #include "ieee80211_i.h" 16 #include "ieee80211_i.h"
17 17
18 /* 18 /*
19 * inform AP that we will go to sleep so that it will buffer the frames 19 * inform AP that we will go to sleep so that it will buffer the frames
20 * while we scan 20 * while we scan
21 */ 21 */
22 static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata) 22 static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata)
23 { 23 {
24 struct ieee80211_local *local = sdata->local; 24 struct ieee80211_local *local = sdata->local;
25 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
25 26
26 local->offchannel_ps_enabled = false; 27 local->offchannel_ps_enabled = false;
27 28
28 /* FIXME: what to do when local->pspolling is true? */ 29 /* FIXME: what to do when local->pspolling is true? */
29 30
30 del_timer_sync(&local->dynamic_ps_timer); 31 del_timer_sync(&local->dynamic_ps_timer);
32 del_timer_sync(&ifmgd->conn_mon_timer);
33
31 cancel_work_sync(&local->dynamic_ps_enable_work); 34 cancel_work_sync(&local->dynamic_ps_enable_work);
32 35
33 if (local->hw.conf.flags & IEEE80211_CONF_PS) { 36 if (local->hw.conf.flags & IEEE80211_CONF_PS) {
34 local->offchannel_ps_enabled = true; 37 local->offchannel_ps_enabled = true;
35 local->hw.conf.flags &= ~IEEE80211_CONF_PS; 38 local->hw.conf.flags &= ~IEEE80211_CONF_PS;
36 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); 39 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
37 } 40 }
38 41
39 if (!(local->offchannel_ps_enabled) || 42 if (!(local->offchannel_ps_enabled) ||
40 !(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) 43 !(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK))
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 /* 81 /*
79 * If IEEE80211_CONF_PS was not set and the dynamic_ps_timer 82 * If IEEE80211_CONF_PS was not set and the dynamic_ps_timer
80 * had been running before leaving the operating channel, 83 * had been running before leaving the operating channel,
81 * restart the timer now and send a nullfunc frame to inform 84 * restart the timer now and send a nullfunc frame to inform
82 * the AP that we are awake. 85 * the AP that we are awake.
83 */ 86 */
84 ieee80211_send_nullfunc(local, sdata, 0); 87 ieee80211_send_nullfunc(local, sdata, 0);
85 mod_timer(&local->dynamic_ps_timer, jiffies + 88 mod_timer(&local->dynamic_ps_timer, jiffies +
86 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); 89 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
87 } 90 }
91
92 ieee80211_sta_reset_conn_monitor(sdata);
88 } 93 }
89 94
90 void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local) 95 void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local)
91 { 96 {
92 struct ieee80211_sub_if_data *sdata; 97 struct ieee80211_sub_if_data *sdata;
93 98
94 mutex_lock(&local->iflist_mtx); 99 mutex_lock(&local->iflist_mtx);
95 list_for_each_entry(sdata, &local->interfaces, list) { 100 list_for_each_entry(sdata, &local->interfaces, list) {
96 if (!ieee80211_sdata_running(sdata)) 101 if (!ieee80211_sdata_running(sdata))
97 continue; 102 continue;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 /* re-enable beaconing */ 166 /* re-enable beaconing */
162 if (enable_beaconing && 167 if (enable_beaconing &&
163 (sdata->vif.type == NL80211_IFTYPE_AP || 168 (sdata->vif.type == NL80211_IFTYPE_AP ||
164 sdata->vif.type == NL80211_IFTYPE_ADHOC || 169 sdata->vif.type == NL80211_IFTYPE_ADHOC ||
165 sdata->vif.type == NL80211_IFTYPE_MESH_POINT)) 170 sdata->vif.type == NL80211_IFTYPE_MESH_POINT))
166 ieee80211_bss_info_change_notify( 171 ieee80211_bss_info_change_notify(
167 sdata, BSS_CHANGED_BEACON_ENABLED); 172 sdata, BSS_CHANGED_BEACON_ENABLED);
168 } 173 }
169 mutex_unlock(&local->iflist_mtx); 174 mutex_unlock(&local->iflist_mtx);
170 } 175 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698