aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-12-12 03:12:24 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-31 08:05:38 -0500
commitc65dd1477b6fe5971489dd8b6e28a07ec277fdd6 (patch)
tree01f740a3fa02bc957b22575fcd1bb486b0af6e43 /include/net
parentfdcb786930777231c81f487ab2526d33971a3438 (diff)
mac80211: inform the driver about update of dtim_period
Currently, when the driver requires the DTIM period, mac80211 will wait to hear a beacon before association. This behavior is suboptimal since some drivers may be able to deal with knowing the DTIM period after the association, if they get it at all. To address this, notify the drivers with bss_info_changed with the new BSS_CHANGED_DTIM_PERIOD flag when the DTIM becomes known. This might be when changing to associated, or later when the entire association was done with only probe response information. Rename the hardware flag for the current behaviour to IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC to more accurately reflect its behaviour. IEEE80211_HW_NEED_DTIM_PERIOD is no longer accurate as all drivers get the DTIM period now, just not before association. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mac80211.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 7a27e00c513a..398b6ca4a9c5 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -208,6 +208,8 @@ struct ieee80211_chanctx_conf {
208 * @BSS_CHANGED_TXPOWER: TX power setting changed for this interface 208 * @BSS_CHANGED_TXPOWER: TX power setting changed for this interface
209 * @BSS_CHANGED_P2P_PS: P2P powersave settings (CTWindow, opportunistic PS) 209 * @BSS_CHANGED_P2P_PS: P2P powersave settings (CTWindow, opportunistic PS)
210 * changed (currently only in P2P client mode, GO mode will be later) 210 * changed (currently only in P2P client mode, GO mode will be later)
211 * @BSS_CHANGED_DTIM_PERIOD: the DTIM period value was changed (set when
212 * it becomes valid, managed mode only)
211 */ 213 */
212enum ieee80211_bss_change { 214enum ieee80211_bss_change {
213 BSS_CHANGED_ASSOC = 1<<0, 215 BSS_CHANGED_ASSOC = 1<<0,
@@ -230,6 +232,7 @@ enum ieee80211_bss_change {
230 BSS_CHANGED_PS = 1<<17, 232 BSS_CHANGED_PS = 1<<17,
231 BSS_CHANGED_TXPOWER = 1<<18, 233 BSS_CHANGED_TXPOWER = 1<<18,
232 BSS_CHANGED_P2P_PS = 1<<19, 234 BSS_CHANGED_P2P_PS = 1<<19,
235 BSS_CHANGED_DTIM_PERIOD = 1<<20,
233 236
234 /* when adding here, make sure to change ieee80211_reconfig */ 237 /* when adding here, make sure to change ieee80211_reconfig */
235}; 238};
@@ -271,9 +274,8 @@ enum ieee80211_rssi_event {
271 * if the hardware cannot handle this it must set the 274 * if the hardware cannot handle this it must set the
272 * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag 275 * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag
273 * @dtim_period: num of beacons before the next DTIM, for beaconing, 276 * @dtim_period: num of beacons before the next DTIM, for beaconing,
274 * valid in station mode only while @assoc is true and if also 277 * valid in station mode only if after the driver was notified
275 * requested by %IEEE80211_HW_NEED_DTIM_PERIOD (cf. also hw conf 278 * with the %BSS_CHANGED_DTIM_PERIOD flag, will be non-zero then.
276 * @ps_dtim_period)
277 * @sync_tsf: last beacon's/probe response's TSF timestamp (could be old 279 * @sync_tsf: last beacon's/probe response's TSF timestamp (could be old
278 * as it may have been received during scanning long ago) 280 * as it may have been received during scanning long ago)
279 * @sync_device_ts: the device timestamp corresponding to the sync_tsf, 281 * @sync_device_ts: the device timestamp corresponding to the sync_tsf,
@@ -1328,9 +1330,9 @@ struct ieee80211_tx_control {
1328 * When this flag is set, signaling beacon-loss will cause an immediate 1330 * When this flag is set, signaling beacon-loss will cause an immediate
1329 * change to disassociated state. 1331 * change to disassociated state.
1330 * 1332 *
1331 * @IEEE80211_HW_NEED_DTIM_PERIOD: 1333 * @IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC:
1332 * This device needs to know the DTIM period for the BSS before 1334 * This device needs to get data from beacon before association (i.e.
1333 * associating. 1335 * dtim_period).
1334 * 1336 *
1335 * @IEEE80211_HW_SUPPORTS_PER_STA_GTK: The device's crypto engine supports 1337 * @IEEE80211_HW_SUPPORTS_PER_STA_GTK: The device's crypto engine supports
1336 * per-station GTKs as used by IBSS RSN or during fast transition. If 1338 * per-station GTKs as used by IBSS RSN or during fast transition. If
@@ -1375,7 +1377,7 @@ enum ieee80211_hw_flags {
1375 IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4, 1377 IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4,
1376 IEEE80211_HW_SIGNAL_UNSPEC = 1<<5, 1378 IEEE80211_HW_SIGNAL_UNSPEC = 1<<5,
1377 IEEE80211_HW_SIGNAL_DBM = 1<<6, 1379 IEEE80211_HW_SIGNAL_DBM = 1<<6,
1378 IEEE80211_HW_NEED_DTIM_PERIOD = 1<<7, 1380 IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC = 1<<7,
1379 IEEE80211_HW_SPECTRUM_MGMT = 1<<8, 1381 IEEE80211_HW_SPECTRUM_MGMT = 1<<8,
1380 IEEE80211_HW_AMPDU_AGGREGATION = 1<<9, 1382 IEEE80211_HW_AMPDU_AGGREGATION = 1<<9,
1381 IEEE80211_HW_SUPPORTS_PS = 1<<10, 1383 IEEE80211_HW_SUPPORTS_PS = 1<<10,