From owner-freebsd-wireless@FreeBSD.ORG Mon Dec 9 03:41:38 2013 Return-Path: Delivered-To: freebsd-wireless@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 ESMTPS id BFF97E07; Mon, 9 Dec 2013 03:41:38 +0000 (UTC) Received: from mail-qc0-x22f.google.com (mail-qc0-x22f.google.com [IPv6:2607:f8b0:400d:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B5351E4E; Mon, 9 Dec 2013 03:41:38 +0000 (UTC) Received: by mail-qc0-f175.google.com with SMTP id e9so2277312qcy.20 for ; Sun, 08 Dec 2013 19:41:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=Kmp4VsNmyYHUs4RiAeOqAhqblH94X1pTfteVvZ2MGLk=; b=AcS9eVBoow+O20ZM72+2PzmqGQRy3e9KzzgmNrOGplsrmuni4dMUSiLr7cM09rjyX6 dlJPkr/vw695E3qHpzGFTQdFHfzoWfyKmWK07SkhhQyCJDIAYD3t+FzqyRQOenO9f/ki q3dBvDmX05BhBsmBWs24oHaM64XxvDVE6PabitvF6HmBMMLo3FRenmNSAsPzxCkf4+CD j+mIUJf3TCpQNPCfr0LIECGhDVGX7CW9BYogkmfNtZiff3+X/OveNeYHReA7s+bShIyl CicqPNOec1U638SiFyUf/KnH61szwSMJq1sobLWkt4r6SznWbMtEqIjXdJ1DzmtLrDjN xthg== MIME-Version: 1.0 X-Received: by 10.49.131.5 with SMTP id oi5mr29899231qeb.38.1386560497532; Sun, 08 Dec 2013 19:41:37 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Sun, 8 Dec 2013 19:41:37 -0800 (PST) In-Reply-To: <201312090340.rB93e2T3094102@svn.freebsd.org> References: <201312090340.rB93e2T3094102@svn.freebsd.org> Date: Sun, 8 Dec 2013 19:41:37 -0800 X-Google-Sender-Auth: DmVYYSCh9j6KJT2rPwU_fVwcUpc Message-ID: Subject: Fwd: svn commit: r259116 - head/sys/dev/iwn From: Adrian Chadd To: "freebsd-wireless@freebsd.org" , Lawrence Stewart , Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 03:41:38 -0000 Hi, I just threw this into -HEAD. Please give it a good thorough testing. -a ---------- Forwarded message ---------- From: Adrian Chadd Date: 8 December 2013 19:40 Subject: svn commit: r259116 - head/sys/dev/iwn To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Author: adrian Date: Mon Dec 9 03:40:02 2013 New Revision: 259116 URL: http://svnweb.freebsd.org/changeset/base/259116 Log: Add some initial support for the Intel 6235. Tested: * Intel 5100 * Intel 6235 Obtained from: mav, others Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwn_chip_cfg.h head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Dec 9 03:38:18 2013 (r259115) +++ head/sys/dev/iwn/if_iwn.c Mon Dec 9 03:40:02 2013 (r259116) @@ -124,15 +124,8 @@ static const struct iwn_ident iwn_ident_ { 0x8086, IWN_DID_5x50_2, "Intel WiMAX/WiFi Link 5350" }, { 0x8086, IWN_DID_5x50_3, "Intel WiMAX/WiFi Link 5150" }, { 0x8086, IWN_DID_5x50_4, "Intel WiMAX/WiFi Link 5150" }, - /* - * These currently don't function; the firmware crashes during - * the startup calibration request. - */ -#if 0 { 0x8086, IWN_DID_6035_1, "Intel Centrino Advanced 6235" }, - /* XXX TODO: figure out which ID this one is? */ { 0x8086, IWN_DID_6035_2, "Intel Centrino Advanced 6235" }, -#endif { 0, 0, NULL } }; @@ -837,8 +830,8 @@ iwn_config_specific(struct iwn_softc *sc case IWN_SDID_6035_3: case IWN_SDID_6035_4: sc->fwname = "iwn6000g2bfw"; - sc->limits = &iwn6000_sensitivity_limits; - sc->base_params = &iwn_6000g2b_base_params; + sc->limits = &iwn6235_sensitivity_limits; + sc->base_params = &iwn_6235_base_params; break; default: device_printf(sc->sc_dev, "adapter type id : 0x%04x sub id :" @@ -5815,7 +5808,7 @@ iwn_send_sensitivity(struct iwn_softc *s 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__, @@ -6648,7 +6641,7 @@ iwn_auth(struct iwn_softc *sc, struct ie 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; } DPRINTF(sc, IWN_DEBUG_STATE, "rxon chan %d flags %x cck %x ofdm %x\n", Modified: head/sys/dev/iwn/if_iwn_chip_cfg.h ============================================================================== --- head/sys/dev/iwn/if_iwn_chip_cfg.h Mon Dec 9 03:38:18 2013 (r259115) +++ head/sys/dev/iwn/if_iwn_chip_cfg.h Mon Dec 9 03:40:02 2013 (r259116) @@ -359,6 +359,34 @@ static const struct iwn_base_params iwn_ .bt_mode = IWN_BT_ADVANCED, .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; + +/* + * 6235 series NICs. + */ +static const struct iwn_base_params iwn_6235_base_params = { + .pll_cfg_val = 0, + .max_ll_items = IWN_OTP_MAX_LL_ITEMS_6x00, + .shadow_ram_support = true, + .shadow_reg_enable = true, + .bt_session_2 = false, + .bt_sco_disable = true, + .additional_nic_config = true, + .regulatory_bands = iwn6000_regulatory_bands, + .enhanced_TX_power = true, + .calib_need = + (IWN_FLG_NEED_PHY_CALIB_DC + | IWN_FLG_NEED_PHY_CALIB_LO + | IWN_FLG_NEED_PHY_CALIB_TX_IQ + | IWN_FLG_NEED_PHY_CALIB_BASE_BAND + | IWN_FLG_NEED_PHY_CALIB_TEMP_OFFSET ), + .support_hostap = false, + .no_multi_vaps = true, + /* XXX 1x2? This NIC is 2x2, right? */ + .additional_gp_drv_bit = IWN_GP_DRIVER_6050_1X2, + .bt_mode = IWN_BT_ADVANCED, + .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, +}; + static const struct iwn_base_params iwn_5x50_base_params = { .pll_cfg_val = IWN_ANA_PLL_INIT, .max_ll_items = IWN_OTP_MAX_LL_ITEMS_6x00, Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Mon Dec 9 03:38:18 2013 (r259115) +++ head/sys/dev/iwn/if_iwnreg.h Mon Dec 9 03:40:02 2013 (r259116) @@ -2001,6 +2001,7 @@ struct iwn_sensitivity_limits { uint32_t min_energy_cck; uint32_t energy_cck; uint32_t energy_ofdm; + uint32_t barker_mrc; }; /* @@ -2015,7 +2016,8 @@ static const struct iwn_sensitivity_limi 200, 400, 97, 100, - 100 + 100, + 390 }; static const struct iwn_sensitivity_limits iwn5000_sensitivity_limits = { @@ -2027,7 +2029,8 @@ static const struct iwn_sensitivity_limi 170, 400, 95, 95, - 95 + 95, + 390 }; static const struct iwn_sensitivity_limits iwn5150_sensitivity_limits = { @@ -2039,7 +2042,8 @@ static const struct iwn_sensitivity_limi 170, 400, 95, 95, - 95 + 95, + 390, }; static const struct iwn_sensitivity_limits iwn1000_sensitivity_limits = { @@ -2051,7 +2055,8 @@ static const struct iwn_sensitivity_limi 170, 400, 95, 95, - 95 + 95, + 390, }; static const struct iwn_sensitivity_limits iwn6000_sensitivity_limits = { @@ -2063,9 +2068,24 @@ static const struct iwn_sensitivity_limi 160, 310, 97, 97, - 100 + 100, + 390 }; +static const struct iwn_sensitivity_limits iwn6235_sensitivity_limits = { + 105, 110, + 192, 232, + 80, 145, + 128, 232, + 125, 175, + 160, 310, + 100, + 110, + 110, + 336 +}; + + /* Get value from linux kernel 3.2.+ in Drivers/net/wireless/iwlwifi/iwl-2000.c*/ static const struct iwn_sensitivity_limits iwn2030_sensitivity_limits = { 105,110,