Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B047FECAAD3 for ; Wed, 7 Sep 2022 09:22:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230465AbiIGJWv convert rfc822-to-8bit (ORCPT ); Wed, 7 Sep 2022 05:22:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230383AbiIGJWW (ORCPT ); Wed, 7 Sep 2022 05:22:22 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 80543B14EA for ; Wed, 7 Sep 2022 02:22:06 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 2879LdxY6001184, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36504.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 2879LdxY6001184 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Wed, 7 Sep 2022 17:21:39 +0800 Received: from RTEXMBS06.realtek.com.tw (172.21.6.99) by RTEXH36504.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Wed, 7 Sep 2022 17:21:57 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS06.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.2375.31; Wed, 7 Sep 2022 17:21:57 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::d902:19b0:8613:5b97]) by RTEXMBS04.realtek.com.tw ([fe80::d902:19b0:8613:5b97%5]) with mapi id 15.01.2375.007; Wed, 7 Sep 2022 17:21:57 +0800 From: Ping-Ke Shih To: Kalle Valo CC: "linux-wireless@vger.kernel.org" Subject: RE: [PATCH 5/5] wifi: rtw89: support TX diversity for 1T2R chipset Thread-Topic: [PATCH 5/5] wifi: rtw89: support TX diversity for 1T2R chipset Thread-Index: AQHYvtUX9S6OuK1vWk2v/+fM36dyR63TnkiDgAAaXiA= Date: Wed, 7 Sep 2022 09:21:57 +0000 Message-ID: <11c57bd5bd924dacb5769e716abe4310@realtek.com> References: <20220902124422.13610-1-pkshih@realtek.com> <20220902124422.13610-6-pkshih@realtek.com> <878rmvaap0.fsf@kernel.org> In-Reply-To: <878rmvaap0.fsf@kernel.org> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXMBS06.realtek.com.tw, 9 x-kse-attachmentfiltering-interceptor-info: no applicable attachment filtering rules found x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: =?us-ascii?Q?Clean,_bases:_2022/9/7_=3F=3F_07:34:00?= x-kse-bulkmessagesfiltering-scan-result: protection disabled Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-ServerInfo: RTEXH36504.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Kalle Valo > Sent: Wednesday, September 7, 2022 3:47 PM > To: Ping-Ke Shih > Cc: linux-wireless@vger.kernel.org > Subject: Re: [PATCH 5/5] wifi: rtw89: support TX diversity for 1T2R chipset > > Ping-Ke Shih writes: > > > Check RSSI strength to decide which path is better, and then set TX path > > accordingly. > > > > Signed-off-by: Ping-Ke Shih > > [...] > > > +static void rtw89_phy_tx_path_div_sta_iter(void *data, struct ieee80211_sta *sta) > > +{ > > + struct rtw89_sta *rtwsta = (struct rtw89_sta *)sta->drv_priv; > > + struct rtw89_dev *rtwdev = rtwsta->rtwdev; > > + struct rtw89_vif *rtwvif = rtwsta->rtwvif; > > + struct rtw89_hal *hal = &rtwdev->hal; > > + bool *done = (bool *)data; > > data is a void pointer, you don't need the cast here. > I have sent v2 to fix it. Thanks. Ping-Ke