ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Wen Gong <wgong@codeaurora.org>,
	johannes@sipsolutions.net, ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] wireless: add check of field VHT Extended NSS BW Capable for 160/80+80 MHz setting
Date: Thu, 20 May 2021 21:21:13 +0200	[thread overview]
Message-ID: <fe1b7675-23ba-a86e-90db-de5803231e21@broadcom.com> (raw)
In-Reply-To: <20210520034021.14690-1-wgong@codeaurora.org>

On 5/20/2021 5:40 AM, Wen Gong wrote:
> Table 9-251—Supported VHT-MCS and NSS Set subfields, it has subfield VHT Extended
> NSS BW Capable, its definition is:
> Indicates whether the STA is capable of interpreting the Extended NSS BW
> Support subfield of the VHT Capabilities Information field.
> 
> This patch is to add check for the subfield.

Almost looks good to me, but...

> Signed-off-by: Wen Gong <wgong@codeaurora.org>
> ---
>   net/wireless/chan.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/net/wireless/chan.c b/net/wireless/chan.c
> index 285b8076054b..f7f86bd75cc0 100644
> --- a/net/wireless/chan.c
> +++ b/net/wireless/chan.c

[...]

> @@ -1037,7 +1039,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
>   		cap = vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK;
>   		if (cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ &&
>   		    cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ &&
> -		    !(vht_cap->cap & IEEE80211_VHT_CAP_EXT_NSS_BW_MASK))
> +		    !(ext_nss_cap && vht_cap->cap & IEEE80211_VHT_CAP_EXT_NSS_BW_MASK))

you should not mix logical and binary operators so add braces around the 
binary operation here.

Regards,
Arend

>   			return false;
>   		break;
>   	default:
> 

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

  reply	other threads:[~2021-05-20 19:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20  3:40 [PATCH] wireless: add check of field VHT Extended NSS BW Capable for 160/80+80 MHz setting Wen Gong
2021-05-20 19:21 ` Arend van Spriel [this message]
2021-05-21  2:21   ` Wen Gong

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=fe1b7675-23ba-a86e-90db-de5803231e21@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=ath11k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wgong@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox