Commit 952cd693 authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

ath9k: remove bfs_keytype from struct ath_buf_state

Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5daefbd0
...@@ -106,7 +106,6 @@ enum buffer_type { ...@@ -106,7 +106,6 @@ enum buffer_type {
#define bf_frmlen bf_state.bfs_frmlen #define bf_frmlen bf_state.bfs_frmlen
#define bf_retries bf_state.bfs_retries #define bf_retries bf_state.bfs_retries
#define bf_keyix bf_state.bfs_keyix #define bf_keyix bf_state.bfs_keyix
#define bf_keytype bf_state.bfs_keytype
#define bf_isht(bf) (bf->bf_state.bf_type & BUF_HT) #define bf_isht(bf) (bf->bf_state.bf_type & BUF_HT)
#define bf_isampdu(bf) (bf->bf_state.bf_type & BUF_AMPDU) #define bf_isampdu(bf) (bf->bf_state.bf_type & BUF_AMPDU)
#define bf_isaggr(bf) (bf->bf_state.bf_type & BUF_AGGR) #define bf_isaggr(bf) (bf->bf_state.bf_type & BUF_AGGR)
...@@ -224,7 +223,6 @@ struct ath_buf_state { ...@@ -224,7 +223,6 @@ struct ath_buf_state {
u8 bfs_paprd; u8 bfs_paprd;
unsigned long bfs_paprd_timestamp; unsigned long bfs_paprd_timestamp;
u32 bfs_keyix; u32 bfs_keyix;
enum ath9k_key_type bfs_keytype;
enum ath9k_internal_frame_type bfs_ftype; enum ath9k_internal_frame_type bfs_ftype;
}; };
......
...@@ -630,7 +630,7 @@ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid, ...@@ -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. * TODO - this could be improved to be dependent on the rate.
* The hardware can keep up at lower rates, but not higher rates * 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; ndelim += ATH_AGGR_ENCRYPTDELIM;
/* /*
...@@ -1604,8 +1604,7 @@ static struct ath_buf *ath_tx_setup_buffer(struct ieee80211_hw *hw, ...@@ -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_flags = setup_tx_flags(skb);
bf->bf_keytype = ath9k_cmn_get_hw_crypto_keytype(skb); if (tx_info->control.hw_key) {
if (bf->bf_keytype != ATH9K_KEY_TYPE_CLEAR) {
bf->bf_frmlen += tx_info->control.hw_key->icv_len; bf->bf_frmlen += tx_info->control.hw_key->icv_len;
bf->bf_keyix = tx_info->control.hw_key->hw_key_idx; bf->bf_keyix = tx_info->control.hw_key->hw_key_idx;
} else { } else {
...@@ -1642,6 +1641,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, ...@@ -1642,6 +1641,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
struct ath_desc *ds; struct ath_desc *ds;
struct ath_atx_tid *tid; struct ath_atx_tid *tid;
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
enum ath9k_key_type keytype;
int frm_type; int frm_type;
__le16 fc; __le16 fc;
u8 tidno; u8 tidno;
...@@ -1655,8 +1655,9 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, ...@@ -1655,8 +1655,9 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
ds = bf->bf_desc; ds = bf->bf_desc;
ath9k_hw_set_desc_link(ah, ds, 0); 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, 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, ath9k_hw_filltxdesc(ah, ds,
skb->len, /* segment length */ skb->len, /* segment length */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment