Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5998356ybc; Wed, 27 Nov 2019 13:08:54 -0800 (PST) X-Google-Smtp-Source: APXvYqxVSBx81W6buwIpWbMoRsRajGgI292kl7A9pO5/3QW3Dx4dTsJjXEho6DMGmkRvZ2j5lreF X-Received: by 2002:a05:6402:4c6:: with SMTP id n6mr34354387edw.257.1574888934517; Wed, 27 Nov 2019 13:08:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888934; cv=none; d=google.com; s=arc-20160816; b=wD6/iXZUrNu21jVEn6HiQP/Bpd5wLh3HLUGtusmCLGfdjsAhmnW+AbNlFLuDWQPc31 waB7//MffjmmmisGIWvonXUeuqlH78dag5gNf48jNbWpqZe20/u/Y5mnzb4A29PvnENb ljV3v35eq/sno4UGPFa4Hssdjo8aXv7bX1gIvTpuSpvPJAskE9BLzD3WnlnDaVY+hRje X+a8JPM/ydZWJjyOrm26sFty++NOwccLgC6r0b3mKVV8wZYhLLujBsk7F0kvWct921Vd endVplT8SnISdp1xpQbSCe7g88oowf40w3ChMgRCpiDQHvAEDuv+5HxN8pLGol7ghIq2 6SWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=400qwR7FVIj9s/YYr2696Rtl3ulDPvhk0N1Dzk4F1Ms=; b=wBohMmc9orJJFQ2WK1Ij27eev69ViJFjo3ieBnPoEGFmiDCFpx0Vm0cRQx7HRB6W3k uUBKgClZsTZDyEOXrWyYmI4RBQrDgXJKQYfUb3hyiV/1KCNJYzxv3nKgn2yAMRpX5EM9 sCgeq+oFEmYHcA/69Dtl9o9zpOWBLzbXAWzLefxajO2DwkMSL+HXkzPIFf5Mle1qDaZg ldF+dhEQ9Vjw2/1HY0pR16vKixMKOfO0QSTToBjnaD9Kk4tzsZK7cAbztjnD/v1Lywrn MJWzYp2nsJPspgroT1IJin+WrVEEG0uIHRIKvQ6/+N9CQ4u9Pv8pZsv1wn30vWyB7M7y TQZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rB2y9KGX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j30si1720321ejo.214.2019.11.27.13.08.29; Wed, 27 Nov 2019 13:08:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rB2y9KGX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731666AbfK0VFT (ORCPT + 99 others); Wed, 27 Nov 2019 16:05:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:58948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732268AbfK0VFR (ORCPT ); Wed, 27 Nov 2019 16:05:17 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 72B9B20637; Wed, 27 Nov 2019 21:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888716; bh=kZ8zWA2dW+43AmUKUBWUQPRKVQv73HqDZw+2W139/QY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rB2y9KGXpuDDOpDAY4v8+YsHwUY5IIXAs20kb+7kcXlMiHnPkdKkdXAqO/JwMNV3D 6CtXli7Qd+WGF9TLl2Ib27CFhYpWUjJeOgxtUvqhTSlOXK+d7fnvrZJ+GUVv7/BKCK P68NGW9tQsw7IZ4ICs1udTxswYcAR4eOQB4oBjsk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sriram R , Johannes Berg , Sasha Levin Subject: [PATCH 4.19 243/306] cfg80211: Prevent regulatory restore during STA disconnect in concurrent interfaces Date: Wed, 27 Nov 2019 21:31:33 +0100 Message-Id: <20191127203132.706702903@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sriram R [ Upstream commit 113f3aaa81bd56aba02659786ed65cbd9cb9a6fc ] Currently when an AP and STA interfaces are active in the same or different radios, regulatory settings are restored whenever the STA disconnects. This restores all channel information including dfs states in all radios. For example, if an AP interface is active in one radio and STA in another, when radar is detected on the AP interface, the dfs state of the channel will be changed to UNAVAILABLE. But when the STA interface disconnects, this issues a regulatory disconnect hint which restores all regulatory settings in all the radios attached and thereby losing the stored dfs state on the other radio where the channel was marked as unavailable earlier. Hence prevent such regulatory restore whenever another active beaconing interface is present in the same or other radios. Signed-off-by: Sriram R Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/wireless/sme.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/wireless/sme.c b/net/wireless/sme.c index d536b07582f8c..c7047c7b4e80f 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -642,11 +642,15 @@ static bool cfg80211_is_all_idle(void) * All devices must be idle as otherwise if you are actively * scanning some new beacon hints could be learned and would * count as new regulatory hints. + * Also if there is any other active beaconing interface we + * need not issue a disconnect hint and reset any info such + * as chan dfs state, etc. */ list_for_each_entry(rdev, &cfg80211_rdev_list, list) { list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { wdev_lock(wdev); - if (wdev->conn || wdev->current_bss) + if (wdev->conn || wdev->current_bss || + cfg80211_beaconing_iface_active(wdev)) is_all_idle = false; wdev_unlock(wdev); } -- 2.20.1