From: Johannes Berg <johannes@sipsolutions.net>
To: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
Simon Wunderlich <siwu@hrz.tu-chemnitz.de>,
Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Subject: Re: [PATCH 2/2] mac80211: add support for mcs masks
Date: Tue, 03 Jan 2012 15:24:50 +0100 [thread overview]
Message-ID: <1325600690.3316.12.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1324304099-18327-3-git-send-email-siwu@hrz.tu-chemnitz.de>
On Mon, 2011-12-19 at 15:14 +0100, Simon Wunderlich wrote:
> +++ b/net/mac80211/iface.c
> @@ -1180,6 +1180,9 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
> sband = local->hw.wiphy->bands[i];
> sdata->rc_rateidx_mask[i] =
> sband ? (1 << sband->n_bitrates) - 1 : 0;
> + memset(sdata->rc_rateidx_mcs_mask[i], sband ? 0xff : 0,
> + sizeof(sdata->rc_rateidx_mcs_mask[i]));
> +
> }
Similar comment as before; there's also a spurious blank line here.
> --- a/net/mac80211/rate.c
> +++ b/net/mac80211/rate.c
> @@ -267,10 +267,10 @@ bool rate_control_send_low(struct ieee80211_sta *sta,
>
> if (!sta || !priv_sta || rc_no_data_or_no_ack_use_min(txrc)) {
> if ((sband->band != IEEE80211_BAND_2GHZ) ||
> - !(info->flags & IEEE80211_TX_CTL_NO_CCK_RATE))
> + !(info->flags & IEEE80211_TX_CTL_NO_CCK_RATE)) {
> info->control.rates[0].idx =
> rate_lowest_index(txrc->sband, sta);
> - else
> + } else
> info->control.rates[0].idx =
> rate_lowest_non_cck_index(txrc->sband, sta);
> info->control.rates[0].count =
Hmm? I see no change here?
> @@ -293,25 +293,128 @@ bool rate_control_send_low(struct ieee80211_sta *sta,
> }
> EXPORT_SYMBOL(rate_control_send_low);
>
> -static void rate_idx_match_mask(struct ieee80211_tx_rate *rate,
> - int n_bitrates, u32 mask)
> +static bool rate_idx_match_legacy_mask(struct ieee80211_tx_rate *rate,
> + int n_bitrates, u32 mask)
> {
> int j;
>
> - /* See whether the selected rate or anything below it is allowed. */
> + /* See whether the selected rate or anything below
> + * it is allowed. */
why change the comment format (and do it wrong while at it)?
> }
> }
> -
> /* Try to find a higher rate that would be allowed */
?
> @@ -358,10 +462,14 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
> * the common case.
> */
> mask = sdata->rc_rateidx_mask[info->band];
> + memcpy(mcs_mask, sdata->rc_rateidx_mcs_mask[info->band],
> + sizeof(mcs_mask));
Do we really have to do this? Might not a pointer be better?
> if (mask != (1 << txrc->sband->n_bitrates) - 1) {
> if (sta) {
> /* Filter out rates that the STA does not support */
> mask &= sta->sta.supp_rates[info->band];
> + for (i = 0; i < sizeof(mcs_mask); i++)
> + mcs_mask[i] &= sta->sta.ht_cap.mcs.rx_mask[i];
Oh, so it's filtered by station ... hm ok I guess unless we tie
lifetimes together we have to do this.
Maybe we could update all stations in the slow-path (changes in the HT
mask) and then just use the already masked version in the sta entry in
the fastpath here?
johannes
next prev parent reply other threads:[~2012-01-03 14:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-19 14:14 [PATCH 0/2] add support for mcs masks Simon Wunderlich
2011-12-19 14:14 ` [PATCH 1/2] nl80211: " Simon Wunderlich
2011-12-19 15:28 ` Ben Greear
2011-12-19 21:14 ` Simon Wunderlich
2011-12-20 15:03 ` Ben Greear
2012-01-03 14:20 ` Johannes Berg
2011-12-19 14:14 ` [PATCH 2/2] mac80211: " Simon Wunderlich
2012-01-03 14:24 ` Johannes Berg [this message]
2012-01-04 16:51 ` Simon Wunderlich
2012-01-04 17:01 ` Johannes Berg
2011-12-19 14:14 ` [PATCH 1/2] iw: add nl80211 bitrates Simon Wunderlich
2011-12-19 14:14 ` [PATCH 2/2] iw: remove ifdefs for mcs mask Simon Wunderlich
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=1325600690.3316.12.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mathias.kretschmer@fokus.fraunhofer.de \
--cc=simon.wunderlich@s2003.tu-chemnitz.de \
--cc=siwu@hrz.tu-chemnitz.de \
/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).