linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Wen Gong <quic_wgong@quicinc.com>
Cc: <ath11k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath11k: add read country code from SMBIOS for WCN6855/QCA6390
Date: Sun, 24 Apr 2022 13:26:01 +0300	[thread overview]
Message-ID: <87o80qkcau.fsf@kernel.org> (raw)
In-Reply-To: <61d2a5aa-c82d-6994-a8f3-0d31e32421be@quicinc.com> (Wen Gong's message of "Sun, 24 Apr 2022 14:22:56 +0800")

Wen Gong <quic_wgong@quicinc.com> writes:

> On 4/23/2022 5:53 PM, Kalle Valo wrote:
>> Wen Gong <quic_wgong@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

  reply	other threads:[~2022-04-24 10:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21  2:35 [PATCH] ath11k: add read country code from SMBIOS for WCN6855/QCA6390 Wen Gong
2022-04-23  9:53 ` Kalle Valo
2022-04-24  6:22   ` Wen Gong
2022-04-24 10:26     ` Kalle Valo [this message]
2022-04-24 12:11       ` Wen Gong
2022-04-27  7:28 ` 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=87o80qkcau.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_wgong@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).