mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-08-22 00:42:01 +02:00
wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO
Update mt7925_mcu_uni_[tx,rx]_ba for MLO support in firmware.
Fixes: 86c051f2c4
("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20241211011926.5002-15-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
28045ef2bc
commit
eb2a9a12c6
|
@ -1258,22 +1258,22 @@ mt7925_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||||
case IEEE80211_AMPDU_RX_START:
|
case IEEE80211_AMPDU_RX_START:
|
||||||
mt76_rx_aggr_start(&dev->mt76, &msta->deflink.wcid, tid, ssn,
|
mt76_rx_aggr_start(&dev->mt76, &msta->deflink.wcid, tid, ssn,
|
||||||
params->buf_size);
|
params->buf_size);
|
||||||
mt7925_mcu_uni_rx_ba(dev, params, true);
|
mt7925_mcu_uni_rx_ba(dev, vif, params, true);
|
||||||
break;
|
break;
|
||||||
case IEEE80211_AMPDU_RX_STOP:
|
case IEEE80211_AMPDU_RX_STOP:
|
||||||
mt76_rx_aggr_stop(&dev->mt76, &msta->deflink.wcid, tid);
|
mt76_rx_aggr_stop(&dev->mt76, &msta->deflink.wcid, tid);
|
||||||
mt7925_mcu_uni_rx_ba(dev, params, false);
|
mt7925_mcu_uni_rx_ba(dev, vif, params, false);
|
||||||
break;
|
break;
|
||||||
case IEEE80211_AMPDU_TX_OPERATIONAL:
|
case IEEE80211_AMPDU_TX_OPERATIONAL:
|
||||||
mtxq->aggr = true;
|
mtxq->aggr = true;
|
||||||
mtxq->send_bar = false;
|
mtxq->send_bar = false;
|
||||||
mt7925_mcu_uni_tx_ba(dev, params, true);
|
mt7925_mcu_uni_tx_ba(dev, vif, params, true);
|
||||||
break;
|
break;
|
||||||
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->deflink.wcid.ampdu_state);
|
clear_bit(tid, &msta->deflink.wcid.ampdu_state);
|
||||||
mt7925_mcu_uni_tx_ba(dev, params, false);
|
mt7925_mcu_uni_tx_ba(dev, vif, params, false);
|
||||||
break;
|
break;
|
||||||
case IEEE80211_AMPDU_TX_START:
|
case IEEE80211_AMPDU_TX_START:
|
||||||
set_bit(tid, &msta->deflink.wcid.ampdu_state);
|
set_bit(tid, &msta->deflink.wcid.ampdu_state);
|
||||||
|
@ -1282,7 +1282,7 @@ mt7925_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||||
case IEEE80211_AMPDU_TX_STOP_CONT:
|
case IEEE80211_AMPDU_TX_STOP_CONT:
|
||||||
mtxq->aggr = false;
|
mtxq->aggr = false;
|
||||||
clear_bit(tid, &msta->deflink.wcid.ampdu_state);
|
clear_bit(tid, &msta->deflink.wcid.ampdu_state);
|
||||||
mt7925_mcu_uni_tx_ba(dev, params, false);
|
mt7925_mcu_uni_tx_ba(dev, vif, params, false);
|
||||||
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
|
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -529,10 +529,10 @@ void mt7925_mcu_rx_event(struct mt792x_dev *dev, struct sk_buff *skb)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mt7925_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
|
mt7925_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
|
||||||
|
struct mt76_wcid *wcid,
|
||||||
struct ieee80211_ampdu_params *params,
|
struct ieee80211_ampdu_params *params,
|
||||||
bool enable, bool tx)
|
bool enable, bool tx)
|
||||||
{
|
{
|
||||||
struct mt76_wcid *wcid = (struct mt76_wcid *)params->sta->drv_priv;
|
|
||||||
struct sta_rec_ba_uni *ba;
|
struct sta_rec_ba_uni *ba;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
struct tlv *tlv;
|
struct tlv *tlv;
|
||||||
|
@ -560,28 +560,60 @@ mt7925_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
|
||||||
|
|
||||||
/** starec & wtbl **/
|
/** starec & wtbl **/
|
||||||
int mt7925_mcu_uni_tx_ba(struct mt792x_dev *dev,
|
int mt7925_mcu_uni_tx_ba(struct mt792x_dev *dev,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
struct ieee80211_ampdu_params *params,
|
struct ieee80211_ampdu_params *params,
|
||||||
bool enable)
|
bool enable)
|
||||||
{
|
{
|
||||||
struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv;
|
struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv;
|
||||||
struct mt792x_vif *mvif = msta->vif;
|
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||||
|
struct mt792x_link_sta *mlink;
|
||||||
|
struct mt792x_bss_conf *mconf;
|
||||||
|
unsigned long usable_links = ieee80211_vif_usable_links(vif);
|
||||||
|
struct mt76_wcid *wcid;
|
||||||
|
u8 link_id, ret;
|
||||||
|
|
||||||
if (enable && !params->amsdu)
|
for_each_set_bit(link_id, &usable_links, IEEE80211_MLD_MAX_NUM_LINKS) {
|
||||||
msta->deflink.wcid.amsdu = false;
|
mconf = mt792x_vif_to_link(mvif, link_id);
|
||||||
|
mlink = mt792x_sta_to_link(msta, link_id);
|
||||||
|
wcid = &mlink->wcid;
|
||||||
|
|
||||||
return mt7925_mcu_sta_ba(&dev->mt76, &mvif->bss_conf.mt76, params,
|
if (enable && !params->amsdu)
|
||||||
enable, true);
|
mlink->wcid.amsdu = false;
|
||||||
|
|
||||||
|
ret = mt7925_mcu_sta_ba(&dev->mt76, &mconf->mt76, wcid, params,
|
||||||
|
enable, true);
|
||||||
|
if (ret < 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
|
int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
struct ieee80211_ampdu_params *params,
|
struct ieee80211_ampdu_params *params,
|
||||||
bool enable)
|
bool enable)
|
||||||
{
|
{
|
||||||
struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv;
|
struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv;
|
||||||
struct mt792x_vif *mvif = msta->vif;
|
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||||
|
struct mt792x_link_sta *mlink;
|
||||||
|
struct mt792x_bss_conf *mconf;
|
||||||
|
unsigned long usable_links = ieee80211_vif_usable_links(vif);
|
||||||
|
struct mt76_wcid *wcid;
|
||||||
|
u8 link_id, ret;
|
||||||
|
|
||||||
return mt7925_mcu_sta_ba(&dev->mt76, &mvif->bss_conf.mt76, params,
|
for_each_set_bit(link_id, &usable_links, IEEE80211_MLD_MAX_NUM_LINKS) {
|
||||||
enable, false);
|
mconf = mt792x_vif_to_link(mvif, link_id);
|
||||||
|
mlink = mt792x_sta_to_link(msta, link_id);
|
||||||
|
wcid = &mlink->wcid;
|
||||||
|
|
||||||
|
ret = mt7925_mcu_sta_ba(&dev->mt76, &mconf->mt76, wcid, params,
|
||||||
|
enable, false);
|
||||||
|
if (ret < 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mt7925_load_clc(struct mt792x_dev *dev, const char *fw_name)
|
static int mt7925_load_clc(struct mt792x_dev *dev, const char *fw_name)
|
||||||
|
|
|
@ -242,9 +242,11 @@ int mt7925_mcu_set_beacon_filter(struct mt792x_dev *dev,
|
||||||
struct ieee80211_vif *vif,
|
struct ieee80211_vif *vif,
|
||||||
bool enable);
|
bool enable);
|
||||||
int mt7925_mcu_uni_tx_ba(struct mt792x_dev *dev,
|
int mt7925_mcu_uni_tx_ba(struct mt792x_dev *dev,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
struct ieee80211_ampdu_params *params,
|
struct ieee80211_ampdu_params *params,
|
||||||
bool enable);
|
bool enable);
|
||||||
int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
|
int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
struct ieee80211_ampdu_params *params,
|
struct ieee80211_ampdu_params *params,
|
||||||
bool enable);
|
bool enable);
|
||||||
void mt7925_scan_work(struct work_struct *work);
|
void mt7925_scan_work(struct work_struct *work);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user