blob: 22ae63b86dec53748885d12edc866b1d1fd43a53 [file] [log] [blame]
developer1d16a302022-04-28 16:35:54 +08001From 04ef8f969aa6a51dd6d9ccd2723513bed3a588a0 Mon Sep 17 00:00:00 2001
2From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Sun, 24 Apr 2022 10:07:00 +0800
4Subject: [PATCH] mt76: mt7915: init rssi in WTBL when add station
5
6---
7 mt7915/main.c | 4 ++++
8 1 file changed, 4 insertions(+)
9
10diff --git a/mt7915/main.c b/mt7915/main.c
11index 09659dc7..3c6c66b8 100644
12--- a/mt7915/main.c
13+++ b/mt7915/main.c
14@@ -671,6 +671,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
15 struct mt7915_phy *phy;
16 #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)
22@@ -692,6 +693,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
23 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--
332.18.0
34