| OLD | NEW |
| 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 * |
| (...skipping 11 matching lines...) Expand all Loading... |
| 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 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
| 26 | 26 |
| 27 local->offchannel_ps_enabled = false; | 27 local->offchannel_ps_enabled = false; |
| 28 | 28 |
| 29 /* FIXME: what to do when local->pspolling is true? */ | 29 /* FIXME: what to do when local->pspolling is true? */ |
| 30 | 30 |
| 31 del_timer_sync(&local->dynamic_ps_timer); | 31 del_timer_sync(&local->dynamic_ps_timer); |
| 32 del_timer_sync(&ifmgd->bcn_mon_timer); |
| 32 del_timer_sync(&ifmgd->conn_mon_timer); | 33 del_timer_sync(&ifmgd->conn_mon_timer); |
| 33 | 34 |
| 34 cancel_work_sync(&local->dynamic_ps_enable_work); | 35 cancel_work_sync(&local->dynamic_ps_enable_work); |
| 35 | 36 |
| 36 if (local->hw.conf.flags & IEEE80211_CONF_PS) { | 37 if (local->hw.conf.flags & IEEE80211_CONF_PS) { |
| 37 local->offchannel_ps_enabled = true; | 38 local->offchannel_ps_enabled = true; |
| 38 local->hw.conf.flags &= ~IEEE80211_CONF_PS; | 39 local->hw.conf.flags &= ~IEEE80211_CONF_PS; |
| 39 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); | 40 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); |
| 40 } | 41 } |
| 41 | 42 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 * If IEEE80211_CONF_PS was not set and the dynamic_ps_timer | 83 * If IEEE80211_CONF_PS was not set and the dynamic_ps_timer |
| 83 * had been running before leaving the operating channel, | 84 * had been running before leaving the operating channel, |
| 84 * restart the timer now and send a nullfunc frame to inform | 85 * restart the timer now and send a nullfunc frame to inform |
| 85 * the AP that we are awake. | 86 * the AP that we are awake. |
| 86 */ | 87 */ |
| 87 ieee80211_send_nullfunc(local, sdata, 0); | 88 ieee80211_send_nullfunc(local, sdata, 0); |
| 88 mod_timer(&local->dynamic_ps_timer, jiffies + | 89 mod_timer(&local->dynamic_ps_timer, jiffies + |
| 89 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); | 90 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); |
| 90 } | 91 } |
| 91 | 92 |
| 93 ieee80211_sta_reset_beacon_monitor(sdata); |
| 92 ieee80211_sta_reset_conn_monitor(sdata); | 94 ieee80211_sta_reset_conn_monitor(sdata); |
| 93 } | 95 } |
| 94 | 96 |
| 95 void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local) | 97 void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local) |
| 96 { | 98 { |
| 97 struct ieee80211_sub_if_data *sdata; | 99 struct ieee80211_sub_if_data *sdata; |
| 98 | 100 |
| 99 mutex_lock(&local->iflist_mtx); | 101 mutex_lock(&local->iflist_mtx); |
| 100 list_for_each_entry(sdata, &local->interfaces, list) { | 102 list_for_each_entry(sdata, &local->interfaces, list) { |
| 101 if (!ieee80211_sdata_running(sdata)) | 103 if (!ieee80211_sdata_running(sdata)) |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 /* re-enable beaconing */ | 168 /* re-enable beaconing */ |
| 167 if (enable_beaconing && | 169 if (enable_beaconing && |
| 168 (sdata->vif.type == NL80211_IFTYPE_AP || | 170 (sdata->vif.type == NL80211_IFTYPE_AP || |
| 169 sdata->vif.type == NL80211_IFTYPE_ADHOC || | 171 sdata->vif.type == NL80211_IFTYPE_ADHOC || |
| 170 sdata->vif.type == NL80211_IFTYPE_MESH_POINT)) | 172 sdata->vif.type == NL80211_IFTYPE_MESH_POINT)) |
| 171 ieee80211_bss_info_change_notify( | 173 ieee80211_bss_info_change_notify( |
| 172 sdata, BSS_CHANGED_BEACON_ENABLED); | 174 sdata, BSS_CHANGED_BEACON_ENABLED); |
| 173 } | 175 } |
| 174 mutex_unlock(&local->iflist_mtx); | 176 mutex_unlock(&local->iflist_mtx); |
| 175 } | 177 } |
| OLD | NEW |