[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240827103012.3853588-1-yanzhen@vivo.com>
Date: Tue, 27 Aug 2024 18:30:12 +0800
From: Yan Zhen <yanzhen@...o.com>
To: edumazet@...gle.com,
johannes@...solutions.net,
davem@...emloft.net,
kuba@...nel.org,
pabeni@...hat.com
Cc: linux-wireless@...r.kernel.org,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
opensource.kernel@...o.com,
Yan Zhen <yanzhen@...o.com>
Subject: [PATCH v1] mac80211: scan: Use max macro
When the original file is guaranteed to contain the minmax.h header
file and compile correctly, using the real macro is usually
more intuitive and readable.
Signed-off-by: Yan Zhen <yanzhen@...o.com>
---
net/mac80211/scan.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index b5f2df61c7f6..e77c9f07b046 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -1013,10 +1013,8 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local,
*/
if ((chan->flags & (IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_RADAR)) ||
!scan_req->n_ssids) {
- *next_delay = msecs_to_jiffies(scan_req->duration) >
- IEEE80211_PASSIVE_CHANNEL_TIME ?
- msecs_to_jiffies(scan_req->duration) :
- IEEE80211_PASSIVE_CHANNEL_TIME;
+ *next_delay = max(msecs_to_jiffies(scan_req->duration),
+ IEEE80211_PASSIVE_CHANNEL_TIME);
local->next_scan_state = SCAN_DECISION;
if (scan_req->n_ssids)
set_bit(SCAN_BEACON_WAIT, &local->scanning);
--
2.34.1
Powered by blists - more mailing lists