Skip to content

Commit 479ffee

Browse files
spasswolfKalle Valo
authored andcommitted
wifi: mt76: mt7921: fix NULL pointer access in mt7921_ipv6_addr_change
When disabling wifi mt7921_ipv6_addr_change() is called as a notifier. At this point mvif->phy is already NULL so we cannot use it here. Signed-off-by: Bert Karwatzki <spasswolf@web.de> Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20240812104542.80760-1-spasswolf@web.de
1 parent 2ad4e1a commit 479ffee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/wireless/mediatek/mt76/mt7921

drivers/net/wireless/mediatek/mt76/mt7921/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ static void mt7921_ipv6_addr_change(struct ieee80211_hw *hw,
11831183
struct inet6_dev *idev)
11841184
{
11851185
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
1186-
struct mt792x_dev *dev = mvif->phy->dev;
1186+
struct mt792x_dev *dev = mt792x_hw_dev(hw);
11871187
struct inet6_ifaddr *ifa;
11881188
struct in6_addr ns_addrs[IEEE80211_BSS_ARP_ADDR_LIST_LEN];
11891189
struct sk_buff *skb;

0 commit comments

Comments
 (0)