All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Jeff Johnson <quic_jjohnson@quicinc.com>
Cc: "Lin Ian \(CSSITB CSS ICW SW WFS \/ EE\)" <ian.lin@infineon.com>,
	<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 4/5] brcmfmac: Update SSID of hidden AP while informing its bss to cfg80211 layer
Date: Mon, 26 Sep 2022 10:54:33 +0300	[thread overview]
Message-ID: <87czbi4ll2.fsf@kernel.org> (raw)
In-Reply-To: <ff7e72ae-0431-b568-32fc-7b1cbf250e20@quicinc.com> (Jeff Johnson's message of "Fri, 23 Sep 2022 08:29:34 -0700")

Jeff Johnson <quic_jjohnson@quicinc.com> writes:

>>>> @@ -3032,6 +3033,12 @@ 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 = brcmf_parse_tlvs(notify_ie, notify_ielen, WLAN_EID_SSID);
>>>> +     if (ssid && ssid->data[0] == '\0' && ssid->len == bi->SSID_len) {
>>>> +             /* Update SSID for hidden AP */
>>>> +             memcpy((u8 *)ssid->data, bi->SSID, bi->SSID_len);
>>>> +     }
>>> memcpy() takes a void pointer so the cast is not needed.
>>
>> There should be a type casting since 'ssid' is a const pointer.
>> As you saw there will be build warning in PATCH v2 (sorry I didn't
>> notice that locally)
>> I will send PATCH v3 to restore type casting, is that ok?
>>
>
> writing through a const pointer seems broken.

Yeah, this is exactly why I don't like casting. I see so often casts
removing the const and that can lead to another problems.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2022-09-26  7:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  3:36 [PATCH 0/5] Fix connect/p2p issue series Ian Lin
2022-09-14  3:36 ` [PATCH 1/5] brcmfmac: correctly remove all p2p vif Ian Lin
2022-09-14  3:36 ` [PATCH 2/5] brcmfmac: Fix for when connect request is not success Ian Lin
2022-09-14  3:36 ` [PATCH 3/5] brcmfmac: Avoiding Connection delay Ian Lin
2022-09-14  3:36 ` [PATCH 4/5] brcmfmac: Update SSID of hidden AP while informing its bss to cfg80211 layer Ian Lin
2022-09-22  4:44   ` Kalle Valo
2022-09-23  1:52     ` Lin Ian (CSSITB CSS ICW SW WFS / EE)
2022-09-23 15:29       ` Jeff Johnson
2022-09-26  7:54         ` Kalle Valo [this message]
2022-09-14  3:36 ` [PATCH 5/5] brcmfmac: fix P2P device discovery failure Ian Lin

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=87czbi4ll2.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 \
    --cc=quic_jjohnson@quicinc.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 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.