wifi: mwifiex: Convert to use jiffies macro
PATCH v3 1/1 wifi: mwifiex: Convert to use jiffies macro
Use time_after macro instead of using
jiffies directly to handle wraparound.
The modifications made compared to the previous version are as follows:
1. change the type of mwifiex_auto_tdls_peer::rssi_jiffies to unsigned long.
--- drivers/net/wireless/marvell/mwifiex/main.h | 2 +- drivers/net/wireless/marvell/mwifiex/tdls.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/marvell/mwifiex/main.h +1 -1
@@ -799,7 +799,7 @@ struct mwifiex_auto_tdls_peer {u8 mac_addr[ETH_ALEN ];u8 tdls_status;int rssi; -long rssi_jiffies; +unsigned long rssi_jiffies;u8 failure_count;u8 do_discover;u8 do_setup;
drivers/net/wireless/marvell/mwifiex/tdls.c +2 -2
@@ -1439,8 +1439,8 @@ void mwifiex_check_auto_tdls(struct timer_list *t)spin_lock_bh (&priv->auto_tdls_lock);list_for_each_entry (tdls_peer, &priv->auto_tdls_list, list) { -if ((jiffies - tdls_peer->rssi_jiffies) > - (MWIFIEX_AUTO_TDLS_IDLE_TIME *HZ )) { +if (time_after (jiffies, tdls_peer->rssi_jiffies + +MWIFIEX_AUTO_TDLS_IDLE_TIME *HZ )) { tdls_peer->rssi =0 ; tdls_peer->do_discover = true; priv->check_tdls_tx = true;
Signature · 1 line
2.39.0
Francesco Dolcini
reviewerHello Chen,
thanks for your patch
Il 23 agosto 2024 09:03:19 CEST, Chen Yufan <[email protected]> ha scritto:
Quoted 5 lines
Use
time_aftermacro instead of using
jiffies directly to handle wraparound.
The modifications made compared to the previous version are as follows:
1. change the type ofmwifiex_auto_tdls_peer::rssi_jiffiesto unsigned long.
The patch changelog should not be part of the commit message, you should have it afterwards.
Francesco
Quoted 7 lines · Chen Yufan
Use
time_aftermacro instead of using
jiffies directly to handle wraparound.
The modifications made compared to the previous version are as follows:
1. change the type ofmwifiex_auto_tdls_peer::rssi_jiffiesto unsigned long.Signed-off-by Chen Yufan <[email protected]>
Changelog questions aside, this looks fine to me:
Quoted 11 lines · Brian Norris
Quoted 7 lines · Chen Yufan
Use
time_aftermacro instead of using
jiffies directly to handle wraparound.
The modifications made compared to the previous version are as follows:
1. change the type ofmwifiex_auto_tdls_peer::rssi_jiffiesto unsigned long.Signed-off-by Chen Yufan <[email protected]>Changelog questions aside, this looks fine to me:
Acked-by Brian Norris <[email protected]>
Thanks, I will pay attention to this question next time.
-Chen
Francesco Dolcini
reviewerQuoted 8 lines · 陈玉凡
Quoted 7 lines · Brian Norris
Quoted 6 lines · Chen Yufan
Use
time_aftermacro instead of using
jiffies directly to handle wraparound.
The modifications made compared to the previous version are as follows:
1. change the type ofmwifiex_auto_tdls_peer::rssi_jiffiesto unsigned long.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Chen Yufan <[email protected]>Changelog questions aside, this looks fine to me:
Acked-by Brian Norris <[email protected]>Thanks, I will pay attention to this question next time.
You should just send a v4 with this addressed and add the acked-by from Brian while doing it.
Francesco
Quoted 5 lines · Chen Yufan
Use
time_aftermacro instead of using jiffies directly to handle wraparound. Change the type to to unsigned long to avoid unnecessary casts.Signed-off-by Chen Yufan <[email protected]>Acked-by Brian Norris <[email protected]>
Patch applied to wireless-next.git, thanks.
97b766f989bc wifi: mwifiex: Convert to use jiffies macro
Signature · 4 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches https://docs.kernel.org/process/submitting-patches.html