diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-02-05 11:48:40 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-11 12:45:00 -0500 |
commit | ef429dadf33feeb150098dbe84ccaa877e3261f6 (patch) | |
tree | 221694dde4f30fa8f71182a427d34dd709b2821a /include/net/mac80211.h | |
parent | 8cef2c9df88fdd13f518e6607de9d664b31f26cc (diff) |
mac80211: introduce beacon-only timing data
In order to be able to predict the next DTIM TBTT
in the driver, add the ability to use timing data
from beacons only with the new hardware flag
IEEE80211_HW_TIMING_BEACON_ONLY and the BSS info
value sync_dtim_count which is only valid if the
timing data came from a beacon. The data can only
come from a beacon, and if no beacon was received
before association it is updated later together
with the DTIM count notification.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 46e08ba92b97..b9e02460d3d7 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -277,9 +277,16 @@ enum ieee80211_rssi_event { | |||
277 | * valid in station mode only if after the driver was notified | 277 | * valid in station mode only if after the driver was notified |
278 | * with the %BSS_CHANGED_DTIM_PERIOD flag, will be non-zero then. | 278 | * with the %BSS_CHANGED_DTIM_PERIOD flag, will be non-zero then. |
279 | * @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 |
280 | * as it may have been received during scanning long ago) | 280 | * as it may have been received during scanning long ago). If the |
281 | * HW flag %IEEE80211_HW_TIMING_BEACON_ONLY is set, then this can | ||
282 | * only come from a beacon, but might not become valid until after | ||
283 | * association when a beacon is received (which is notified with the | ||
284 | * %BSS_CHANGED_DTIM flag.) | ||
281 | * @sync_device_ts: the device timestamp corresponding to the sync_tsf, | 285 | * @sync_device_ts: the device timestamp corresponding to the sync_tsf, |
282 | * the driver/device can use this to calculate synchronisation | 286 | * the driver/device can use this to calculate synchronisation |
287 | * (see @sync_tsf) | ||
288 | * @sync_dtim_count: Only valid when %IEEE80211_HW_TIMING_BEACON_ONLY | ||
289 | * is requested, see @sync_tsf/@sync_device_ts. | ||
283 | * @beacon_int: beacon interval | 290 | * @beacon_int: beacon interval |
284 | * @assoc_capability: capabilities taken from assoc resp | 291 | * @assoc_capability: capabilities taken from assoc resp |
285 | * @basic_rates: bitmap of basic rates, each bit stands for an | 292 | * @basic_rates: bitmap of basic rates, each bit stands for an |
@@ -331,6 +338,7 @@ struct ieee80211_bss_conf { | |||
331 | u16 assoc_capability; | 338 | u16 assoc_capability; |
332 | u64 sync_tsf; | 339 | u64 sync_tsf; |
333 | u32 sync_device_ts; | 340 | u32 sync_device_ts; |
341 | u8 sync_dtim_count; | ||
334 | u32 basic_rates; | 342 | u32 basic_rates; |
335 | int mcast_rate[IEEE80211_NUM_BANDS]; | 343 | int mcast_rate[IEEE80211_NUM_BANDS]; |
336 | u16 ht_operation_mode; | 344 | u16 ht_operation_mode; |
@@ -1371,6 +1379,9 @@ struct ieee80211_tx_control { | |||
1371 | * @IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF: Use the P2P Device address for any | 1379 | * @IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF: Use the P2P Device address for any |
1372 | * P2P Interface. This will be honoured even if more than one interface | 1380 | * P2P Interface. This will be honoured even if more than one interface |
1373 | * is supported. | 1381 | * is supported. |
1382 | * | ||
1383 | * @IEEE80211_HW_TIMING_BEACON_ONLY: Use sync timing from beacon frames | ||
1384 | * only, to allow getting TBTT of a DTIM beacon. | ||
1374 | */ | 1385 | */ |
1375 | enum ieee80211_hw_flags { | 1386 | enum ieee80211_hw_flags { |
1376 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 1387 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
@@ -1399,6 +1410,7 @@ enum ieee80211_hw_flags { | |||
1399 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23, | 1410 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23, |
1400 | IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24, | 1411 | IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24, |
1401 | IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25, | 1412 | IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25, |
1413 | IEEE80211_HW_TIMING_BEACON_ONLY = 1<<26, | ||
1402 | }; | 1414 | }; |
1403 | 1415 | ||
1404 | /** | 1416 | /** |