aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-04-06 23:45:27 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-04-06 23:45:27 +0000
commitd31850654e2ffc318a6bb6388a30c7dceb9819d8 (patch)
tree2b7f0e6b3a660204d74163a02711dd7420144350
parent99f65e9198c89e96f935986300b8ee3605d1349f (diff)
downloadsrc-d31850654e2ffc318a6bb6388a30c7dceb9819d8.tar.gz
src-d31850654e2ffc318a6bb6388a30c7dceb9819d8.zip
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.
-rw-r--r--sys/dev/iwn/if_iwn.c7
1 files 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. */