mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7921: fix crash on ipv6 addr notification during vif bringup
mvif->phy is NULL when the interface is not properly initialized yet Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+4
-1
@@ -1183,7 +1183,7 @@ static void mt7921_ipv6_addr_change(struct ieee80211_hw *hw,
|
||||
struct inet6_dev *idev)
|
||||
{
|
||||
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||
struct mt792x_dev *dev = mvif->phy->dev;
|
||||
struct mt792x_dev *dev = mt792x_hw_dev(hw);
|
||||
struct inet6_ifaddr *ifa;
|
||||
struct in6_addr ns_addrs[IEEE80211_BSS_ARP_ADDR_LIST_LEN];
|
||||
struct sk_buff *skb;
|
||||
@@ -1206,6 +1206,9 @@ static void mt7921_ipv6_addr_change(struct ieee80211_hw *hw,
|
||||
},
|
||||
};
|
||||
|
||||
if (!mvif->phy)
|
||||
return;
|
||||
|
||||
read_lock_bh(&idev->lock);
|
||||
list_for_each_entry(ifa, &idev->addr_list, if_list) {
|
||||
if (ifa->flags & IFA_F_TENTATIVE)
|
||||
|
||||
Reference in New Issue
Block a user