mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
wifi: mt76: mt7996: add duplicated WTBL command
This is a firmware mechanism to improve packet loss issues for mt7996 and mt7992 chipsets. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Link: https://patch.msgid.link/20251215063728.3013365-6-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
956d2e65da
commit
7f3ec77859
|
|
@ -756,6 +756,9 @@ static void mt7996_init_work(struct work_struct *work)
|
|||
mt7996_mcu_set_eeprom(dev);
|
||||
mt7996_mac_init(dev);
|
||||
mt7996_txbf_init(dev);
|
||||
|
||||
if (!is_mt7990(&dev->mt76))
|
||||
mt7996_mcu_set_dup_wtbl(dev);
|
||||
}
|
||||
|
||||
void mt7996_wfsys_reset(struct mt7996_dev *dev)
|
||||
|
|
|
|||
|
|
@ -4033,7 +4033,6 @@ int mt7996_mcu_get_eeprom_free_block(struct mt7996_dev *dev, u8 *block_num)
|
|||
|
||||
int mt7996_mcu_get_chip_config(struct mt7996_dev *dev, u32 *cap)
|
||||
{
|
||||
#define NIC_CAP 3
|
||||
#define UNI_EVENT_CHIP_CONFIG_EFUSE_VERSION 0x21
|
||||
struct {
|
||||
u8 _rsv[4];
|
||||
|
|
@ -4041,7 +4040,7 @@ int mt7996_mcu_get_chip_config(struct mt7996_dev *dev, u32 *cap)
|
|||
__le16 tag;
|
||||
__le16 len;
|
||||
} __packed req = {
|
||||
.tag = cpu_to_le16(NIC_CAP),
|
||||
.tag = cpu_to_le16(UNI_CHIP_CONFIG_NIC_CAPA),
|
||||
.len = cpu_to_le16(sizeof(req) - 4),
|
||||
};
|
||||
struct sk_buff *skb;
|
||||
|
|
@ -5048,3 +5047,25 @@ int mt7996_mcu_cp_support(struct mt7996_dev *dev, u8 mode)
|
|||
return mt76_mcu_send_msg(&dev->mt76, MCU_WA_EXT_CMD(CP_SUPPORT),
|
||||
&cp_mode, sizeof(cp_mode), true);
|
||||
}
|
||||
|
||||
int mt7996_mcu_set_dup_wtbl(struct mt7996_dev *dev)
|
||||
{
|
||||
#define DUP_WTBL_NUM 80
|
||||
struct {
|
||||
u8 _rsv[4];
|
||||
|
||||
__le16 tag;
|
||||
__le16 len;
|
||||
__le16 base;
|
||||
__le16 num;
|
||||
u8 _rsv2[4];
|
||||
} __packed req = {
|
||||
.tag = cpu_to_le16(UNI_CHIP_CONFIG_DUP_WTBL),
|
||||
.len = cpu_to_le16(sizeof(req) - 4),
|
||||
.base = cpu_to_le16(MT7996_WTBL_STA - DUP_WTBL_NUM + 1),
|
||||
.num = cpu_to_le16(DUP_WTBL_NUM),
|
||||
};
|
||||
|
||||
return mt76_mcu_send_msg(&dev->mt76, MCU_WM_UNI_CMD(CHIP_CONFIG), &req,
|
||||
sizeof(req), true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -798,6 +798,11 @@ enum {
|
|||
UNI_CHANNEL_RX_PATH,
|
||||
};
|
||||
|
||||
enum {
|
||||
UNI_CHIP_CONFIG_NIC_CAPA = 3,
|
||||
UNI_CHIP_CONFIG_DUP_WTBL = 4,
|
||||
};
|
||||
|
||||
#define MT7996_BSS_UPDATE_MAX_SIZE (sizeof(struct bss_req_hdr) + \
|
||||
sizeof(struct mt76_connac_bss_basic_tlv) + \
|
||||
sizeof(struct bss_rlm_tlv) + \
|
||||
|
|
|
|||
|
|
@ -748,6 +748,7 @@ void mt7996_mcu_exit(struct mt7996_dev *dev);
|
|||
int mt7996_mcu_get_all_sta_info(struct mt7996_phy *phy, u16 tag);
|
||||
int mt7996_mcu_wed_rro_reset_sessions(struct mt7996_dev *dev, u16 id);
|
||||
int mt7996_mcu_set_sniffer_mode(struct mt7996_phy *phy, bool enabled);
|
||||
int mt7996_mcu_set_dup_wtbl(struct mt7996_dev *dev);
|
||||
|
||||
static inline bool mt7996_has_hwrro(struct mt7996_dev *dev)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user