From: Shay Bar <shay.bar@celeno.com>
To: Felix Fietkau <nbd@nbd.name>, linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, eliav.farber@celeno.com,
aviad.brikman@celeno.com
Subject: Re: [PATCH] mac80211: do not allow bigger VHT MPDUs than the hardware supports
Date: Tue, 5 Jan 2021 10:35:23 +0200 [thread overview]
Message-ID: <6327afad-03d4-f35d-e7ae-17ea2fdf1ff9@celeno.com> (raw)
In-Reply-To: <20200917125031.45009-1-nbd@nbd.name>
On 17/09/2020 15:50, Felix Fietkau wrote:
> Limit maximum VHT MPDU size by local capability
>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> ---
> net/mac80211/vht.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c
> index 7e601d067d53..fb0e3a657d2d 100644
> --- a/net/mac80211/vht.c
> +++ b/net/mac80211/vht.c
> @@ -168,10 +168,7 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata,
> /* take some capabilities as-is */
> cap_info = le32_to_cpu(vht_cap_ie->vht_cap_info);
> vht_cap->cap = cap_info;
> - vht_cap->cap &= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 |
> - IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 |
> - IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 |
> - IEEE80211_VHT_CAP_RXLDPC |
> + vht_cap->cap &= IEEE80211_VHT_CAP_RXLDPC |
> IEEE80211_VHT_CAP_VHT_TXOP_PS |
> IEEE80211_VHT_CAP_HTC_VHT |
> IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK |
> @@ -180,6 +177,9 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata,
> IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN |
> IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN;
>
> + vht_cap->cap |= min_t(u32, cap_info & IEEE80211_VHT_CAP_MAX_MPDU_MASK,
> + own_cap.cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK);
> +
> /* and some based on our own capabilities */
> switch (own_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) {
> case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ:
>
The vht_cap->cap IEEE80211_VHT_CAP_MAX_MPDU* reflect the associated STA
_RX_ capabilities.
Why would you override the original STA _RX_ capabilities (vht_cap->cap)
with your own HW _RX_ size limitation ?
e.g. if HW support 11454 in TX and 3895 in RX, due to this change, you
limit your TX to your own _RX_ limitation (3895) while STA actually
reported 11454 RX.
prev parent reply other threads:[~2021-01-05 8:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 12:50 [PATCH] mac80211: do not allow bigger VHT MPDUs than the hardware supports Felix Fietkau
2021-01-05 8:35 ` Shay Bar [this message]
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=6327afad-03d4-f35d-e7ae-17ea2fdf1ff9@celeno.com \
--to=shay.bar@celeno.com \
--cc=aviad.brikman@celeno.com \
--cc=eliav.farber@celeno.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
/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