Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286202
b: refs/heads/master
c: d32a102
h: refs/heads/master
v: v3
  • Loading branch information
Yoni Divinsky authored and John W. Linville committed Jan 16, 2012
1 parent 7407fd1 commit 486732d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 331d9301ed4d0fe33e9762c62f2870243bcf77eb
refs/heads/master: d32a102819eef99d4d87019266bea208447be0a0
10 changes: 1 addition & 9 deletions trunk/net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,8 +1001,6 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx)
static ieee80211_tx_result debug_noinline
ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);

if (!tx->key)
return TX_CONTINUE;

Expand All @@ -1017,13 +1015,7 @@ ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
case WLAN_CIPHER_SUITE_AES_CMAC:
return ieee80211_crypto_aes_cmac_encrypt(tx);
default:
/* handle hw-only algorithm */
if (info->control.hw_key) {
ieee80211_tx_set_protected(tx);
return TX_CONTINUE;
}
break;

return ieee80211_crypto_hw_encrypt(tx);
}

return TX_DROP;
Expand Down
19 changes: 19 additions & 0 deletions trunk/net/mac80211/wpa.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,3 +643,22 @@ ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx)

return RX_CONTINUE;
}

ieee80211_tx_result
ieee80211_crypto_hw_encrypt(struct ieee80211_tx_data *tx)
{
struct sk_buff *skb;
struct ieee80211_tx_info *info = NULL;

skb_queue_walk(&tx->skbs, skb) {
info = IEEE80211_SKB_CB(skb);

/* handle hw-only algorithm */
if (!info->control.hw_key)
return TX_DROP;
}

ieee80211_tx_set_protected(tx);

return TX_CONTINUE;
}
2 changes: 2 additions & 0 deletions trunk/net/mac80211/wpa.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ ieee80211_tx_result
ieee80211_crypto_aes_cmac_encrypt(struct ieee80211_tx_data *tx);
ieee80211_rx_result
ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx);
ieee80211_tx_result
ieee80211_crypto_hw_encrypt(struct ieee80211_tx_data *tx);

#endif /* WPA_H */

0 comments on commit 486732d

Please sign in to comment.