]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mt76x0: use mt76_wcid_free in mt76x0
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 29 Aug 2018 11:16:42 +0000 (13:16 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 4 Sep 2018 08:03:09 +0000 (11:03 +0300)
Use helper from util instead of custom code.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/mt76x0/main.c

index a5bdd324f6ec7d94bab348a4d361f56097f46e26..66e8389d489f71289f25e73400733646e70767e9 100644 (file)
@@ -197,7 +197,7 @@ mt76x0_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
        mutex_lock(&dev->mt76.mutex);
        rcu_assign_pointer(dev->wcid[idx], NULL);
        mt76x02_mac_wcid_set_drop(&dev->mt76, idx, true);
-       dev->wcid_mask[idx / BITS_PER_LONG] &= ~BIT(idx % BITS_PER_LONG);
+       mt76_wcid_free(dev->wcid_mask, idx);
        mt76x02_mac_wcid_setup(&dev->mt76, idx, 0, NULL);
        mt76x0_mac_set_ampdu_factor(dev);
        mutex_unlock(&dev->mt76.mutex);