Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5daefbd0 authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville
Browse files

ath9k: remove bfs_tidno from struct ath_buf_state

parent 2d3bcba0
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -105,7 +105,6 @@ enum buffer_type {
#define bf_al           	bf_state.bfs_al
#define bf_al           	bf_state.bfs_al
#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_tidno        	bf_state.bfs_tidno
#define bf_keyix                bf_state.bfs_keyix
#define bf_keyix                bf_state.bfs_keyix
#define bf_keytype      	bf_state.bfs_keytype
#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)
@@ -220,7 +219,6 @@ struct ath_buf_state {
	int bfs_nframes;
	int bfs_nframes;
	u16 bfs_al;
	u16 bfs_al;
	u16 bfs_frmlen;
	u16 bfs_frmlen;
	int bfs_tidno;
	int bfs_retries;
	int bfs_retries;
	u8 bf_type;
	u8 bf_type;
	u8 bfs_paprd;
	u8 bfs_paprd;
+13 −12
Original line number Original line Diff line number Diff line
@@ -323,6 +323,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
	struct ieee80211_tx_rate rates[4];
	struct ieee80211_tx_rate rates[4];
	u16 bf_seqno;
	u16 bf_seqno;
	int nframes;
	int nframes;
	u8 tidno;


	skb = bf->bf_mpdu;
	skb = bf->bf_mpdu;
	hdr = (struct ieee80211_hdr *)skb->data;
	hdr = (struct ieee80211_hdr *)skb->data;
@@ -358,14 +359,15 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
	}
	}


	an = (struct ath_node *)sta->drv_priv;
	an = (struct ath_node *)sta->drv_priv;
	tid = ATH_AN_2_TID(an, bf->bf_tidno);
	tidno = ieee80211_get_qos_ctl(hdr)[0] & IEEE80211_QOS_CTL_TID_MASK;
	tid = ATH_AN_2_TID(an, tidno);


	/*
	/*
	 * The hardware occasionally sends a tx status for the wrong TID.
	 * The hardware occasionally sends a tx status for the wrong TID.
	 * In this case, the BA status cannot be considered valid and all
	 * In this case, the BA status cannot be considered valid and all
	 * subframes need to be retransmitted
	 * subframes need to be retransmitted
	 */
	 */
	if (bf->bf_tidno != ts->tid)
	if (tidno != ts->tid)
		txok = false;
		txok = false;


	isaggr = bf_isaggr(bf);
	isaggr = bf_isaggr(bf);
@@ -1386,7 +1388,7 @@ static void assign_aggr_tid_seqno(struct sk_buff *skb,
	struct ath_node *an;
	struct ath_node *an;
	struct ath_atx_tid *tid;
	struct ath_atx_tid *tid;
	__le16 fc;
	__le16 fc;
	u8 *qc;
	u8 tidno;


	if (!tx_info->control.sta)
	if (!tx_info->control.sta)
		return;
		return;
@@ -1394,18 +1396,13 @@ static void assign_aggr_tid_seqno(struct sk_buff *skb,
	an = (struct ath_node *)tx_info->control.sta->drv_priv;
	an = (struct ath_node *)tx_info->control.sta->drv_priv;
	hdr = (struct ieee80211_hdr *)skb->data;
	hdr = (struct ieee80211_hdr *)skb->data;
	fc = hdr->frame_control;
	fc = hdr->frame_control;

	tidno = ieee80211_get_qos_ctl(hdr)[0] & IEEE80211_QOS_CTL_TID_MASK;
	if (ieee80211_is_data_qos(fc)) {
		qc = ieee80211_get_qos_ctl(hdr);
		bf->bf_tidno = qc[0] & 0xf;
	}


	/*
	/*
	 * For HT capable stations, we save tidno for later use.
	 * Override seqno set by upper layer with the one
	 * We also override seqno set by upper layer with the one
	 * in tx aggregation state.
	 * in tx aggregation state.
	 */
	 */
	tid = ATH_AN_2_TID(an, bf->bf_tidno);
	tid = ATH_AN_2_TID(an, tidno);
	hdr->seq_ctrl = cpu_to_le16(tid->seq_next << IEEE80211_SEQ_SEQ_SHIFT);
	hdr->seq_ctrl = cpu_to_le16(tid->seq_next << IEEE80211_SEQ_SEQ_SHIFT);
	INCR(tid->seq_next, IEEE80211_SEQ_MAX);
	INCR(tid->seq_next, IEEE80211_SEQ_MAX);
}
}
@@ -1647,6 +1644,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
	struct ath_hw *ah = sc->sc_ah;
	struct ath_hw *ah = sc->sc_ah;
	int frm_type;
	int frm_type;
	__le16 fc;
	__le16 fc;
	u8 tidno;


	frm_type = get_hw_packet_type(skb);
	frm_type = get_hw_packet_type(skb);
	fc = hdr->frame_control;
	fc = hdr->frame_control;
@@ -1673,7 +1671,10 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
	if (bf_isht(bf) && (sc->sc_flags & SC_OP_TXAGGR) &&
	if (bf_isht(bf) && (sc->sc_flags & SC_OP_TXAGGR) &&
	    tx_info->control.sta) {
	    tx_info->control.sta) {
		an = (struct ath_node *)tx_info->control.sta->drv_priv;
		an = (struct ath_node *)tx_info->control.sta->drv_priv;
		tid = ATH_AN_2_TID(an, bf->bf_tidno);
		tidno = ieee80211_get_qos_ctl(hdr)[0] &
			IEEE80211_QOS_CTL_TID_MASK;
		tid = ATH_AN_2_TID(an, tidno);



		WARN_ON(tid->ac->txq != txctl->txq);
		WARN_ON(tid->ac->txq != txctl->txq);
		if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
		if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {