linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	Sachin Ahuja <sahuja@codeaurora.org>,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Subject: Re: [PATCH v2] cfg80211: avoid restoring the regulatory during disconnect
Date: Mon, 12 May 2014 16:00:03 +0200	[thread overview]
Message-ID: <1399903203.4337.9.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1399631327-23379-1-git-send-email-rmanohar@qti.qualcomm.com>

On Fri, 2014-05-09 at 15:58 +0530, Rajkumar Manoharan wrote:

> +static bool cfg80211_is_all_countryie_ignore(void)
> +{
> +	struct cfg80211_registered_device *rdev;
> +	struct wireless_dev *wdev;
> +
> +	list_for_each_entry(rdev, &cfg80211_rdev_list, list) {
> +		list_for_each_entry(wdev, &rdev->wdev_list, list) {
> +			wdev_lock(wdev);
> +			if (!(wdev->wiphy->regulatory_flags &
> +			      REGULATORY_COUNTRY_IE_IGNORE)) {
> +				wdev_unlock(wdev);

The locking here seems completely pointless.

Also, maybe you can do something about the long lines, maybe with a
temporary variable?

johannes



  reply	other threads:[~2014-05-12 14:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 10:28 [PATCH v2] cfg80211: avoid restoring the regulatory during disconnect Rajkumar Manoharan
2014-05-12 14:00 ` Johannes Berg [this message]
2014-05-12 17:21   ` Rajkumar Manoharan
2014-05-12 18:36     ` Rajkumar Manoharan

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=1399903203.4337.9.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@do-not-panic.com \
    --cc=rmanohar@qti.qualcomm.com \
    --cc=sahuja@codeaurora.org \
    /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).