diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-01-31 13:48:24 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:03 -0500 |
commit | 2c9745e5684ad75d02020bcaa31ab6d4b498e1e1 (patch) | |
tree | 9bbb636cd650c71e26fb52cd3b4d8f1a0930caf6 /net/mac80211/rx.c | |
parent | 8cc9a73914b07b5908d8a59320f4557fc9639f2e (diff) |
mac80211: clean up some things in the RX path
Uninline ieee80211_invoke_rx_handlers to save .text space,
make the code more readable in some places and remove the
"optimisation" that is hit only very few times and unclear
to start with.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 37 |
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 | ||
1451 | static inline ieee80211_rx_result __ieee80211_invoke_rx_handlers( | 1451 | static 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 | |||
1484 | static 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 | ||
1494 | static void ieee80211_rx_michael_mic_report(struct net_device *dev, | 1487 | static 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; |