From patchwork Wed Jan 7 15:50:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliad Peller X-Patchwork-Id: 5585521 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BF41CBF6C3 for ; Wed, 7 Jan 2015 15:57:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA6F620173 for ; Wed, 7 Jan 2015 15:57:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E57F420108 for ; Wed, 7 Jan 2015 15:57:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752611AbbAGP5s (ORCPT ); Wed, 7 Jan 2015 10:57:48 -0500 Received: from mail-wi0-f181.google.com ([209.85.212.181]:52945 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752568AbbAGP5r (ORCPT ); Wed, 7 Jan 2015 10:57:47 -0500 Received: by mail-wi0-f181.google.com with SMTP id r20so1937983wiv.2 for ; Wed, 07 Jan 2015 07:57:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=rjP7e+kM/CsbZsFvkmVxMqmBCd3+77zIarB64qUQ3uE=; b=G2AeX2M/1qJSYqvhl5ybOHx2tLFFwFeRDePB2GGjxOte6b90HnHAkMINpXYlK/p6mz UIFEKmQqfIp17JGhUb5OhTiulQYk28LA2Be+f49tpLGqNoeMmE5tvH/e/07mm80h+NHu typ6fVX2qpJevmAtJf9EGmaJYUUIhndfLbDuMvLlJKVMsmlJF2UF61UPFo1MgEJvl4UH IpN4Y09cFK2pETSkOl+ptLmfKWJ0GYgP10sDs2JWe7YLjnGfGDRL2P3Wz0IzyHOnWiPY is6Eo7JRqE6AHTu1y41paHBXMX/Jhvp8rInG+EjZ2u2642xRwPSJ6b6f0QFyrapGO44S P++w== X-Gm-Message-State: ALoCoQlMDfYkb9+aGVV1MR/uP6mQz5lTM+6xmvlAtbHDU2H82XA50XGp7RCZpGmIuvFwxkI2o8j6 X-Received: by 10.180.103.40 with SMTP id ft8mr48408534wib.68.1420645821540; Wed, 07 Jan 2015 07:50:21 -0800 (PST) Received: from muse.ger.corp.intel.com (93-172-181-114.bb.netvision.net.il. [93.172.181.114]) by mx.google.com with ESMTPSA id o1sm2567110wjf.41.2015.01.07.07.50.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Jan 2015 07:50:20 -0800 (PST) From: Eliad Peller To: Subject: [PATCH v2 3/3] mac80211: don't defer scans in case of radar detection Date: Wed, 7 Jan 2015 17:50:11 +0200 Message-Id: <1420645811-17877-3-git-send-email-eliad@wizery.com> X-Mailer: git-send-email 1.8.5.2.229.g4448466.dirty In-Reply-To: <1420645811-17877-1-git-send-email-eliad@wizery.com> References: <1420645811-17877-1-git-send-email-eliad@wizery.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Radar detection can last indefinite time. There is no point in deferring a scan request in this case - simply return -EBUSY. Signed-off-by: Eliad Peller --- v1->v2: use the newly introduced funcion net/mac80211/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index cdd8258..4bee1f97 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -505,7 +505,7 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, lockdep_assert_held(&local->mtx); - if (local->scan_req) + if (local->scan_req || ieee80211_is_radar_required(local)) return -EBUSY; if (!ieee80211_can_scan(local, sdata)) {