Skip to content

Commit d517aa6

Browse files
committed
Revert "wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO"
mainline inlcusion from mainline-v6.15-rc1 category: bugfix For MLO, mac80211 will send the BA action for each link to the driver, so the driver does not need to handle it itself. Therefore, revert this patch. Fixes: eb2a9a1 ("wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO") Cc: stable@vger.kernel.org Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Tested-by: Caleb Jorden <cjorden@gmail.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/20250305000851.493671-1-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry picked from commit 766ea2c) This reverts commit a44f6c7. Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent bfd537d commit d517aa6

3 files changed

Lines changed: 14 additions & 48 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,22 +1273,22 @@ mt7925_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
12731273
case IEEE80211_AMPDU_RX_START:
12741274
mt76_rx_aggr_start(&dev->mt76, &msta->deflink.wcid, tid, ssn,
12751275
params->buf_size);
1276-
mt7925_mcu_uni_rx_ba(dev, vif, params, true);
1276+
mt7925_mcu_uni_rx_ba(dev, params, true);
12771277
break;
12781278
case IEEE80211_AMPDU_RX_STOP:
12791279
mt76_rx_aggr_stop(&dev->mt76, &msta->deflink.wcid, tid);
1280-
mt7925_mcu_uni_rx_ba(dev, vif, params, false);
1280+
mt7925_mcu_uni_rx_ba(dev, params, false);
12811281
break;
12821282
case IEEE80211_AMPDU_TX_OPERATIONAL:
12831283
mtxq->aggr = true;
12841284
mtxq->send_bar = false;
1285-
mt7925_mcu_uni_tx_ba(dev, vif, params, true);
1285+
mt7925_mcu_uni_tx_ba(dev, params, true);
12861286
break;
12871287
case IEEE80211_AMPDU_TX_STOP_FLUSH:
12881288
case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
12891289
mtxq->aggr = false;
12901290
clear_bit(tid, &msta->deflink.wcid.ampdu_state);
1291-
mt7925_mcu_uni_tx_ba(dev, vif, params, false);
1291+
mt7925_mcu_uni_tx_ba(dev, params, false);
12921292
break;
12931293
case IEEE80211_AMPDU_TX_START:
12941294
set_bit(tid, &msta->deflink.wcid.ampdu_state);
@@ -1297,7 +1297,7 @@ mt7925_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
12971297
case IEEE80211_AMPDU_TX_STOP_CONT:
12981298
mtxq->aggr = false;
12991299
clear_bit(tid, &msta->deflink.wcid.ampdu_state);
1300-
mt7925_mcu_uni_tx_ba(dev, vif, params, false);
1300+
mt7925_mcu_uni_tx_ba(dev, params, false);
13011301
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
13021302
break;
13031303
}

drivers/net/wireless/mediatek/mt76/mt7925/mcu.c

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,10 @@ void mt7925_mcu_rx_event(struct mt792x_dev *dev, struct sk_buff *skb)
529529

530530
static int
531531
mt7925_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
532-
struct mt76_wcid *wcid,
533532
struct ieee80211_ampdu_params *params,
534533
bool enable, bool tx)
535534
{
535+
struct mt76_wcid *wcid = (struct mt76_wcid *)params->sta->drv_priv;
536536
struct sta_rec_ba_uni *ba;
537537
struct sk_buff *skb;
538538
struct tlv *tlv;
@@ -560,60 +560,28 @@ mt7925_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
560560

561561
/** starec & wtbl **/
562562
int mt7925_mcu_uni_tx_ba(struct mt792x_dev *dev,
563-
struct ieee80211_vif *vif,
564563
struct ieee80211_ampdu_params *params,
565564
bool enable)
566565
{
567566
struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv;
568-
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
569-
struct mt792x_link_sta *mlink;
570-
struct mt792x_bss_conf *mconf;
571-
unsigned long usable_links = ieee80211_vif_usable_links(vif);
572-
struct mt76_wcid *wcid;
573-
u8 link_id, ret;
574-
575-
for_each_set_bit(link_id, &usable_links, IEEE80211_MLD_MAX_NUM_LINKS) {
576-
mconf = mt792x_vif_to_link(mvif, link_id);
577-
mlink = mt792x_sta_to_link(msta, link_id);
578-
wcid = &mlink->wcid;
579-
580-
if (enable && !params->amsdu)
581-
mlink->wcid.amsdu = false;
567+
struct mt792x_vif *mvif = msta->vif;
582568

583-
ret = mt7925_mcu_sta_ba(&dev->mt76, &mconf->mt76, wcid, params,
584-
enable, true);
585-
if (ret < 0)
586-
break;
587-
}
569+
if (enable && !params->amsdu)
570+
msta->deflink.wcid.amsdu = false;
588571

589-
return ret;
572+
return mt7925_mcu_sta_ba(&dev->mt76, &mvif->bss_conf.mt76, params,
573+
enable, true);
590574
}
591575

592576
int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
593-
struct ieee80211_vif *vif,
594577
struct ieee80211_ampdu_params *params,
595578
bool enable)
596579
{
597580
struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv;
598-
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
599-
struct mt792x_link_sta *mlink;
600-
struct mt792x_bss_conf *mconf;
601-
unsigned long usable_links = ieee80211_vif_usable_links(vif);
602-
struct mt76_wcid *wcid;
603-
u8 link_id, ret;
604-
605-
for_each_set_bit(link_id, &usable_links, IEEE80211_MLD_MAX_NUM_LINKS) {
606-
mconf = mt792x_vif_to_link(mvif, link_id);
607-
mlink = mt792x_sta_to_link(msta, link_id);
608-
wcid = &mlink->wcid;
609-
610-
ret = mt7925_mcu_sta_ba(&dev->mt76, &mconf->mt76, wcid, params,
611-
enable, false);
612-
if (ret < 0)
613-
break;
614-
}
581+
struct mt792x_vif *mvif = msta->vif;
615582

616-
return ret;
583+
return mt7925_mcu_sta_ba(&dev->mt76, &mvif->bss_conf.mt76, params,
584+
enable, false);
617585
}
618586

619587
static int mt7925_load_clc(struct mt792x_dev *dev, const char *fw_name)

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,9 @@ int mt7925_mcu_set_beacon_filter(struct mt792x_dev *dev,
242242
struct ieee80211_vif *vif,
243243
bool enable);
244244
int mt7925_mcu_uni_tx_ba(struct mt792x_dev *dev,
245-
struct ieee80211_vif *vif,
246245
struct ieee80211_ampdu_params *params,
247246
bool enable);
248247
int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
249-
struct ieee80211_vif *vif,
250248
struct ieee80211_ampdu_params *params,
251249
bool enable);
252250
void mt7925_scan_work(struct work_struct *work);

0 commit comments

Comments
 (0)