aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-05 10:54:31 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-11 12:44:59 -0500
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,
3667 bool have_higher_than_11mbit; 3667 bool have_higher_than_11mbit;
3668 int min_rate = INT_MAX, min_rate_index = -1; 3668 int min_rate = INT_MAX, min_rate_index = -1;
3669 struct ieee80211_supported_band *sband; 3669 struct ieee80211_supported_band *sband;
3670 const struct cfg80211_bss_ies *ies;
3670 3671
3671 sband = local->hw.wiphy->bands[cbss->channel->band]; 3672 sband = local->hw.wiphy->bands[cbss->channel->band];
3672 3673
@@ -3710,7 +3711,10 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
3710 3711
3711 /* set timing information */ 3712 /* set timing information */
3712 sdata->vif.bss_conf.beacon_int = cbss->beacon_interval; 3713 sdata->vif.bss_conf.beacon_int = cbss->beacon_interval;
3713 sdata->vif.bss_conf.sync_tsf = cbss->tsf; 3714 rcu_read_lock();
3715 ies = rcu_dereference(cbss->ies);
3716 sdata->vif.bss_conf.sync_tsf = ies->tsf;
3717 rcu_read_unlock();
3714 sdata->vif.bss_conf.sync_device_ts = bss->device_ts; 3718 sdata->vif.bss_conf.sync_device_ts = bss->device_ts;
3715 3719
3716 /* tell driver about BSSID, basic rates and timing */ 3720 /* tell driver about BSSID, basic rates and timing */