From: Johannes Berg <johannes@sipsolutions.net>
To: Avinash Patil <patila@marvell.com>
Cc: linux-wireless@vger.kernel.org, akarwar@marvell.com, cluo@marvell.com
Subject: Re: [PATCH v3] cfg80211: check for carrier state only when offchanel CAC supported
Date: Mon, 05 Jan 2015 13:57:54 +0100 [thread overview]
Message-ID: <1420462674.9459.9.camel@sipsolutions.net> (raw)
In-Reply-To: <1420475584-5533-1-git-send-email-patila@marvell.com> (sfid-20150105_120344_381788_A7E15DA0)
On Mon, 2015-01-05 at 22:03 +0530, Avinash Patil wrote:
> Checking for carrier state during start_radar_detection is needed
> only for devices which support offchannel CAC.
> This patch provides this additional check of extended feature offchannel
> CAC support while checking for carrier state.
>
> Signed-off-by: Avinash Patil <patila@marvell.com>
> ---
> include/uapi/linux/nl80211.h | 3 +++
> net/wireless/nl80211.c | 4 +++-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
> index 735ab43..c318802 100644
> --- a/include/uapi/linux/nl80211.h
> +++ b/include/uapi/linux/nl80211.h
> @@ -4205,10 +4205,13 @@ enum nl80211_feature_flags {
> /**
> * enum nl80211_ext_feature_index - bit index of extended features.
> *
> + * @NL80211_EXT_FEATURE_OFFCHAN_CAC: This device/driver supports
> + * offchannel Channel Availability Check(CAC).
> * @NUM_NL80211_EXT_FEATURES: number of extended features.
> * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
> */
> enum nl80211_ext_feature_index {
> + NL80211_EXT_FEATURE_OFFCHAN_CAC,
>
> /* add new features before the definition below */
> NUM_NL80211_EXT_FEATURES,
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 39753de..b2abb37 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -6138,7 +6138,9 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
> if (err)
> return err;
>
> - if (netif_carrier_ok(dev))
> + if (wiphy_ext_feature_isset(&rdev->wiphy,
> + NL80211_EXT_FEATURE_OFFCHAN_CAC) &&
> + netif_carrier_ok(dev))
> return -EBUSY;
Wait - doesn't that have to be !feature_isset()?
johannes
next prev parent reply other threads:[~2015-01-05 12:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 16:33 [PATCH v3] cfg80211: check for carrier state only when offchanel CAC supported Avinash Patil
2015-01-05 12:57 ` Johannes Berg [this message]
2015-01-05 13:28 ` Avinash Patil
2015-01-05 13:47 ` Johannes Berg
2015-01-05 14:20 ` Avinash Patil
2015-01-05 15:33 ` Johannes Berg
2015-01-07 13:03 ` Johannes Berg
2015-01-07 13:12 ` Avinash Patil
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=1420462674.9459.9.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=akarwar@marvell.com \
--cc=cluo@marvell.com \
--cc=linux-wireless@vger.kernel.org \
--cc=patila@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.