Added TLV command TLV_TYPE_UAP_MAC_ADDRESS for AP configuration.
Without this TLV command, client can't connect to AP after restart of
hostapd.
Signed-off-by: David Lin <yu-hao.lin@nxp.com>
---
drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 ++
drivers/net/wireless/marvell/mwifiex/fw.h | 1 +
drivers/net/wireless/marvell/mwifiex/ioctl.h | 1 +
drivers/net/wireless/marvell/mwifiex/uap_cmd.c | 8 ++++++++
4 files changed, 12 insertions(+)
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 2968db643ab4..40ab3e8d0c1c 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -2103,6 +2103,8 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
mwifiex_set_sys_config_invalid_data(bss_cfg);
+ memcpy(bss_cfg->mac_addr, priv->curr_addr, ETH_ALEN);
+
if (params->beacon_interval)
bss_cfg->beacon_period = params->beacon_interval;
if (params->dtim_period)
diff --git a/drivers/net/wireless/marvell/mwifiex/fw.h b/drivers/net/wireless/marvell/mwifiex/fw.h
index 7080f8701952..699c7ffcd0e5 100644
--- a/drivers/net/wireless/marvell/mwifiex/fw.h
+++ b/drivers/net/wireless/marvell/mwifiex/fw.h
@@ -165,6 +165,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
#define TLV_TYPE_STA_MAC_ADDR (PROPRIETARY_TLV_BASE_ID + 32)
#define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 35)
#define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42)
+#define TLV_TYPE_UAP_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 43)
#define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 44)
#define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45)
#define TLV_TYPE_UAP_BCAST_SSID (PROPRIETARY_TLV_BASE_ID + 48)
diff --git a/drivers/net/wireless/marvell/mwifiex/ioctl.h b/drivers/net/wireless/marvell/mwifiex/ioctl.h
index 80ba79ca74c5..fbbb5aafb803 100644
--- a/drivers/net/wireless/marvell/mwifiex/ioctl.h
+++ b/drivers/net/wireless/marvell/mwifiex/ioctl.h
@@ -83,6 +83,7 @@ struct wep_key {
#define MWIFIEX_OPERATING_CLASSES 16
struct mwifiex_uap_bss_param {
+ u8 mac_addr[ETH_ALEN];
u8 channel;
u8 band_cfg;
u16 rts_threshold;
diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
index 91a8a581e3f5..c1133da28bc6 100644
--- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
+++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
@@ -472,6 +472,7 @@ void mwifiex_config_uap_11d(struct mwifiex_private *priv,
static int
mwifiex_uap_bss_param_prepare(u8 *tlv, void *cmd_buf, u16 *param_size)
{
+ struct host_cmd_tlv_mac_addr *mac_tlv;
struct host_cmd_tlv_dtim_period *dtim_period;
struct host_cmd_tlv_beacon_period *beacon_period;
struct host_cmd_tlv_ssid *ssid;
@@ -491,6 +492,13 @@ mwifiex_uap_bss_param_prepare(u8 *tlv, void *cmd_buf, u16 *param_size)
int i;
u16 cmd_size = *param_size;
+ mac_tlv = (struct host_cmd_tlv_mac_addr *)tlv;
+ mac_tlv->header.type = cpu_to_le16(TLV_TYPE_UAP_MAC_ADDRESS);
+ mac_tlv->header.len = cpu_to_le16(ETH_ALEN);
+ memcpy(mac_tlv->mac_addr, bss_cfg->mac_addr, ETH_ALEN);
+ cmd_size += sizeof(struct host_cmd_tlv_mac_addr);
+ tlv += sizeof(struct host_cmd_tlv_mac_addr);
+
if (bss_cfg->ssid.ssid_len) {
ssid = (struct host_cmd_tlv_ssid *)tlv;
ssid->header.type = cpu_to_le16(TLV_TYPE_UAP_SSID);
--
2.25.1
On Tue, Nov 28, 2023 at 04:31:09PM +0800, David Lin wrote: > Added TLV command TLV_TYPE_UAP_MAC_ADDRESS for AP configuration. > > Without this TLV command, client can't connect to AP after restart of > hostapd. Do I understand correctly this is a fix for an existing issue that has nothing to do with the HOST MLE topic? If so, that great to have this fixed (and it looks like something I am affected by, I will try it in the coming days), but it should be: - separate patch from this series - fixes tag - cc stable Francesco
> From: Francesco Dolcini <francesco@dolcini.it> > Sent: Friday, December 1, 2023 6:31 PM > To: David Lin <yu-hao.lin@nxp.com> > Cc: linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org; > briannorris@chromium.org; kvalo@kernel.org; francesco@dolcini.it; Pete > Hsieh <tsung-hsien.hsieh@nxp.com> > Subject: [EXT] Re: [PATCH v7 06/12] wifi: mwifiex: added mac address for AP > config. > > Caution: This is an external email. Please take care when clicking links or > opening attachments. When in doubt, report the message using the 'Report > this email' button > > > On Tue, Nov 28, 2023 at 04:31:09PM +0800, David Lin wrote: > > Added TLV command TLV_TYPE_UAP_MAC_ADDRESS for AP configuration. > > > > Without this TLV command, client can't connect to AP after restart of > > hostapd. > > Do I understand correctly this is a fix for an existing issue that has nothing > to do with the HOST MLE topic? > Yes. > If so, that great to have this fixed (and it looks like something I am affected > by, I will try it in the coming days), but it should be: > - separate patch from this series > - fixes tag > - cc stable > I will sperate this patch from Patch v8 and let it as a single patch. - fixes tag - cc stable I don't understand what does this mean? > Francesco >
On 12/1/2023 2:50 PM, David Lin wrote: > - fixes tag > - cc stable > > I don't understand what does this mean? <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes> <https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1>
> From: Jeff Johnson <quic_jjohnson@quicinc.com> > Sent: Monday, December 4, 2023 12:13 AM > To: David Lin <yu-hao.lin@nxp.com>; Francesco Dolcini > <francesco@dolcini.it> > Cc: linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org; > briannorris@chromium.org; kvalo@kernel.org; Pete Hsieh > <tsung-hsien.hsieh@nxp.com> > Subject: Re: [EXT] Re: [PATCH v7 06/12] wifi: mwifiex: added mac address for > AP config. > > Caution: This is an external email. Please take care when clicking links or > opening attachments. When in doubt, report the message using the 'Report > this email' button > > > On 12/1/2023 2:50 PM, David Lin wrote: > > - fixes tag > > - cc stable > > > > I don't understand what does this mean? > > <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww. > kernel.org%2Fdoc%2Fhtml%2Flatest%2Fprocess%2Fsubmitting-patches.html% > 23using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes&data=05 > %7C01%7Cyu-hao.lin%40nxp.com%7Cb1c2bb38d9024e40659c08dbf41acb78 > %7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63837216815151639 > 0%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL > CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=D2ZPx9Fxcm > %2FYZimLDD9Qj%2BXtwvzoKWjpGbruB9zF4K8%3D&reserved=0> > > <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww. > kernel.org%2Fdoc%2Fhtml%2Flatest%2Fprocess%2Fstable-kernel-rules.html% > 23option-1&data=05%7C01%7Cyu-hao.lin%40nxp.com%7Cb1c2bb38d9024e4 > 0659c08dbf41acb78%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C > 638372168151516390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM > DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C > &sdata=r6va5Ynyztm57GwGYEk0zGFV8oBWdr8Iuspns%2BynrnM%3D&reserv > ed=0> Thanks for your information. I will base on Francesco's comment and your information to separate this commit to a single patch.
© 2016 - 2025 Red Hat, Inc.