blob: 8e444e132223b9ca0d0f8b50fdef2efdd67aa501 [file] [log] [blame]
developer1f55fcf2024-10-17 14:52:33 +08001From 3b8af1b07109458e7274bc032b27c3c2e331acb3 Mon Sep 17 00:00:00 2001
developer42c7a432024-07-12 14:39:29 +08002From: Rex Lu <rex.lu@mediatek.com>
3Date: Fri, 5 Jul 2024 17:50:29 +0800
developer1f55fcf2024-10-17 14:52:33 +08004Subject: [PATCH] wifi: mt76: mt7915: Clear private driver data in case of
5 reuse
developer42c7a432024-07-12 14:39:29 +08006
7Signed-off-by: Rex Lu <rex.lu@mediatek.com>
8---
9 mt7915/main.c | 3 +++
10 1 file changed, 3 insertions(+)
11
12diff --git a/mt7915/main.c b/mt7915/main.c
developer1f55fcf2024-10-17 14:52:33 +080013index f9ce1ba7..d5ea85d6 100644
developer42c7a432024-07-12 14:39:29 +080014--- a/mt7915/main.c
15+++ b/mt7915/main.c
16@@ -230,6 +230,9 @@ int mt7915_init_vif(struct mt7915_phy *phy, struct ieee80211_vif *vif, bool bf_e
17 bool ext_phy = phy != &dev->phy;
developer1f55fcf2024-10-17 14:52:33 +080018 int idx, i, ret = 0;
developer42c7a432024-07-12 14:39:29 +080019
20+ /* Clear private driver data in case of reuse */
21+ memset(mvif, 0, sizeof(struct mt7915_vif));
22+
23 /* To differentiate the mac address of TXD and TXCMD interface */
24 vif->addr[0] |= bf_en;
25
26--
developer1f55fcf2024-10-17 14:52:33 +0800272.45.2
developer42c7a432024-07-12 14:39:29 +080028