summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-07-27 15:43:22 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:47:31 -0700
commit570bd537a9a1520ddebfed772bcf6eaf7510bec4 (patch)
tree3f77e577764bdadb18869fb89bfc8fa60db20954 /net/mac80211
parent8e6f003274147359ea612663048298823bed131f (diff)
[MAC80211]: split ieee80211_rx_h_check handler
The ieee80211_rx_h_check handler really does two things, it's a lot easier to understand if it's split into ieee80211_rx_h_check and ieee80211_rx_h_load_key, and it may be possible in the future to optimise the key loading to not do it for each interface. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Jiri Benc <jbenc@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/rx.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index b46ba7c6745..f7a1b61f9be 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -234,7 +234,6 @@ static ieee80211_txrx_result
ieee80211_rx_h_check(struct ieee80211_txrx_data *rx)
{
struct ieee80211_hdr *hdr;
- int always_sta_key;
hdr = (struct ieee80211_hdr *) rx->skb->data;
/* Drop duplicate 802.11 retransmissions (IEEE 802.11 Chap. 9.2.9) */
@@ -302,6 +301,16 @@ ieee80211_rx_h_check(struct ieee80211_txrx_data *rx)
return TXRX_QUEUED;
}
+ return TXRX_CONTINUE;
+}
+
+
+static ieee80211_txrx_result
+ieee80211_rx_h_load_key(struct ieee80211_txrx_data *rx)
+{
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data;
+ int always_sta_key;
+
if (rx->sdata->type == IEEE80211_IF_TYPE_STA)
always_sta_key = 0;
else
@@ -1208,6 +1217,7 @@ ieee80211_rx_handler ieee80211_rx_handlers[] =
ieee80211_rx_h_monitor,
ieee80211_rx_h_passive_scan,
ieee80211_rx_h_check,
+ ieee80211_rx_h_load_key,
ieee80211_rx_h_sta_process,
ieee80211_rx_h_ccmp_decrypt,
ieee80211_rx_h_tkip_decrypt,