aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-07-27 09:43:22 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:47:31 -0400
commit570bd537a9a1520ddebfed772bcf6eaf7510bec4 (patch)
tree3f77e577764bdadb18869fb89bfc8fa60db20954
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>
-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 b46ba7c67453..f7a1b61f9bef 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -234,7 +234,6 @@ static ieee80211_txrx_result
234ieee80211_rx_h_check(struct ieee80211_txrx_data *rx) 234ieee80211_rx_h_check(struct ieee80211_txrx_data *rx)
235{ 235{
236 struct ieee80211_hdr *hdr; 236 struct ieee80211_hdr *hdr;
237 int always_sta_key;
238 hdr = (struct ieee80211_hdr *) rx->skb->data; 237 hdr = (struct ieee80211_hdr *) rx->skb->data;
239 238
240 /* Drop duplicate 802.11 retransmissions (IEEE 802.11 Chap. 9.2.9) */ 239 /* 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)
302 return TXRX_QUEUED; 301 return TXRX_QUEUED;
303 } 302 }
304 303
304 return TXRX_CONTINUE;
305}
306
307
308static ieee80211_txrx_result
309ieee80211_rx_h_load_key(struct ieee80211_txrx_data *rx)
310{
311 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data;
312 int always_sta_key;
313
305 if (rx->sdata->type == IEEE80211_IF_TYPE_STA) 314 if (rx->sdata->type == IEEE80211_IF_TYPE_STA)
306 always_sta_key = 0; 315 always_sta_key = 0;
307 else 316 else
@@ -1208,6 +1217,7 @@ ieee80211_rx_handler ieee80211_rx_handlers[] =
1208 ieee80211_rx_h_monitor, 1217 ieee80211_rx_h_monitor,
1209 ieee80211_rx_h_passive_scan, 1218 ieee80211_rx_h_passive_scan,
1210 ieee80211_rx_h_check, 1219 ieee80211_rx_h_check,
1220 ieee80211_rx_h_load_key,
1211 ieee80211_rx_h_sta_process, 1221 ieee80211_rx_h_sta_process,
1212 ieee80211_rx_h_ccmp_decrypt, 1222 ieee80211_rx_h_ccmp_decrypt,
1213 ieee80211_rx_h_tkip_decrypt, 1223 ieee80211_rx_h_tkip_decrypt,