Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Dec 2013 03:40:02 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r259116 - head/sys/dev/iwn
Message-ID:  <201312090340.rB93e2T3094102@svn.freebsd.org>

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



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