Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp739663ybc; Sat, 16 Nov 2019 07:52:40 -0800 (PST) X-Google-Smtp-Source: APXvYqyt95DHPg5yaGyXpv+qhxzxKVydSSOSQo4eTmi0D+AWUW+Lb0YiFbs6zi0EQUo7mZYVWhYb X-Received: by 2002:a17:906:3053:: with SMTP id d19mr10876494ejd.109.1573919560659; Sat, 16 Nov 2019 07:52:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573919560; cv=none; d=google.com; s=arc-20160816; b=BdmBCFwrGFcL00SsW1qpOTpVJXpehsE10VB7RonZ5HhftRzUUHoiOErR+nTRX07Esv JQi6tq77vVU3JOhfUn49wMC1q9gOyX3B07tT8gOlzgHv5gxMsi7/ct7tngFLDi6NlQPn LSDRBy1gxU8JWsSean0pk8SKOIckzrSJfOjK3liKnGoPJtS57hTRfx5KT4UegvaFnkbH fsC+1nq9IoPBtqYML9HuubOcbaHe5K8jrPuQdDVHk+349d/p3RuJtO+4L451NiKShMo6 n10AwGuw04HgDEXl6Xl/IwrmZP20EZQNeYsKTFVy8UmuqTcQSF4MCpmCr8m2xMA0T6iG SmBQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cfj+gzU2f8oEwuVkIspcqw5UK3ak37eX0E/XV/+/OCE=; b=wbEdcKedOkNGhIRS5tRILJ4CrzahrfE5ShVB5/UOy5i2GuCAjXStPlsYNiKRy4De/L L6/lGwc21WGNzrUfZgxtWWKnFfDt5dqBCpe2JRv7AS0rX15kammLbiufhM/Cz6gLgMs/ R0W8xhUNWriNa4HFL1xXP6Ay/xpGYSS0wC2ZdxY6EFFoh6CidlXrbhH0q/Czr21Yljj3 USCV1FNyG4/Apg9aFn1I7dsoRhEsZ3Z/TcesSw7wKGa+OBRUx84bs3wf5/QS+hQPXy0V jO0x5biSPXS9ltU+T1JBBJfx94Zaxb9T7ha9+DTtvpMOSQqUsYxaVGtBLAF009Zn8/kf 3jCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XxTUeGBt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a61si9401259edf.157.2019.11.16.07.52.15; Sat, 16 Nov 2019 07:52:40 -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=XxTUeGBt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729832AbfKPPrv (ORCPT + 99 others); Sat, 16 Nov 2019 10:47:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:53866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729654AbfKPPrM (ORCPT ); Sat, 16 Nov 2019 10:47:12 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5D97C2088F; Sat, 16 Nov 2019 15:47:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919231; bh=5Pdak+JPJzVEhoD/8rcgc5m8LdWqf4v8nm3VoE3IvzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XxTUeGBtQno2/GyHBn/Q5+d4Y6ybRImKJB3WlcSUQVR3LOdrzuctuuiEgRYe2KVpX 2r/gI0OplJpSdeyqWWj2sO4E6oD5ruQrER8rAatQOJVU+/USDMFzo3d1apkI99MPC5 350/jI+CT4W8xzBsREcPT0LGECVZq7hrFnnDBrnY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Johannes Berg , Sasha Levin , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 237/237] cfg80211: call disconnect_wk when AP stops Date: Sat, 16 Nov 2019 10:41:12 -0500 Message-Id: <20191116154113.7417-237-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg [ Upstream commit e005bd7ddea06784c1eb91ac5bb6b171a94f3b05 ] Since we now prevent regulatory restore during STA disconnect if concurrent AP interfaces are active, we need to reschedule this check when the AP state changes. This fixes never doing a restore when an AP is the last interface to stop. Or to put it another way: we need to re-check after anything we check here changes. Cc: stable@vger.kernel.org Fixes: 113f3aaa81bd ("cfg80211: Prevent regulatory restore during STA disconnect in concurrent interfaces") Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/wireless/ap.c | 2 ++ net/wireless/core.h | 2 ++ net/wireless/sme.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/net/wireless/ap.c b/net/wireless/ap.c index 882d97bdc6bfd..550ac9d827fe7 100644 --- a/net/wireless/ap.c +++ b/net/wireless/ap.c @@ -41,6 +41,8 @@ int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev, cfg80211_sched_dfs_chan_update(rdev); } + schedule_work(&cfg80211_disconnect_work); + return err; } diff --git a/net/wireless/core.h b/net/wireless/core.h index 7f52ef5693203..f5d58652108dd 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -430,6 +430,8 @@ void cfg80211_process_wdev_events(struct wireless_dev *wdev); bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range, u32 center_freq_khz, u32 bw_khz); +extern struct work_struct cfg80211_disconnect_work; + /** * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable * @wiphy: the wiphy to validate against diff --git a/net/wireless/sme.c b/net/wireless/sme.c index c7047c7b4e80f..07c2196e9d573 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -667,7 +667,7 @@ static void disconnect_work(struct work_struct *work) rtnl_unlock(); } -static DECLARE_WORK(cfg80211_disconnect_work, disconnect_work); +DECLARE_WORK(cfg80211_disconnect_work, disconnect_work); /* -- 2.20.1