summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-05 16:54:31 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-02-11 18:44:59 +0100
commit8cef2c9df88fdd13f518e6607de9d664b31f26cc (patch)
treef8a4d29db6012ad3468a5d9435562fc1f383209a /net/mac80211/mlme.c
parent83c7aa1a1475ae1c42640ab6e4559016142efc67 (diff)
cfg80211: move TSF into IEs
While technically the TSF isn't an IE, it can be necessary to distinguish between the TSF from a beacon and a probe response, in particular in order to know the next DTIM TBTT, as not all APs are spec compliant wrt. TSF==0 being a DTIM TBTT and thus the DTIM count needs to be taken into account as well. To allow this, move the TSF into the IE struct so it can be known whence it came. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 40ce00c6d4ca..51eca5a0cdaa 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3667,6 +3667,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
bool have_higher_than_11mbit;
int min_rate = INT_MAX, min_rate_index = -1;
struct ieee80211_supported_band *sband;
+ const struct cfg80211_bss_ies *ies;
sband = local->hw.wiphy->bands[cbss->channel->band];
@@ -3710,7 +3711,10 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
/* set timing information */
sdata->vif.bss_conf.beacon_int = cbss->beacon_interval;
- sdata->vif.bss_conf.sync_tsf = cbss->tsf;
+ rcu_read_lock();
+ ies = rcu_dereference(cbss->ies);
+ sdata->vif.bss_conf.sync_tsf = ies->tsf;
+ rcu_read_unlock();
sdata->vif.bss_conf.sync_device_ts = bss->device_ts;
/* tell driver about BSSID, basic rates and timing */