* [PATCH] wifi: rtlwifi: use unsigned long for rtl_bssid_entry timestamp
@ 2023-09-29 15:45 Dmitry Antipov
2023-10-03 0:26 ` Ping-Ke Shih
2023-10-03 11:44 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Antipov @ 2023-09-29 15:45 UTC (permalink / raw)
To: Ping-Ke Shih; +Cc: Kalle Valo, linux-wireless, Dmitry Antipov
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 <dmantipov@yandex.ru>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] wifi: rtlwifi: use unsigned long for rtl_bssid_entry timestamp
2023-09-29 15:45 [PATCH] wifi: rtlwifi: use unsigned long for rtl_bssid_entry timestamp Dmitry Antipov
@ 2023-10-03 0:26 ` Ping-Ke Shih
2023-10-03 11:44 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Ping-Ke Shih @ 2023-10-03 0:26 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Kalle Valo, linux-wireless@vger.kernel.org
> -----Original Message-----
> From: Dmitry Antipov <dmantipov@yandex.ru>
> Sent: Friday, September 29, 2023 11:45 PM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Kalle Valo <kvalo@kernel.org>; linux-wireless@vger.kernel.org; Dmitry Antipov <dmantipov@yandex.ru>
> 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 <dmantipov@yandex.ru>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: rtlwifi: use unsigned long for rtl_bssid_entry timestamp
2023-09-29 15:45 [PATCH] wifi: rtlwifi: use unsigned long for rtl_bssid_entry timestamp Dmitry Antipov
2023-10-03 0:26 ` Ping-Ke Shih
@ 2023-10-03 11:44 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2023-10-03 11:44 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Ping-Ke Shih, linux-wireless, Dmitry Antipov
Dmitry Antipov <dmantipov@yandex.ru> wrote:
> 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 <dmantipov@yandex.ru>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Patch applied to wireless-next.git, thanks.
f0fb62e090bd wifi: rtlwifi: use unsigned long for rtl_bssid_entry timestamp
--
https://patchwork.kernel.org/project/linux-wireless/patch/20230929154524.222498-1-dmantipov@yandex.ru/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-03 11:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-29 15:45 [PATCH] wifi: rtlwifi: use unsigned long for rtl_bssid_entry timestamp Dmitry Antipov
2023-10-03 0:26 ` Ping-Ke Shih
2023-10-03 11:44 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.