mac80211: rename bss_conf timestamp to last_tsf
authorJohannes Berg <johannes.berg@intel.com>
Tue, 13 Mar 2012 13:29:30 +0000 (14:29 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 Mar 2012 18:54:20 +0000 (14:54 -0400)
This value is not really very useful by itself,
yet some drivers (including iwlwifi until I can
figure out what it should do) use it. At least
rename it to "last_tsf" to indicate the meaning
and add a note that it may be really old.

I suspect the value may become useful combined
with the rx_status->mactime, but we don't (yet)
store that value and pass it to the driver.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/common.c
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
drivers/net/wireless/rt2x00/rt2x00config.c
include/net/mac80211.h
net/mac80211/driver-trace.h
net/mac80211/mlme.c

index b42052b47d8e290ebede79489c70aa094cd3f3bf..e5ac04739bcc5f998487c7e29845ce0a757727fa 100644 (file)
@@ -5355,7 +5355,7 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
        if (changes & BSS_CHANGED_ASSOC) {
                D_MAC80211("ASSOC %d\n", bss_conf->assoc);
                if (bss_conf->assoc) {
-                       il->timestamp = bss_conf->timestamp;
+                       il->timestamp = bss_conf->last_tsf;
 
                        if (!il_is_rfkill(il))
                                il->ops->post_associate(il);
index 36909077f994917c72bbc80cad3ef5a5e613aaf3..2e1a31797a9e59c16af11c7630e2b576f236b11e 100644 (file)
@@ -822,7 +822,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
 
        if (changes & BSS_CHANGED_ASSOC) {
                if (bss_conf->assoc) {
-                       priv->timestamp = bss_conf->timestamp;
+                       priv->timestamp = bss_conf->last_tsf;
                        ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
                } else {
                        /*
index d7c0f86c9e435bfab86fc620c5ac6d49e5433784..293676bfa5711352fa3c989183a8360ebfae97af 100644 (file)
@@ -102,7 +102,7 @@ void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev,
 
        /* Update the AID, this is needed for dynamic PS support */
        rt2x00dev->aid = bss_conf->assoc ? bss_conf->aid : 0;
-       rt2x00dev->last_beacon = bss_conf->timestamp;
+       rt2x00dev->last_beacon = bss_conf->last_tsf;
 
        /* Update global beacon interval time, this is needed for PS support */
        rt2x00dev->beacon_int = bss_conf->beacon_int;
index 44e4dfcb5722ec317dbc89b2a8775a58115be0bf..9a012be615ffba4f145aa1846906eed9ce8e5b82 100644 (file)
@@ -229,7 +229,8 @@ enum ieee80211_rssi_event {
  *     valid in station mode only while @assoc is true and if also
  *     requested by %IEEE80211_HW_NEED_DTIM_PERIOD (cf. also hw conf
  *     @ps_dtim_period)
- * @timestamp: beacon timestamp
+ * @last_tsf: last beacon's/probe response's TSF timestamp (could be old
+ *     as it may have been received during scanning long ago)
  * @beacon_int: beacon interval
  * @assoc_capability: capabilities taken from assoc resp
  * @basic_rates: bitmap of basic rates, each bit stands for an
@@ -276,7 +277,7 @@ struct ieee80211_bss_conf {
        u8 dtim_period;
        u16 beacon_int;
        u16 assoc_capability;
-       u64 timestamp;
+       u64 last_tsf;
        u32 basic_rates;
        int mcast_rate[IEEE80211_NUM_BANDS];
        u16 ht_operation_mode;
index 7034209ad3f405c27eb8472213039c7b5a4908fb..21d6f5290a1c67883d004ab5c2215bd9ebdafc54 100644 (file)
@@ -296,7 +296,7 @@ TRACE_EVENT(drv_bss_info_changed,
                __entry->dtimper = info->dtim_period;
                __entry->bcnint = info->beacon_int;
                __entry->assoc_cap = info->assoc_capability;
-               __entry->timestamp = info->timestamp;
+               __entry->timestamp = info->last_tsf;
                __entry->basic_rates = info->basic_rates;
                __entry->enable_beacon = info->enable_beacon;
                __entry->ht_operation_mode = info->ht_operation_mode;
index 39c13939008b7837def7da3c7f3ed3e4350b6a35..90d1db36cdef9a1bcafd3dd72678d6f6f9215a36 100644 (file)
@@ -1318,7 +1318,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
        bss_info_changed |= BSS_CHANGED_ASSOC;
        /* set timing information */
        bss_conf->beacon_int = cbss->beacon_interval;
-       bss_conf->timestamp = cbss->tsf;
+       bss_conf->last_tsf = cbss->tsf;
 
        bss_info_changed |= BSS_CHANGED_BEACON_INT;
        bss_info_changed |= ieee80211_handle_bss_capability(sdata,