All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Avinash Patil <patila@marvell.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Amitkumar Karwar <akarwar@marvell.com>,
	Cathy Luo <cluo@marvell.com>
Subject: Re: [PATCH v3] cfg80211: check for carrier state only when offchanel CAC supported
Date: Mon, 05 Jan 2015 14:47:25 +0100	[thread overview]
Message-ID: <1420465645.9459.13.camel@sipsolutions.net> (raw)
In-Reply-To: <CBACCFA0AEB13A41977475BCF3E896FC66736E7A69@SC-VEXCH2.marvell.com> (sfid-20150105_143403_923577_F829B8B6)

On Mon, 2015-01-05 at 05:28 -0800, Avinash Patil wrote:

> > -     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
> 
> If Offchannel CAC is supported (driver has set this bit in wiphy's
> extended features) & carrier is ON, return EBUSY as offchannel CAC may
> be ongoing, isnt it?

Well, my thinking is this - a new feature flag should allow something
new.

Therefore, the patch should essentially be this:

+ if (!new_feature)
  if (do_old_check)

Now wrapping that into a single if gives

- if (do_old_check)
+ if (!new_feature && do_old_check)

so the patch looks wrong to me.

johannes


  reply	other threads:[~2015-01-05 13:47 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
2015-01-05 13:28   ` Avinash Patil
2015-01-05 13:47     ` Johannes Berg [this message]
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=1420465645.9459.13.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.