Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315542
b: refs/heads/master
c: 8c358bc
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg committed Jul 12, 2012
1 parent a948ec1 commit 7564614
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 30f422925c39edf61cbcf6d35140d726402d4b04
refs/heads/master: 8c358bcd097fa1f63e57fb82525ba52f4a537bfa
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlegacy/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -5360,7 +5360,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->last_tsf;
il->timestamp = bss_conf->sync_tsf;

if (!il_is_rfkill(il))
il->ops->post_associate(il);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/dvm/rxon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,

if (changes & BSS_CHANGED_ASSOC) {
if (bss_conf->assoc) {
priv->timestamp = bss_conf->last_tsf;
priv->timestamp = bss_conf->sync_tsf;
ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
} else {
/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2x00config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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->last_tsf;
rt2x00dev->last_beacon = bss_conf->sync_tsf;

/* Update global beacon interval time, this is needed for PS support */
rt2x00dev->beacon_int = bss_conf->beacon_int;
Expand Down
10 changes: 8 additions & 2 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,10 @@ 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)
* @last_tsf: last beacon's/probe response's TSF timestamp (could be old
* @sync_tsf: last beacon's/probe response's TSF timestamp (could be old
* as it may have been received during scanning long ago)
* @sync_device_ts: the device timestamp corresponding to the sync_tsf,
* the driver/device can use this to calculate synchronisation
* @beacon_int: beacon interval
* @assoc_capability: capabilities taken from assoc resp
* @basic_rates: bitmap of basic rates, each bit stands for an
Expand Down Expand Up @@ -281,7 +283,8 @@ struct ieee80211_bss_conf {
u8 dtim_period;
u16 beacon_int;
u16 assoc_capability;
u64 last_tsf;
u64 sync_tsf;
u32 sync_device_ts;
u32 basic_rates;
int mcast_rate[IEEE80211_NUM_BANDS];
u16 ht_operation_mode;
Expand Down Expand Up @@ -696,6 +699,8 @@ enum mac80211_rx_flags {
*
* @mactime: value in microseconds of the 64-bit Time Synchronization Function
* (TSF) timer when the first data symbol (MPDU) arrived at the hardware.
* @device_timestamp: arbitrary timestamp for the device, mac80211 doesn't use
* it but can store it and pass it back to the driver for synchronisation
* @band: the active band when this frame was received
* @freq: frequency the radio was tuned to when receiving this frame, in MHz
* @signal: signal strength when receiving this frame, either in dBm, in dB or
Expand All @@ -709,6 +714,7 @@ enum mac80211_rx_flags {
*/
struct ieee80211_rx_status {
u64 mactime;
u32 device_timestamp;
u16 flag;
u16 freq;
u8 rate_idx;
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ struct ieee80211_bss {
size_t ssid_len;
u8 ssid[IEEE80211_MAX_SSID_LEN];

u32 device_ts;

u8 dtim_period;

bool wmm_used;
Expand Down
15 changes: 8 additions & 7 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,11 +1269,6 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;

bss_info_changed |= BSS_CHANGED_ASSOC;
/* set timing information */
bss_conf->beacon_int = cbss->beacon_interval;
bss_conf->last_tsf = cbss->tsf;

bss_info_changed |= BSS_CHANGED_BEACON_INT;
bss_info_changed |= ieee80211_handle_bss_capability(sdata,
bss_conf->assoc_capability, bss->has_erp_value, bss->erp_value);

Expand Down Expand Up @@ -3135,9 +3130,15 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,

memcpy(ifmgd->bssid, cbss->bssid, ETH_ALEN);

/* tell driver about BSSID and basic rates */
/* set timing information */
sdata->vif.bss_conf.beacon_int = cbss->beacon_interval;
sdata->vif.bss_conf.sync_tsf = cbss->tsf;
sdata->vif.bss_conf.sync_device_ts = bss->device_ts;

/* tell driver about BSSID, basic rates and timing */
ieee80211_bss_info_change_notify(sdata,
BSS_CHANGED_BSSID | BSS_CHANGED_BASIC_RATES);
BSS_CHANGED_BSSID | BSS_CHANGED_BASIC_RATES |
BSS_CHANGED_BEACON_INT);

if (assoc)
sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/mac80211/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ ieee80211_bss_info_update(struct ieee80211_local *local,

cbss = cfg80211_inform_bss_frame(local->hw.wiphy, channel,
mgmt, len, signal, GFP_ATOMIC);

if (!cbss)
return NULL;

cbss->free_priv = ieee80211_rx_bss_free;
bss = (void *)cbss->priv;

bss->device_ts = rx_status->device_timestamp;

if (elems->parse_error) {
if (beacon)
bss->corrupt_data |= IEEE80211_BSS_CORRUPT_BEACON;
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/mac80211/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ TRACE_EVENT(drv_bss_info_changed,
__field(u8, dtimper)
__field(u16, bcnint)
__field(u16, assoc_cap)
__field(u64, timestamp)
__field(u64, sync_tsf)
__field(u32, sync_device_ts)
__field(u32, basic_rates)
__field(u32, changed)
__field(bool, enable_beacon)
Expand All @@ -325,7 +326,8 @@ 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->last_tsf;
__entry->sync_tsf = info->sync_tsf;
__entry->sync_device_ts = info->sync_device_ts;
__entry->basic_rates = info->basic_rates;
__entry->enable_beacon = info->enable_beacon;
__entry->ht_operation_mode = info->ht_operation_mode;
Expand Down

0 comments on commit 7564614

Please sign in to comment.