mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7915: run mt7915_configure_filter holding mt76 mutex
In order to avoid races, run mt7915_configure_filter routine holding mt76 mutex Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
37865118ae
commit
742c36b2e5
+4
-1
@@ -429,7 +429,6 @@ static void mt7915_configure_filter(struct ieee80211_hw *hw,
|
||||
struct mt7915_dev *dev = mt7915_hw_dev(hw);
|
||||
struct mt7915_phy *phy = mt7915_hw_phy(hw);
|
||||
bool band = phy != &dev->phy;
|
||||
|
||||
u32 ctl_flags = MT_WF_RFCR1_DROP_ACK |
|
||||
MT_WF_RFCR1_DROP_BF_POLL |
|
||||
MT_WF_RFCR1_DROP_BA |
|
||||
@@ -443,6 +442,8 @@ static void mt7915_configure_filter(struct ieee80211_hw *hw,
|
||||
phy->rxfilter |= !(flags & FIF_##_flag) * (_hw); \
|
||||
} while (0)
|
||||
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
|
||||
phy->rxfilter &= ~(MT_WF_RFCR_DROP_OTHER_BSS |
|
||||
MT_WF_RFCR_DROP_OTHER_BEACON |
|
||||
MT_WF_RFCR_DROP_FRAME_REPORT |
|
||||
@@ -473,6 +474,8 @@ static void mt7915_configure_filter(struct ieee80211_hw *hw,
|
||||
mt76_clear(dev, MT_WF_RFCR1(band), ctl_flags);
|
||||
else
|
||||
mt76_set(dev, MT_WF_RFCR1(band), ctl_flags);
|
||||
|
||||
mutex_unlock(&dev->mt76.mutex);
|
||||
}
|
||||
|
||||
static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
|
||||
|
||||
Reference in New Issue
Block a user