Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1608007pxp; Thu, 17 Mar 2022 12:36:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfzZrIXJ48l2kZikrBbaP6jl2HlmD/CaKZk+rLHCsNNBOmWoZEWIjo5w2i1e+I6jUuwp7k X-Received: by 2002:a17:902:6845:b0:153:9af1:3134 with SMTP id f5-20020a170902684500b001539af13134mr6831892pln.169.1647545771036; Thu, 17 Mar 2022 12:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647545771; cv=none; d=google.com; s=arc-20160816; b=aSY3zeXMVbPvx+fUzZp/4D9M6b9KwLg0B7qTbngeLMOX4YoK2HHWZzSMJH8ifYeVv9 8RRDd/mAcAVC6+BX1OPd27vdGa0NgD1EEpsSdb3SM85BG76eorb71etBRrELuNJVIlZU VzcNEoj1fZar3W3AT3f5kwSRzVMUI+nEuXq5vaeY7gS5RvuwffA6JB6uJrViblR1aCui evPyko2tsE//U379P8avOcF9sLzZ18Q23RidAdAiqvzEUv81M11yedFbaL0maWSaoh5/ LCBn46HhqAs7kBtorCK65oR2uuohTZ2n1QfaX7TRSZCD2SEkabxK/3NXtYJ6F/Jev0m5 ZSzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KP8FFQ2znlYuKX2IQLxD30FbMJucHgoczEGzrn7su9U=; b=pt1i8Xa/FFaSkZFuCHMtBW5c+ob8lGp/5Pspu5ybnDK6JWXVQQt8ipxfjICFi7tKUQ p0IptVMfdS/uMfaoTq9rGu6P2csZNMJeK2K5Vk7LyEQyUM92OYj2flVCDKrMIfAoTKrU RLfSSppUWUu2DB+ocbhjOv6HvcM/xF88zNaK1+vxUrnJkHIS0xnCn2oMWJ1ekgSUTuSS esISWc0Pq6e4NdeoiPyYaKl0sfD4l/iSvY/hWeskcN+/jpWU1AFRg6JcFUKspJNW1kTq 57m4cmNOct1c4Ag88KndoeLw4WO/UlHA18CYht0Ssd+H3Pm0xW9otUEruoWMj/Bldtod 8GbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OHI6tfLy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n15-20020a170903110f00b00151f3eea1aasi6637299plh.550.2022.03.17.12.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 12:36:10 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OHI6tfLy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6172C22A2B0; Thu, 17 Mar 2022 12:36:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235041AbiCQM6g (ORCPT + 99 others); Thu, 17 Mar 2022 08:58:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235142AbiCQMyr (ORCPT ); Thu, 17 Mar 2022 08:54:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C7B03B00E; Thu, 17 Mar 2022 05:53:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DB68C61240; Thu, 17 Mar 2022 12:53:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2CCCC340E9; Thu, 17 Mar 2022 12:53:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521610; bh=1n0/fjh8481R1/+vVkCK08P+a7iR+AerTmZh2YvhAQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OHI6tfLyxZ2/yge8yuppsTeOLTrfYN0KMZFH7sx13nMDxrXM29e8fzoD0aPbrdjJY 7y/jac5mW7fbQJdKcZ4rFzTVFHheb4HIwuV0GFveQ5ky/I7CiRL6mWMpIoxg3E+Yh7 kOlCrqJqi0sJJ7XBK8PnsZd26frKMDROOo1QzwuE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sreeramya Soratkal , Johannes Berg , Sasha Levin Subject: [PATCH 5.16 23/28] nl80211: Update bss channel on channel switch for P2P_CLIENT Date: Thu, 17 Mar 2022 13:46:14 +0100 Message-Id: <20220317124527.424056121@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sreeramya Soratkal [ 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 Link: https://lore.kernel.org/r/1646114600-31479-1-git-send-email-quic_ssramya@quicinc.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/wireless/nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index f73251828782..9b4bb1460cef 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -17757,7 +17757,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); -- 2.34.1