summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreeramya Soratkal <quic_ssramya@quicinc.com>2022-03-01 11:33:20 +0530
committerAlexander Grund <flamefire89@gmail.com>2023-11-09 19:17:24 +0100
commit9ab0ab713c94a95b69769a60fec1b63c4a3b28df (patch)
tree33bd04d32b378840a356f33379e79946786b0ad6
parentae60a2dabbf5a91cc9b838a94d773d43b4894bed (diff)
nl80211: Update bss channel on channel switch for P2P_CLIENT
[ 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. Change-Id: I9a1f3e060cc4fc32d426b111e38f97b8bdc8b5d4 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>
-rw-r--r--net/wireless/nl80211.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 9a796931e55e..b6ce2bcac4b9 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -13575,7 +13575,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))
wdev->current_bss->pub.channel = chandef->chan;