From patchwork Thu Dec 5 09:21:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliad Peller X-Patchwork-Id: 3286961 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E27B19F373 for ; Thu, 5 Dec 2013 09:21:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C824C20222 for ; Thu, 5 Dec 2013 09:21:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B1F6201FD for ; Thu, 5 Dec 2013 09:21:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753550Ab3LEJVl (ORCPT ); Thu, 5 Dec 2013 04:21:41 -0500 Received: from mail-ea0-f180.google.com ([209.85.215.180]:49047 "EHLO mail-ea0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752223Ab3LEJVi (ORCPT ); Thu, 5 Dec 2013 04:21:38 -0500 Received: by mail-ea0-f180.google.com with SMTP id f15so11190204eak.39 for ; Thu, 05 Dec 2013 01:21:37 -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; bh=Cd3k/Kelfe/4D28o/DUotoSblNcMdR1Bx6hz9uIF238=; b=HrNgIajJjn1B09RisGRG2vWCzjDVFkmZEu15ROHcWtZ58mk99xl/aDV9okkB5Fw1+Y cfhZE/74cwhU5WzJFXl+SfHBB2ZGoQUKxBWrpdiSbM86ZF7ViLObG4PrZxqT8oyXWV38 siEcsj2muZDFcqOCqfT3qYVVSTSKN/7FMf6vpj5pmue9seFmuEzZUjhCDxXyqROEE8eo jYXXxZYGf9/XJz5Co+maCdNbhJuB51k/LzMYyL2ArNMiRMp9LbEmEaSocwXfdLWraYmI nIp8ggDwmb5quHHJYZTOuA5ZoPww0DJa+xVPACNinhtYh0P8nGrreYtzf1t8/V4/Dv5x UKlA== X-Gm-Message-State: ALoCoQlxo4ygOFQ3YdxirtVgKGrTPUI31LjOWeHtikJWwZQ150nFdyoeZkW17dtoAI9wumoJVpy3 X-Received: by 10.15.32.73 with SMTP id z49mr80017829eeu.27.1386235297598; Thu, 05 Dec 2013 01:21:37 -0800 (PST) Received: from localhost.localdomain (93-173-177-113.bb.netvision.net.il. [93.173.177.113]) by mx.google.com with ESMTPSA id h3sm78610986eem.15.2013.12.05.01.21.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 01:21:36 -0800 (PST) From: Eliad Peller To: Johannes Berg Cc: , Barak Bercovitz Subject: [PATCH 1/4] cfg80211: stop sched scan only when needed Date: Thu, 5 Dec 2013 11:21:26 +0200 Message-Id: <1386235289-27278-1-git-send-email-eliad@wizery.com> X-Mailer: git-send-email 1.8.5.rc1 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, 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 From: Barak Bercovitz cfg80211_leave stops sched scan when any station vif is leaving. Add an explicit check and call it only when the relevant vif (the one we scan on) is leaving. Signed-off-by: Barak Bercovitz [Eliad - changed the commit message a bit] Signed-off-by: Eliad Peller --- net/wireless/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/wireless/core.c b/net/wireless/core.c index 32af857..a8e48c7 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -775,7 +775,8 @@ void cfg80211_leave(struct cfg80211_registered_device *rdev, break; case NL80211_IFTYPE_P2P_CLIENT: case NL80211_IFTYPE_STATION: - __cfg80211_stop_sched_scan(rdev, false); + if (rdev->sched_scan_req && dev == rdev->sched_scan_req->dev) + __cfg80211_stop_sched_scan(rdev, false); wdev_lock(wdev); #ifdef CONFIG_CFG80211_WEXT