@@ -1691,7 +1691,6 @@ static int invoke_tx_handlers_early(struct ieee80211_tx_data *tx)
CALL_TXH(ieee80211_tx_h_check_assoc);
CALL_TXH(ieee80211_tx_h_ps_buf);
CALL_TXH(ieee80211_tx_h_check_control_port_protocol);
- CALL_TXH(ieee80211_tx_h_select_key);
txh_done:
if (unlikely(res == TX_DROP)) {
@@ -1759,6 +1758,17 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx)
if (r)
return r;
+
+ r = ieee80211_tx_h_select_key(tx);
+ if (unlikely(r != TX_CONTINUE)) {
+ I802_DEBUG_INC(tx->local->tx_handlers_drop);
+ if (tx->skb)
+ ieee80211_free_txskb(&tx->local->hw, tx->skb);
+ else
+ ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs);
+ return -1;
+ }
+
return invoke_tx_handlers_late(tx);
}
ieee80211_tx_dequeue() already calls ieee80211_tx_h_select_key() when needed. Move it from invoke_tx_handlers_early() to invoke_tx_handlers() to avoid calling it twice for TXQs. Signed-off-by: Alexander Wetzel <Alexander@wetzel-home.de> --- net/mac80211/tx.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)