From patchwork Thu Oct 29 07:46:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Dutt Undekari X-Patchwork-Id: 7516971 X-Patchwork-Delegate: johannes@sipsolutions.net 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2B6719F399 for ; Thu, 29 Oct 2015 07:47:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 660F02087E for ; Thu, 29 Oct 2015 07:47:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7427A2081A for ; Thu, 29 Oct 2015 07:47:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753542AbbJ2Hr3 (ORCPT ); Thu, 29 Oct 2015 03:47:29 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:39245 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752268AbbJ2Hr3 (ORCPT ); Thu, 29 Oct 2015 03:47:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1446104849; x=1477640849; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=ettbjvn3KcGrRBH8lVzh/9EvH72C34n9zAKr3ptyrak=; b=KoMxpqGKZnajwxYmSMi2IiqZKBZqd9Bqh5aRjKn8c6XN8nRbozk9hfCf 97nbDMCnAPDmkvPTctKM3XsqTcEyVqQ5uwhgONqO4V4wfXsSVtHAGU2H9 +DyUQg3cRFUMvGXYayrBcX0EInkHDqjqO1VCymcX9RB82VRg1bfJJPVe0 o=; X-IronPort-AV: E=McAfee;i="5700,7163,7968"; a="239731179" Received: from ironmsg03-r-new.qualcomm.com (HELO Ironmsg03-R.qualcomm.com) ([10.53.140.107]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Oct 2015 00:47:28 -0700 X-IronPort-AV: E=Sophos;i="5.20,213,1444719600"; d="scan'208";a="1023806214" Received: from nasanexm02h.na.qualcomm.com ([10.85.0.89]) by Ironmsg03-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 29 Oct 2015 00:47:29 -0700 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by nasanexm02h.na.qualcomm.com (10.85.0.89) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Thu, 29 Oct 2015 00:47:14 -0700 Received: from usdutt-linux.qualcomm.com (10.80.80.8) by aphydexm01f.ap.qualcomm.com (10.252.127.15) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Thu, 29 Oct 2015 13:17:18 +0530 From: Sunil Dutt To: CC: , , , , Subject: [PATCH 2/2] mac80211: Add support for aborting an ongoing scan Date: Thu, 29 Oct 2015 13:16:44 +0530 Message-ID: <1446104804-8312-2-git-send-email-usdutt@qti.qualcomm.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1446104804-8312-1-git-send-email-usdutt@qti.qualcomm.com> References: <1446104804-8312-1-git-send-email-usdutt@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To aphydexm01f.ap.qualcomm.com (10.252.127.15) 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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: Vidyullatha Kanchanapally This commit adds implementation for abort scan in mac80211. Reviewed-by: Jouni Malinen Signed-off-by: Vidyullatha Kanchanapally Signed-off-by: Sunil Dutt --- net/mac80211/cfg.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 713cdbf..d4d78e1 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3797,6 +3797,16 @@ static int ieee80211_del_tx_ts(struct wiphy *wiphy, struct net_device *dev, return -ENOENT; } +static int ieee80211_abort_scan(struct wiphy *wiphy, struct net_device *dev) +{ + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); + struct ieee80211_local *local = sdata->local; + + /* Cancel the ongoing scan */ + ieee80211_scan_cancel(local); + return 0; +} + const struct cfg80211_ops mac80211_config_ops = { .add_virtual_intf = ieee80211_add_iface, .del_virtual_intf = ieee80211_del_iface, @@ -3881,4 +3891,5 @@ const struct cfg80211_ops mac80211_config_ops = { .set_ap_chanwidth = ieee80211_set_ap_chanwidth, .add_tx_ts = ieee80211_add_tx_ts, .del_tx_ts = ieee80211_del_tx_ts, + .abort_scan = ieee80211_abort_scan, };