developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame] | 1 | From e503dbe84bc2b46907a792e11c196018b274647a Mon Sep 17 00:00:00 2001 |
| 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Tue, 28 Mar 2023 20:20:57 +0800 |
| 4 | Subject: [PATCH 27/39] wifi: mt76: mt7996: fix twt mcu command |
| 5 | |
| 6 | Update unified command for twt. |
| 7 | |
| 8 | Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 9 | --- |
| 10 | mt7915/mcu.h | 1 - |
| 11 | mt7996/mcu.c | 7 +++++-- |
| 12 | 2 files changed, 5 insertions(+), 3 deletions(-) |
| 13 | |
| 14 | diff --git a/mt7915/mcu.h b/mt7915/mcu.h |
| 15 | index b9ea297..e7a5395 100644 |
| 16 | --- a/mt7915/mcu.h |
| 17 | +++ b/mt7915/mcu.h |
| 18 | @@ -264,7 +264,6 @@ enum { |
| 19 | MCU_TWT_AGRT_MODIFY, |
| 20 | MCU_TWT_AGRT_DELETE, |
| 21 | MCU_TWT_AGRT_TEARDOWN, |
| 22 | - MCU_TWT_AGRT_GET_TSF, |
| 23 | }; |
| 24 | |
| 25 | enum { |
| 26 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
| 27 | index a6d8235..6bcb33e 100644 |
| 28 | --- a/mt7996/mcu.c |
| 29 | +++ b/mt7996/mcu.c |
| 30 | @@ -3823,7 +3823,9 @@ int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev, |
| 31 | int cmd) |
| 32 | { |
| 33 | struct { |
| 34 | - u8 _rsv[4]; |
| 35 | + /* fixed field */ |
| 36 | + u8 bss; |
| 37 | + u8 _rsv[3]; |
| 38 | |
| 39 | __le16 tag; |
| 40 | __le16 len; |
| 41 | @@ -3841,7 +3843,7 @@ int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev, |
| 42 | u8 exponent; |
| 43 | u8 is_ap; |
| 44 | u8 agrt_params; |
| 45 | - u8 __rsv2[135]; |
| 46 | + u8 __rsv2[23]; |
| 47 | } __packed req = { |
| 48 | .tag = cpu_to_le16(UNI_CMD_TWT_ARGT_UPDATE), |
| 49 | .len = cpu_to_le16(sizeof(req) - 4), |
| 50 | @@ -3851,6 +3853,7 @@ int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev, |
| 51 | .flowid = flow->id, |
| 52 | .peer_id = cpu_to_le16(flow->wcid), |
| 53 | .duration = flow->duration, |
| 54 | + .bss = mvif->mt76.idx, |
| 55 | .bss_idx = mvif->mt76.idx, |
| 56 | .start_tsf = cpu_to_le64(flow->tsf), |
| 57 | .mantissa = flow->mantissa, |
| 58 | -- |
| 59 | 2.18.0 |
| 60 | |