Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Mar 2019 02:56:51 +0000 (UTC)
From:      Andriy Voskoboinyk <avos@FreeBSD.org>
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
Message-ID:  <201903180256.x2I2upYh000353@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903180256.x2I2upYh000353>