Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp400538rwd; Tue, 30 May 2023 23:10:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7fTzcTXr3OTTwiV6VKkxDM6GIcNRpoV2vV0r19cAoninjQyrzI7wrPygcehwdpoO65OLP/ X-Received: by 2002:a92:d581:0:b0:33b:ad04:2c31 with SMTP id a1-20020a92d581000000b0033bad042c31mr1647737iln.8.1685513434803; Tue, 30 May 2023 23:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685513434; cv=none; d=google.com; s=arc-20160816; b=yBvGwQIKrnx5t2+PBsrS11F4UYhxOwyssntgas6onlJBSukYtXZGf4to+yiji6Q1/m 0RZRUJT2dS/OkW3crxs5q8QZ1J03JgXw3o7EyA/HSxJj7SriDiA40WMp8594fkIJadMV MmGLICJY0m14v1DGF/6p60DPbZF0uRM7emT1p7ZOJdxpvg+z1EAl0JCg/mIdtjXtmutJ jlm7P/J6s18FZPykKvswgRvYrDn2lcc2nZOcn7XB3jOIr15d6QQpbuanvT4g25wsMYRr 5R0unPxOR8TIxTHzHLOPZ6Xm960fySCzx0N+SilEHUZDblytCb/3tRmAz19qEDct2Xkn 4iRg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :authenticated-by; bh=aF3fu8wlTDSvH4fNatvOQpEsu12JxLCMqEoD7OnhzYQ=; b=QkpHgJZUuRGAF303sNOBBOVy85K9Gl9AIsn95Jc7Sjo3A2eMUXfTW4rJzS/oXrH5q+ ILMJTRNhm8+lGxImJTU2xQczfVxq9kWTH0+07sG2tFnM47YJxNi+SXfddLWC4vbRPaF2 pycyHhXbJhSyA8K6x/3R/tfSxossemIFCtJfXSqKubMNP3PoAzUMPG2Vq8YhO0h7xJS3 QmQsza45bG89Mqme1Ij11reTYIOaL4YJkI9dCZdlIchDimK1ar280LzcnFNDG4jUz0Fo HoFhhKOtkDT2XPjGcsjBjejDahAZV403DSIRCpMXPcp6p9i/f9PmopAeDqRmCVRlWUto yTMA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c11-20020a170903234b00b001a95929ca08si324095plh.533.2023.05.30.23.10.27; Tue, 30 May 2023 23:10:34 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234421AbjEaGI0 (ORCPT + 64 others); Wed, 31 May 2023 02:08:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234433AbjEaGIJ (ORCPT ); Wed, 31 May 2023 02:08:09 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C9A718D for ; Tue, 30 May 2023 23:07:47 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 34V67QifC025616, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 34V67QifC025616 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Wed, 31 May 2023 14:07:26 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Wed, 31 May 2023 14:07:39 +0800 Received: from [127.0.1.1] (172.21.69.188) by RTEXMBS04.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.2375.7; Wed, 31 May 2023 14:07:39 +0800 From: Ping-Ke Shih To: CC: , , Subject: [PATCH 1/4] wifi: rtw89: 8851b: enable hw_scan support Date: Wed, 31 May 2023 14:07:10 +0800 Message-ID: <20230531060713.57203-2-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230531060713.57203-1-pkshih@realtek.com> References: <20230531060713.57203-1-pkshih@realtek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.21.69.188] X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Po-Hao Huang This enables hw_scan for 8851b after firmware version 0.29.37.1. Extend the channel info struct with padding zeros so newer firmware can work properly, this change is backward compatible with older firmware. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/fw.c | 1 + drivers/net/wireless/realtek/rtw89/fw.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c index f7f40a261c96a..4bb90d9e00d2c 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.c +++ b/drivers/net/wireless/realtek/rtw89/fw.c @@ -257,6 +257,7 @@ struct __fw_feat_cfg { static const struct __fw_feat_cfg fw_feat_tbl[] = { __CFG_FW_FEAT(RTL8851B, ge, 0, 29, 37, 1, TX_WAKE), + __CFG_FW_FEAT(RTL8851B, ge, 0, 29, 37, 1, SCAN_OFFLOAD), __CFG_FW_FEAT(RTL8852A, le, 0, 13, 29, 0, OLD_HT_RA_FORMAT), __CFG_FW_FEAT(RTL8852A, ge, 0, 13, 35, 0, SCAN_OFFLOAD), __CFG_FW_FEAT(RTL8852A, ge, 0, 13, 35, 0, TX_WAKE), diff --git a/drivers/net/wireless/realtek/rtw89/fw.h b/drivers/net/wireless/realtek/rtw89/fw.h index dd71beb152aeb..78d808f1e8c84 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.h +++ b/drivers/net/wireless/realtek/rtw89/fw.h @@ -243,7 +243,7 @@ struct rtw89_fw_macid_pause_grp { #define RTW89_SCANOFLD_MAX_IE_LEN 512 #define RTW89_SCANOFLD_PKT_NONE 0xFF #define RTW89_SCANOFLD_DEBUG_MASK 0x1F -#define RTW89_MAC_CHINFO_SIZE 24 +#define RTW89_MAC_CHINFO_SIZE 28 #define RTW89_SCAN_LIST_GUARD 4 #define RTW89_SCAN_LIST_LIMIT \ ((RTW89_H2C_MAX_SIZE / RTW89_MAC_CHINFO_SIZE) - RTW89_SCAN_LIST_GUARD) -- 2.25.1