From nobody Fri Apr 08 00:03:41 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 CFC7B1A88485; Fri, 8 Apr 2022 00:03:44 +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 4KZJPV6mszz4kyC; Fri, 8 Apr 2022 00:03:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649376224; 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=rs+lweJzzwRkfCOeVtncmi/ne2Hhf98nJce0zdMUzHM=; b=kZSXLYBFEzNij7OpKPYIkt26pFFJORtT6IwNUnYjlHX58+oRexnqaomQbjGxuUgWVmMVbN etHJ6vrKB9JsRtx2oEHXOTb6+954wKQ3qRDWeeeTRtdlI9BXxgAHZG4W6nKUAd31yZMQHh niRwwhOgQtDGi8masxl7MyOEYM/rEPmDBxXfY5HQnCRf0ORlOSj6dFfnCi38s7pMpML/2S 7Ki5zfGCgGLAOPHUewqgSS50F5r1Bf2oBnOPN9iibhaBN/MROb00RA07hx9zUJuBMFwzIb 2TlaawclfBpp1M0SXqzREWwH4XlgyvE7WgQMelrfpmeRPBxVeqHyHM5fDDiD3A== 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 DA0E81A581; Fri, 8 Apr 2022 00:03:41 +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 23803fbd086690; Fri, 8 Apr 2022 00:03:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23803fn8086689; Fri, 8 Apr 2022 00:03:41 GMT (envelope-from git) Date: Fri, 8 Apr 2022 00:03:41 GMT Message-Id: <202204080003.23803fn8086689@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: 50e3b6aa480b - main - rtwn: Restore RF_ENV control type after initializing RF. 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: 50e3b6aa480b34e6eb87530d307db7ceba591a17 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649376224; 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=rs+lweJzzwRkfCOeVtncmi/ne2Hhf98nJce0zdMUzHM=; b=nmIK+FdvMxDr0VTTJ6HWwgoUZKLnccbthO2gfBLsaaU09HGetv1xEYKpC2Rb6S9EgPE+l3 s5SrqvhaQfZfoOxVCp4XM1JkCoOQF7D3ppz3NYxGmpjOruQXBaiLnuwGFXvr/fpC6RWhS1 2yP+/TkkHo0K2CXzZ8e9/wrp4vvEeoK46VKNqo7HkZikrZdSXGOIigZ0xd9N3QUV37S+jl TNxoGSf6MgoqEnxRjKqGllXJ/ZPM1a0Xkxiy6b3Nrk2NLY8sxaeqyVRrfy1ZXa7opzUI7J Esvs786LhkxS5HryK8LrlJxCTQfOsx8tMZIKeN7eje+d3R4Xqmb/aITC77yz1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649376224; a=rsa-sha256; cv=none; b=S+MM7x6yAgxj9LkXVDaPd4IwQbHqfMxRUtGmn6xLVM2uKgvLTLvFuFIPytOc3GC5lv3lbe Y4Ny39wuQUYGj7YMdZvkxLCPmwvTAX024f4QtMk9azVjN5PMDjJGMgs+31grfA7aewgXqw 4q5b4ENB1mPguhTKfCkLGaPJ/gy7y/NVf7/ekpl5R9e8aK5k604tA5Sum3SZzIh2lJsWrV rDO+wl1NSzdMa/JeX2Btp3gV2MSaYBuT0Z4aNgWUhzLgfcoFZ+zQlEJ1bZmToD5Ca0aeU6 sC2nIZ11Wd2NLDLjALPLX6NWuz26+N+/WzcZ4rdMCzPahGBhxufOPMU80uIskQ== 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=50e3b6aa480b34e6eb87530d307db7ceba591a17 commit 50e3b6aa480b34e6eb87530d307db7ceba591a17 Author: John Baldwin AuthorDate: 2022-04-08 00:01:28 +0000 Commit: John Baldwin CommitDate: 2022-04-08 00:01:28 +0000 rtwn: Restore RF_ENV control type after initializing RF. Both rwlwifi in Linux and rtwn in OpenBSD restore this register, and the existing code was saving the value and not using it. Reported by: -Wunused-but-set-variable Reviewed by: imp Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D34838 --- sys/dev/rtwn/rtl8192e/r92e_init.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/rtwn/rtl8192e/r92e_init.c b/sys/dev/rtwn/rtl8192e/r92e_init.c index b38a9661567d..48a87e6ae98c 100644 --- a/sys/dev/rtwn/rtl8192e/r92e_init.c +++ b/sys/dev/rtwn/rtl8192e/r92e_init.c @@ -195,6 +195,11 @@ r92e_init_rf(struct rtwn_softc *sc) /* Write RF initialization values for this chain. */ i += r92c_init_rf_chain(sc, &sc->rf_prog[i], chain); + /* Restore RF_ENV control type. */ + reg = rtwn_bb_read(sc, R92C_FPGA0_RFIFACESW(idx)); + reg &= ~(0x10 << off) | (type << off); + rtwn_bb_write(sc, R92C_FPGA0_RFIFACESW(idx), reg); + /* Cache RF register CHNLBW. */ rs->rf_chnlbw[chain] = rtwn_rf_read(sc, chain, R92C_RF_CHNLBW); }