Commit ef591d74 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

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: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent d17a2fe8
...@@ -316,6 +316,7 @@ struct mt76_wcid { ...@@ -316,6 +316,7 @@ struct mt76_wcid {
int inactive_count; int inactive_count;
struct rate_info rate; struct rate_info rate;
unsigned long ampdu_state;
u16 idx; u16 idx;
u8 hw_key_idx; u8 hw_key_idx;
......
...@@ -863,7 +863,7 @@ mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi) ...@@ -863,7 +863,7 @@ mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
return; return;
msta = (struct mt7915_sta *)sta->drv_priv; msta = (struct mt7915_sta *)sta->drv_priv;
if (!test_and_set_bit(tid, &msta->ampdu_state)) if (!test_and_set_bit(tid, &msta->wcid.ampdu_state))
ieee80211_start_tx_ba_session(sta, tid, 0); ieee80211_start_tx_ba_session(sta, tid, 0);
} }
......
...@@ -836,16 +836,16 @@ mt7915_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -836,16 +836,16 @@ mt7915_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
case IEEE80211_AMPDU_TX_STOP_FLUSH: case IEEE80211_AMPDU_TX_STOP_FLUSH:
case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT: case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
mtxq->aggr = false; mtxq->aggr = false;
clear_bit(tid, &msta->ampdu_state); clear_bit(tid, &msta->wcid.ampdu_state);
ret = mt7915_mcu_add_tx_ba(dev, params, false); ret = mt7915_mcu_add_tx_ba(dev, params, false);
break; break;
case IEEE80211_AMPDU_TX_START: case IEEE80211_AMPDU_TX_START:
set_bit(tid, &msta->ampdu_state); set_bit(tid, &msta->wcid.ampdu_state);
ret = IEEE80211_AMPDU_TX_START_IMMEDIATE; ret = IEEE80211_AMPDU_TX_START_IMMEDIATE;
break; break;
case IEEE80211_AMPDU_TX_STOP_CONT: case IEEE80211_AMPDU_TX_STOP_CONT:
mtxq->aggr = false; mtxq->aggr = false;
clear_bit(tid, &msta->ampdu_state); clear_bit(tid, &msta->wcid.ampdu_state);
ret = mt7915_mcu_add_tx_ba(dev, params, false); ret = mt7915_mcu_add_tx_ba(dev, params, false);
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
break; break;
......
...@@ -144,7 +144,6 @@ struct mt7915_sta { ...@@ -144,7 +144,6 @@ struct mt7915_sta {
unsigned long changed; unsigned long changed;
unsigned long jiffies; unsigned long jiffies;
unsigned long ampdu_state;
struct mt76_connac_sta_key_conf bip; struct mt76_connac_sta_key_conf bip;
struct { struct {
......
...@@ -531,7 +531,7 @@ static void mt7921_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi) ...@@ -531,7 +531,7 @@ static void mt7921_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
return; return;
msta = (struct mt7921_sta *)sta->drv_priv; msta = (struct mt7921_sta *)sta->drv_priv;
if (!test_and_set_bit(tid, &msta->ampdu_state)) if (!test_and_set_bit(tid, &msta->wcid.ampdu_state))
ieee80211_start_tx_ba_session(sta, tid, 0); ieee80211_start_tx_ba_session(sta, tid, 0);
} }
......
...@@ -954,16 +954,16 @@ mt7921_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -954,16 +954,16 @@ mt7921_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
case IEEE80211_AMPDU_TX_STOP_FLUSH: case IEEE80211_AMPDU_TX_STOP_FLUSH:
case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT: case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
mtxq->aggr = false; mtxq->aggr = false;
clear_bit(tid, &msta->ampdu_state); clear_bit(tid, &msta->wcid.ampdu_state);
mt7921_mcu_uni_tx_ba(dev, params, false); mt7921_mcu_uni_tx_ba(dev, params, false);
break; break;
case IEEE80211_AMPDU_TX_START: case IEEE80211_AMPDU_TX_START:
set_bit(tid, &msta->ampdu_state); set_bit(tid, &msta->wcid.ampdu_state);
ret = IEEE80211_AMPDU_TX_START_IMMEDIATE; ret = IEEE80211_AMPDU_TX_START_IMMEDIATE;
break; break;
case IEEE80211_AMPDU_TX_STOP_CONT: case IEEE80211_AMPDU_TX_STOP_CONT:
mtxq->aggr = false; mtxq->aggr = false;
clear_bit(tid, &msta->ampdu_state); clear_bit(tid, &msta->wcid.ampdu_state);
mt7921_mcu_uni_tx_ba(dev, params, false); mt7921_mcu_uni_tx_ba(dev, params, false);
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
break; break;
......
...@@ -156,7 +156,6 @@ struct mt7921_sta { ...@@ -156,7 +156,6 @@ struct mt7921_sta {
struct ewma_avg_signal avg_ack_signal; struct ewma_avg_signal avg_ack_signal;
unsigned long last_txs; unsigned long last_txs;
unsigned long ampdu_state;
struct mt76_connac_sta_key_conf bip; struct mt76_connac_sta_key_conf bip;
}; };
......
...@@ -1204,7 +1204,7 @@ mt7996_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi) ...@@ -1204,7 +1204,7 @@ mt7996_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
return; return;
msta = (struct mt7996_sta *)sta->drv_priv; msta = (struct mt7996_sta *)sta->drv_priv;
if (!test_and_set_bit(tid, &msta->ampdu_state)) if (!test_and_set_bit(tid, &msta->wcid.ampdu_state))
ieee80211_start_tx_ba_session(sta, tid, 0); ieee80211_start_tx_ba_session(sta, tid, 0);
} }
......
...@@ -774,16 +774,16 @@ mt7996_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -774,16 +774,16 @@ mt7996_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
case IEEE80211_AMPDU_TX_STOP_FLUSH: case IEEE80211_AMPDU_TX_STOP_FLUSH:
case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT: case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
mtxq->aggr = false; mtxq->aggr = false;
clear_bit(tid, &msta->ampdu_state); clear_bit(tid, &msta->wcid.ampdu_state);
ret = mt7996_mcu_add_tx_ba(dev, params, false); ret = mt7996_mcu_add_tx_ba(dev, params, false);
break; break;
case IEEE80211_AMPDU_TX_START: case IEEE80211_AMPDU_TX_START:
set_bit(tid, &msta->ampdu_state); set_bit(tid, &msta->wcid.ampdu_state);
ret = IEEE80211_AMPDU_TX_START_IMMEDIATE; ret = IEEE80211_AMPDU_TX_START_IMMEDIATE;
break; break;
case IEEE80211_AMPDU_TX_STOP_CONT: case IEEE80211_AMPDU_TX_STOP_CONT:
mtxq->aggr = false; mtxq->aggr = false;
clear_bit(tid, &msta->ampdu_state); clear_bit(tid, &msta->wcid.ampdu_state);
ret = mt7996_mcu_add_tx_ba(dev, params, false); ret = mt7996_mcu_add_tx_ba(dev, params, false);
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
break; break;
......
...@@ -111,7 +111,6 @@ struct mt7996_sta { ...@@ -111,7 +111,6 @@ struct mt7996_sta {
unsigned long changed; unsigned long changed;
unsigned long jiffies; unsigned long jiffies;
unsigned long ampdu_state;
struct mt76_connac_sta_key_conf bip; struct mt76_connac_sta_key_conf bip;
......
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