summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/xmit.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-11-14 14:20:03 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2010-11-17 21:19:09 (GMT)
commit952cd693718d8ac796d5323fe7876241cf15ecfa (patch)
tree9b58c8df233617b2a1eacc50c399a31202e656e9 /drivers/net/wireless/ath/ath9k/xmit.c
parent5daefbd061d9509644058b6886abe2b6672ee386 (diff)
downloadlinux-fsl-qoriq-952cd693718d8ac796d5323fe7876241cf15ecfa.tar.xz
ath9k: remove bfs_keytype from struct ath_buf_state
Signed-off-by: Felix Fietkau <nbd@openwrt.org> 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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index c7097a5..6e0467c 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -630,7 +630,7 @@ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid,
* TODO - this could be improved to be dependent on the rate.
* The hardware can keep up at lower rates, but not higher rates
*/
- if (bf->bf_keytype != ATH9K_KEY_TYPE_CLEAR)
+ if (tx_info->control.hw_key)
ndelim += ATH_AGGR_ENCRYPTDELIM;
/*
@@ -1604,8 +1604,7 @@ static struct ath_buf *ath_tx_setup_buffer(struct ieee80211_hw *hw,
bf->bf_flags = setup_tx_flags(skb);
- bf->bf_keytype = ath9k_cmn_get_hw_crypto_keytype(skb);
- if (bf->bf_keytype != ATH9K_KEY_TYPE_CLEAR) {
+ if (tx_info->control.hw_key) {
bf->bf_frmlen += tx_info->control.hw_key->icv_len;
bf->bf_keyix = tx_info->control.hw_key->hw_key_idx;
} else {
@@ -1642,6 +1641,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
struct ath_desc *ds;
struct ath_atx_tid *tid;
struct ath_hw *ah = sc->sc_ah;
+ enum ath9k_key_type keytype;
int frm_type;
__le16 fc;
u8 tidno;
@@ -1655,8 +1655,9 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
ds = bf->bf_desc;
ath9k_hw_set_desc_link(ah, ds, 0);
+ keytype = ath9k_cmn_get_hw_crypto_keytype(skb);
ath9k_hw_set11n_txdesc(ah, ds, bf->bf_frmlen, frm_type, MAX_RATE_POWER,
- bf->bf_keyix, bf->bf_keytype, bf->bf_flags);
+ bf->bf_keyix, keytype, bf->bf_flags);
ath9k_hw_filltxdesc(ah, ds,
skb->len, /* segment length */