Skip to content

Commit ef591d7

Browse files
LorenzoBianconinbd168
authored andcommitted
wifi: mt76: move ampdu_state in mt76_wcid
ampdu_state field is used by most of the drivers, so move it in mt76_wcid structure. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
1 parent d17a2fe commit ef591d7

File tree

10 files changed

+13
-15
lines changed

10 files changed

+13
-15
lines changed

drivers/net/wireless/mediatek/mt76/mt76.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ struct mt76_wcid {
316316
int inactive_count;
317317

318318
struct rate_info rate;
319+
unsigned long ampdu_state;
319320

320321
u16 idx;
321322
u8 hw_key_idx;

drivers/net/wireless/mediatek/mt76/mt7915/mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
863863
return;
864864

865865
msta = (struct mt7915_sta *)sta->drv_priv;
866-
if (!test_and_set_bit(tid, &msta->ampdu_state))
866+
if (!test_and_set_bit(tid, &msta->wcid.ampdu_state))
867867
ieee80211_start_tx_ba_session(sta, tid, 0);
868868
}
869869

drivers/net/wireless/mediatek/mt76/mt7915/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -836,16 +836,16 @@ mt7915_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
836836
case IEEE80211_AMPDU_TX_STOP_FLUSH:
837837
case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
838838
mtxq->aggr = false;
839-
clear_bit(tid, &msta->ampdu_state);
839+
clear_bit(tid, &msta->wcid.ampdu_state);
840840
ret = mt7915_mcu_add_tx_ba(dev, params, false);
841841
break;
842842
case IEEE80211_AMPDU_TX_START:
843-
set_bit(tid, &msta->ampdu_state);
843+
set_bit(tid, &msta->wcid.ampdu_state);
844844
ret = IEEE80211_AMPDU_TX_START_IMMEDIATE;
845845
break;
846846
case IEEE80211_AMPDU_TX_STOP_CONT:
847847
mtxq->aggr = false;
848-
clear_bit(tid, &msta->ampdu_state);
848+
clear_bit(tid, &msta->wcid.ampdu_state);
849849
ret = mt7915_mcu_add_tx_ba(dev, params, false);
850850
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
851851
break;

drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ struct mt7915_sta {
144144

145145
unsigned long changed;
146146
unsigned long jiffies;
147-
unsigned long ampdu_state;
148147
struct mt76_connac_sta_key_conf bip;
149148

150149
struct {

drivers/net/wireless/mediatek/mt76/mt7921/mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ static void mt7921_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
531531
return;
532532

533533
msta = (struct mt7921_sta *)sta->drv_priv;
534-
if (!test_and_set_bit(tid, &msta->ampdu_state))
534+
if (!test_and_set_bit(tid, &msta->wcid.ampdu_state))
535535
ieee80211_start_tx_ba_session(sta, tid, 0);
536536
}
537537

drivers/net/wireless/mediatek/mt76/mt7921/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -954,16 +954,16 @@ mt7921_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
954954
case IEEE80211_AMPDU_TX_STOP_FLUSH:
955955
case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
956956
mtxq->aggr = false;
957-
clear_bit(tid, &msta->ampdu_state);
957+
clear_bit(tid, &msta->wcid.ampdu_state);
958958
mt7921_mcu_uni_tx_ba(dev, params, false);
959959
break;
960960
case IEEE80211_AMPDU_TX_START:
961-
set_bit(tid, &msta->ampdu_state);
961+
set_bit(tid, &msta->wcid.ampdu_state);
962962
ret = IEEE80211_AMPDU_TX_START_IMMEDIATE;
963963
break;
964964
case IEEE80211_AMPDU_TX_STOP_CONT:
965965
mtxq->aggr = false;
966-
clear_bit(tid, &msta->ampdu_state);
966+
clear_bit(tid, &msta->wcid.ampdu_state);
967967
mt7921_mcu_uni_tx_ba(dev, params, false);
968968
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
969969
break;

drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ struct mt7921_sta {
156156
struct ewma_avg_signal avg_ack_signal;
157157

158158
unsigned long last_txs;
159-
unsigned long ampdu_state;
160159

161160
struct mt76_connac_sta_key_conf bip;
162161
};

drivers/net/wireless/mediatek/mt76/mt7996/mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ mt7996_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
12041204
return;
12051205

12061206
msta = (struct mt7996_sta *)sta->drv_priv;
1207-
if (!test_and_set_bit(tid, &msta->ampdu_state))
1207+
if (!test_and_set_bit(tid, &msta->wcid.ampdu_state))
12081208
ieee80211_start_tx_ba_session(sta, tid, 0);
12091209
}
12101210

drivers/net/wireless/mediatek/mt76/mt7996/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -774,16 +774,16 @@ mt7996_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
774774
case IEEE80211_AMPDU_TX_STOP_FLUSH:
775775
case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
776776
mtxq->aggr = false;
777-
clear_bit(tid, &msta->ampdu_state);
777+
clear_bit(tid, &msta->wcid.ampdu_state);
778778
ret = mt7996_mcu_add_tx_ba(dev, params, false);
779779
break;
780780
case IEEE80211_AMPDU_TX_START:
781-
set_bit(tid, &msta->ampdu_state);
781+
set_bit(tid, &msta->wcid.ampdu_state);
782782
ret = IEEE80211_AMPDU_TX_START_IMMEDIATE;
783783
break;
784784
case IEEE80211_AMPDU_TX_STOP_CONT:
785785
mtxq->aggr = false;
786-
clear_bit(tid, &msta->ampdu_state);
786+
clear_bit(tid, &msta->wcid.ampdu_state);
787787
ret = mt7996_mcu_add_tx_ba(dev, params, false);
788788
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
789789
break;

drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ struct mt7996_sta {
111111

112112
unsigned long changed;
113113
unsigned long jiffies;
114-
unsigned long ampdu_state;
115114

116115
struct mt76_connac_sta_key_conf bip;
117116

0 commit comments

Comments
 (0)