From nobody Wed Apr 06 23:45:57 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 17CF71A82A1C; Wed, 6 Apr 2022 23:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KYh3T3rY7z4Qv7; Wed, 6 Apr 2022 23:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649288757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sjzzcdw+o/ONoThO6pFXow8QnxgC0zJjUdfuiDHlQXU=; b=r7B3aA3QWGB4E22S2GksoaMSUBWctddjv2fwsP9z6uOBUfQp5sWc0W27G5b3cqYHJ14ew7 /R48Fek6F+B+8Dx3Cu6lIHiOJXZ7VWsCUWw+TjjuZdSijjCkPyjhmF100pEnbTIjUPotUx LcZ1ftlOzjcl5Emuv3yxoZ1p70Hu92/dQYhiQ1sLRMfvZUpjEqkbVZVetYts+qloAPL4na eUSA8tJGnytSrsgJJyK3RnHgKAgJ8ZqAu91YUG/fQIkSQKBJDIJcYpMisKMrnyuWotCQlt fvREGjz574dFE7oKjtolb9xTikUhgiD0s5xOAMNprLiqrbgbKXuycf0UfyCjvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50A97245E4; Wed, 6 Apr 2022 23:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 236NjvsU008588; Wed, 6 Apr 2022 23:45:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 236Njvic008587; Wed, 6 Apr 2022 23:45:57 GMT (envelope-from git) Date: Wed, 6 Apr 2022 23:45:57 GMT Message-Id: <202204062345.236Njvic008587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d31850654e2f - main - iwn: Remove write-only extra variable. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d31850654e2ffc318a6bb6388a30c7dceb9819d8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649288757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sjzzcdw+o/ONoThO6pFXow8QnxgC0zJjUdfuiDHlQXU=; b=SB6tJulvlzk9b6Cq2z6FmtkV0Gh9hBzV8YvL1TbrXjmxRyDQkvHFSsTcINNO3KqG9XlcJi y0/0PShild7LYgCj2HeFPttQ5FKaw2X1PfwMmvLYUxAGhnKNTl8CesiMjU17pgUjs3+JE9 0ul7hn4CR+KAeoW2MkbSy5uUbRdhG2aoCNdF91IK2AeJaOZRttO3wzP8HQ5gQpAxUN3je8 0kjMokS6X7G3AZqiLexjewX96XAHpTC67taHDhADmSkny8UGRPYqVVIupfKFtTve+QHFn4 YgETuLprGLQe6Ew6SCrebjy4va9pIZl7DyvmPFY48WFCxpYvvP+iE5dOYvT1FA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649288757; a=rsa-sha256; cv=none; b=fWGF8GVmqYR3j7JtfQSMssoYz0W5ZcNwnfN5tvxmD5M7IMDgxePzKYbCGe16t1yVJ6u6si vMShQDYsoWJqEA2e+iJ6X2S8GfPgI5PuX21d4f63pkLoEP6IOfNl5TPzKLvdpaDjX1IPlF 5OOTGQy//pL1y7GVi2YEQr3ACR78nKp/Hx4tgvLmIcNWB8mkX7q5VGXcnNQOUSwBYsmYb2 ia5i8eFxP8USIUQy521bt+ej/mTM4lCCnWM0a74aYdChnJrHJ032FLRhemmyk7J1WDL1IJ Y0mxRCeZ3+ODCHHdqP1qrgqPtPsBUOP6/jAB5djMz7/9XsKoTaOJv9KsZ2Yu+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d31850654e2ffc318a6bb6388a30c7dceb9819d8 commit d31850654e2ffc318a6bb6388a30c7dceb9819d8 Author: John Baldwin AuthorDate: 2022-04-06 23:45:27 +0000 Commit: John Baldwin 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. */