From: Johannes Berg <johannes@sipsolutions.net>
To: Sunil Dutt <usdutt@qti.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, jouni@qca.qualcomm.com,
vkanchan@qti.qualcomm.com, amarnath@qca.qualcomm.com
Subject: Re: [PATCH 2/2] mac80211: Add support for aborting an ongoing scan
Date: Fri, 30 Oct 2015 10:35:36 +0100 [thread overview]
Message-ID: <1446197736.3261.17.camel@sipsolutions.net> (raw)
In-Reply-To: <1446104804-8312-2-git-send-email-usdutt@qti.qualcomm.com>
On Thu, 2015-10-29 at 13:16 +0530, Sunil Dutt wrote:
> From: Vidyullatha Kanchanapally <vkanchan@qti.qualcomm.com>
>
> This commit adds implementation for abort scan in mac80211.
>
> Reviewed-by: Jouni Malinen <jouni@qca.qualcomm.com>
> Signed-off-by: Vidyullatha Kanchanapally <vkanchan@qti.qualcomm.com>
> Signed-off-by: Sunil Dutt <usdutt@qti.qualcomm.com>
> ---
> 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;
> +}
You're not returning -ENOENT when there's no scan, which could be racy?
I'm not sure those races would be relevant, but you should think about
that and document it.
johannes
next prev parent reply other threads:[~2015-10-30 9:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 7:46 [PATCH 1/2] cfg80211: Add support for aborting an ongoing scan Sunil Dutt
2015-10-29 7:46 ` [PATCH 2/2] mac80211: " Sunil Dutt
2015-10-30 9:35 ` Johannes Berg [this message]
2015-10-30 9:34 ` [PATCH 1/2] cfg80211: " Johannes Berg
2015-10-30 10:37 ` Jouni Malinen
2015-10-30 10:58 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446197736.3261.17.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=amarnath@qca.qualcomm.com \
--cc=jouni@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=usdutt@qti.qualcomm.com \
--cc=vkanchan@qti.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).