[PATCH] ath11k: add read country code from SMBIOS for WCN6855/QCA6390
Kalle Valo
kvalo at kernel.org
Sun Apr 24 03:26:01 PDT 2022
Wen Gong <quic_wgong at quicinc.com> writes:
> On 4/23/2022 5:53 PM, Kalle Valo wrote:
>> Wen Gong <quic_wgong at quicinc.com> writes:
>>
>>
> ...
>>> +
>>> struct ath11k_smbios_bdf {
>>> struct dmi_header hdr;
>>> - u32 padding;
>>> + u8 features_disabled;
>>> + /* enum ath11k_smbios_cc_type */
>>> + u8 country_code_flag;
>>> + /* To set specific country, you need to set country code
>>> + * flag=ATH11K_SMBIOS_CC_ISO first, then if country is United States, then country
>>> + * code value = 0x5553 ("US",'U' = 0x55, 'S'= 0x53), To set country
>>> + * to INDONESIA, then country code value = 0x4944 ("IN", 'I'=0x49, 'D'=0x44).
>>> + * If country code flag = ATH11K_SMBIOS_CC_WW, then you can use
>>> + * worldwide regulatory setting.
>>> + */
>>> + __le16 cc_code;
>>> u8 bdf_enabled;
>>> u8 bdf_ext[];
>>> -};
>>> +} __packed;
>> Is cc_code really in little endian? I would expect data in smbios to be
>> in native endian (ie. u16), bios using different endian than the host
>> sounds strange to me. And struct dmi_header also uses native endian:
>>
>> struct dmi_header {
>> u8 type;
>> u8 length;
>> u16 handle;
>> } __packed;
>
> Yes, Kalle,
>
> I agree with you.
>
> need I send new version to change the "__le16 cc_code" to "u16 cc_code"?
I fixed this in the pending branch, compile tested only. Please check:
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=a6d583e310c70fb93ec7045f0ea38c12632098d8
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
More information about the ath11k
mailing list