diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2010-08-05 17:56:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-16 15:26:41 -0400 |
commit | c17512d846a4b063c8d3e708d82c0664d9c7182e (patch) | |
tree | 34db1793ec03defed98246fa2b8f50bea470009d /drivers/net/wireless/ath/ath9k/xmit.c | |
parent | 6fe140024ff66d7eccde1a151a08c262dc7a1e6f (diff) |
ath9k: remove duplicate get_hw_crypto_keytype()
Use ath9k_cmn_get_hw_crypto_keytype() instead which is
already exported and shared, and does exactly the same thing.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/xmit.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 4dda14e3622..457f07692ac 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1407,22 +1407,6 @@ static enum ath9k_pkt_type get_hw_packet_type(struct sk_buff *skb) | |||
1407 | return htype; | 1407 | return htype; |
1408 | } | 1408 | } |
1409 | 1409 | ||
1410 | static int get_hw_crypto_keytype(struct sk_buff *skb) | ||
1411 | { | ||
1412 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | ||
1413 | |||
1414 | if (tx_info->control.hw_key) { | ||
1415 | if (tx_info->control.hw_key->alg == ALG_WEP) | ||
1416 | return ATH9K_KEY_TYPE_WEP; | ||
1417 | else if (tx_info->control.hw_key->alg == ALG_TKIP) | ||
1418 | return ATH9K_KEY_TYPE_TKIP; | ||
1419 | else if (tx_info->control.hw_key->alg == ALG_CCMP) | ||
1420 | return ATH9K_KEY_TYPE_AES; | ||
1421 | } | ||
1422 | |||
1423 | return ATH9K_KEY_TYPE_CLEAR; | ||
1424 | } | ||
1425 | |||
1426 | static void assign_aggr_tid_seqno(struct sk_buff *skb, | 1410 | static void assign_aggr_tid_seqno(struct sk_buff *skb, |
1427 | struct ath_buf *bf) | 1411 | struct ath_buf *bf) |
1428 | { | 1412 | { |
@@ -1661,7 +1645,7 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf, | |||
1661 | bf->bf_state.bfs_paprd_timestamp = jiffies; | 1645 | bf->bf_state.bfs_paprd_timestamp = jiffies; |
1662 | bf->bf_flags = setup_tx_flags(skb, use_ldpc); | 1646 | bf->bf_flags = setup_tx_flags(skb, use_ldpc); |
1663 | 1647 | ||
1664 | bf->bf_keytype = get_hw_crypto_keytype(skb); | 1648 | bf->bf_keytype = ath9k_cmn_get_hw_crypto_keytype(skb); |
1665 | if (bf->bf_keytype != ATH9K_KEY_TYPE_CLEAR) { | 1649 | if (bf->bf_keytype != ATH9K_KEY_TYPE_CLEAR) { |
1666 | bf->bf_frmlen += tx_info->control.hw_key->icv_len; | 1650 | bf->bf_frmlen += tx_info->control.hw_key->icv_len; |
1667 | bf->bf_keyix = tx_info->control.hw_key->hw_key_idx; | 1651 | bf->bf_keyix = tx_info->control.hw_key->hw_key_idx; |