[PATCH] wifi: mt76: mt7921: fix null pointer access in mt792x_mac_link_bss_remove
Bert Karwatzki
spasswolf at web.de
Wed Aug 28 01:17:20 PDT 2024
Am Mittwoch, dem 28.08.2024 um 00:38 +0100 schrieb Mike Lothian:
> But not the follow on fix which fixes suspend...
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
> b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
> index 2e6268cb06c0..a85c19da77e5 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
> @@ -1182,7 +1182,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;
> @@ -1205,6 +1205,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)
>
> > > >
> >
That is interesting (or odd) because suspend (s2idle) works for me in next-
20240827 on this hardware:
04:00.0 Network controller [0280]: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz
[14c3:0608]
are you using a different model?
[ 272.780054] [ T848] wlp4s0: deauthenticating from 54:67:51:3d:a2:d2 by
local choice (Reason: 3=DEAUTH_LEAVING)
[ 273.067438] [ T3437] PM: suspend entry (s2idle)
[ 273.151140] [ T3437] Filesystems sync: 0.083 seconds
[ 273.157029] [ T3437] Freezing user space processes
Can your the post the backtrace of your error (when commit 479ffee68d59c599f is
applied)?
Bert Karwatzki
More information about the Linux-mediatek
mailing list