public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Bither <jonbither@gmail.com>
To: Miri Korenblit <miriam.rachel.korenblit@intel.com>,
	johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
	Johannes Berg <johannes.berg@intel.com>,
	Gregory Greenman <gregory.greenman@intel.com>
Subject: Re: [PATCH 5/8] wifi: mac80211: disallow drivers with HT wider than HE
Date: Thu, 11 Jan 2024 15:39:33 -0500	[thread overview]
Message-ID: <037b6a4e-e143-3b69-2ab2-00c4dee75bda@gmail.com> (raw)
In-Reply-To: <20240111181514.da15fe3214d2.I4df51ad2f4c844615c168bf9bdb498925b3c77d4@changeid>


On 1/11/24 11:17, Miri Korenblit wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> To simplify the code in the next patch, disallow drivers
> supporting 40 MHz in HT but not HE, since we'd otherwise
> have to track local maximum bandwidth per mode there.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
> ---
>   net/mac80211/main.c | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
>
> diff --git a/net/mac80211/main.c b/net/mac80211/main.c
> index d48fa1147c14..e05bcc35bc1e 100644
> --- a/net/mac80211/main.c
> +++ b/net/mac80211/main.c
> @@ -1119,8 +1119,26 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
>   		supp_vht = supp_vht || sband->vht_cap.vht_supported;
>   
>   		for_each_sband_iftype_data(sband, i, iftd) {
> +			u8 he_40_mhz_cap;
> +
>   			supp_he = supp_he || iftd->he_cap.has_he;
>   			supp_eht = supp_eht || iftd->eht_cap.has_eht;
> +
> +			if (sband->band == NL80211_BAND_2GHZ)
> +				he_40_mhz_cap =
> +					IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G;
> +			else
> +				he_40_mhz_cap =
> +					IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G;
> +
> +			/* currently no support for HE client where HT has 40 MHz but not HT */
where HT has 40 MHz but not HE?
> +			if (iftd->he_cap.has_he &&
> +			    iftd->types_mask & (BIT(NL80211_IFTYPE_STATION) |
> +						BIT(NL80211_IFTYPE_P2P_CLIENT)) &&
> +			    sband->ht_cap.ht_supported &&
> +			    sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 &&
> +			    !(iftd->he_cap.he_cap_elem.phy_cap_info[0] & he_40_mhz_cap))
> +				return -EINVAL;
>   		}
>   
>   		/* HT, VHT, HE require QoS, thus >= 4 queues */

  reply	other threads:[~2024-01-11 20:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 16:17 [PATCH 0/8] cfg80211/mac80211 patches from our internal tree 2024-01-11 Miri Korenblit
2024-01-11 16:17 ` [PATCH 1/8] wifi: mac80211_hwsim: advertise 15 simultaneous links Miri Korenblit
2024-01-11 16:17 ` [PATCH 2/8] wifi: mac80211: simplify ieee80211_config_bw() prototype Miri Korenblit
2024-01-11 16:17 ` [PATCH 3/8] wifi: mac80211: remove extra element parsing Miri Korenblit
2024-01-11 16:17 ` [PATCH 4/8] wifi: mac80211: simplify HE capability access Miri Korenblit
2024-01-11 16:17 ` [PATCH 5/8] wifi: mac80211: disallow drivers with HT wider than HE Miri Korenblit
2024-01-11 20:39   ` Jonathan Bither [this message]
2024-01-12 10:21     ` Johannes Berg
2024-01-12 17:27       ` Jonathan Bither
2024-01-12 13:10   ` Kalle Valo
2024-01-12 18:42     ` Johannes Berg
2024-01-12 19:58       ` Ben Greear
2024-01-15 22:00         ` Johannes Berg
2024-01-15 23:14           ` Ben Greear
2024-01-13  6:54       ` Kalle Valo
2024-01-11 16:17 ` [PATCH 6/8] wifi: mac80211: fix potential sta-link leak Miri Korenblit
2024-01-11 16:17 ` [PATCH 7/8] wifi: mac80211: don't set bss_conf in parsing Miri Korenblit
2024-01-11 16:17 ` [PATCH 8/8] wifi: mac80211: use deflink and fix typo in link ID check Miri Korenblit

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=037b6a4e-e143-3b69-2ab2-00c4dee75bda@gmail.com \
    --to=jonbither@gmail.com \
    --cc=gregory.greenman@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=miriam.rachel.korenblit@intel.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