Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jul 2024 11:09:33 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 9776aba34576 - main - net80211: scan/internal: change boolean argument from int to bool
Message-ID:  <202407261109.46QB9XtG020493@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz:

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

commit 9776aba34576596cbe49084457ee40730fec55a2
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-06-30 21:16:39 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-07-26 11:07:39 +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
    MFC after:      3 days
    Differential Revision: https://reviews.freebsd.org/D45816
---
 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 38f73d87f3d4..f5e8a301ad28 100644
--- a/sys/net80211/ieee80211_adhoc.c
+++ b/sys/net80211/ieee80211_adhoc.c
@@ -763,7 +763,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 1d741ca4d7bf..ac97889a9cef 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -1817,7 +1817,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 73e7ef7a8efd..8359ea8878d2 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -1878,7 +1878,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 5da7999951d6..8fd4de162359 100644
--- a/sys/net80211/ieee80211_sta.c
+++ b/sys/net80211/ieee80211_sta.c
@@ -1690,7 +1690,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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202407261109.46QB9XtG020493>