Search Linux Wireless

Re: [PATCH 4/5] brcmfmac: Update SSID of hidden AP while informing its bss to cfg80211 layer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Johnson <quic_jjohnson@xxxxxxxxxxx> 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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux