mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 09:20:13 -04:00
wifi: mt76: mt7996: add mcu command to set bssid mapping address
When receiving a 4 address non-AMSDU packet, there is no bssid in the address fields, which breaks powersave handling for 4-address peers. Set the mcu command to use A1 as bssid when receiving 4 address non-AMSDU packets on mt7992 and mt7990. Also skip mt7996_mac_init_band() for invalid bands, so the command is only sent for bands that actually exist on the device. Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> Link: https://patch.msgid.link/20260724124813.3961474-15-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
1df5433559
commit
043e042666
@@ -562,6 +562,9 @@ mt7996_mac_init_band(struct mt7996_dev *dev, u8 band)
|
||||
{
|
||||
u32 mask, set;
|
||||
|
||||
if (!mt7996_band_valid(dev, band))
|
||||
return;
|
||||
|
||||
/* clear estimated value of EIFS for Rx duration & OBSS time */
|
||||
mt76_wr(dev, MT_WF_RMAC_RSVD0(band), MT_WF_RMAC_RSVD0_EIFS_CLR);
|
||||
|
||||
@@ -593,6 +596,9 @@ mt7996_mac_init_band(struct mt7996_dev *dev, u8 band)
|
||||
* MT_AGG_ACR_PPDU_TXS2H (PPDU format) even though ACR bit is set.
|
||||
*/
|
||||
mt76_set(dev, MT_AGG_ACR4(band), MT_AGG_ACR_PPDU_TXS2H);
|
||||
|
||||
if (!is_mt7996(&dev->mt76))
|
||||
mt7996_mcu_set_bssid_mapping_addr(&dev->mt76, band);
|
||||
}
|
||||
|
||||
static void mt7996_mac_init_basic_rates(struct mt7996_dev *dev)
|
||||
|
||||
@@ -5049,6 +5049,32 @@ int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev,
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
int mt7996_mcu_set_bssid_mapping_addr(struct mt76_dev *dev, u8 band_idx)
|
||||
{
|
||||
enum {
|
||||
BSSID_MAPPING_ADDR1,
|
||||
BSSID_MAPPING_ADDR2,
|
||||
BSSID_MAPPING_ADDR3,
|
||||
};
|
||||
struct {
|
||||
u8 band_idx;
|
||||
u8 _rsv1[3];
|
||||
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
u8 addr;
|
||||
u8 _rsv2[3];
|
||||
} __packed req = {
|
||||
.band_idx = band_idx,
|
||||
.tag = cpu_to_le16(UNI_BAND_CONFIG_BSSID_MAPPING_ADDR),
|
||||
.len = cpu_to_le16(sizeof(req) - 4),
|
||||
.addr = BSSID_MAPPING_ADDR1,
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(dev, MCU_WM_UNI_CMD(BAND_CONFIG),
|
||||
&req, sizeof(req), true);
|
||||
}
|
||||
|
||||
int mt7996_mcu_set_rts_thresh(struct mt7996_phy *phy, u32 val)
|
||||
{
|
||||
struct {
|
||||
|
||||
@@ -927,6 +927,7 @@ enum {
|
||||
UNI_BAND_CONFIG_RADIO_ENABLE,
|
||||
UNI_BAND_CONFIG_RTS_THRESHOLD = 0x08,
|
||||
UNI_BAND_CONFIG_MAC_ENABLE_CTRL = 0x0c,
|
||||
UNI_BAND_CONFIG_BSSID_MAPPING_ADDR = 0x12,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
||||
@@ -772,6 +772,7 @@ int mt7996_mcu_set_protection(struct mt7996_phy *phy, struct mt7996_vif_link *li
|
||||
u8 ht_mode, bool use_cts_prot);
|
||||
int mt7996_mcu_set_timing(struct mt7996_phy *phy, struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *link_conf);
|
||||
int mt7996_mcu_set_bssid_mapping_addr(struct mt76_dev *dev, u8 band_idx);
|
||||
int mt7996_mcu_get_chan_mib_info(struct mt7996_phy *phy, bool chan_switch);
|
||||
int mt7996_mcu_get_temperature(struct mt7996_phy *phy);
|
||||
int mt7996_mcu_set_thermal_throttling(struct mt7996_phy *phy, u8 state);
|
||||
|
||||
Reference in New Issue
Block a user