diff options
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 53c7077ffd4f..3e81af1fce58 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #define IEEE80211_IBSS_JOIN_TIMEOUT (7 * HZ) | 31 | #define IEEE80211_IBSS_JOIN_TIMEOUT (7 * HZ) |
32 | 32 | ||
33 | #define IEEE80211_IBSS_MERGE_INTERVAL (30 * HZ) | 33 | #define IEEE80211_IBSS_MERGE_INTERVAL (30 * HZ) |
34 | #define IEEE80211_IBSS_MERGE_DELAY 0x400000 | ||
35 | #define IEEE80211_IBSS_INACTIVITY_LIMIT (60 * HZ) | 34 | #define IEEE80211_IBSS_INACTIVITY_LIMIT (60 * HZ) |
36 | 35 | ||
37 | #define IEEE80211_IBSS_MAX_STA_ENTRIES 128 | 36 | #define IEEE80211_IBSS_MAX_STA_ENTRIES 128 |
@@ -270,7 +269,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
270 | enum ieee80211_band band = rx_status->band; | 269 | enum ieee80211_band band = rx_status->band; |
271 | 270 | ||
272 | if (elems->ds_params && elems->ds_params_len == 1) | 271 | if (elems->ds_params && elems->ds_params_len == 1) |
273 | freq = ieee80211_channel_to_frequency(elems->ds_params[0]); | 272 | freq = ieee80211_channel_to_frequency(elems->ds_params[0], |
273 | band); | ||
274 | else | 274 | else |
275 | freq = rx_status->freq; | 275 | freq = rx_status->freq; |
276 | 276 | ||
@@ -354,7 +354,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
354 | if (memcmp(cbss->bssid, sdata->u.ibss.bssid, ETH_ALEN) == 0) | 354 | if (memcmp(cbss->bssid, sdata->u.ibss.bssid, ETH_ALEN) == 0) |
355 | goto put_bss; | 355 | goto put_bss; |
356 | 356 | ||
357 | if (rx_status->flag & RX_FLAG_TSFT) { | 357 | if (rx_status->flag & RX_FLAG_MACTIME_MPDU) { |
358 | /* | 358 | /* |
359 | * For correct IBSS merging we need mactime; since mactime is | 359 | * For correct IBSS merging we need mactime; since mactime is |
360 | * defined as the time the first data symbol of the frame hits | 360 | * defined as the time the first data symbol of the frame hits |
@@ -396,10 +396,6 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
396 | jiffies); | 396 | jiffies); |
397 | #endif | 397 | #endif |
398 | 398 | ||
399 | /* give slow hardware some time to do the TSF sync */ | ||
400 | if (rx_timestamp < IEEE80211_IBSS_MERGE_DELAY) | ||
401 | goto put_bss; | ||
402 | |||
403 | if (beacon_timestamp > rx_timestamp) { | 399 | if (beacon_timestamp > rx_timestamp) { |
404 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 400 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
405 | printk(KERN_DEBUG "%s: beacon TSF higher than " | 401 | printk(KERN_DEBUG "%s: beacon TSF higher than " |
@@ -663,12 +659,13 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
663 | } | 659 | } |
664 | 660 | ||
665 | static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | 661 | static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, |
666 | struct ieee80211_mgmt *mgmt, | 662 | struct sk_buff *req) |
667 | size_t len) | ||
668 | { | 663 | { |
664 | struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(req); | ||
665 | struct ieee80211_mgmt *mgmt = (void *)req->data; | ||
669 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; | 666 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; |
670 | struct ieee80211_local *local = sdata->local; | 667 | struct ieee80211_local *local = sdata->local; |
671 | int tx_last_beacon; | 668 | int tx_last_beacon, len = req->len; |
672 | struct sk_buff *skb; | 669 | struct sk_buff *skb; |
673 | struct ieee80211_mgmt *resp; | 670 | struct ieee80211_mgmt *resp; |
674 | u8 *pos, *end; | 671 | u8 *pos, *end; |
@@ -688,7 +685,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
688 | mgmt->bssid, tx_last_beacon); | 685 | mgmt->bssid, tx_last_beacon); |
689 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 686 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
690 | 687 | ||
691 | if (!tx_last_beacon) | 688 | if (!tx_last_beacon && !(rx_status->rx_flags & IEEE80211_RX_RA_MATCH)) |
692 | return; | 689 | return; |
693 | 690 | ||
694 | if (memcmp(mgmt->bssid, ifibss->bssid, ETH_ALEN) != 0 && | 691 | if (memcmp(mgmt->bssid, ifibss->bssid, ETH_ALEN) != 0 && |
@@ -785,7 +782,7 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
785 | 782 | ||
786 | switch (fc & IEEE80211_FCTL_STYPE) { | 783 | switch (fc & IEEE80211_FCTL_STYPE) { |
787 | case IEEE80211_STYPE_PROBE_REQ: | 784 | case IEEE80211_STYPE_PROBE_REQ: |
788 | ieee80211_rx_mgmt_probe_req(sdata, mgmt, skb->len); | 785 | ieee80211_rx_mgmt_probe_req(sdata, skb); |
789 | break; | 786 | break; |
790 | case IEEE80211_STYPE_PROBE_RESP: | 787 | case IEEE80211_STYPE_PROBE_RESP: |
791 | ieee80211_rx_mgmt_probe_resp(sdata, mgmt, skb->len, | 788 | ieee80211_rx_mgmt_probe_resp(sdata, mgmt, skb->len, |