From owner-freebsd-bugs@FreeBSD.ORG Fri Sep 6 19:30:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E5D70BFD for ; Fri, 6 Sep 2013 19:30:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C618C2A46 for ; Fri, 6 Sep 2013 19:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r86JU0fa072662 for ; Fri, 6 Sep 2013 19:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r86JU0eu072661; Fri, 6 Sep 2013 19:30:00 GMT (envelope-from gnats) Resent-Date: Fri, 6 Sep 2013 19:30:00 GMT Resent-Message-Id: <201309061930.r86JU0eu072661@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Johannes Jost Meixner Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1239CAC0 for ; Fri, 6 Sep 2013 19:26:03 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E570029C0 for ; Fri, 6 Sep 2013 19:26:02 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r86JQ2HD091096 for ; Fri, 6 Sep 2013 19:26:02 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r86JQ2gX091092; Fri, 6 Sep 2013 19:26:02 GMT (envelope-from nobody) Message-Id: <201309061926.r86JQ2gX091092@oldred.freebsd.org> Date: Fri, 6 Sep 2013 19:26:02 GMT From: Johannes Jost Meixner To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/181898: Centrino Advanced-N 6235 with latest iwn(4) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 19:30:01 -0000 >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@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 >Release-Note: >Audit-Trail: >Unformatted: