diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-03-02 23:45:10 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-05 14:39:40 -0500 |
commit | 707c1b4e68a2811ff2c9e75750a98a3310789a2d (patch) | |
tree | 3a1ae3887b26308baa33cc520935300669ae1024 /net/mac80211 | |
parent | 0ad65bd7e1b38dd2c86da5f07dbfa35fe1f03099 (diff) |
mac80211: Update IBSS beacon timestamp properly
In IBSS mode, the beacon timestamp has to be filled with the
BSS's timestamp when joining, and set to zero when creating
a new BSS.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ibss.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index a96ce9dfc6b5..f4becc12904e 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -64,7 +64,7 @@ static int __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
64 | const int freq, | 64 | const int freq, |
65 | const size_t supp_rates_len, | 65 | const size_t supp_rates_len, |
66 | const u8 *supp_rates, | 66 | const u8 *supp_rates, |
67 | const u16 capability) | 67 | const u16 capability, u64 tsf) |
68 | { | 68 | { |
69 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; | 69 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; |
70 | struct ieee80211_local *local = sdata->local; | 70 | struct ieee80211_local *local = sdata->local; |
@@ -127,6 +127,7 @@ static int __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
127 | memcpy(mgmt->bssid, ifibss->bssid, ETH_ALEN); | 127 | memcpy(mgmt->bssid, ifibss->bssid, ETH_ALEN); |
128 | mgmt->u.beacon.beacon_int = | 128 | mgmt->u.beacon.beacon_int = |
129 | cpu_to_le16(local->hw.conf.beacon_int); | 129 | cpu_to_le16(local->hw.conf.beacon_int); |
130 | mgmt->u.beacon.timestamp = cpu_to_le64(tsf); | ||
130 | mgmt->u.beacon.capab_info = cpu_to_le16(capability); | 131 | mgmt->u.beacon.capab_info = cpu_to_le16(capability); |
131 | 132 | ||
132 | pos = skb_put(skb, 2 + ifibss->ssid_len); | 133 | pos = skb_put(skb, 2 + ifibss->ssid_len); |
@@ -199,7 +200,8 @@ static int ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
199 | bss->cbss.beacon_interval, | 200 | bss->cbss.beacon_interval, |
200 | bss->cbss.channel->center_freq, | 201 | bss->cbss.channel->center_freq, |
201 | bss->supp_rates_len, bss->supp_rates, | 202 | bss->supp_rates_len, bss->supp_rates, |
202 | bss->cbss.capability); | 203 | bss->cbss.capability, |
204 | bss->cbss.tsf); | ||
203 | } | 205 | } |
204 | 206 | ||
205 | static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | 207 | static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, |
@@ -502,7 +504,7 @@ static int ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata) | |||
502 | bssid, local->hw.conf.beacon_int, | 504 | bssid, local->hw.conf.beacon_int, |
503 | local->hw.conf.channel->center_freq, | 505 | local->hw.conf.channel->center_freq, |
504 | sband->n_bitrates, supp_rates, | 506 | sband->n_bitrates, supp_rates, |
505 | capability); | 507 | capability, 0); |
506 | } | 508 | } |
507 | 509 | ||
508 | static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | 510 | static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) |