From: Johannes Berg <johannes@sipsolutions.net>
To: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC 3/3] mac80211: Report 40MHz Intolerance to associated AP.
Date: Thu, 14 Jul 2011 12:15:49 +0200 [thread overview]
Message-ID: <1310638549.3874.12.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1310559873-10314-3-git-send-email-rmanohar@qca.qualcomm.com> (sfid-20110713_142647_318351_9E1F152E)
On Wed, 2011-07-13 at 17:54 +0530, Rajkumar Manoharan wrote:
> This patch adds support for 40MHz intolerance handling in STA
> mode. STA should report of any 40MHz intolerance in case if it
> finds a non-HT AP or a HT AP which prohibits 40MHz transmission
> (i.e 40MHz intolerant bit is set in HT capabilities IE).
>
> STA shall report this condition using 20/40 BSS coexistence
> action frame.
I think it'd be smarter to add this logic to cfg80211, the scan parsing
stuff can be generic, and even the action frame can be transmitted
generically.
Heck, come to think of it, why not do this in wpa_supplicant?
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -206,6 +206,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
> channel_type = NL80211_CHAN_HT20;
>
> if (!(ap_ht_cap_flags & IEEE80211_HT_CAP_40MHZ_INTOLERANT) &&
> + !(sband->ht_cap.cap & IEEE80211_HT_CAP_40MHZ_INTOLERANT) &&
> (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
> (hti->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)) {
> switch(hti->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
> diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
> index 08a45ac..29d50dd 100644
> --- a/net/mac80211/scan.c
> +++ b/net/mac80211/scan.c
> @@ -74,6 +74,31 @@ static bool is_uapsd_supported(struct ieee802_11_elems *elems)
> return qos_info & IEEE80211_WMM_IE_AP_QOSINFO_UAPSD;
> }
>
> +static void ieee80211_check_40mhz_intolerance(
> + struct ieee80211_sub_if_data *sdata,
> + struct ieee80211_channel *channel,
> + struct ieee802_11_elems *elems)
> +{
> + struct ieee80211_local *local = sdata->local;
> +
> + if ((local->_oper_channel_type != NL80211_CHAN_HT40MINUS) ||
> + (local->_oper_channel_type != NL80211_CHAN_HT40PLUS))
> + return;
> +
> + if (local->oper_channel->band != channel->band)
> + return;
> +
> + if (!elems->ht_cap_elem ||
> + (le16_to_cpu(elems->ht_cap_elem->cap_info) &
> + IEEE80211_HT_CAP_40MHZ_INTOLERANT)) {
> + sdata->found_40mhz_intolerant = true;
> + if (!channel->is_40mhz_intolerant) {
> + channel->is_40mhz_intolerant = true;
I don't like mac80211 changing cfg80211 data structures much.
> + sdata->intol_channels++;
If that's a counter, why is it a u8?
> @@ -434,6 +462,8 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
> else
> __set_bit(SCAN_SW_SCANNING, &local->scanning);
>
> + sdata->found_40mhz_intolerant = false;
> + sdata->intol_channels = 0;
This makes no sense, the scan could be on only some channels, but you're
resetting all info.
> ieee80211_recalc_idle(local);
>
> if (local->ops->hw_scan) {
> diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> index 652e569..9ad5361 100644
> --- a/net/mac80211/util.c
> +++ b/net/mac80211/util.c
> @@ -1334,6 +1334,93 @@ int ieee80211_reconfig(struct ieee80211_local *local)
> return 0;
> }
>
> +static void ieee80211_send_public_action_frame(
> + struct ieee80211_sub_if_data *sdata)
Kidding, right?
"send_public_action_frame", but then it creates a 40 intolerant frame?
> +void ieee80211_process_40mhz_intolerance(struct ieee80211_local *local)
> +{
> + struct ieee80211_hw *hw = &local->hw;
> + struct ieee80211_conf *conf = &hw->conf;
> + struct ieee80211_supported_band *sband =
> + local->hw.wiphy->bands[local->oper_channel->band];
> + struct ieee80211_sub_if_data *sdata;
> + int i;
> +
> + mutex_lock(&local->iflist_mtx);
> + list_for_each_entry(sdata, &local->interfaces, list) {
> + if (!ieee80211_sdata_running(sdata))
> + continue;
> + if (!sdata->found_40mhz_intolerant)
> + continue;
> + if (!conf_is_ht40(conf))
> + continue;
> + ieee80211_send_public_action_frame(sdata);
What if the AP is HT40, we find the intolerant AP, but we're only 20 MHz
capable? IOW -- this logic doesn't seem to make sense?
I really don't see why we can't do all of this in wpa_s.
johannes
next prev parent reply other threads:[~2011-07-14 10:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 12:24 [RFC 1/3] mac80211: Add 20/40 BSS coexistence management frame format Rajkumar Manoharan
2011-07-13 12:24 ` [RFC 2/3] wireless: Add 40MHz Intolerance support to HT capablities Rajkumar Manoharan
2011-07-14 10:11 ` Johannes Berg
2011-07-14 16:41 ` Rajkumar Manoharan
2011-07-13 12:24 ` [RFC 3/3] mac80211: Report 40MHz Intolerance to associated AP Rajkumar Manoharan
2011-07-14 10:15 ` Johannes Berg [this message]
2011-07-14 17:12 ` Rajkumar Manoharan
2011-07-14 17:17 ` Johannes Berg
2011-07-14 10:08 ` [RFC 1/3] mac80211: Add 20/40 BSS coexistence management frame format Johannes Berg
2011-07-14 14:08 ` 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=1310638549.3874.12.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=rmanohar@qca.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).