From 76ee65bfaa1435320a72989a6413467ce446ae23 Mon Sep 17 00:00:00 2001 From: Ron Rindjunsky Date: Thu, 22 Nov 2007 19:49:12 +0200 Subject: mac80211: restructuring data Rx handlers This patch restructures the Rx handlers chain by incorporating previously handlers ieee80211_rx_h_802_1x_pae and ieee80211_rx_h_drop_unencrypted into ieee80211_rx_h_data, already in 802.3 form. this scheme follows more precisely after the IEEE802.11 data plane archituecture, and will prevent code duplication to IEEE8021.11n A-MSDU handler. added function: - ieee80211_data_to_8023: transfering 802.11 data frames to 802.3 frame - ieee80211_deliver_skb: delivering the 802.3 frames to upper stack eliminated handlers: - ieee80211_rx_h_drop_unencrypted: now function ieee80211_drop_unencrypted - ieee80211_rx_h_802_1x_pae: now function ieee80211_802_1x_pae changed handlers: - ieee80211_rx_h_data: now contains calls to four above function Signed-off-by: Ron Rindjunsky Acked-by: Johannes Berg Signed-off-by: John W. Linville Signed-off-by: David S. Miller --- net/mac80211/util.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'net/mac80211/util.c') diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 88f262baaa5e..5227c16f113e 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -218,23 +218,11 @@ int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb) } EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb); -int ieee80211_is_eapol(const struct sk_buff *skb) +int ieee80211_is_eapol(const struct sk_buff *skb, int hdrlen) { - const struct ieee80211_hdr *hdr; - u16 fc; - int hdrlen; - if (unlikely(skb->len < 10)) return 0; - hdr = (const struct ieee80211_hdr *) skb->data; - fc = le16_to_cpu(hdr->frame_control); - - if (unlikely(!WLAN_FC_DATA_PRESENT(fc))) - return 0; - - hdrlen = ieee80211_get_hdrlen(fc); - if (unlikely(skb->len >= hdrlen + sizeof(eapol_header) && memcmp(skb->data + hdrlen, eapol_header, sizeof(eapol_header)) == 0)) -- cgit v1.2.3