From: Chun-Cheng Chang <frank0988855428@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Chun-Cheng Chang <frank0988855428@gmail.com>
Subject: [PATCH] wifi: ath9k: use max() for pulse duration selection
Date: Thu, 2 Jul 2026 13:23:39 +0000 [thread overview]
Message-ID: <20260702132339.415072-1-frank0988855428@gmail.com> (raw)
Use max() to select the larger primary or extension channel pulse
duration in ath9k_postprocess_radar_event().
This matches the RSSI selection just below and improves readability
without changing behavior.
Signed-off-by: Chun-Cheng Chang <frank0988855428@gmail.com>
---
drivers/net/wireless/ath/ath9k/dfs.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/dfs.c b/drivers/net/wireless/ath/ath9k/dfs.c
index 2fb73a5e1d51..370346450675 100644
--- a/drivers/net/wireless/ath/ath9k/dfs.c
+++ b/drivers/net/wireless/ath/ath9k/dfs.c
@@ -239,10 +239,7 @@ ath9k_postprocess_radar_event(struct ath_softc *sc,
* Radiated testing, when pulse is on DC, different pri and
* ext durations are reported, so take the larger of the two
*/
- if (ard->pulse_length_ext >= ard->pulse_length_pri)
- dur = ard->pulse_length_ext;
- else
- dur = ard->pulse_length_pri;
+ dur = max(ard->pulse_length_ext, ard->pulse_length_pri);
DFS_STAT_INC(sc, dc_phy_errors);
/* when both are present use stronger one */
--
2.53.0
reply other threads:[~2026-07-02 13:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260702132339.415072-1-frank0988855428@gmail.com \
--to=frank0988855428@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=toke@toke.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox