summaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-01-31 19:48:24 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:03 -0500
commit2c9745e5684ad75d02020bcaa31ab6d4b498e1e1 (patch)
tree9bbb636cd650c71e26fb52cd3b4d8f1a0930caf6 /net/mac80211/rx.c
parent8cc9a73914b07b5908d8a59320f4557fc9639f2e (diff)
downloadblackbird-op-linux-2c9745e5684ad75d02020bcaa31ab6d4b498e1e1.tar.gz
blackbird-op-linux-2c9745e5684ad75d02020bcaa31ab6d4b498e1e1.zip
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.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)
return RX_QUEUED;
}
-static inline ieee80211_rx_result __ieee80211_invoke_rx_handlers(
- struct ieee80211_local *local,
- ieee80211_rx_handler *handlers,
- struct ieee80211_txrx_data *rx,
- struct sta_info *sta)
+static void ieee80211_invoke_rx_handlers(struct ieee80211_local *local,
+ ieee80211_rx_handler *handlers,
+ struct ieee80211_txrx_data *rx,
+ struct sta_info *sta)
{
ieee80211_rx_handler *handler;
ieee80211_rx_result res = RX_DROP_MONITOR;
@@ -1476,19 +1475,13 @@ static inline ieee80211_rx_result __ieee80211_invoke_rx_handlers(
break;
}
- if (res == RX_DROP_UNUSABLE || res == RX_DROP_MONITOR)
- dev_kfree_skb(rx->skb);
- return res;
-}
-
-static inline void ieee80211_invoke_rx_handlers(struct ieee80211_local *local,
- ieee80211_rx_handler *handlers,
- struct ieee80211_txrx_data *rx,
- struct sta_info *sta)
-{
- if (__ieee80211_invoke_rx_handlers(local, handlers, rx, sta) ==
- RX_CONTINUE)
+ switch (res) {
+ case RX_DROP_MONITOR:
+ case RX_DROP_UNUSABLE:
+ case RX_CONTINUE:
dev_kfree_skb(rx->skb);
+ break;
+ }
}
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,
skb = rx.skb;
- if (sta && !(sta->flags & (WLAN_STA_WDS | WLAN_STA_ASSOC_AP)) &&
- !atomic_read(&local->iff_promiscs) &&
- !is_multicast_ether_addr(hdr->addr1)) {
- rx.flags |= IEEE80211_TXRXD_RXRA_MATCH;
- ieee80211_invoke_rx_handlers(local, local->rx_handlers, &rx,
- rx.sta);
- sta_info_put(sta);
- return;
- }
-
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
if (!netif_running(sdata->dev))
continue;
OpenPOWER on IntegriCloud