blob: 2e938b792083e7b65084805abe29de22a141d8d1 [file] [log] [blame]
From e503dbe84bc2b46907a792e11c196018b274647a Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Tue, 28 Mar 2023 20:20:57 +0800
Subject: [PATCH 27/39] wifi: mt76: mt7996: fix twt mcu command
Update unified command for twt.
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
---
mt7915/mcu.h | 1 -
mt7996/mcu.c | 7 +++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/mt7915/mcu.h b/mt7915/mcu.h
index b9ea297..e7a5395 100644
--- a/mt7915/mcu.h
+++ b/mt7915/mcu.h
@@ -264,7 +264,6 @@ enum {
MCU_TWT_AGRT_MODIFY,
MCU_TWT_AGRT_DELETE,
MCU_TWT_AGRT_TEARDOWN,
- MCU_TWT_AGRT_GET_TSF,
};
enum {
diff --git a/mt7996/mcu.c b/mt7996/mcu.c
index a6d8235..6bcb33e 100644
--- a/mt7996/mcu.c
+++ b/mt7996/mcu.c
@@ -3823,7 +3823,9 @@ int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev,
int cmd)
{
struct {
- u8 _rsv[4];
+ /* fixed field */
+ u8 bss;
+ u8 _rsv[3];
__le16 tag;
__le16 len;
@@ -3841,7 +3843,7 @@ int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev,
u8 exponent;
u8 is_ap;
u8 agrt_params;
- u8 __rsv2[135];
+ u8 __rsv2[23];
} __packed req = {
.tag = cpu_to_le16(UNI_CMD_TWT_ARGT_UPDATE),
.len = cpu_to_le16(sizeof(req) - 4),
@@ -3851,6 +3853,7 @@ int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev,
.flowid = flow->id,
.peer_id = cpu_to_le16(flow->wcid),
.duration = flow->duration,
+ .bss = mvif->mt76.idx,
.bss_idx = mvif->mt76.idx,
.start_tsf = cpu_to_le64(flow->tsf),
.mantissa = flow->mantissa,
--
2.18.0