Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp400733ybj; Wed, 6 May 2020 21:23:49 -0700 (PDT) X-Google-Smtp-Source: APiQypKLHrpCYW9OPSChA221YEXPgqKczteooHSMLpl7nmbzj3pSDx16rnUUVfPelLpj4PGz7wFn X-Received: by 2002:a17:906:bcec:: with SMTP id op12mr10481726ejb.245.1588825428916; Wed, 06 May 2020 21:23:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588825428; cv=none; d=google.com; s=arc-20160816; b=HfzaMn00nrx/gt7Rba+bPmM5PCw58Jc4eKNFEChhwXRt8/7QA49VlebOevUjFisOpN 8sRMSawCLePy7VIg4bKXu1uDhOP7FxCsbWLi0CVrdn9+UulSzK4anjpD8yDCVAc9ci0G xcC32+dvH7nc9MFdENuVpcjI1QKU4aepOn3RXBMBqxJWcBVbCL1lce+UXEWZZrXBSMo1 J5KMVYKJeHeK8bedmuk9mLOpktwP1RC81abz+s2SZboZUFN16uoDD+WkGAMG7zFGjRND SZ5Kfh1G9s6L9MX3bvP0g/zQCxdB5twvqBoMm1rB98Bb1sjnoFFnzry/7zIMjKTFYzbA sSgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:authenticated-by; bh=C42kX9Szdq8Dad3HeRec8TwpujFO1Lqgx8yBxX7jAIs=; b=fqXf7aZeivc291wPmTPlf4xk1WaC6hkDi05ODDQeoMZTiYq7p89O5/KSF6HtzFG4xX qJXtAsmIibay40yd2qZaRgoSJ1GQD2NZ3rUHvSOKRaRQPDGEnobqeq8wzucamoUfaDzQ Cc3M/wf8wyuIIUgNyFA5LmnWNhKWeW+KVsyjYNY64G7oHyue12i+/h7XQemQy9KosjPb kvie5tsqMa8TRkwXR15sbdYjZDeLrcHBRUsRLtUbXQRVrNhanA47OVH0sdklKzLfaSye uSrNcwsb6/UlgbKQ+5meNLYvjulK7Qe+/iedWCUeeMBqO1EePMYOJSvpV/CMZ5SG/Gwj uO9w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu22si2347546edb.507.2020.05.06.21.23.25; Wed, 06 May 2020 21:23:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725905AbgEGEWP (ORCPT + 99 others); Thu, 7 May 2020 00:22:15 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:34095 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbgEGEWP (ORCPT ); Thu, 7 May 2020 00:22:15 -0400 Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.69 with qID 0474LwVT2027294, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexmb06.realtek.com.tw[172.21.6.99]) by rtits2.realtek.com.tw (8.15.2/2.66/5.86) with ESMTPS id 0474LwVT2027294 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 7 May 2020 12:21:58 +0800 Received: from RTEXMB04.realtek.com.tw (172.21.6.97) by RTEXMB06.realtek.com.tw (172.21.6.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 7 May 2020 12:21:58 +0800 Received: from localhost.localdomain (172.21.68.128) by RTEXMB04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 7 May 2020 12:21:57 +0800 From: To: CC: , , Subject: [PATCH v2 8/9] rtw88: fill zeros to words 0x06 and 0x07 of security cam entry Date: Thu, 7 May 2020 12:21:50 +0800 Message-ID: <20200507042151.15634-9-yhchuang@realtek.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507042151.15634-1-yhchuang@realtek.com> References: <20200507042151.15634-1-yhchuang@realtek.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.128] X-ClientProxiedBy: RTEXMB02.realtek.com.tw (172.21.6.95) To RTEXMB04.realtek.com.tw (172.21.6.97) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ping-Ke Shih 8723D adds some experimental features to word 0x06 of cam entry, so fill zeros to initialize them to off state. For existing chips, these two words are reserved and always zeros, so this change is harmless for them. Signed-off-by: Ping-Ke Shih Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/sec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/sec.c b/drivers/net/wireless/realtek/rtw88/sec.c index d0d7fbb10d58..ce46e5b4a60a 100644 --- a/drivers/net/wireless/realtek/rtw88/sec.c +++ b/drivers/net/wireless/realtek/rtw88/sec.c @@ -44,7 +44,7 @@ void rtw_sec_write_cam(struct rtw_dev *rtwdev, write_cmd = RTW_SEC_CMD_WRITE_ENABLE | RTW_SEC_CMD_POLLING; addr = hw_key_idx << RTW_SEC_CAM_ENTRY_SHIFT; - for (i = 5; i >= 0; i--) { + for (i = 7; i >= 0; i--) { switch (i) { case 0: content = ((key->keyidx & 0x3)) | @@ -60,6 +60,10 @@ void rtw_sec_write_cam(struct rtw_dev *rtwdev, (cam->addr[4] << 16) | (cam->addr[5] << 24); break; + case 6: + case 7: + content = 0; + break; default: j = (i - 2) << 2; content = (key->key[j]) | -- 2.17.1