aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-07-02 12:09:12 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-08-12 08:09:29 -0400
commitaf61a165187bb94b1dc7628ef815c23d0eacf40b (patch)
tree9dae3fcf629a55b0f3e91bec51ad92a9d77e6402 /net/mac80211/tx.c
parent1da5fcc86d71040c5b294ca5611ae6c86bfa815c (diff)
mac80211: add control port protocol TX control flag
A lot of drivers check the frame protocol for ETH_P_PAE, for various reasons (like making those more reliable). Add a new flags bitmap to the TX control info and a new flag indicating the control port protocol is in use to let all drivers also apply such logic to other control port protocols, should they be configured. Also use the new flag in the iwlwifi drivers. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 0e42322aa6b1..098ae854ad3c 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -539,9 +539,11 @@ ieee80211_tx_h_check_control_port_protocol(struct ieee80211_tx_data *tx)
539{ 539{
540 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); 540 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
541 541
542 if (unlikely(tx->sdata->control_port_protocol == tx->skb->protocol && 542 if (unlikely(tx->sdata->control_port_protocol == tx->skb->protocol)) {
543 tx->sdata->control_port_no_encrypt)) 543 if (tx->sdata->control_port_no_encrypt)
544 info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; 544 info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
545 info->control.flags |= IEEE80211_TX_CTRL_PORT_CTRL_PROTO;
546 }
545 547
546 return TX_CONTINUE; 548 return TX_CONTINUE;
547} 549}