developer | da18a74 | 2023-04-06 13:44:00 +0800 | [diff] [blame] | 1 | From e505146b00960b7f04426f953e0b061d973354fd Mon Sep 17 00:00:00 2001 |
developer | bb6ddff | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Mon, 13 Feb 2023 14:48:10 +0800 |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 4 | Subject: [PATCH 03/29] wifi: mt76: mt7996: fix pointer calculation in ie |
developer | bb6ddff | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 5 | countdown event |
| 6 | |
| 7 | Fix the tail and data pointers. The rxd->len in mt7996_mcu_rxd does not |
| 8 | include the length of general rxd. It only includes the length of |
| 9 | firmware event rxd. Use the skb->length to get the correct length. |
| 10 | |
| 11 | Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 12 | Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> |
| 13 | Change-Id: I832194559e63e6b49b7ee00dc9c606b6106d8669 |
| 14 | --- |
| 15 | mt7996/mcu.c | 3 ++- |
| 16 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 17 | |
| 18 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
developer | da18a74 | 2023-04-06 13:44:00 +0800 | [diff] [blame] | 19 | index dbe1057..2e25572 100644 |
developer | bb6ddff | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 20 | --- a/mt7996/mcu.c |
| 21 | +++ b/mt7996/mcu.c |
| 22 | @@ -422,7 +422,8 @@ mt7996_mcu_ie_countdown(struct mt7996_dev *dev, struct sk_buff *skb) |
| 23 | if (hdr->band && dev->mt76.phys[hdr->band]) |
| 24 | mphy = dev->mt76.phys[hdr->band]; |
| 25 | |
| 26 | - tail = skb->data + le16_to_cpu(rxd->len); |
| 27 | + tail = skb->data + skb->len; |
| 28 | + data += sizeof(struct header); |
| 29 | while (data + sizeof(struct tlv) < tail && le16_to_cpu(tlv->len)) { |
| 30 | switch (le16_to_cpu(tlv->tag)) { |
| 31 | case UNI_EVENT_IE_COUNTDOWN_CSA: |
| 32 | -- |
developer | da18a74 | 2023-04-06 13:44:00 +0800 | [diff] [blame] | 33 | 2.18.0 |
developer | bb6ddff | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 34 | |