Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9131102pxu; Mon, 28 Dec 2020 07:23:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFPfAvKbBIYUX8PlFH8Ql6NdGn9FSFZbTOZxBGgfXuB8zudea2ImKItDJQ5GbrTc5DqYix X-Received: by 2002:a17:906:7090:: with SMTP id b16mr42986988ejk.76.1609168982017; Mon, 28 Dec 2020 07:23:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168982; cv=none; d=google.com; s=arc-20160816; b=QQkeqzApd0muAaTAVYa0sbhNB/Xv9Z+bLdVhMhYiQ4QM/7rVNPjm63sdLrt2LW1RNj 0cDCgqx4sLoaSRIP6sWf/ycM0glqrIFwuJjALoB4WvIoHC0yCCuoP9NtokH/zpXRbSNh A+FhUQ6MWUf5xhEqIlHQX8l+X0eL2Jw1jiCm6nvsD5ZXxQd1R3RaAAFHdhOrSDmgaDVu N/D5LouUxw57oabcfvT11K33gBnCY2WIU+5RLKpZzVx/3cygw/ZapXjm3CpWX9Oo3zsg aKQIkuMDnW8yfsMQ6cn7hTFITpDnR1VCX3mlXhJ3rX2mBsIncw5FQoiCFJEvITpz/+2x wD0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VJsJE/Sq5/1ec4c/cDMhcIOB/CXrkLnjVMEEEW1PzAo=; b=yGKpVIwv0zLRLv3G0tSJbGm9BGF3B2Hc0A8MlwO/rXM8go6fNmo3b+o52axYxV3lTv etHQ1W4fQEbT4rMrYcz4+OP3DFphlQuwVoOxfqb3ZgtGDOKbYVT6D33bQ++6DW6lv9E6 Cx0jMp9L+RKaHI3/6ujHqb5I1BSHYQ/9riAplgOp5qwi3NNBic1Xwzjavt9RK17dYT7S k6jJmFI7EVxqc7t7CwA97LR8MfAtpQDtH1OlmNZKARWTI2kAR2GCkVRmgYAd/G1mArpY whYLwHPdsv8Abx1CuNDNP1JERfOygKI/y73YoDnn8Z61vrW1UxSGoEEHDBQxiNMlzcs2 Y+ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uNqvikbE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si20741834eds.556.2020.12.28.07.22.37; Mon, 28 Dec 2020 07:23:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uNqvikbE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436947AbgL1OCm (ORCPT + 99 others); Mon, 28 Dec 2020 09:02:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:36346 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436897AbgL1OCf (ORCPT ); Mon, 28 Dec 2020 09:02:35 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5FF2B2064B; Mon, 28 Dec 2020 14:01:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164115; bh=IWRDa28+widSSeJiMsMFp8MUt95eHCJui1hA1mkbdE8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uNqvikbE71DsiDU+FyKTE1L1smFfAy+n+OMjkMsU98qQwF+vVSTpqAGgNX8c5t6tH ZldyOwckYDtaliHRuMIekuzDMEyIhTsMWIHnO5ipx+MvYkWcPX09HItWBRjTq/sKLQ FliBLAebSX9ljN4gFVRqzqhJ7lnviTWUiNyKnTh0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sven Eckelmann , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 065/717] ath11k: Initialize complete alpha2 for regulatory change Date: Mon, 28 Dec 2020 13:41:03 +0100 Message-Id: <20201228125024.109673721@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sven Eckelmann [ Upstream commit 383a32cde4172db19d4743d4c782c00af39ff275 ] The function ath11k_wmi_send_init_country_cmd is taking 3 byte from alpha2 of the structure wmi_init_country_params. But the function ath11k_reg_notifier is only initializing 2 bytes. The third byte is therefore always an uninitialized value. The command can happen to look like 0c 00 87 02 01 00 00 00 00 00 00 00 43 41 f8 00 instead of 0c 00 87 02 01 00 00 00 00 00 00 00 43 41 00 00 Tested-on: IPQ8074 hw2.0 WLAN.HK.2.1.0.1-01161-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Tested-on: IPQ8074 hw2.0 WLAN.HK.2.4.0.1.r1-00019-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 WLAN.HK.2.4.0.1.r1-00026-QCAHKSWPL_SILICONZ-2 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201021140555.4114715-1-sven@narfation.org Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/reg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath11k/reg.c b/drivers/net/wireless/ath/ath11k/reg.c index f6a1f0352989d..83f75f8855ebe 100644 --- a/drivers/net/wireless/ath/ath11k/reg.c +++ b/drivers/net/wireless/ath/ath11k/reg.c @@ -80,6 +80,7 @@ ath11k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request) */ init_country_param.flags = ALPHA_IS_SET; memcpy(&init_country_param.cc_info.alpha2, request->alpha2, 2); + init_country_param.cc_info.alpha2[2] = 0; ret = ath11k_wmi_send_init_country_cmd(ar, init_country_param); if (ret) -- 2.27.0