From: Johannes Berg <johannes@sipsolutions.net>
To: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 3/3] mac80211: add VHT support for IBSS
Date: Tue, 03 Mar 2015 10:28:49 +0100 [thread overview]
Message-ID: <1425374929.2450.25.camel@sipsolutions.net> (raw)
In-Reply-To: <1424533961-3869-3-git-send-email-janusz.dziedzic@tieto.com> (sfid-20150221_165308_246956_55F2621E)
On Sat, 2015-02-21 at 16:52 +0100, Janusz Dziedzic wrote:
> @@ -1055,17 +1074,36 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
>
> memcpy(&htcap_ie, elems->ht_cap_elem, sizeof(htcap_ie));
>
> - /*
> - * fall back to HT20 if we don't use or use
> - * the other extension channel
> - */
> - if (chandef.center_freq1 !=
> - sdata->u.ibss.chandef.center_freq1)
> - htcap_ie.cap_info &=
> - cpu_to_le16(~IEEE80211_HT_CAP_SUP_WIDTH_20_40);
> -
> rates_updated |= ieee80211_ht_cap_ie_to_sta_ht_cap(
> sdata, sband, &htcap_ie, sta);
> +
> + if (elems->vht_operation && elems->vht_cap_elem &&
> + width != NL80211_CHAN_WIDTH_20 &&
> + width != NL80211_CHAN_WIDTH_40) {
> + /* we both use VHT */
> + vht_cap = sta->sta.vht_cap;
> + vht_oper = elems->vht_operation;
> +
> + ieee80211_vht_oper_to_chandef(channel, vht_oper,
> + &chandef);
> + memcpy(&vhtcap_ie, elems->vht_cap_elem,
> + sizeof(vhtcap_ie));
> + ieee80211_vht_cap_ie_to_sta_vht_cap(sdata,
> + sband,
> + &vhtcap_ie,
> + sta);
> + if (memcmp(&vht_cap, &sta->sta.vht_cap,
> + sizeof(vht_cap)))
> + rates_updated |= true;
Some refactoring would be great, with expressions and argument lists
like this.
> + if (!
> cfg80211_chandef_compatible(&sdata->u.ibss.chandef,
> + &chandef))
> + /* TODO handle incompatible chandefs
> */
> + WARN_ON_ONCE(1);
That seems like an unaddressed TODO? I don't think you should warn on a
remote problem.
johannes
next prev parent reply other threads:[~2015-03-03 9:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-21 15:52 [PATCH 1/3] cfg80211: add VHT support for IBSS Janusz Dziedzic
2015-02-21 15:52 ` [PATCH 2/3] mac80211: IBSS fix scan request Janusz Dziedzic
2015-03-03 9:23 ` Johannes Berg
2015-02-21 15:52 ` [PATCH 3/3] mac80211: add VHT support for IBSS Janusz Dziedzic
2015-03-03 9:28 ` Johannes Berg [this message]
2015-03-03 9:21 ` [PATCH 1/3] cfg80211: " Johannes Berg
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=1425374929.2450.25.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=janusz.dziedzic@tieto.com \
--cc=linux-wireless@vger.kernel.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.