diff --git a/mt7603/init.c b/mt7603/init.c index a690e476..c468d915 100644 --- a/mt7603/init.c +++ b/mt7603/init.c @@ -237,7 +237,7 @@ mt7603_mac_init(struct mt7603_dev *dev) eth_broadcast_addr(bc_addr); mt7603_wtbl_init(dev, MT7603_WTBL_RESERVED, -1, bc_addr); dev->global_sta.wcid.idx = MT7603_WTBL_RESERVED; - rcu_assign_pointer(dev->wcid[MT7603_WTBL_RESERVED], + rcu_assign_pointer(dev->mt76.wcid[MT7603_WTBL_RESERVED], &dev->global_sta.wcid); mt76_rmw_field(dev, MT_LPON_BTEIR, MT_LPON_BTEIR_MBSS_MODE, 2); diff --git a/mt7603/mac.c b/mt7603/mac.c index 35f82d51..92c77ed3 100644 --- a/mt7603/mac.c +++ b/mt7603/mac.c @@ -361,10 +361,10 @@ mt7603_rx_get_wcid(struct mt7603_dev *dev, u8 idx, bool unicast) struct mt7603_sta *sta; struct mt76_wcid *wcid; - if (idx >= ARRAY_SIZE(dev->wcid)) + if (idx >= ARRAY_SIZE(dev->mt76.wcid)) return NULL; - wcid = rcu_dereference(dev->wcid[idx]); + wcid = rcu_dereference(dev->mt76.wcid[idx]); if (unicast || !wcid) return wcid; @@ -1068,12 +1068,12 @@ void mt7603_mac_add_txs(struct mt7603_dev *dev, void *data) if (pid == MT_PACKET_ID_NO_ACK) return; - if (wcidx >= ARRAY_SIZE(dev->wcid)) + if (wcidx >= ARRAY_SIZE(dev->mt76.wcid)) return; rcu_read_lock(); - wcid = rcu_dereference(dev->wcid[wcidx]); + wcid = rcu_dereference(dev->mt76.wcid[wcidx]); if (!wcid) goto out; diff --git a/mt7603/main.c b/mt7603/main.c index ea43181a..69f16475 100644 --- a/mt7603/main.c +++ b/mt7603/main.c @@ -97,7 +97,7 @@ mt7603_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) mt7603_wtbl_init(dev, idx, mvif->idx, bc_addr); mt7603_wtbl_set_ps(dev, idx, false); - rcu_assign_pointer(dev->wcid[idx], &mvif->sta.wcid); + rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid); mt7603_txq_init(dev, vif->txq); out: @@ -115,7 +115,7 @@ mt7603_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) mt7603_beacon_set_timer(dev, mvif->idx, 0); - rcu_assign_pointer(dev->wcid[idx], NULL); + rcu_assign_pointer(dev->mt76.wcid[idx], NULL); mt76_txq_remove(&dev->mt76, vif->txq); mutex_lock(&dev->mt76.mutex); @@ -305,7 +305,7 @@ mt7603_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, mutex_lock(&dev->mt76.mutex); - idx = mt76_wcid_alloc(dev->wcid_mask, MT7603_WTBL_STA - 1); + idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7603_WTBL_STA - 1); if (idx < 0) { ret = -ENOSPC; goto out; @@ -322,7 +322,7 @@ mt7603_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (vif->type == NL80211_IFTYPE_AP) set_bit(MT_WCID_FLAG_CHECK_PS, &msta->wcid.flags); - rcu_assign_pointer(dev->wcid[idx], &msta->wcid); + rcu_assign_pointer(dev->mt76.wcid[idx], &msta->wcid); out: mutex_unlock(&dev->mt76.mutex); @@ -341,13 +341,13 @@ mt7603_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, mutex_lock(&dev->mt76.mutex); mt76_tx_status_check(&dev->mt76, &msta->wcid, true); - rcu_assign_pointer(dev->wcid[idx], NULL); + rcu_assign_pointer(dev->mt76.wcid[idx], NULL); mt7603_wtbl_clear(dev, idx); for (i = 0; i < ARRAY_SIZE(sta->txq); i++) mt76_txq_remove(&dev->mt76, sta->txq[i]); - mt76_wcid_free(dev->wcid_mask, idx); + mt76_wcid_free(dev->mt76.wcid_mask, idx); mutex_unlock(&dev->mt76.mutex); diff --git a/mt7603/mt7603.h b/mt7603/mt7603.h index 806312f6..f4dc0c9d 100644 --- a/mt7603/mt7603.h +++ b/mt7603/mt7603.h @@ -98,8 +98,6 @@ struct mt7603_dev { u32 rxfilter; u8 vif_mask; - unsigned long wcid_mask[MT7603_WTBL_SIZE / BITS_PER_LONG]; - struct mt76_wcid __rcu *wcid[MT7603_WTBL_SIZE]; struct mt7603_sta global_sta;