diff options
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index ec5acc6dc021..fe6b99059531 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1641,12 +1641,7 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata, | |||
1641 | 1641 | ||
1642 | if (compare_ether_addr(mgmt->sa, sdata->u.mgd.bssid) != 0 || | 1642 | if (compare_ether_addr(mgmt->sa, sdata->u.mgd.bssid) != 0 || |
1643 | compare_ether_addr(mgmt->bssid, sdata->u.mgd.bssid) != 0) { | 1643 | compare_ether_addr(mgmt->bssid, sdata->u.mgd.bssid) != 0) { |
1644 | /* Not from the current AP. */ | 1644 | /* Not from the current AP or not associated yet. */ |
1645 | return; | ||
1646 | } | ||
1647 | |||
1648 | if (sdata->u.mgd.state == IEEE80211_STA_MLME_ASSOCIATE) { | ||
1649 | /* Association in progress; ignore SA Query */ | ||
1650 | return; | 1645 | return; |
1651 | } | 1646 | } |
1652 | 1647 | ||
@@ -1683,7 +1678,6 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
1683 | struct ieee80211_local *local = rx->local; | 1678 | struct ieee80211_local *local = rx->local; |
1684 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); | 1679 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); |
1685 | struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data; | 1680 | struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data; |
1686 | struct ieee80211_bss *bss; | ||
1687 | int len = rx->skb->len; | 1681 | int len = rx->skb->len; |
1688 | 1682 | ||
1689 | if (!ieee80211_is_action(mgmt->frame_control)) | 1683 | if (!ieee80211_is_action(mgmt->frame_control)) |
@@ -1761,17 +1755,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
1761 | if (memcmp(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN)) | 1755 | if (memcmp(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN)) |
1762 | return RX_DROP_MONITOR; | 1756 | return RX_DROP_MONITOR; |
1763 | 1757 | ||
1764 | bss = ieee80211_rx_bss_get(local, sdata->u.mgd.bssid, | 1758 | return ieee80211_sta_rx_mgmt(sdata, rx->skb); |
1765 | local->hw.conf.channel->center_freq, | ||
1766 | sdata->u.mgd.ssid, | ||
1767 | sdata->u.mgd.ssid_len); | ||
1768 | if (!bss) | ||
1769 | return RX_DROP_MONITOR; | ||
1770 | |||
1771 | ieee80211_sta_process_chanswitch(sdata, | ||
1772 | &mgmt->u.action.u.chan_switch.sw_elem, bss); | ||
1773 | ieee80211_rx_bss_put(local, bss); | ||
1774 | break; | ||
1775 | } | 1759 | } |
1776 | break; | 1760 | break; |
1777 | case WLAN_CATEGORY_SA_QUERY: | 1761 | case WLAN_CATEGORY_SA_QUERY: |
@@ -2026,13 +2010,8 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata, | |||
2026 | case NL80211_IFTYPE_STATION: | 2010 | case NL80211_IFTYPE_STATION: |
2027 | if (!bssid) | 2011 | if (!bssid) |
2028 | return 0; | 2012 | return 0; |
2029 | if (!ieee80211_bssid_match(bssid, sdata->u.mgd.bssid)) { | 2013 | if (!multicast && |
2030 | if (!(rx->flags & IEEE80211_RX_IN_SCAN)) | 2014 | compare_ether_addr(sdata->dev->dev_addr, hdr->addr1) != 0) { |
2031 | return 0; | ||
2032 | rx->flags &= ~IEEE80211_RX_RA_MATCH; | ||
2033 | } else if (!multicast && | ||
2034 | compare_ether_addr(sdata->dev->dev_addr, | ||
2035 | hdr->addr1) != 0) { | ||
2036 | if (!(sdata->dev->flags & IFF_PROMISC)) | 2015 | if (!(sdata->dev->flags & IFF_PROMISC)) |
2037 | return 0; | 2016 | return 0; |
2038 | rx->flags &= ~IEEE80211_RX_RA_MATCH; | 2017 | rx->flags &= ~IEEE80211_RX_RA_MATCH; |