summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt76x2_common.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2018-09-04 16:40:54 +0200
committerFelix Fietkau <nbd@nbd.name>2018-09-19 12:28:45 +0200
commit36404c065ac310c042aa3334ecd6fa12cd3400eb (patch)
treef49d6bd2c2ad213cbf50ab854cb35e75140a11aa /drivers/net/wireless/mediatek/mt76/mt76x2_common.c
parent43e2f2904160b9a95aad77df9cbc1622910b8598 (diff)
mt76: move wcid fields to common mt76_dev struct
All current MT devices including new MT7603 type chips support 128 WCIDs, we can unify wcid data in common mt76_dev structure. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x2_common.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x2_common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_common.c b/drivers/net/wireless/mediatek/mt76/mt76x2_common.c
index 11ff60360ce6..b613eb760be5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_common.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_common.c
@@ -81,7 +81,7 @@ int mt76x2_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
mutex_lock(&dev->mt76.mutex);
- idx = mt76_wcid_alloc(dev->wcid_mask, ARRAY_SIZE(dev->wcid));
+ idx = mt76_wcid_alloc(dev->mt76.wcid_mask, ARRAY_SIZE(dev->mt76.wcid));
if (idx < 0) {
ret = -ENOSPC;
goto out;
@@ -101,7 +101,7 @@ int mt76x2_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
ewma_signal_init(&msta->rssi);
- rcu_assign_pointer(dev->wcid[idx], &msta->wcid);
+ rcu_assign_pointer(dev->mt76.wcid[idx], &msta->wcid);
out:
mutex_unlock(&dev->mt76.mutex);
@@ -119,11 +119,11 @@ int mt76x2_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
int i;
mutex_lock(&dev->mt76.mutex);
- rcu_assign_pointer(dev->wcid[idx], NULL);
+ rcu_assign_pointer(dev->mt76.wcid[idx], NULL);
for (i = 0; i < ARRAY_SIZE(sta->txq); i++)
mt76_txq_remove(&dev->mt76, sta->txq[i]);
mt76x02_mac_wcid_set_drop(&dev->mt76, idx, true);
- mt76_wcid_free(dev->wcid_mask, idx);
+ mt76_wcid_free(dev->mt76.wcid_mask, idx);
mt76x02_mac_wcid_setup(&dev->mt76, idx, 0, NULL);
mutex_unlock(&dev->mt76.mutex);