kern/181898: Centrino Advanced-N 6235 with latest iwn(4)

Johannes Jost Meixner xmj at chaot.net
Fri Sep 6 19:30:01 UTC 2013


>Number:         181898
>Category:       kern
>Synopsis:       Centrino Advanced-N 6235 with latest iwn(4)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 06 19:30:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Johannes Jost Meixner
>Release:        10.0-CURRENT
>Organization:
Goldener Grund OUe
>Environment:
FreeBSD mx12 10.0-CURRENT FreeBSD 10.0-CURRENT #1 r255210M: Thu Sep  5 00:23:11 EEST 2013     root at mx12:/usr/obj/usr/src/sys/xmj.debug  amd64

>Description:
I submitted kern/173898 a while back, and iwn(4) has been working on my laptop
since last November. As said before, HT40 does not (yet?) work on the chip.
However, at least throughput on my box is okay.

The diff attached to this integrates 
http://people.freebsd.org/~mav/iwn6235.patch
and is compatible with the commits that touched iwn in August/September.

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: sys/dev/iwn/if_iwn.c
===================================================================
--- sys/dev/iwn/if_iwn.c	(revision 255210)
+++ sys/dev/iwn/if_iwn.c	(working copy)
@@ -115,6 +115,8 @@
 	{ 0x8086, IWN_DID_5x00_2, "Intel WiFi Link 5100"			},
 	{ 0x8086, IWN_DID_6x00_3, "Intel Centrino Ultimate-N 6300"		},
 	{ 0x8086, IWN_DID_6x00_4, "Intel Centrino Advanced-N 6200"		},
+    { 0x8086, IWN_DID_6235_1, "Intel Centrino Advanced-N 6235"      },
+    { 0x8086, IWN_DID_6235_2, "Intel Centrino Advanced-N 6235"      },
 	{ 0x8086, IWN_DID_5x50_1, "Intel WiMAX/WiFi Link 5350"			},
 	{ 0x8086, IWN_DID_5x50_2, "Intel WiMAX/WiFi Link 5350"			},
 	{ 0x8086, IWN_DID_5x50_3, "Intel WiMAX/WiFi Link 5150"			},
@@ -861,6 +863,9 @@
 		if (pid != 0x0082 && pid != 0x0085) {
 			sc->fwname = "iwn6000g2bfw";
 			sc->sc_flags |= IWN_FLAG_ADV_BTCOEX;
+		    /* xmj 3lines Override chains masks, ROM is known to be broken. */
+		    sc->txchainmask = IWN_ANT_AB;
+		    sc->rxchainmask = IWN_ANT_AB;
 		} else
 			sc->fwname = "iwn6000g2afw";
 		break;
@@ -5213,7 +5218,7 @@
 	cmd.energy_cck         = htole16(calib->energy_cck);
 	/* Barker modulation: use default values. */
 	cmd.corr_barker        = htole16(190);
-	cmd.corr_barker_mrc    = htole16(390);
+	cmd.corr_barker_mrc    = htole16(sc->limits->barker_mrc);
 
 	DPRINTF(sc, IWN_DEBUG_CALIBRATE,
 	    "%s: set sensitivity %d/%d/%d/%d/%d/%d/%d\n", __func__,
@@ -5799,7 +5804,7 @@
 		sc->rxon->ofdm_mask = 0;
 	} else {
 		/* Assume 802.11b/g. */
-		sc->rxon->cck_mask  = 0x0f;
+		sc->rxon->cck_mask  = 0x03;
 		sc->rxon->ofdm_mask = 0x15;
 	}
 	if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) {
@@ -7059,12 +7064,11 @@
 		/* Use internal power amplifier only. */
 		IWN_WRITE(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_RADIO_2X2_IPA);
 	}
-	if ((sc->hw_type == IWN_HW_REV_TYPE_6050 ||
-	     sc->hw_type == IWN_HW_REV_TYPE_6005) && sc->calib_ver >= 6) {
+	if (sc->hw_type == IWN_HW_REV_TYPE_6050 && sc->calib_ver >= 6) {
 		/* Indicate that ROM calibration version is >=6. */
 		IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_CALIB_VER6);
 	}
-	if (sc->hw_type == IWN_HW_REV_TYPE_6005)
+	if (sc->hw_type == IWN_HW_REV_TYPE_6050)
 		IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_6050_1X2);
 	return 0;
 }
Index: sys/dev/iwn/if_iwn_devid.h
===================================================================
--- sys/dev/iwn/if_iwn_devid.h	(revision 255210)
+++ sys/dev/iwn/if_iwn_devid.h	(working copy)
@@ -156,7 +156,16 @@
 #define	IWN_SDID_6035_2		0x4260
 #define	IWN_SDID_6035_3		0x4460
 #define	IWN_SDID_6035_4		0x4860
+
 /*
+ * This includes Centrino Advanced-N 6235
+ */
+
+#define IWN_DID_6235_1		0x088e 
+#define IWN_DID_6235_2		0x088f
+
+
+/*
  * --------------------------------------------------------------------------
  * Device ID for 1030 and 6030 Series
  * --------------------------------------------------------------------------
Index: sys/dev/iwn/if_iwnreg.h
===================================================================
--- sys/dev/iwn/if_iwnreg.h	(revision 255210)
+++ sys/dev/iwn/if_iwnreg.h	(working copy)
@@ -1891,6 +1891,7 @@
 	uint32_t	min_energy_cck;
 	uint32_t	energy_cck;
 	uint32_t	energy_ofdm;
+	uint32_t	barker_mrc;
 };
 
 /*
@@ -1905,7 +1906,8 @@
 	200, 400,
 	 97,
 	100,
-	100
+	100,
+	390
 };
 
 static const struct iwn_sensitivity_limits iwn5000_sensitivity_limits = {
@@ -1917,7 +1919,8 @@
 	170, 400,
 	 95,
 	 95,
-	 95
+	 95,
+	390
 };
 
 static const struct iwn_sensitivity_limits iwn5150_sensitivity_limits = {
@@ -1929,7 +1932,8 @@
 	170, 400,
 	 95,
 	 95,
-	 95
+	 95,
+	390
 };
 
 static const struct iwn_sensitivity_limits iwn1000_sensitivity_limits = {
@@ -1941,7 +1945,8 @@
 	170, 400,
 	 95,
 	 95,
-	 95
+	 95,
+	390
 };
 
 static const struct iwn_sensitivity_limits iwn6000_sensitivity_limits = {
@@ -1951,9 +1956,10 @@
 	128, 232,
 	125, 175,
 	160, 310,
-	 97,
-	 97,
-	100
+	110,
+	110,
+	110,
+	336
 };
 
 /* Get value from linux kernel 3.2.+ in Drivers/net/wireless/iwlwifi/iwl-2000.c*/
Index: sys/modules/iwnfw/iwn6000g2b/Makefile
===================================================================
--- sys/modules/iwnfw/iwn6000g2b/Makefile	(revision 255210)
+++ sys/modules/iwnfw/iwn6000g2b/Makefile	(working copy)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
 KMOD=	iwn6000g2bfw
-IMG=	iwlwifi-6000g2b-17.168.5.2
+IMG=	iwlwifi-6000g2b-18.168.6.1
 
 .include <bsd.kmod.mk>


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list