blob: 43a0ae7982fd3861e0b84dbbd75f506285e1ed10 [file] [log] [blame]
developerf8871e82023-03-08 17:22:32 +08001From 55254f381217a874a2bb20c288107bb3d2f3811d Mon Sep 17 00:00:00 2001
developer6a1998b2022-12-08 18:09:45 +08002From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Sun, 24 Apr 2022 10:07:00 +0800
developerf8871e82023-03-08 17:22:32 +08004Subject: [PATCH 1117/1132] mt76: mt7915: init rssi in WTBL when add station
developer6a1998b2022-12-08 18:09:45 +08005
6---
7 mt7915/main.c | 4 ++++
8 1 file changed, 4 insertions(+)
9
10diff --git a/mt7915/main.c b/mt7915/main.c
developerf8871e82023-03-08 17:22:32 +080011index 21ad3b07..d1135d9f 100644
developer6a1998b2022-12-08 18:09:45 +080012--- a/mt7915/main.c
13+++ b/mt7915/main.c
developer2aa1e642022-12-19 11:33:22 +080014@@ -692,6 +692,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
developerb8853042023-02-17 11:50:45 +080015 struct mt7915_phy *phy = ext_phy ? mt7915_ext_phy(dev) : &dev->phy;
developer6a1998b2022-12-08 18:09:45 +080016 #endif
17 int ret, idx;
18+ u32 addr;
19
20 idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA);
21 if (idx < 0)
developer2aa1e642022-12-19 11:33:22 +080022@@ -715,6 +716,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
developer6a1998b2022-12-08 18:09:45 +080023 if (ret)
24 return ret;
25
26+ addr = mt7915_mac_wtbl_lmac_addr(dev, msta->wcid.idx, 30);
27+ mt76_rmw_field(dev, addr, GENMASK(7, 0), 0xa0);
28+
29 #ifdef CONFIG_MTK_VENDOR
30 mt7915_vendor_amnt_sta_remove(mvif->phy, sta);
31 #endif
32--
developerf3f5d9b2023-02-07 15:24:34 +0800332.18.0
developer6a1998b2022-12-08 18:09:45 +080034