]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
nl80211: Update bss channel on channel switch for P2P_CLIENT
authorSreeramya Soratkal <quic_ssramya@quicinc.com>
Tue, 1 Mar 2022 06:03:20 +0000 (11:33 +0530)
committerPaolo Pisati <paolo.pisati@canonical.com>
Wed, 23 Mar 2022 10:51:20 +0000 (11:51 +0100)
BugLink: https://bugs.launchpad.net/bugs/1966057
[ Upstream commit e50b88c4f076242358b66ddb67482b96947438f2 ]

The wdev channel information is updated post channel switch only for
the station mode and not for the other modes. Due to this, the P2P client
still points to the old value though it moved to the new channel
when the channel change is induced from the P2P GO.

Update the bss channel after CSA channel switch completion for P2P client
interface as well.

Signed-off-by: Sreeramya Soratkal <quic_ssramya@quicinc.com>
Link: https://lore.kernel.org/r/1646114600-31479-1-git-send-email-quic_ssramya@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/wireless/nl80211.c

index 99564db14aa12dea64f5b3239e868acd08c52b1c..2f9ead98a9dad455d346c4894f0ec32f1af3d803 100644 (file)
@@ -17525,7 +17525,8 @@ void cfg80211_ch_switch_notify(struct net_device *dev,
        wdev->chandef = *chandef;
        wdev->preset_chandef = *chandef;
 
-       if (wdev->iftype == NL80211_IFTYPE_STATION &&
+       if ((wdev->iftype == NL80211_IFTYPE_STATION ||
+            wdev->iftype == NL80211_IFTYPE_P2P_CLIENT) &&
            !WARN_ON(!wdev->current_bss))
                cfg80211_update_assoc_bss_entry(wdev, chandef->chan);