From: Johannes Berg <johannes@sipsolutions.net>
To: Ilan Peer <ilan.peer@intel.com>
Cc: linux-wireless@vger.kernel.org, wireless-regdb@lists.infradead.org
Subject: Re: [PATCH v2 3/6] cfg80211: Enable GO operation on additional channels
Date: Thu, 05 Dec 2013 14:09:12 +0100 [thread overview]
Message-ID: <1386248952.4182.1.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1386098166-24196-4-git-send-email-ilan.peer@intel.com> (sfid-20131203_201542_768088_0385761E)
On Tue, 2013-12-03 at 21:16 +0200, Ilan Peer wrote:
> +#ifdef CONFIG_CFG80211_REG_SOFT_CONFIGURATIONS
> +/* For GO only, check if the channel can be used under permissive conditions
> + * mandated by the some regulatory bodies, i.e., the channel is marked with
> + * IEEE80211_CHAN_GO_CONCURRENT and there is an additional station interface
> + * associated to an AP on the same channel or on the same UNII band
> + * (assuming that the AP is an authorized master).
> + */
> +static bool cfg80211_go_permissive_chan(struct cfg80211_registered_device *rdev,
> + struct ieee80211_channel *chan)
> +{
Seems like you could move the ifdef here ...
> + struct wireless_dev *wdev_iter;
> +
> + ASSERT_RTNL();
> +
> + if (!(chan->flags & IEEE80211_CHAN_GO_CONCURRENT))
> + return false;
> +
> + list_for_each_entry(wdev_iter, &rdev->wdev_list, list) {
> + struct ieee80211_channel *other_chan = NULL;
> +
> + if (wdev_iter->iftype != NL80211_IFTYPE_STATION ||
> + !netif_running(wdev_iter->netdev))
> + continue;
> +
> + wdev_lock(wdev_iter);
> + if (wdev_iter->current_bss)
> + other_chan = wdev_iter->current_bss->pub.channel;
> + wdev_unlock(wdev_iter);
> +
> + if (!other_chan)
> + continue;
> +
> + if (chan == other_chan) {
> + return true;
> + } else if (chan->band == IEEE80211_BAND_5GHZ) {
> + int r1 = cfg80211_get_unii(chan->center_freq);
> + int r2 = cfg80211_get_unii(other_chan->center_freq);
> +
> + if (r1 != -EINVAL && r1 == r2)
> + return true;
> + }
> + }
and here instead of duplicating the function prototype
> + return false;
> +}
johannes
WARNING: multiple messages have this Message-ID (diff)
From: Johannes Berg <johannes@sipsolutions.net>
To: Ilan Peer <ilan.peer@intel.com>
Cc: wireless-regdb@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [wireless-regdb] [PATCH v2 3/6] cfg80211: Enable GO operation on additional channels
Date: Thu, 05 Dec 2013 14:09:12 +0100 [thread overview]
Message-ID: <1386248952.4182.1.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1386098166-24196-4-git-send-email-ilan.peer@intel.com>
On Tue, 2013-12-03 at 21:16 +0200, Ilan Peer wrote:
> +#ifdef CONFIG_CFG80211_REG_SOFT_CONFIGURATIONS
> +/* For GO only, check if the channel can be used under permissive conditions
> + * mandated by the some regulatory bodies, i.e., the channel is marked with
> + * IEEE80211_CHAN_GO_CONCURRENT and there is an additional station interface
> + * associated to an AP on the same channel or on the same UNII band
> + * (assuming that the AP is an authorized master).
> + */
> +static bool cfg80211_go_permissive_chan(struct cfg80211_registered_device *rdev,
> + struct ieee80211_channel *chan)
> +{
Seems like you could move the ifdef here ...
> + struct wireless_dev *wdev_iter;
> +
> + ASSERT_RTNL();
> +
> + if (!(chan->flags & IEEE80211_CHAN_GO_CONCURRENT))
> + return false;
> +
> + list_for_each_entry(wdev_iter, &rdev->wdev_list, list) {
> + struct ieee80211_channel *other_chan = NULL;
> +
> + if (wdev_iter->iftype != NL80211_IFTYPE_STATION ||
> + !netif_running(wdev_iter->netdev))
> + continue;
> +
> + wdev_lock(wdev_iter);
> + if (wdev_iter->current_bss)
> + other_chan = wdev_iter->current_bss->pub.channel;
> + wdev_unlock(wdev_iter);
> +
> + if (!other_chan)
> + continue;
> +
> + if (chan == other_chan) {
> + return true;
> + } else if (chan->band == IEEE80211_BAND_5GHZ) {
> + int r1 = cfg80211_get_unii(chan->center_freq);
> + int r2 = cfg80211_get_unii(other_chan->center_freq);
> +
> + if (r1 != -EINVAL && r1 == r2)
> + return true;
> + }
> + }
and here instead of duplicating the function prototype
> + return false;
> +}
johannes
_______________________________________________
wireless-regdb mailing list
wireless-regdb@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/wireless-regdb
next prev parent reply other threads:[~2013-12-05 13:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 19:16 [PATCH v2 0/6] Enable additional channels for use Ilan Peer
2013-12-03 19:16 ` [PATCH v2 1/6] cfg80211: Add indoor only and GO concurrent channel attributes Ilan Peer
2013-12-03 19:16 ` [PATCH v2 2/6] cfg80211: Add Kconfig option for cellular BS hints Ilan Peer
2013-12-03 19:16 ` [PATCH v2 3/6] cfg80211: Enable GO operation on additional channels Ilan Peer
2013-12-05 13:09 ` Johannes Berg [this message]
2013-12-05 13:09 ` [wireless-regdb] " Johannes Berg
2013-12-05 13:57 ` [PATCH v3 " Ilan Peer
2013-12-03 19:16 ` [PATCH v2 4/6] cfg80211: Add an option to hint indoor operation Ilan Peer
2013-12-04 9:16 ` [PATCH v3 " Ilan Peer
2013-12-03 19:16 ` [PATCH v2 5/6] cfg80211: Enable GO operation on indoor channels Ilan Peer
2013-12-05 13:10 ` Johannes Berg
2013-12-05 13:10 ` [wireless-regdb] " Johannes Berg
2013-12-05 14:00 ` [PATCH v3 " Ilan Peer
2013-12-03 19:16 ` [PATCH v2 6/6] mac80211: Enable initiating radiation " Ilan Peer
-- strict thread matches above, loose matches on Subject: below --
2014-01-15 15:52 [PATCH v2 0/6] Enable additional channels for use Ilan Peer
2014-01-15 15:52 ` [PATCH v2 3/6] cfg80211: Enable GO operation on additional channels Ilan Peer
2014-01-25 0:09 ` Luis R. Rodriguez
2014-01-26 22:03 ` Peer, Ilan
2014-01-26 22:21 ` Peer, Ilan
2014-01-27 8:41 ` Peer, Ilan
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=1386248952.4182.1.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=ilan.peer@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=wireless-regdb@lists.infradead.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 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.