Commit 9f8f587c authored by Sean Wang's avatar Sean Wang Committed by Felix Fietkau

wifi: mt76: mt7925: add link handling in the mt7925_ipv6_addr_change

add link handling in the mt7925_ipv6_addr_change
Co-developed-by: default avatarMing Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: default avatarMing Yen Hsieh <mingyen.hsieh@mediatek.com>
Co-developed-by: default avatarDeren Wu <deren.wu@mediatek.com>
Signed-off-by: default avatarDeren Wu <deren.wu@mediatek.com>
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/ed429b1896cc10c8db25dc2ade3e59bec78d7131.1720248331.git.sean.wang@kernel.orgSigned-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 14732429
......@@ -1490,12 +1490,12 @@ static void mt7925_sta_set_decap_offload(struct ieee80211_hw *hw,
}
#if IS_ENABLED(CONFIG_IPV6)
static void mt7925_ipv6_addr_change(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct inet6_dev *idev)
static void __mt7925_ipv6_addr_change(struct ieee80211_hw *hw,
struct ieee80211_bss_conf *link_conf,
struct inet6_dev *idev)
{
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
struct mt792x_dev *dev = mvif->phy->dev;
struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf);
struct mt792x_dev *dev = mt792x_hw_dev(hw);
struct inet6_ifaddr *ifa;
struct sk_buff *skb;
u8 idx = 0;
......@@ -1509,7 +1509,7 @@ static void mt7925_ipv6_addr_change(struct ieee80211_hw *hw,
struct in6_addr ns_addrs[IEEE80211_BSS_ARP_ADDR_LIST_LEN];
} req_hdr = {
.hdr = {
.bss_idx = mvif->bss_conf.mt76.idx,
.bss_idx = mconf->mt76.idx,
},
.arpns = {
.tag = cpu_to_le16(UNI_OFFLOAD_OFFLOAD_ND),
......@@ -1544,6 +1544,23 @@ static void mt7925_ipv6_addr_change(struct ieee80211_hw *hw,
ieee80211_queue_work(dev->mt76.hw, &dev->ipv6_ns_work);
}
static void mt7925_ipv6_addr_change(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct inet6_dev *idev)
{
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
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_ipv6_addr_change(hw, bss_conf, idev);
}
}
#endif
int mt7925_set_tx_sar_pwr(struct ieee80211_hw *hw,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment