diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-02-11 19:30:11 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-02-11 19:30:11 +0000 |
commit | 6a13283d27ef20e62444a587134245b56c545a1a (patch) | |
tree | 2cae56cadf19d22cf5a411f32b0dcda307778942 /sys | |
parent | b93bb0e95e9d9d64b517e7a6cbce701634b1fa07 (diff) |
Intel Centrino Wireless-N 2200 (tested) and Wireless-N 105/135 (untested)
support. Tested by mlarkin@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_iwn.c | 48 | ||||
-rw-r--r-- | sys/dev/pci/if_iwnreg.h | 8 |
2 files changed, 47 insertions, 9 deletions
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c index fc151a24e36..c1f43ba02c5 100644 --- a/sys/dev/pci/if_iwn.c +++ b/sys/dev/pci/if_iwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwn.c,v 1.128 2014/02/10 19:08:58 kettenis Exp $ */ +/* $OpenBSD: if_iwn.c,v 1.129 2014/02/11 19:30:10 kettenis Exp $ */ /*- * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr> @@ -96,6 +96,12 @@ static const struct pci_matchid iwn_devices[] = { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_6235_2 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_2030_1 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_2030_2 }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_2000_1 }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_2000_2 }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_135_1 }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_135_2 }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_105_1 }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_105_2 }, }; int iwn_match(struct device *, void *, void *); @@ -364,7 +370,7 @@ iwn_attach(struct device *parent, struct device *self, void *aux) printf(": %s", intrstr); /* Read hardware revision and attach. */ - sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >> 4) & 0xf; + sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >> 4) & 0x1f; if (sc->hw_type == IWN_HW_REV_TYPE_4965) error = iwn4965_attach(sc, PCI_PRODUCT(pa->pa_id)); else @@ -659,6 +665,19 @@ iwn5000_attach(struct iwn_softc *sc, pci_product_id_t pid) sc->fwname = "iwn-2030"; sc->sc_flags |= IWN_FLAG_ADV_BT_COEX; break; + case IWN_HW_REV_TYPE_2000: + sc->limits = &iwn2000_sensitivity_limits; + sc->fwname = "iwn-2000"; + break; + case IWN_HW_REV_TYPE_135: + sc->limits = &iwn2000_sensitivity_limits; + sc->fwname = "iwn-135"; + sc->sc_flags |= IWN_FLAG_ADV_BT_COEX; + break; + case IWN_HW_REV_TYPE_105: + sc->limits = &iwn2000_sensitivity_limits; + sc->fwname = "iwn-105"; + break; default: printf(": adapter type %d not supported\n", sc->hw_type); return ENOTSUP; @@ -1537,7 +1556,10 @@ iwn5000_read_eeprom(struct iwn_softc *sc) hdr.version, hdr.pa_type, letoh16(hdr.volt))); sc->calib_ver = hdr.version; - if (sc->hw_type == IWN_HW_REV_TYPE_2030) { + if (sc->hw_type == IWN_HW_REV_TYPE_2030 || + sc->hw_type == IWN_HW_REV_TYPE_2000 || + sc->hw_type == IWN_HW_REV_TYPE_135 || + sc->hw_type == IWN_HW_REV_TYPE_105) { sc->eeprom_voltage = letoh16(hdr.volt); iwn_read_prom_data(sc, base + IWN5000_EEPROM_TEMP, &val, 2); sc->eeprom_temp = letoh16(val); @@ -2112,7 +2134,10 @@ iwn5000_rx_calib_results(struct iwn_softc *sc, struct iwn_rx_desc *desc, switch (calib->code) { case IWN5000_PHY_CALIB_DC: if (sc->hw_type == IWN_HW_REV_TYPE_5150 || - sc->hw_type == IWN_HW_REV_TYPE_2030) + sc->hw_type == IWN_HW_REV_TYPE_2030 || + sc->hw_type == IWN_HW_REV_TYPE_2000 || + sc->hw_type == IWN_HW_REV_TYPE_135 || + sc->hw_type == IWN_HW_REV_TYPE_105) idx = 0; break; case IWN5000_PHY_CALIB_LO: @@ -4181,7 +4206,8 @@ iwn_send_advanced_btcoex(struct iwn_softc *sc) struct iwn_btcoex_prot btprot; int error, i; - if (sc->hw_type == IWN_HW_REV_TYPE_2030) { + if (sc->hw_type == IWN_HW_REV_TYPE_2030 || + sc->hw_type == IWN_HW_REV_TYPE_135) { struct iwn2000_btcoex_config btconfig; memset(&btconfig, 0, sizeof btconfig); @@ -4284,7 +4310,12 @@ iwn_config(struct iwn_softc *sc) sc->sc_dev.dv_xname); return error; } - } else if (sc->hw_type == IWN_HW_REV_TYPE_2030) { + } + + if (sc->hw_type == IWN_HW_REV_TYPE_2030 || + sc->hw_type == IWN_HW_REV_TYPE_2000 || + sc->hw_type == IWN_HW_REV_TYPE_135 || + sc->hw_type == IWN_HW_REV_TYPE_105) { error = iwn2000_temp_offset_calib(sc); if (error != 0) { printf("%s: could not set temperature offset\n", @@ -5783,7 +5814,10 @@ iwn5000_nic_config(struct iwn_softc *sc) } if (sc->hw_type == IWN_HW_REV_TYPE_6005) IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_6050_1X2); - if (sc->hw_type == IWN_HW_REV_TYPE_2030) + if (sc->hw_type == IWN_HW_REV_TYPE_2030 || + sc->hw_type == IWN_HW_REV_TYPE_2000 || + sc->hw_type == IWN_HW_REV_TYPE_135 || + sc->hw_type == IWN_HW_REV_TYPE_105) IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_RADIO_IQ_INVERT); return 0; } diff --git a/sys/dev/pci/if_iwnreg.h b/sys/dev/pci/if_iwnreg.h index 424116c2047..f9d285d86d1 100644 --- a/sys/dev/pci/if_iwnreg.h +++ b/sys/dev/pci/if_iwnreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwnreg.h,v 1.46 2014/02/10 19:08:58 kettenis Exp $ */ +/* $OpenBSD: if_iwnreg.h,v 1.47 2014/02/11 19:30:10 kettenis Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -195,7 +195,7 @@ /* Possible flags for register IWN_HW_REV. */ #define IWN_HW_REV_TYPE_SHIFT 4 -#define IWN_HW_REV_TYPE_MASK 0x000000f0 +#define IWN_HW_REV_TYPE_MASK 0x000001f0 #define IWN_HW_REV_TYPE_4965 0 #define IWN_HW_REV_TYPE_5300 2 #define IWN_HW_REV_TYPE_5350 3 @@ -206,6 +206,10 @@ #define IWN_HW_REV_TYPE_6050 8 #define IWN_HW_REV_TYPE_6005 11 #define IWN_HW_REV_TYPE_2030 12 +#define IWN_HW_REV_TYPE_2000 16 +#define IWN_HW_REV_TYPE_105 17 +#define IWN_HW_REV_TYPE_135 18 + /* Possible flags for register IWN_GIO_CHICKEN. */ #define IWN_GIO_CHICKEN_L1A_NO_L0S_RX (1 << 23) |