developer | 4721e25 | 2022-06-21 16:41:28 +0800 | [diff] [blame^] | 1 | From 2c6d87aad4535b918828b5d01e51650901131cd1 Mon Sep 17 00:00:00 2001 |
developer | 5a0d2a9 | 2022-06-15 17:22:32 +0800 | [diff] [blame] | 2 | From: Shayne Chen <shayne.chen@mediatek.com> |
| 3 | Date: Wed, 15 Jun 2022 23:15:13 +0800 |
developer | 4721e25 | 2022-06-21 16:41:28 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 09/12] check starec newly |
developer | 5a0d2a9 | 2022-06-15 17:22:32 +0800 | [diff] [blame] | 5 | |
| 6 | --- |
developer | 4721e25 | 2022-06-21 16:41:28 +0800 | [diff] [blame^] | 7 | mt7915/main.c | 2 +- |
| 8 | mt7915/mcu.c | 4 +++- |
developer | 5a0d2a9 | 2022-06-15 17:22:32 +0800 | [diff] [blame] | 9 | 2 files changed, 4 insertions(+), 2 deletions(-) |
| 10 | |
| 11 | diff --git a/mt7915/main.c b/mt7915/main.c |
developer | 4721e25 | 2022-06-21 16:41:28 +0800 | [diff] [blame^] | 12 | index 7934981..3958799 100644 |
developer | 5a0d2a9 | 2022-06-15 17:22:32 +0800 | [diff] [blame] | 13 | --- a/mt7915/main.c |
| 14 | +++ b/mt7915/main.c |
developer | f64861f | 2022-06-22 11:44:53 +0800 | [diff] [blame] | 15 | @@ -235,7 +235,6 @@ static int mt7915_add_interface(struct ieee80211_hw *hw, |
developer | 5a0d2a9 | 2022-06-15 17:22:32 +0800 | [diff] [blame] | 16 | mt7915_mac_wtbl_update(dev, idx, |
| 17 | MT_WTBL_UPDATE_ADM_COUNT_CLEAR); |
| 18 | |
| 19 | - rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid); |
| 20 | if (vif->txq) { |
| 21 | mtxq = (struct mt76_txq *)vif->txq->drv_priv; |
| 22 | mtxq->wcid = idx; |
developer | f64861f | 2022-06-22 11:44:53 +0800 | [diff] [blame] | 23 | @@ -251,6 +250,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw, |
developer | 5a0d2a9 | 2022-06-15 17:22:32 +0800 | [diff] [blame] | 24 | |
| 25 | mt7915_mcu_add_bss_info(phy, vif, true); |
| 26 | mt7915_mcu_add_sta(dev, vif, NULL, true); |
| 27 | + rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid); |
| 28 | |
| 29 | out: |
| 30 | mutex_unlock(&dev->mt76.mutex); |
| 31 | diff --git a/mt7915/mcu.c b/mt7915/mcu.c |
developer | 4721e25 | 2022-06-21 16:41:28 +0800 | [diff] [blame^] | 32 | index 1b7a630..a726021 100644 |
developer | 5a0d2a9 | 2022-06-15 17:22:32 +0800 | [diff] [blame] | 33 | --- a/mt7915/mcu.c |
| 34 | +++ b/mt7915/mcu.c |
developer | f64861f | 2022-06-22 11:44:53 +0800 | [diff] [blame] | 35 | @@ -1610,6 +1610,7 @@ int mt7915_mcu_add_sta(struct mt7915_dev *dev, struct ieee80211_vif *vif, |
developer | 5a0d2a9 | 2022-06-15 17:22:32 +0800 | [diff] [blame] | 36 | struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; |
| 37 | struct mt7915_sta *msta; |
| 38 | struct sk_buff *skb; |
| 39 | + bool newly; |
| 40 | int ret; |
| 41 | |
| 42 | msta = sta ? (struct mt7915_sta *)sta->drv_priv : &mvif->sta; |
developer | f64861f | 2022-06-22 11:44:53 +0800 | [diff] [blame] | 43 | @@ -1620,7 +1621,8 @@ int mt7915_mcu_add_sta(struct mt7915_dev *dev, struct ieee80211_vif *vif, |
developer | 5a0d2a9 | 2022-06-15 17:22:32 +0800 | [diff] [blame] | 44 | return PTR_ERR(skb); |
| 45 | |
| 46 | /* starec basic */ |
| 47 | - mt76_connac_mcu_sta_basic_tlv(skb, vif, sta, enable, true); |
| 48 | + newly = !rcu_access_pointer(dev->mt76.wcid[msta->wcid.idx]); |
| 49 | + mt76_connac_mcu_sta_basic_tlv(skb, vif, sta, enable, newly); |
| 50 | if (!enable) |
| 51 | goto out; |
| 52 | |
| 53 | -- |
developer | 4721e25 | 2022-06-21 16:41:28 +0800 | [diff] [blame^] | 54 | 2.18.0 |
developer | 5a0d2a9 | 2022-06-15 17:22:32 +0800 | [diff] [blame] | 55 | |