Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp713205imj; Wed, 13 Feb 2019 16:19:21 -0800 (PST) X-Google-Smtp-Source: AHgI3IYHe5PUhp4ItNKWQ39lDhfOxAot1oTyJmb6ctg+wLTsuGuxQpsCsLCX8qKu9y/18rZNTFxH X-Received: by 2002:a63:da45:: with SMTP id l5mr890605pgj.111.1550103561038; Wed, 13 Feb 2019 16:19:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550103561; cv=none; d=google.com; s=arc-20160816; b=vX6kATgM/wm/z9bBBnAJOlXNjM0EmWaJBKtsURAZgH7sByHMjRKdDTARv82atqtyVz WkYsUW8ts693Ijh/nzT5F5t/cAPy6VbrrG0ujdqZs3Tj5EEeHO+JOsckI8k8WkTPzXeW bj+CV6Wg6LWKy6zMStxBdkYSmwwx1YPrWmMvpK9XvlxPZMpQym7YBXrmL0Q9ax5Wa7/A 0RXuSWeSFE/bTL7xmwmI4fACD4gkZBLrlxNCIPCwzxlLwoX2icH2YZ6ikihxY9qfUDe9 59kOcqRwa0pngdKzrlvpaxWHcdtrfy4wrBVab5Xief1K1Bb9440ZK5qfkk84UV+UIt6w Zppw== 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=m+N//xzDw8ZouECWyQGQxtEOxNtvocaQFBD4GlI6V8Y=; b=UmMmqVeC2/x2rbRT3PIQNTOgzAHs/jdmNvv1GNyNwWXu/7bn5bW0RYYwghRPhX4kpu AzNYU3UhacQt+zrigqY/u4XQvaiPIgZHdyqwMynXdeC0HZxTOpOkHe2Vu+pjxm7ocvZs wroyA+iICFkdYTlT9Soa6XsQ8pzv045lqFhlazaASEcetAiVwdVL7VJP4Zkf3kpVvIjI /8BKDoU7mmOKK49EA2hFu718U2CpBrNQwoNXKUiShdCleFWkYDMxAsLRAGsT7yxqbp83 Ms6+jNNiL2/e7b9S+DgeB2nIa83FPB63BAecgNmgYV/WYLxH0B+KkvawrwvAxTSiPUrK K4TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=igGHrkb0; 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 s73si739454pfs.54.2019.02.13.16.19.04; Wed, 13 Feb 2019 16:19:21 -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=igGHrkb0; 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 S2392020AbfBMSpb (ORCPT + 99 others); Wed, 13 Feb 2019 13:45:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:44108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406331AbfBMSp2 (ORCPT ); Wed, 13 Feb 2019 13:45:28 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 6565D20811; Wed, 13 Feb 2019 18:45:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550083527; bh=xOiWPNECfftlfeJBDXKEzWo0Fc+66luvb0Im6BNO9iY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=igGHrkb0q7zaTqjdFNd3ssaoj3mRfjO57qQDlx8+HD58yYOQ2hNFo1ijBzTpQti76 Tdz4HR98l5xLKYqeb/0zxdcld+J8SAlYwEpa0b95J3Tvv3qr4Z570e4mtoPQxJn+rC C6WkCdFEN2VCuul2ncBHZnKfoypsArJWuX5WGRKQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg Subject: [PATCH 4.20 14/50] cfg80211: call disconnect_wk when AP stops Date: Wed, 13 Feb 2019 19:38:19 +0100 Message-Id: <20190213183656.954676443@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190213183655.747168774@linuxfoundation.org> References: <20190213183655.747168774@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johannes Berg commit e005bd7ddea06784c1eb91ac5bb6b171a94f3b05 upstream. 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: Greg Kroah-Hartman --- net/wireless/ap.c | 2 ++ net/wireless/core.h | 2 ++ net/wireless/sme.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) --- a/net/wireless/ap.c +++ b/net/wireless/ap.c @@ -41,6 +41,8 @@ int __cfg80211_stop_ap(struct cfg80211_r cfg80211_sched_dfs_chan_update(rdev); } + schedule_work(&cfg80211_disconnect_work); + return err; } --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -444,6 +444,8 @@ void cfg80211_process_wdev_events(struct 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 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -667,7 +667,7 @@ static void disconnect_work(struct work_ rtnl_unlock(); } -static DECLARE_WORK(cfg80211_disconnect_work, disconnect_work); +DECLARE_WORK(cfg80211_disconnect_work, disconnect_work); /*