From mboxrd@z Thu Jan 1 00:00:00 1970 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 ECF19E776D4 for ; Tue, 3 Oct 2023 00:27:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238397AbjJCA1L convert rfc822-to-8bit (ORCPT ); Mon, 2 Oct 2023 20:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbjJCA1K (ORCPT ); Mon, 2 Oct 2023 20:27:10 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DE3A93 for ; Mon, 2 Oct 2023 17:27:06 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3930QvvN61232036, 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.92/5.92) with ESMTPS id 3930QvvN61232036 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Oct 2023 08:26:57 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) 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; Tue, 3 Oct 2023 08:26:58 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS01.realtek.com.tw (172.21.6.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Tue, 3 Oct 2023 08:26:57 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7]) by RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7%5]) with mapi id 15.01.2375.007; Tue, 3 Oct 2023 08:26:57 +0800 From: Ping-Ke Shih To: Dmitry Antipov CC: Kalle Valo , "linux-wireless@vger.kernel.org" Subject: RE: [PATCH] wifi: rtlwifi: use unsigned long for rtl_bssid_entry timestamp Thread-Topic: [PATCH] wifi: rtlwifi: use unsigned long for rtl_bssid_entry timestamp Thread-Index: AQHZ8uwWyOE1al08SkyT8OIXaSWRnLA3Oq5g Date: Tue, 3 Oct 2023 00:26:57 +0000 Message-ID: References: <20230929154524.222498-1-dmantipov@yandex.ru> In-Reply-To: <20230929154524.222498-1-dmantipov@yandex.ru> Accept-Language: en-US, zh-TW Content-Language: zh-TW x-originating-ip: [172.21.69.25] x-kse-serverinfo: RTEXMBS01.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 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 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Dmitry Antipov > Sent: Friday, September 29, 2023 11:45 PM > To: Ping-Ke Shih > Cc: Kalle Valo ; linux-wireless@vger.kernel.org; Dmitry Antipov > Subject: [PATCH] wifi: rtlwifi: use unsigned long for rtl_bssid_entry timestamp > > Since 'age' of 'struct rtl_bssid_entry' is in jiffies, prefer 'unsigned > long' over 'u32' to avoid possible truncation in 'rtl_collect_scan_list()' > and thus weird result in 'rtl_scan_list_expire()'. Compile tested only. > > Signed-off-by: Dmitry Antipov Acked-by: Ping-Ke Shih > --- > drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h > index 2e7e04f91279..0f99e3446796 100644 > --- a/drivers/net/wireless/realtek/rtlwifi/wifi.h > +++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h > @@ -2708,7 +2708,7 @@ struct rtl_c2hcmd { > struct rtl_bssid_entry { > struct list_head list; > u8 bssid[ETH_ALEN]; > - u32 age; > + unsigned long age; > }; > > struct rtl_scan_list { > -- > 2.41.0