From patchwork Tue Mar 1 06:03:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreeramya Soratkal X-Patchwork-Id: 547777 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B546C433F5 for ; Tue, 1 Mar 2022 06:03:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231189AbiCAGEM (ORCPT ); Tue, 1 Mar 2022 01:04:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229674AbiCAGEL (ORCPT ); Tue, 1 Mar 2022 01:04:11 -0500 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13F7F60CFB for ; Mon, 28 Feb 2022 22:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1646114611; x=1677650611; h=from:to:cc:subject:date:message-id:mime-version; bh=OYbuFDWj682ibRpmzI10PRt6i53ppm9DvP01f/vxpXw=; b=yes5EsqrSFXoax+Q7/IoKsJDAOArL8ckuRsZE00W796n4W/Q5zybUQRS iVURXser9k9VTvb5AGpegPjV/eayWQEFecbx6U1HRdckQ58bnJnqXICNh /Ek+oYOIHy2s23Z4BxzHsWYLMBgcFn+5mZ/luMWeLmfmwa2Nz9h+R+uwJ Q=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-02.qualcomm.com with ESMTP; 28 Feb 2022 22:03:30 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 22:03:30 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Mon, 28 Feb 2022 22:03:30 -0800 Received: from hu-ssramya-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Mon, 28 Feb 2022 22:03:28 -0800 From: Sreeramya Soratkal To: CC: , , Subject: [PATCH] nl80211: Update bss channel on channel switch for P2P_CLIENT Date: Tue, 1 Mar 2022 11:33:20 +0530 Message-ID: <1646114600-31479-1-git-send-email-quic_ssramya@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 578bff9..8e0caaa 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -17816,7 +17816,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);