Commit 2c9745e5 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

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: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8cc9a739
...@@ -1448,8 +1448,7 @@ ieee80211_rx_h_mgmt(struct ieee80211_txrx_data *rx) ...@@ -1448,8 +1448,7 @@ ieee80211_rx_h_mgmt(struct ieee80211_txrx_data *rx)
return RX_QUEUED; return RX_QUEUED;
} }
static inline ieee80211_rx_result __ieee80211_invoke_rx_handlers( static void ieee80211_invoke_rx_handlers(struct ieee80211_local *local,
struct ieee80211_local *local,
ieee80211_rx_handler *handlers, ieee80211_rx_handler *handlers,
struct ieee80211_txrx_data *rx, struct ieee80211_txrx_data *rx,
struct sta_info *sta) struct sta_info *sta)
...@@ -1476,19 +1475,13 @@ static inline ieee80211_rx_result __ieee80211_invoke_rx_handlers( ...@@ -1476,19 +1475,13 @@ static inline ieee80211_rx_result __ieee80211_invoke_rx_handlers(
break; break;
} }
if (res == RX_DROP_UNUSABLE || res == RX_DROP_MONITOR) switch (res) {
dev_kfree_skb(rx->skb); case RX_DROP_MONITOR:
return res; case RX_DROP_UNUSABLE:
} case RX_CONTINUE:
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)
dev_kfree_skb(rx->skb); dev_kfree_skb(rx->skb);
break;
}
} }
static void ieee80211_rx_michael_mic_report(struct net_device *dev, 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,16 +1711,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
skb = rx.skb; 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) { list_for_each_entry_rcu(sdata, &local->interfaces, list) {
if (!netif_running(sdata->dev)) if (!netif_running(sdata->dev))
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment