wifi: mt76: mt7925: extend mt7925_mcu_uni_bss_ps for per-link BSS
Extend mt7925_mcu_uni_bss_ps with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/20240613030241.5771-22-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
d1c5f3719f
commit
3a0c8d2908
@ -1383,7 +1383,7 @@ static void mt7925_vif_cfg_changed(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_PS)
|
||||
mt7925_mcu_uni_bss_ps(dev, vif);
|
||||
mt7925_mcu_uni_bss_ps(dev, &vif->bss_conf);
|
||||
|
||||
mt792x_mutex_release(dev);
|
||||
}
|
||||
|
@ -1243,9 +1243,10 @@ int mt7925_mcu_set_eeprom(struct mt792x_dev *dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt7925_mcu_set_eeprom);
|
||||
|
||||
int mt7925_mcu_uni_bss_ps(struct mt792x_dev *dev, struct ieee80211_vif *vif)
|
||||
int mt7925_mcu_uni_bss_ps(struct mt792x_dev *dev,
|
||||
struct ieee80211_bss_conf *link_conf)
|
||||
{
|
||||
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||
struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf);
|
||||
struct {
|
||||
struct {
|
||||
u8 bss_idx;
|
||||
@ -1264,16 +1265,16 @@ int mt7925_mcu_uni_bss_ps(struct mt792x_dev *dev, struct ieee80211_vif *vif)
|
||||
} __packed ps;
|
||||
} __packed ps_req = {
|
||||
.hdr = {
|
||||
.bss_idx = mvif->bss_conf.mt76.idx,
|
||||
.bss_idx = mconf->mt76.idx,
|
||||
},
|
||||
.ps = {
|
||||
.tag = cpu_to_le16(UNI_BSS_INFO_PS),
|
||||
.len = cpu_to_le16(sizeof(struct ps_tlv)),
|
||||
.ps_state = vif->cfg.ps ? 2 : 0,
|
||||
.ps_state = link_conf->vif->cfg.ps ? 2 : 0,
|
||||
},
|
||||
};
|
||||
|
||||
if (vif->type != NL80211_IFTYPE_STATION)
|
||||
if (link_conf->vif->type != NL80211_IFTYPE_STATION)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_UNI_CMD(BSS_INFO_UPDATE),
|
||||
|
@ -242,7 +242,8 @@ int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
|
||||
bool enable);
|
||||
void mt7925_scan_work(struct work_struct *work);
|
||||
void mt7925_roc_work(struct work_struct *work);
|
||||
int mt7925_mcu_uni_bss_ps(struct mt792x_dev *dev, struct ieee80211_vif *vif);
|
||||
int mt7925_mcu_uni_bss_ps(struct mt792x_dev *dev,
|
||||
struct ieee80211_bss_conf *link_conf);
|
||||
void mt7925_coredump_work(struct work_struct *work);
|
||||
int mt7925_get_txpwr_info(struct mt792x_dev *dev, u8 band_idx,
|
||||
struct mt7925_txpwr *txpwr);
|
||||
|
Loading…
Reference in New Issue
Block a user