From: Johannes Berg <johannes@sipsolutions.net>
To: Pawel Dembicki <paweldembicki@gmail.com>, linux-wireless@vger.kernel.org
Cc: Antony Kolitsos <zeusomighty@hotmail.com>,
Thomas Fourier <fourier.thomas@gmail.com>,
Roopni Devanathan <quic_rdevanat@quicinc.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] wifi: mwl8k: inject DSSS Parameter Set element into beacons if missing
Date: Tue, 11 Nov 2025 08:38:18 +0100 [thread overview]
Message-ID: <01be9a3b952fbcfe26d4a4d487a51d26ba07b13f.camel@sipsolutions.net> (raw)
In-Reply-To: <20251111073134.2774120-2-paweldembicki@gmail.com>
>
> ---
> V2:
> - added "wifi:" prefix to commit title
> - renamed "DS Params" -> "DSSS Parameter Set"
> - Insert WLAN_EID_DS_PARAMS after WLAN_EID_SSID, WLAN_EID_SUPP_RATES
> and WLAN_EID_EXT_SUPP_RATES
FWIW, per spec it should be between them:
- SSID
- Supported Rates
- DSSS Parameter Set
- TIM
- Country
- ...
- Extended Supported Rates
so actually Extended Supported Rates is also in the _tail_ part of the
cfg80211 API.
> ---
> drivers/net/wireless/marvell/mwl8k.c | 71 ++++++++++++++++++++++++++--
> 1 file changed, 66 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c
> index 891e125ad30b..914a566d700a 100644
> --- a/drivers/net/wireless/marvell/mwl8k.c
> +++ b/drivers/net/wireless/marvell/mwl8k.c
> @@ -2966,6 +2966,52 @@ mwl8k_cmd_rf_antenna(struct ieee80211_hw *hw, int antenna, int mask)
> /*
> * CMD_SET_BEACON.
> */
> +
> +static bool mwl8k_beacon_has_ds_params(const u8 *buf, int len)
> +{
> + const struct ieee80211_mgmt *mgmt = (const void *)buf;
> + int ies_len;
> +
> + if (len <= offsetof(struct ieee80211_mgmt, u.beacon.variable))
> + return false;
> +
> + ies_len = len - offsetof(struct ieee80211_mgmt, u.beacon.variable);
> +
> + return cfg80211_find_ie(WLAN_EID_DS_PARAMS, mgmt->u.beacon.variable,
> + ies_len) != NULL;
> +}
> +
> +static void mwl8k_beacon_copy_inject_ds_params(struct ieee80211_hw *hw,
> + u8 *buf_dst, const u8 *buf_src,
> + int src_len)
> +{
> + const struct ieee80211_mgmt *mgmt = (const void *)buf_src;
> + static const u8 before_ds_params[] = {
> + WLAN_EID_SSID,
> + WLAN_EID_SUPP_RATES,
> + WLAN_EID_EXT_SUPP_RATES,
> + };
nit: seems on tab would be nicer?
> - cmd = kzalloc(sizeof(*cmd) + len, GFP_KERNEL);
> + if (!ds_params_present)
> + /*
> + * mwl8k firmware requires a DS Params IE with the current
> + * channel in AP beacons. If mac80211/hostapd does not
> + * include it, inject one here. IE ID + length + channel
> + * number = 3 bytes.
> + */
> + final_len += 3;
> +
another nit: I'd probably add braces
johannes
prev parent reply other threads:[~2025-11-11 7:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 7:31 Pawel Dembicki
2025-11-11 7:38 ` Johannes Berg [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=01be9a3b952fbcfe26d4a4d487a51d26ba07b13f.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=fourier.thomas@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=paweldembicki@gmail.com \
--cc=quic_rdevanat@quicinc.com \
--cc=zeusomighty@hotmail.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
all inboxes | Powered by JetHome®