mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-23 18:51:32 -05:00
wifi: mt76: mt7925: add link handling in the BSS_CHANGED_ARP_FILTER handler
add link handling in the BSS_CHANGED_ARP_FILTER handler. Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Co-developed-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/6e26e2ce253630ab29702693a7822f9961de6a18.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
@@ -1749,6 +1749,10 @@ static void mt7925_vif_cfg_changed(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||
struct mt792x_dev *dev = mt792x_hw_dev(hw);
|
||||
unsigned long valid = ieee80211_vif_is_mld(vif) ?
|
||||
mvif->valid_links : BIT(0);
|
||||
struct ieee80211_bss_conf *bss_conf;
|
||||
int i;
|
||||
|
||||
mt792x_mutex_acquire(dev);
|
||||
|
||||
@@ -1759,17 +1763,13 @@ static void mt7925_vif_cfg_changed(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_ARP_FILTER) {
|
||||
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||
|
||||
mt7925_mcu_update_arp_filter(&dev->mt76, &mvif->bss_conf.mt76);
|
||||
for_each_set_bit(i, &valid, IEEE80211_MLD_MAX_NUM_LINKS) {
|
||||
bss_conf = mt792x_vif_to_bss_conf(vif, i);
|
||||
mt7925_mcu_update_arp_filter(&dev->mt76, bss_conf);
|
||||
}
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_PS) {
|
||||
unsigned long valid = ieee80211_vif_is_mld(vif) ?
|
||||
mvif->valid_links : BIT(0);
|
||||
struct ieee80211_bss_conf *bss_conf;
|
||||
int i;
|
||||
|
||||
for_each_set_bit(i, &valid, IEEE80211_MLD_MAX_NUM_LINKS) {
|
||||
bss_conf = mt792x_vif_to_bss_conf(vif, i);
|
||||
mt7925_mcu_uni_bss_ps(dev, bss_conf);
|
||||
|
||||
@@ -121,10 +121,12 @@ int mt7925_mcu_regval(struct mt792x_dev *dev, u32 regidx, u32 *val, bool set)
|
||||
EXPORT_SYMBOL_GPL(mt7925_mcu_regval);
|
||||
|
||||
int mt7925_mcu_update_arp_filter(struct mt76_dev *dev,
|
||||
struct mt76_vif *vif)
|
||||
struct ieee80211_bss_conf *link_conf)
|
||||
{
|
||||
struct ieee80211_vif *mvif = container_of((void *)vif, struct ieee80211_vif,
|
||||
struct ieee80211_vif *mvif = container_of((void *)link_conf->vif,
|
||||
struct ieee80211_vif,
|
||||
drv_priv);
|
||||
struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf);
|
||||
struct sk_buff *skb;
|
||||
int i, len = min_t(int, mvif->cfg.arp_addr_cnt,
|
||||
IEEE80211_BSS_ARP_ADDR_LIST_LEN);
|
||||
@@ -136,7 +138,7 @@ int mt7925_mcu_update_arp_filter(struct mt76_dev *dev,
|
||||
struct mt7925_arpns_tlv arp;
|
||||
} req = {
|
||||
.hdr = {
|
||||
.bss_idx = vif->idx,
|
||||
.bss_idx = mconf->mt76.idx,
|
||||
},
|
||||
.arp = {
|
||||
.tag = cpu_to_le16(UNI_OFFLOAD_OFFLOAD_ARP),
|
||||
|
||||
@@ -626,5 +626,5 @@ int mt7925_mcu_set_chctx(struct mt76_phy *phy, struct mt76_vif *mvif,
|
||||
struct ieee80211_chanctx_conf *ctx);
|
||||
int mt7925_mcu_set_rate_txpower(struct mt76_phy *phy);
|
||||
int mt7925_mcu_update_arp_filter(struct mt76_dev *dev,
|
||||
struct mt76_vif *vif);
|
||||
struct ieee80211_bss_conf *link_conf);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user