Skip to content

Commit

Permalink
mt7603: configure other-unicast drop based on monitor mode setting
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Dec 8, 2017
1 parent ac815fa commit e504656
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mt7603_main.c
Expand Up @@ -168,6 +168,15 @@ mt7603_config(struct ieee80211_hw *hw, u32 changed)
mt7603_mac_set_timing(dev);
}

if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
if (!(hw->conf.flags & IEEE80211_CONF_MONITOR))
dev->rxfilter |= MT_WF_RFCR_DROP_OTHER_UC;
else
dev->rxfilter &= ~MT_WF_RFCR_DROP_OTHER_UC;

mt76_wr(dev, MT_WF_RFCR, dev->rxfilter);
}

mutex_unlock(&dev->mutex);

return ret;
Expand Down Expand Up @@ -198,8 +207,7 @@ mt7603_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,
MT_WF_RFCR_DROP_UNWANTED_CTL |
MT_WF_RFCR_DROP_STBC_MULTI);

MT76_FILTER(OTHER_BSS, MT_WF_RFCR_DROP_OTHER_UC |
MT_WF_RFCR_DROP_OTHER_TIM |
MT76_FILTER(OTHER_BSS, MT_WF_RFCR_DROP_OTHER_TIM |
MT_WF_RFCR_DROP_A3_MAC |
MT_WF_RFCR_DROP_A3_BSSID);

Expand Down

0 comments on commit e504656

Please sign in to comment.