diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-02-14 06:20:22 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-14 15:52:11 -0500 |
commit | c269a20393500e84e8cbae23ca6d65e1107433c4 (patch) | |
tree | 332a3cec9329d0c74a7f01f0111208ec75341227 /net/mac80211/ibss.c | |
parent | 05e051d8ae3472302ec7c510ab6d4d85551bd1ea (diff) |
mac80211: reply to directed probes in IBSS
WFA certification and the WMM spec require that we
always reply to unicast probe requests, so do that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 775fb63471c4..a42aa61269ea 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -664,12 +664,13 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
664 | } | 664 | } |
665 | 665 | ||
666 | static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | 666 | static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, |
667 | struct ieee80211_mgmt *mgmt, | 667 | struct sk_buff *req) |
668 | size_t len) | ||
669 | { | 668 | { |
669 | struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(req); | ||
670 | struct ieee80211_mgmt *mgmt = (void *)req->data; | ||
670 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; | 671 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; |
671 | struct ieee80211_local *local = sdata->local; | 672 | struct ieee80211_local *local = sdata->local; |
672 | int tx_last_beacon; | 673 | int tx_last_beacon, len = req->len; |
673 | struct sk_buff *skb; | 674 | struct sk_buff *skb; |
674 | struct ieee80211_mgmt *resp; | 675 | struct ieee80211_mgmt *resp; |
675 | u8 *pos, *end; | 676 | u8 *pos, *end; |
@@ -689,7 +690,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
689 | mgmt->bssid, tx_last_beacon); | 690 | mgmt->bssid, tx_last_beacon); |
690 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 691 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
691 | 692 | ||
692 | if (!tx_last_beacon) | 693 | if (!tx_last_beacon && !(rx_status->rx_flags & IEEE80211_RX_RA_MATCH)) |
693 | return; | 694 | return; |
694 | 695 | ||
695 | if (memcmp(mgmt->bssid, ifibss->bssid, ETH_ALEN) != 0 && | 696 | if (memcmp(mgmt->bssid, ifibss->bssid, ETH_ALEN) != 0 && |
@@ -786,7 +787,7 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
786 | 787 | ||
787 | switch (fc & IEEE80211_FCTL_STYPE) { | 788 | switch (fc & IEEE80211_FCTL_STYPE) { |
788 | case IEEE80211_STYPE_PROBE_REQ: | 789 | case IEEE80211_STYPE_PROBE_REQ: |
789 | ieee80211_rx_mgmt_probe_req(sdata, mgmt, skb->len); | 790 | ieee80211_rx_mgmt_probe_req(sdata, skb); |
790 | break; | 791 | break; |
791 | case IEEE80211_STYPE_PROBE_RESP: | 792 | case IEEE80211_STYPE_PROBE_RESP: |
792 | ieee80211_rx_mgmt_probe_resp(sdata, mgmt, skb->len, | 793 | ieee80211_rx_mgmt_probe_resp(sdata, mgmt, skb->len, |