Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2273007pxp; Mon, 21 Mar 2022 15:33:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwC0M5pFx4JrxbkUHrWBJh6orvQ/Wz1Ivkfovaim7EGbuUJpW4U7H47LDae6T1L18pJI2Zm X-Received: by 2002:a63:4e0d:0:b0:381:4606:ec9e with SMTP id c13-20020a634e0d000000b003814606ec9emr19618880pgb.345.1647901990049; Mon, 21 Mar 2022 15:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647901990; cv=none; d=google.com; s=arc-20160816; b=VVAkaHY40eRVxRcSYk7WrkrNUEhPbLrJn41gYkT13ia9iyObvR4f6Pi8mngViXPizW 6dHiKtGhcldi36ajzY0849BDw2m1no3vOJGQoqcuHuHyHoi1BJpQM0jJvrHVYLdkQRkS 6MZ/Uxv4PoCAFF3DJneixlkwo07iYKCee/Bh4kHBL9gf7egYo6qbI8O2sDr8mxybukcK I2pbBCZaxx3SsUL/BUgU9Gkwq50AdLQ5Bo91G5TU8R6julPuMDDfex6Px6zbVoZRl9BY EewkCA4JiPEEE7Np54Z2HO5pbs7JC0ZeXRsMNPVEc+FlU/7JUhIumzENyadjFcBoO4qi xHFw== 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=vE/OMH7wCFF/kv7I8xKG9yYsFLoulbWGC5fUPV8GVQE=; b=uofcLCxDgVBVUI1LrwcqZ2yN7WB0vZ50d/pQ6F+i7HJ8tBvmZB8tJ/+Shv1mO5isir iHmDz1XnfHDNhCRM5/RqGgt7bNG7FxTKojk/He3gvSCOxfGFBUCs1tkPUntxETPeTcr7 Y9+HBm0jT2WJupc2ScVVCW828oZopnC3qXAU0h3GugDx/6TFC2RU6yP1k0AZvRtt2rc3 0tMNpWPeNIp4ia2xxZQyQhiTgUCbniVH9KIcnbyHwMpNhzFTiKZpOMJCcHH2HSyQ03ZY p8WhVhhMFjpVuzRnOVFy3Z1OVoZVYYFCmhYBZt5F/n+aclElCPAMeJm4XOynQJpbhCfS x6WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uswr1S+o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id cj19-20020a056a00299300b004fa86593770si7349531pfb.145.2022.03.21.15.33.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:33:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uswr1S+o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 B936E32F4E0; Mon, 21 Mar 2022 14:46:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347800AbiCUN76 (ORCPT + 99 others); Mon, 21 Mar 2022 09:59:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348435AbiCUN5A (ORCPT ); Mon, 21 Mar 2022 09:57:00 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 042EE16D8CD; Mon, 21 Mar 2022 06:55:09 -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 ams.source.kernel.org (Postfix) with ESMTPS id 95795B816CE; Mon, 21 Mar 2022 13:55:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E49FBC340E8; Mon, 21 Mar 2022 13:55:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647870907; bh=588xbUtmPZNqqQ0O0bWiHhkKzSzqqyaIEJxroH93rbk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uswr1S+olRcPRYlYYPIi87IGgK5CDMxuo0crBK1efnbCM0Et7ss4t0er1modK3Aae A85A+MsaHpnQDoov+bkp3bDteoTP7SUcdlfcnM55l/ABDHfVDfe9IE94rxxa5+O6Ww 7HQ8eCJEgLuZ+IyjX1PTcxODEtYYJ2usDys+YbQw= 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 4.19 13/57] nl80211: Update bss channel on channel switch for P2P_CLIENT Date: Mon, 21 Mar 2022 14:51:54 +0100 Message-Id: <20220321133222.370531005@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220321133221.984120927@linuxfoundation.org> References: <20220321133221.984120927@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.1 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 c5806f46f6c9..2799ff117f5a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -15518,7 +15518,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; -- 2.34.1