aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c37
1 files changed, 10 insertions, 27 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 860c488984d8..794917fccd9b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1448,11 +1448,10 @@ ieee80211_rx_h_mgmt(struct ieee80211_txrx_data *rx)
1448 return RX_QUEUED; 1448 return RX_QUEUED;
1449} 1449}
1450 1450
1451static inline ieee80211_rx_result __ieee80211_invoke_rx_handlers( 1451static void ieee80211_invoke_rx_handlers(struct ieee80211_local *local,
1452 struct ieee80211_local *local, 1452 ieee80211_rx_handler *handlers,
1453 ieee80211_rx_handler *handlers, 1453 struct ieee80211_txrx_data *rx,
1454 struct ieee80211_txrx_data *rx, 1454 struct sta_info *sta)
1455 struct sta_info *sta)
1456{ 1455{
1457 ieee80211_rx_handler *handler; 1456 ieee80211_rx_handler *handler;
1458 ieee80211_rx_result res = RX_DROP_MONITOR; 1457 ieee80211_rx_result res = RX_DROP_MONITOR;
@@ -1476,19 +1475,13 @@ static inline ieee80211_rx_result __ieee80211_invoke_rx_handlers(
1476 break; 1475 break;
1477 } 1476 }
1478 1477
1479 if (res == RX_DROP_UNUSABLE || res == RX_DROP_MONITOR) 1478 switch (res) {
1480 dev_kfree_skb(rx->skb); 1479 case RX_DROP_MONITOR:
1481 return res; 1480 case RX_DROP_UNUSABLE:
1482} 1481 case RX_CONTINUE:
1483
1484static inline void ieee80211_invoke_rx_handlers(struct ieee80211_local *local,
1485 ieee80211_rx_handler *handlers,
1486 struct ieee80211_txrx_data *rx,
1487 struct sta_info *sta)
1488{
1489 if (__ieee80211_invoke_rx_handlers(local, handlers, rx, sta) ==
1490 RX_CONTINUE)
1491 dev_kfree_skb(rx->skb); 1482 dev_kfree_skb(rx->skb);
1483 break;
1484 }
1492} 1485}
1493 1486
1494static void ieee80211_rx_michael_mic_report(struct net_device *dev, 1487static void ieee80211_rx_michael_mic_report(struct net_device *dev,
@@ -1718,16 +1711,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
1718 1711
1719 skb = rx.skb; 1712 skb = rx.skb;
1720 1713
1721 if (sta && !(sta->flags & (WLAN_STA_WDS | WLAN_STA_ASSOC_AP)) &&
1722 !atomic_read(&local->iff_promiscs) &&
1723 !is_multicast_ether_addr(hdr->addr1)) {
1724 rx.flags |= IEEE80211_TXRXD_RXRA_MATCH;
1725 ieee80211_invoke_rx_handlers(local, local->rx_handlers, &rx,
1726 rx.sta);
1727 sta_info_put(sta);
1728 return;
1729 }
1730
1731 list_for_each_entry_rcu(sdata, &local->interfaces, list) { 1714 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
1732 if (!netif_running(sdata->dev)) 1715 if (!netif_running(sdata->dev))
1733 continue; 1716 continue;