Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4884355pxu; Wed, 21 Oct 2020 07:42:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyb9S7hULSM966mYaHtUKvVNBzZKLlc0T99CDKARzK0Di5Kd4J+zGgHeYuqT8FM9mtj1+pa X-Received: by 2002:a05:6402:2208:: with SMTP id cq8mr3257382edb.191.1603291353742; Wed, 21 Oct 2020 07:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603291353; cv=none; d=google.com; s=arc-20160816; b=BwuMuwvhtFvoTgAPc6NWotf4IY8y1LS1tIKf/3ItA+Big3rkVtnJT/biqatlo9Ve8V SzfwN8Oq9T5wECkXTVq4mHNA0RY5pzlkF72q7zQv2fTMiLeYFQik72R8MP355XpAIW4n DNlBgvT163p5C4a3NHTc1dFDMq53C7rPtLlHgmj97otZM45pCKJbP0iKvDYsGyDUIBFr nnmFTq4oKtGbQnJV63Sn99A1O7Nknbw9rFT2q4e0a9eXBisimzk2gYs0xkg6zcIKwWq5 gY4aW8hRQUb8aVP8hC2f+PDT9fccHMTiKb2o7v2FN6e6l2mPqb/sAHeVJYWb9zMOE6NF Dc/Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=0IVOM5jhr+HBlD6Kb4Smea9Li8jHzw/ys+VyIk3sxng=; b=q9TK020/1cXGKxob58AJJ+JXqFPM62XPBZo15tUWLaW4LcgnWFq4Kr05YFcfFApJFm mGvmDF5EHRq+BTTmaWzmvqMzTujWYC+9ow5+TabPKmJSDQC+of6tBYfvBp+xLjNsYfPD yLoWaOdkhm5igh2eohvaLUBE4tFBQBQ+qo0MP1f8EP9GtBep8U/0bnGhIYCZ1AiLqgiA 6+WL3NCnBTRTBd5qCYGbgZLkXPYkb6XNCwTtYZ5/gEqUTsxUPTJxth3mpXd4cLVN66o1 S6U3iWoc7ghLs/NA32tOhoTxQsbGuGcFLAbvs/q5K0HLs+YsUt+gsrzjoLwAYaFHuUpK 7M9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@narfation.org header.s=20121 header.b=oHWuM0bb; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=narfation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si1636654ejy.301.2020.10.21.07.41.41; Wed, 21 Oct 2020 07:42:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@narfation.org header.s=20121 header.b=oHWuM0bb; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=narfation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442512AbgJUOGK (ORCPT + 99 others); Wed, 21 Oct 2020 10:06:10 -0400 Received: from dvalin.narfation.org ([213.160.73.56]:48850 "EHLO dvalin.narfation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442486AbgJUOGK (ORCPT ); Wed, 21 Oct 2020 10:06:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1603289167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0IVOM5jhr+HBlD6Kb4Smea9Li8jHzw/ys+VyIk3sxng=; b=oHWuM0bbTblOC/VSSUaz18CmtM5kJBoyHGdj3SlMylyVfbRmy/pbuiMtQHnGByEB/hrIzx q8Ei5E+yk7oqptyf2Kk42eZve5k4XSnEI4LubH6ORiDRpo/r+JTsTGkActHH5Vdv+RL+Hr sB+unNBVZcgg8POsE/CpkhJIVMODOGY= From: Sven Eckelmann To: ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Sven Eckelmann Subject: [PATCH] ath11k: Initialize complete alpha2 for regulatory change Date: Wed, 21 Oct 2020 16:05:55 +0200 Message-Id: <20201021140555.4114715-1-sven@narfation.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Sven Eckelmann --- 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 f6a1f0352989..83f75f8855eb 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.28.0