aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2007-11-22 12:49:12 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:55:27 -0500
commit76ee65bfaa1435320a72989a6413467ce446ae23 (patch)
treef0e2dec58af542dc7ec53f7eb76c55ae4c3855e8 /net/mac80211/tx.c
parentece8edddf067d21c4e5abfe3f1205da1588edbb2 (diff)
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 <ron.rindjunsky@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 50ab4b2de1e9..12c15588af68 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -420,7 +420,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_txrx_data *tx)
420 return TXRX_CONTINUE; 420 return TXRX_CONTINUE;
421} 421}
422 422
423
424static ieee80211_txrx_result 423static ieee80211_txrx_result
425ieee80211_tx_h_ps_buf(struct ieee80211_txrx_data *tx) 424ieee80211_tx_h_ps_buf(struct ieee80211_txrx_data *tx)
426{ 425{
@@ -433,13 +432,15 @@ ieee80211_tx_h_ps_buf(struct ieee80211_txrx_data *tx)
433 return ieee80211_tx_h_multicast_ps_buf(tx); 432 return ieee80211_tx_h_multicast_ps_buf(tx);
434} 433}
435 434
436
437
438
439static ieee80211_txrx_result 435static ieee80211_txrx_result
440ieee80211_tx_h_select_key(struct ieee80211_txrx_data *tx) 436ieee80211_tx_h_select_key(struct ieee80211_txrx_data *tx)
441{ 437{
442 struct ieee80211_key *key; 438 struct ieee80211_key *key;
439 const struct ieee80211_hdr *hdr;
440 u16 fc;
441
442 hdr = (const struct ieee80211_hdr *) tx->skb->data;
443 fc = le16_to_cpu(hdr->frame_control);
443 444
444 if (unlikely(tx->u.tx.control->flags & IEEE80211_TXCTL_DO_NOT_ENCRYPT)) 445 if (unlikely(tx->u.tx.control->flags & IEEE80211_TXCTL_DO_NOT_ENCRYPT))
445 tx->key = NULL; 446 tx->key = NULL;
@@ -448,7 +449,8 @@ ieee80211_tx_h_select_key(struct ieee80211_txrx_data *tx)
448 else if ((key = rcu_dereference(tx->sdata->default_key))) 449 else if ((key = rcu_dereference(tx->sdata->default_key)))
449 tx->key = key; 450 tx->key = key;
450 else if (tx->sdata->drop_unencrypted && 451 else if (tx->sdata->drop_unencrypted &&
451 !(tx->sdata->eapol && ieee80211_is_eapol(tx->skb))) { 452 !(tx->sdata->eapol &&
453 ieee80211_is_eapol(tx->skb, ieee80211_get_hdrlen(fc)))) {
452 I802_DEBUG_INC(tx->local->tx_handlers_drop_unencrypted); 454 I802_DEBUG_INC(tx->local->tx_handlers_drop_unencrypted);
453 return TXRX_DROP; 455 return TXRX_DROP;
454 } else { 456 } else {