From patchwork Sun Jan 4 10:13:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliad Peller X-Patchwork-Id: 5562991 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 C7225BF6C3 for ; Sun, 4 Jan 2015 10:13:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA9F9201BC for ; Sun, 4 Jan 2015 10:13:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 247372017A for ; Sun, 4 Jan 2015 10:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752586AbbADKNd (ORCPT ); Sun, 4 Jan 2015 05:13:33 -0500 Received: from mail-wg0-f49.google.com ([74.125.82.49]:51439 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751101AbbADKNa (ORCPT ); Sun, 4 Jan 2015 05:13:30 -0500 Received: by mail-wg0-f49.google.com with SMTP id n12so25905816wgh.22 for ; Sun, 04 Jan 2015 02:13:29 -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:cc:subject:date:message-id:in-reply-to :references; bh=6QE2z9cwd2uo0NVLPb2/5oyZlshdls+e5w+i4uyuRJg=; b=AxVeX8hsbBGCEX1lUiNdkLYc1eWXEtd7qYoj2fMEG4viJQPYa622fxP1bWOejj23r7 LhmkSlc3xKlljTvpFJgX/WFdMYzrwJR8UzNJgbn4ewkyoG1NUnCzqnYxjOPVA8lsdgAZ VkIEWKKCu0fjmZmVike5jofM0GzlIT/2RN19aQB8xSeSs9kZ/g3cUraU4grMSo2d+xCo VTCZAu8CKjWpVyHR01vgW22EYrLdBa2z7NYZ3Z8kb9YvriF/I1Hj7N/8+A0S1AdZRY78 QORm2UFbo2IkQ7E543g1CoA6435NucyhdMhw9Ry7C7bERYeDD/oPJwb+AZLSD2oZc2nx VyDg== X-Gm-Message-State: ALoCoQmZ52xwM/6mJp0DZUkAKyOCH12YwsjkxHu3hV0JLfyIW+D4CBkscccuesAE2noWEgSl/wwA X-Received: by 10.194.237.101 with SMTP id vb5mr167766675wjc.30.1420366409221; Sun, 04 Jan 2015 02:13:29 -0800 (PST) Received: from muse.ger.corp.intel.com (89-138-233-251.bb.netvision.net.il. [89.138.233.251]) by mx.google.com with ESMTPSA id gb10sm45781034wjb.21.2015.01.04.02.13.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 04 Jan 2015 02:13:28 -0800 (PST) From: Eliad Peller To: Johannes Berg Cc: Subject: [PATCH 2/3] mac80211: don't defer scans in case of radar detection Date: Sun, 4 Jan 2015 12:13:18 +0200 Message-Id: <1420366399-31535-2-git-send-email-eliad@wizery.com> X-Mailer: git-send-email 1.8.5.2.229.g4448466.dirty In-Reply-To: <1420366399-31535-1-git-send-email-eliad@wizery.com> References: <1420366399-31535-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 --- 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 ae84267..4525623 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 || local->radar_detect_enabled) return -EBUSY; if (!ieee80211_can_scan(local, sdata)) {