git: d31850654e2f - main - iwn: Remove write-only extra variable.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 06 Apr 2022 23:45:57 UTC
The branch main has been updated by jhb:

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

commit d31850654e2ffc318a6bb6388a30c7dceb9819d8
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-06 23:45:27 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-06 23:45:27 +0000

    iwn: Remove write-only extra variable.
    
    extra is used in a commented-out expression to compute
    scan_service_time.  Use #if 0 instead of a comment for the disabled
    scan_service_time expression and move the unused computation of extra
    under the same #if.
---
 sys/dev/iwn/if_iwn.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index 4191fb340a03..4ef388cfb8f8 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -7026,7 +7026,7 @@ iwn_scan(struct iwn_softc *sc, struct ieee80211vap *vap,
 	int buflen, error;
 	int is_active;
 	uint16_t dwell_active, dwell_passive;
-	uint32_t extra, scan_service_time;
+	uint32_t scan_service_time;
 
 	DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__);
 
@@ -7070,9 +7070,12 @@ iwn_scan(struct iwn_softc *sc, struct ieee80211vap *vap,
 	 * suspend_time: 100 (TU)
 	 *
 	 */
+#if 0
 	extra = (100 /* suspend_time */ / 100 /* beacon interval */) << 22;
-	//scan_service_time = extra | ((100 /* susp */ % 100 /* int */) * 1024);
+	scan_service_time = extra | ((100 /* susp */ % 100 /* int */) * 1024);
+#else
 	scan_service_time = (4 << 22) | (100 * 1024);	/* Hardcode for now! */
+#endif
 	hdr->pause_svc = htole32(scan_service_time);
 
 	/* Select antennas for scanning. */