From owner-svn-src-stable-12@freebsd.org Mon Mar 18 02:56:52 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC754152AC54; Mon, 18 Mar 2019 02:56:52 +0000 (UTC) (envelope-from avos@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 505A26C8E1; Mon, 18 Mar 2019 02:56:52 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25D721B3A1; Mon, 18 Mar 2019 02:56:52 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2I2uqhV000355; Mon, 18 Mar 2019 02:56:52 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2I2upYh000353; Mon, 18 Mar 2019 02:56:51 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903180256.x2I2upYh000353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 18 Mar 2019 02:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345253 - in stable/12/sys/dev/rtwn/rtl8192c: . usb X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable/12/sys/dev/rtwn/rtl8192c: . usb X-SVN-Commit-Revision: 345253 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 505A26C8E1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Mar 2019 02:56:52 -0000 Author: avos Date: Mon Mar 18 02:56:51 2019 New Revision: 345253 URL: https://svnweb.freebsd.org/changeset/base/345253 Log: MFC r344745: rtwn_usb(4): fix Tx instability with RTL8192CU chipsets PR: 233949 Modified: stable/12/sys/dev/rtwn/rtl8192c/r92c_reg.h stable/12/sys/dev/rtwn/rtl8192c/r92c_tx.c stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/rtwn/rtl8192c/r92c_reg.h ============================================================================== --- stable/12/sys/dev/rtwn/rtl8192c/r92c_reg.h Mon Mar 18 02:40:22 2019 (r345252) +++ stable/12/sys/dev/rtwn/rtl8192c/r92c_reg.h Mon Mar 18 02:56:51 2019 (r345253) @@ -148,6 +148,7 @@ #define R92C_RD_RESP_PKT_TH 0x463 #define R92C_INIRTS_RATE_SEL 0x480 #define R92C_INIDATA_RATE_SEL(macid) (0x484 + (macid)) +#define R92C_POWER_STATUS 0x4a4 #define R92C_QUEUE_CTRL 0x4c6 #define R92C_MAX_AGGR_NUM 0x4ca #define R92C_BAR_MODE_CTRL 0x4cc Modified: stable/12/sys/dev/rtwn/rtl8192c/r92c_tx.c ============================================================================== --- stable/12/sys/dev/rtwn/rtl8192c/r92c_tx.c Mon Mar 18 02:40:22 2019 (r345252) +++ stable/12/sys/dev/rtwn/rtl8192c/r92c_tx.c Mon Mar 18 02:56:51 2019 (r345253) @@ -211,6 +211,12 @@ r92c_tx_setup_macid(void *buf, int id) struct r92c_tx_desc *txd = (struct r92c_tx_desc *)buf; txd->txdw1 |= htole32(SM(R92C_TXDW1_MACID, id)); + + /* XXX does not belong here */ + /* XXX temporary (I hope) */ + /* Force CCK1 for RTS / CTS frames (driver bug) */ + txd->txdw4 &= ~htole32(SM(R92C_TXDW4_RTSRATE, R92C_TXDW4_RTSRATE_M)); + txd->txdw4 &= ~htole32(R92C_TXDW4_RTS_SHORT); } void Modified: stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c ============================================================================== --- stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c Mon Mar 18 02:40:22 2019 (r345252) +++ stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_init.c Mon Mar 18 02:56:51 2019 (r345253) @@ -357,6 +357,8 @@ void r92cu_post_init(struct rtwn_softc *sc) { + rtwn_write_4(sc, R92C_POWER_STATUS, 0x5); + /* Perform LO and IQ calibrations. */ r92c_iq_calib(sc); /* Perform LC calibration. */