Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6015896ybc; Wed, 27 Nov 2019 13:27:02 -0800 (PST) X-Google-Smtp-Source: APXvYqz3C8F1vmcAvIs0bxM6LVY32SteHG0HIpWVI9G7FtroHReO1HHZFnOZcU1ZNk4RqY0YxWS+ X-Received: by 2002:a17:906:d96e:: with SMTP id rp14mr50195363ejb.14.1574890022620; Wed, 27 Nov 2019 13:27:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890022; cv=none; d=google.com; s=arc-20160816; b=LRVg21OtXNk15FU3h/BmQUlJFSXFLE8nnNq65Wi4jRdveCseu1cyU+lTLK6w/KYaao HSLJGkNlLWVQ3MvfRZr7NiS8oVLYTtoEW66miEqpmQ0uEVn4xa+Xv2+aRt4iv4QPKxax sXNBKDvpV4bWhBwDCg4Tn7CjtnxoSnbbfjH7uAqYt8OC24P78rKXXz9HKWMm0uXBdc6T ODqvgwRbEXp98+dJ81dSq0HrWiwF49wFn7sRLro+OywnRsTY36I9solrjrQGmYGsHZem W/yY1D895+GT74+4amwXh2qWiCFKuVrW7VxCudWtqNnhhcCeLDMujhFotmHsuBJ6laIh xOrg== 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=cfj+gzU2f8oEwuVkIspcqw5UK3ak37eX0E/XV/+/OCE=; b=lTdgF0eIFqoNLo4orS07VifDI0ezhhBVDOJ1BvuaEHL98lqURZsJoIpcNaUXncS2du r3t6LlA2e60W3Ggxlwc+0CaNG4Fu3GmlW2q/X87Cfsv0bUL7XHFpjg3jIg+gLtGEj8mQ dxcEIAblJMYUropQ33HJpuW/msjgyf9+UpPrlhyh6eKZZMqiBRrC+EirNZ7+EO27YQq1 0E2HLhW0/s4eLZAXWP86DGAwUuWuqNdkjkFuk0f+UstWi4vgNYT1Qq7yiYBaIAvaIp7Q POzYVjmTQ7GEuVIxB2V+g2URFDEtmU6D4ThIVOyIktMXNjyyrABpwaYMb2MJx9OdIrAJ t8Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LpxKWBvm; 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 ks14si9914856ejb.87.2019.11.27.13.26.39; Wed, 27 Nov 2019 13:27:02 -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=LpxKWBvm; 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 S1732342AbfK0VFx (ORCPT + 99 others); Wed, 27 Nov 2019 16:05:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:59632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727440AbfK0VFt (ORCPT ); Wed, 27 Nov 2019 16:05:49 -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 0C9EB21770; Wed, 27 Nov 2019 21:05:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888748; bh=5Pdak+JPJzVEhoD/8rcgc5m8LdWqf4v8nm3VoE3IvzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LpxKWBvmRTf7cRgPIsOxhPWFkbLE8B30tIPwqbBUVUcuzAB/OWu6rfi1CiCDCFcSp 3xDY81mpG5B+hRAGcruzzT/hAXPzJ0w3jnDsCktSdxGAgagqqKwWjvDZrYRMnSZM4x /SfPYU6C/D9BwdFA6OSUqkZmKjIDZqALJ4Vo9Q+w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , Sasha Levin Subject: [PATCH 4.19 254/306] cfg80211: call disconnect_wk when AP stops Date: Wed, 27 Nov 2019 21:31:44 +0100 Message-Id: <20191127203133.433190312@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: 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