Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2013 07:48:21 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r256722 - head/sys/dev/usb/wlan
Message-ID:  <201310180748.r9I7mLII085891@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevlo
Date: Fri Oct 18 07:48:20 2013
New Revision: 256722
URL: http://svnweb.freebsd.org/changeset/base/256722

Log:
  Correct tx mixer gain value for RT3070 and RT3071.
  
  Correctly value in EEPROM/EFUSE is one or more for RT3070 and
  two or more for other RT3071 chips.

Modified:
  head/sys/dev/usb/wlan/if_run.c

Modified: head/sys/dev/usb/wlan/if_run.c
==============================================================================
--- head/sys/dev/usb/wlan/if_run.c	Fri Oct 18 07:46:28 2013	(r256721)
+++ head/sys/dev/usb/wlan/if_run.c	Fri Oct 18 07:48:20 2013	(r256722)
@@ -4366,7 +4366,7 @@ static int
 run_rt3070_rf_init(struct run_softc *sc)
 {
 	uint32_t tmp;
-	uint8_t rf, target, bbp4;
+	uint8_t bbp4, mingain, rf, target;
 	int i;
 
 	run_rt3070_rf_read(sc, 30, &rf);
@@ -4473,7 +4473,8 @@ run_rt3070_rf_init(struct run_softc *sc)
 		     (sc->mac_ver == 0x3071 && sc->mac_rev >= 0x0211)) &&
 		    !sc->ext_2ghz_lna)
 			rf |= 0x20;	/* fix for long range Rx issue */
-		if (sc->txmixgain_2ghz >= 1)
+		mingain = (sc->mac_ver == 0x3070) ? 1 : 2;
+		if (sc->txmixgain_2ghz >= mingain)
 			rf = (rf & ~0x7) | sc->txmixgain_2ghz;
 		run_rt3070_rf_write(sc, 17, rf);
 	}



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