Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2235584pxb; Sun, 24 Apr 2022 08:35:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpdcY9iX1GiqXjpgsCIEuXcLAC7AF8vZrXvzcOzUaPu2Fw0ORJygoMW7MgxJS8hcKXELDB X-Received: by 2002:a05:6402:1e88:b0:412:fc6b:f271 with SMTP id f8-20020a0564021e8800b00412fc6bf271mr14935663edf.345.1650814532073; Sun, 24 Apr 2022 08:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650814532; cv=none; d=google.com; s=arc-20160816; b=nkU5vnCqBFwrw6nDFwyyCA61BjfVvWGNyJipUOMIHr3UbwrL0Wu/x3LM0f+pEaaB6F WsB7smFAeFFHXYwO+mEXlSrZYuI8U2MoUppbvGmDmU2H1vULKXgP2/aIT/dWr8l/FrHM hymIkgdTKi46TOOWJSAh0oYUCBKnAASg52rlsj2lL+WKvKRC2rCrG9S7CaM5u72+Qoof 41ked5wsN5NvgCEaP1TxD1tVzfV4RGMIHkbHLieCUSJiE4bcTt+o+5/mxiidFaeAd2xd aToYQe4H1vX/JCDLNGzzYNkRBP5FaqACauWAOikEvaWpHFyGN0UJsxHpJ3kywZhLQDy8 NQUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=kKPFsit4rUYK7gNNds11XB+VuG/GjGDkpievrmyAjw8=; b=OYdltv9Kx9QCcUPIQd+zMymJc6hjWi6HiV5dsx3lSRWugAAJXpzo9f8ExKWkYnNAUz FzFlwsZECkKXtiVJod/jzuTH7BSxMvOjI9ZfRoBg+iOjGD2mpJ24my5Yky80YKbNbxPR P4LtDvJtLC++N2PDbZI7/nmdTPBfJUes8pMxEZYEZumXTPABS3sXS5qpMfaDiPEAlZCi FZZIQ984PpuWMKJXyDmFh+DTByf1QrB/3y9UmDcWDt2N/8XGsg47xGdUpj/vkd1cNCGx ppv8HYsRrAcr483himwsTM/HZ/ucEfvTi7hgHyU6Ch1wkOpVmDK45Z9YWVLRI5iCGBLZ D8zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=s57dneqi; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc39-20020a17090716a700b006e8789beed1si2242938ejc.167.2022.04.24.08.35.10; Sun, 24 Apr 2022 08:35:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=s57dneqi; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238369AbiDXG1D (ORCPT + 67 others); Sun, 24 Apr 2022 02:27:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238362AbiDXG1A (ORCPT ); Sun, 24 Apr 2022 02:27:00 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E02A17BF96 for ; Sat, 23 Apr 2022 23:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1650781441; x=1682317441; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=kKPFsit4rUYK7gNNds11XB+VuG/GjGDkpievrmyAjw8=; b=s57dneqiR4TY60fVXRmMyyPdfY6FvYOqQwnMuH24FGgjdfMIAAXvYcjY /28YigTRX6CtWN3CJJZuhahy+8Em2T99eWjt1QJ+dTt1qTFIvNA2Kt7ex ac2J//9lKdZEMEwSZ7pI/MyNaRyMBezYXS3OL739LL/F/A1A+Xlsk7NAA Q=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-01.qualcomm.com with ESMTP; 23 Apr 2022 23:23:00 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2022 23:23:00 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Sat, 23 Apr 2022 23:23:00 -0700 Received: from [10.253.9.110] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Sat, 23 Apr 2022 23:22:59 -0700 Message-ID: <61d2a5aa-c82d-6994-a8f3-0d31e32421be@quicinc.com> Date: Sun, 24 Apr 2022 14:22:56 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] ath11k: add read country code from SMBIOS for WCN6855/QCA6390 Content-Language: en-US To: Kalle Valo CC: , References: <20220421023501.32167-1-quic_wgong@quicinc.com> <8735i4m8hu.fsf@kernel.org> From: Wen Gong In-Reply-To: <8735i4m8hu.fsf@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 4/23/2022 5:53 PM, Kalle Valo wrote: > Wen Gong 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"?