From: Kalle Valo <kvalo@kernel.org>
To: Ian Lin <ian.lin@infineon.com>
Cc: <linux-wireless@vger.kernel.org>,
<brcm80211-dev-list@broadcom.com>,
<brcm80211-dev-list@cypress.com>, <franky.lin@broadcom.com>,
<hante.meuleman@broadcom.com>, <Double.Lo@infineon.com>
Subject: Re: [PATCH v3 4/5] brcmfmac: Update SSID of hidden AP while informing its bss to cfg80211 layer
Date: Wed, 28 Sep 2022 09:38:48 +0300 [thread overview]
Message-ID: <874jwsrojr.fsf@kernel.org> (raw)
In-Reply-To: <20220927034138.20463-5-ian.lin@infineon.com> (Ian Lin's message of "Mon, 26 Sep 2022 22:41:37 -0500")
Ian Lin <ian.lin@infineon.com> writes:
> From: Syed Rafiuddeen <syed.rafiuddeen@cypress.com>
>
> cfg80211 layer on DUT STA is disconnecting ongoing connection attempt after
> receiving association response, because cfg80211 layer does not have valid
> AP bss information. On association response event, brcmfmac communicates
> the AP bss information to cfg80211 layer, but SSID seem to be empty in AP
> bss information, and cfg80211 layer prints kernel warning and then
> disconnects the ongoing connection attempt.
>
> SSID is empty in SSID IE, but 'bi->SSID' contains a valid SSID, so
> updating the SSID for hidden AP while informing its bss information
> to cfg80211 layer.
>
> Signed-off-by: Syed Rafiuddeen <syed.rafiuddeen@cypress.com>
> Signed-off-by: Chung-Hsien Hsu <chung-hsien.hsu@infineon.com>
> Signed-off-by: Chi-hsien Lin <chi-hsien.lin@infineon.com>
> Signed-off-by: Ian Lin <ian.lin@infineon.com>
> ---
> .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> index 6c37da42e61b..3560afe0ccfe 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> @@ -3003,6 +3003,7 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
> u8 *notify_ie;
> size_t notify_ielen;
> struct cfg80211_inform_bss bss_data = {};
> + struct brcmf_tlv *ssid;
>
> if (le32_to_cpu(bi->length) > WL_BSS_INFO_MAX) {
> bphy_err(drvr, "Bss info is larger than buffer. Discarding\n");
> @@ -3032,6 +3033,13 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
> notify_ielen = le32_to_cpu(bi->ie_length);
> bss_data.signal = (s16)le16_to_cpu(bi->RSSI) * 100;
>
> + ssid = (struct brcmf_tlv *)
> + brcmf_parse_tlvs(notify_ie, notify_ielen, WLAN_EID_SSID);
This still casts away the const. For some reason brcmf_parse_tlvs()
takes a const buffer:
static const struct brcmf_tlv *brcmf_parse_tlvs(const void *buf, int buflen, uint key)
I'm not familiar with brcmfmac internal so I don't know why it does
that, but that means the buffer cannot be modified. If you need to
modify the ssid should you make a copy of it?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2022-09-28 6:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 3:41 [PATCH v3 0/5] Fix connect/p2p issue series Ian Lin
2022-09-27 3:41 ` [PATCH v3 1/5] brcmfmac: correctly remove all p2p vif Ian Lin
2022-09-27 3:41 ` [PATCH v3 2/5] brcmfmac: Fix for when connect request is not success Ian Lin
2022-09-27 3:41 ` [PATCH v3 3/5] brcmfmac: Avoiding Connection delay Ian Lin
2022-09-27 3:41 ` [PATCH v3 4/5] brcmfmac: Update SSID of hidden AP while informing its bss to cfg80211 layer Ian Lin
2022-09-28 6:38 ` Kalle Valo [this message]
2022-09-28 10:07 ` Lin Ian (CSSITB CSS ICW SW WFS / EE)
2022-10-04 11:01 ` Lin Ian (CSSITB CSS ICW SW WFS / EE)
2022-10-05 7:58 ` Kalle Valo
2022-10-05 10:22 ` Arend Van Spriel
2022-10-06 8:34 ` Lin Ian (CSSITB CSS ICW SW WFS / EE)
2022-10-10 9:23 ` Arend Van Spriel
2022-10-10 9:41 ` Johannes Berg
2022-10-10 11:18 ` Arend Van Spriel
2022-09-27 3:41 ` [PATCH v3 5/5] brcmfmac: fix P2P device discovery failure Ian Lin
2022-09-28 6:33 ` [PATCH v3 0/5] Fix connect/p2p issue series Kalle Valo
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=874jwsrojr.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=Double.Lo@infineon.com \
--cc=brcm80211-dev-list@broadcom.com \
--cc=brcm80211-dev-list@cypress.com \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=ian.lin@infineon.com \
--cc=linux-wireless@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.