From patchwork Tue Jul 5 12:23:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Coelho X-Patchwork-Id: 9214165 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7675260572 for ; Tue, 5 Jul 2016 12:23:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67A48284E3 for ; Tue, 5 Jul 2016 12:23:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B7D428A54; Tue, 5 Jul 2016 12:23:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SBL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDDD628A42 for ; Tue, 5 Jul 2016 12:23:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755100AbcGEMXb (ORCPT ); Tue, 5 Jul 2016 08:23:31 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:32938 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754950AbcGEMX2 (ORCPT ); Tue, 5 Jul 2016 08:23:28 -0400 Received: from [192.40.95.6] (helo=dubbel.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1bKPNu-0001jv-86; Tue, 05 Jul 2016 15:23:26 +0300 From: Luca Coelho To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Luca Coelho Date: Tue, 5 Jul 2016 15:23:13 +0300 Message-Id: <1467721394-8195-7-git-send-email-luca@coelho.fi> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1467721394-8195-1-git-send-email-luca@coelho.fi> References: <1467721394-8195-1-git-send-email-luca@coelho.fi> X-SA-Exim-Connect-IP: 192.40.95.6 X-SA-Exim-Mail-From: luca@coelho.fi Subject: [PATCH 6/7] mac80211: report failure to start (partial) scan as scan abort X-SA-Exim-Version: 4.2.1 (built Mon, 06 Jul 2015 07:28:29 +0000) X-SA-Exim-Scanned: Yes (on farmhouse.coelho.fi) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Berg Rather than reporting the scan as having completed, report it as being aborted. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- net/mac80211/scan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 8d4a9cd..070b40f 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -362,10 +362,11 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) if (rc == 0) return; - /* HW scan failed and is going to be reported as done, so clear - * old scan info. + /* HW scan failed and is going to be reported as aborted, + * so clear old scan info. */ memset(&local->scan_info, 0, sizeof(local->scan_info)); + aborted = true; } kfree(local->hw_scan_req);