git: e9624aa3f2f8 - stable/14 - net80211: scan/internal: change boolean argument from int to bool

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Sat, 28 Sep 2024 10:38:13 UTC
The branch stable/14 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=e9624aa3f2f8b370c42141b83c4b71bf06832142

commit e9624aa3f2f8b370c42141b83c4b71bf06832142
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-06-30 21:16:39 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-09-28 10:35:12 +0000

    net80211: scan/internal: change boolean argument from int to bool
    
    ieee80211_probe_curchan() passes a "force" argument which is bool.
    Make it such.  Adjust the (*sc_scan_probe_curchan)() KPI to bool
    as well. This is all a big NOP as the only implementor of this
    function, ieee80211_swscan_probe_curchan(), does not use the argument
    at all.
    
    I came across this when pondering a different scan implementation.
    Rather than dropping the change remove the argument from the function,
    and push the cleanup out given it is purely net80211 internal code
    (the argument may have reason for existance in the future).
    
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D45816
    
    (cherry picked from commit 9776aba34576596cbe49084457ee40730fec55a2)
---
 sys/net80211/ieee80211_adhoc.c   | 2 +-
 sys/net80211/ieee80211_hostap.c  | 2 +-
 sys/net80211/ieee80211_mesh.c    | 2 +-
 sys/net80211/ieee80211_scan.c    | 2 +-
 sys/net80211/ieee80211_scan.h    | 4 ++--
 sys/net80211/ieee80211_scan_sw.c | 4 ++--
 sys/net80211/ieee80211_sta.c     | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c
index 7455500a91ab..021f2af2b0f9 100644
--- a/sys/net80211/ieee80211_adhoc.c
+++ b/sys/net80211/ieee80211_adhoc.c
@@ -767,7 +767,7 @@ adhoc_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
 				 * XXX check if the beacon we recv'd gives
 				 * us what we need and suppress the probe req
 				 */
-				ieee80211_probe_curchan(vap, 1);
+				ieee80211_probe_curchan(vap, true);
 				ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN;
 			}
 			ieee80211_add_scan(vap, rxchan, &scan, wh,
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
index 52832c308c7d..983668a43d4c 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -1816,7 +1816,7 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
 				 * XXX check if the beacon we recv'd gives
 				 * us what we need and suppress the probe req
 				 */
-				ieee80211_probe_curchan(vap, 1);
+				ieee80211_probe_curchan(vap, true);
 				ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN;
 			}
 			ieee80211_add_scan(vap, ic->ic_curchan, &scan, wh,
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
index 477527b34529..82208b8b6f7b 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -1881,7 +1881,7 @@ mesh_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype,
 				 * XXX check if the beacon we recv'd gives
 				 * us what we need and suppress the probe req
 				 */
-				ieee80211_probe_curchan(vap, 1);
+				ieee80211_probe_curchan(vap, true);
 				ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN;
 			}
 			ieee80211_add_scan(vap, rxchan, &scan, wh,
diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c
index 4e5958e82cc8..04fee33f48f1 100644
--- a/sys/net80211/ieee80211_scan.c
+++ b/sys/net80211/ieee80211_scan.c
@@ -513,7 +513,7 @@ ieee80211_scan_done(struct ieee80211vap *vap)
  * then we'll transmit a probe request.
  */
 void
-ieee80211_probe_curchan(struct ieee80211vap *vap, int force)
+ieee80211_probe_curchan(struct ieee80211vap *vap, bool force)
 {
 	struct ieee80211com *ic = vap->iv_ic;
 
diff --git a/sys/net80211/ieee80211_scan.h b/sys/net80211/ieee80211_scan.h
index a33864b102e2..1afe767ef052 100644
--- a/sys/net80211/ieee80211_scan.h
+++ b/sys/net80211/ieee80211_scan.h
@@ -104,7 +104,7 @@ struct ieee80211_scan_methods {
 	void (*sc_cancel_anyscan)(struct ieee80211vap *);
 	void (*sc_scan_next)(struct ieee80211vap *);
 	void (*sc_scan_done)(struct ieee80211vap *);
-	void (*sc_scan_probe_curchan)(struct ieee80211vap *, int);
+	void (*sc_scan_probe_curchan)(struct ieee80211vap *, bool);
 	void (*sc_add_scan)(struct ieee80211vap *,
 	    struct ieee80211_channel *,
 	    const struct ieee80211_scanparams *,
@@ -179,7 +179,7 @@ void	ieee80211_cancel_scan(struct ieee80211vap *);
 void	ieee80211_cancel_anyscan(struct ieee80211vap *);
 void	ieee80211_scan_next(struct ieee80211vap *);
 void	ieee80211_scan_done(struct ieee80211vap *);
-void	ieee80211_probe_curchan(struct ieee80211vap *, int);
+void	ieee80211_probe_curchan(struct ieee80211vap *, bool);
 struct ieee80211_channel *ieee80211_scan_pickchannel(struct ieee80211com *, int);
 
 struct ieee80211_scanparams;
diff --git a/sys/net80211/ieee80211_scan_sw.c b/sys/net80211/ieee80211_scan_sw.c
index 62f6bf24d42a..e1d6b2779cf0 100644
--- a/sys/net80211/ieee80211_scan_sw.c
+++ b/sys/net80211/ieee80211_scan_sw.c
@@ -522,7 +522,7 @@ ieee80211_swscan_scan_done(struct ieee80211vap *vap)
  * then we'll transmit a probe request.
  */
 static void
-ieee80211_swscan_probe_curchan(struct ieee80211vap *vap, int force)
+ieee80211_swscan_probe_curchan(struct ieee80211vap *vap, bool force __unused)
 {
 	struct ieee80211com *ic = vap->iv_ic;
 	struct ieee80211_scan_state *ss = ic->ic_scan;
@@ -569,7 +569,7 @@ scan_curchan(struct ieee80211_scan_state *ss, unsigned long maxdwell)
 	    maxdwell);
 	IEEE80211_LOCK(ic);
 	if (ss->ss_flags & IEEE80211_SCAN_ACTIVE)
-		ieee80211_probe_curchan(vap, 0);
+		ieee80211_probe_curchan(vap, false);
 	taskqueue_enqueue_timeout(ic->ic_tq,
 	    &SCAN_PRIVATE(ss)->ss_scan_curchan, maxdwell);
 	IEEE80211_UNLOCK(ic);
diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c
index 042f5636be29..e48c6e084eb3 100644
--- a/sys/net80211/ieee80211_sta.c
+++ b/sys/net80211/ieee80211_sta.c
@@ -1694,7 +1694,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype,
 				 * XXX check if the beacon we recv'd gives
 				 * us what we need and suppress the probe req
 				 */
-				ieee80211_probe_curchan(vap, 1);
+				ieee80211_probe_curchan(vap, true);
 				ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN;
 			}
 			ieee80211_add_scan(vap, rxchan, &scan, wh,