diff options
Diffstat (limited to 'sys/dev/iwn')
-rw-r--r-- | sys/dev/iwn/if_iwn.c | 72 | ||||
-rw-r--r-- | sys/dev/iwn/if_iwn_devid.h | 294 | ||||
-rw-r--r-- | sys/dev/iwn/if_iwnreg.h | 13 |
3 files changed, 331 insertions, 48 deletions
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 06df5abc96d3..e2d5eea41252 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include <dev/iwn/if_iwnreg.h> #include <dev/iwn/if_iwnvar.h> +#include <dev/iwn/if_iwn_devid.h> struct iwn_ident { uint16_t vendor; @@ -82,40 +83,40 @@ struct iwn_ident { }; static const struct iwn_ident iwn_ident_table[] = { - { 0x8086, 0x0082, "Intel Centrino Advanced-N 6205" }, - { 0x8086, 0x0083, "Intel Centrino Wireless-N 1000" }, - { 0x8086, 0x0084, "Intel Centrino Wireless-N 1000" }, - { 0x8086, 0x0085, "Intel Centrino Advanced-N 6205" }, - { 0x8086, 0x0087, "Intel Centrino Advanced-N + WiMAX 6250" }, - { 0x8086, 0x0089, "Intel Centrino Advanced-N + WiMAX 6250" }, - { 0x8086, 0x008a, "Intel Centrino Wireless-N 1030" }, - { 0x8086, 0x008b, "Intel Centrino Wireless-N 1030" }, - { 0x8086, 0x0090, "Intel Centrino Advanced-N 6230" }, - { 0x8086, 0x0091, "Intel Centrino Advanced-N 6230" }, - { 0x8086, 0x0885, "Intel Centrino Wireless-N + WiMAX 6150" }, - { 0x8086, 0x0886, "Intel Centrino Wireless-N + WiMAX 6150" }, - { 0x8086, 0x0887, "Intel Centrino Wireless-N 2230" }, - { 0x8086, 0x0888, "Intel Centrino Wireless-N 2230" }, - { 0x8086, 0x0896, "Intel Centrino Wireless-N 130" }, - { 0x8086, 0x0897, "Intel Centrino Wireless-N 130" }, - { 0x8086, 0x08ae, "Intel Centrino Wireless-N 100" }, - { 0x8086, 0x08af, "Intel Centrino Wireless-N 100" }, - { 0x8086, 0x4229, "Intel Wireless WiFi Link 4965" }, - { 0x8086, 0x422b, "Intel Centrino Ultimate-N 6300" }, - { 0x8086, 0x422c, "Intel Centrino Advanced-N 6200" }, - { 0x8086, 0x422d, "Intel Wireless WiFi Link 4965" }, - { 0x8086, 0x4230, "Intel Wireless WiFi Link 4965" }, - { 0x8086, 0x4232, "Intel WiFi Link 5100" }, - { 0x8086, 0x4233, "Intel Wireless WiFi Link 4965" }, - { 0x8086, 0x4235, "Intel Ultimate N WiFi Link 5300" }, - { 0x8086, 0x4236, "Intel Ultimate N WiFi Link 5300" }, - { 0x8086, 0x4237, "Intel WiFi Link 5100" }, - { 0x8086, 0x4238, "Intel Centrino Ultimate-N 6300" }, - { 0x8086, 0x4239, "Intel Centrino Advanced-N 6200" }, - { 0x8086, 0x423a, "Intel WiMAX/WiFi Link 5350" }, - { 0x8086, 0x423b, "Intel WiMAX/WiFi Link 5350" }, - { 0x8086, 0x423c, "Intel WiMAX/WiFi Link 5150" }, - { 0x8086, 0x423d, "Intel WiMAX/WiFi Link 5150" }, + { 0x8086, IWN_DID_6x05_1, "Intel Centrino Advanced-N 6205" }, + { 0x8086, IWN_DID_1000_1, "Intel Centrino Wireless-N 1000" }, + { 0x8086, IWN_DID_1000_2, "Intel Centrino Wireless-N 1000" }, + { 0x8086, IWN_DID_6x05_2, "Intel Centrino Advanced-N 6205" }, + { 0x8086, IWN_DID_6050_1, "Intel Centrino Advanced-N + WiMAX 6250" }, + { 0x8086, IWN_DID_6050_2, "Intel Centrino Advanced-N + WiMAX 6250" }, + { 0x8086, IWN_DID_x030_1, "Intel Centrino Wireless-N 1030" }, + { 0x8086, IWN_DID_x030_2, "Intel Centrino Wireless-N 1030" }, + { 0x8086, IWN_DID_x030_3, "Intel Centrino Advanced-N 6230" }, + { 0x8086, IWN_DID_x030_4, "Intel Centrino Advanced-N 6230" }, + { 0x8086, IWN_DID_6150_1, "Intel Centrino Wireless-N + WiMAX 6150" }, + { 0x8086, IWN_DID_6150_2, "Intel Centrino Wireless-N + WiMAX 6150" }, + { 0x8086, IWN_DID_2x30_1, "Intel Centrino Wireless-N 2230" }, + { 0x8086, IWN_DID_2x30_2, "Intel Centrino Wireless-N 2230" }, + { 0x8086, IWN_DID_130_1, "Intel Centrino Wireless-N 130" }, + { 0x8086, IWN_DID_130_2, "Intel Centrino Wireless-N 130" }, + { 0x8086, IWN_DID_100_1, "Intel Centrino Wireless-N 100" }, + { 0x8086, IWN_DID_100_2, "Intel Centrino Wireless-N 100" }, + { 0x8086, IWN_DID_4965_1, "Intel Wireless WiFi Link 4965" }, + { 0x8086, IWN_DID_6x00_1, "Intel Centrino Ultimate-N 6300" }, + { 0x8086, IWN_DID_6x00_2, "Intel Centrino Advanced-N 6200" }, + { 0x8086, IWN_DID_4965_2, "Intel Wireless WiFi Link 4965" }, + { 0x8086, IWN_DID_4965_3, "Intel Wireless WiFi Link 4965" }, + { 0x8086, IWN_DID_5x00_1, "Intel WiFi Link 5100" }, + { 0x8086, IWN_DID_4965_4, "Intel Wireless WiFi Link 4965" }, + { 0x8086, IWN_DID_5x00_3, "Intel Ultimate N WiFi Link 5300" }, + { 0x8086, IWN_DID_5x00_4, "Intel Ultimate N WiFi Link 5300" }, + { 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_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" }, + { 0x8086, IWN_DID_5x50_4, "Intel WiMAX/WiFi Link 5150" }, { 0, 0, NULL } }; @@ -518,7 +519,8 @@ iwn_attach(device_t dev) IWN_LOCK_INIT(sc); /* 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) >> IWN_HW_REV_TYPE_SHIFT) + & IWN_HW_REV_TYPE_MASK; if (sc->hw_type == IWN_HW_REV_TYPE_4965) error = iwn4965_attach(sc, pci_get_device(dev)); else diff --git a/sys/dev/iwn/if_iwn_devid.h b/sys/dev/iwn/if_iwn_devid.h new file mode 100644 index 000000000000..23fd0a100670 --- /dev/null +++ b/sys/dev/iwn/if_iwn_devid.h @@ -0,0 +1,294 @@ +/*- + * Copyright (c) 2013 Cedric GROSS <cg@cgross.info> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ + +#ifndef __IF_IWN_DEVID_H__ +#define __IF_IWN_DEVID_H__ + +#define IWN_HW_REV_TYPE_SHIFT 4 +#define IWN_HW_REV_TYPE_MASK 0x1f + +/* Device revision */ +#define IWN_HW_REV_TYPE_4965 0 +#define IWN_HW_REV_TYPE_5300 2 +#define IWN_HW_REV_TYPE_5350 3 +#define IWN_HW_REV_TYPE_5150 4 +#define IWN_HW_REV_TYPE_5100 5 +#define IWN_HW_REV_TYPE_1000 6 +#define IWN_HW_REV_TYPE_6000 7 +#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 + + /* ========================================================================== + * DEVICE ID BLOCK + * ========================================================================== +*/ +/* + * -------------------------------------------------------------------------- + * Device ID for 2x30 series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_2x30_1 0x0887 +#define IWN_DID_2x30_2 0x0888 +/* SubDevice ID */ +#define IWN_SDID_2x30_1 0x4062 +#define IWN_SDID_2x30_2 0x4262 +#define IWN_SDID_2x30_3 0x4462 +#define IWN_SDID_2x30_4 0x4066 +#define IWN_SDID_2x30_5 0x4266 +#define IWN_SDID_2x30_6 0x4466 +/* + * -------------------------------------------------------------------------- + * Device ID for 1000 series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_1000_1 0x0083 +#define IWN_DID_1000_2 0x0084 +/* SubDevice ID */ +#define IWN_SDID_1000_1 0x1205 +#define IWN_SDID_1000_2 0x1305 +#define IWN_SDID_1000_3 0x1225 +#define IWN_SDID_1000_4 0x1325 +#define IWN_SDID_1000_5 0x1215 +#define IWN_SDID_1000_6 0x1315 +#define IWN_SDID_1000_7 0x1206 +#define IWN_SDID_1000_8 0x1306 +#define IWN_SDID_1000_9 0x1226 +#define IWN_SDID_1000_10 0x1326 +#define IWN_SDID_1000_11 0x1216 +#define IWN_SDID_1000_12 0x1316 + +/* + * -------------------------------------------------------------------------- + * Device ID for 6x00 series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_6x00_1 0x422B +#define IWN_DID_6x00_2 0x422C +#define IWN_DID_6x00_3 0x4238 +#define IWN_DID_6x00_4 0x4239 +/* SubDevice ID */ +#define IWN_SDID_6x00_1 0x1101 +#define IWN_SDID_6x00_2 0x1121 +#define IWN_SDID_6x00_3 0x1301 +#define IWN_SDID_6x00_4 0x1306 +#define IWN_SDID_6x00_5 0x1307 +#define IWN_SDID_6x00_6 0x1321 +#define IWN_SDID_6x00_7 0x1326 +#define IWN_SDID_6x00_8 0x1111 +#define IWN_SDID_6x00_9 0x1311 +#define IWN_SDID_6x00_10 0x1316 +/* + * -------------------------------------------------------------------------- + * Device ID for 6x05 series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_6x05_1 0x0082 +#define IWN_DID_6x05_2 0x0085 +/* SubDevice ID */ +#define IWN_SDID_6x05_1 0x1301 +#define IWN_SDID_6x05_2 0x1306 +#define IWN_SDID_6x05_3 0x1307 +#define IWN_SDID_6x05_4 0x1321 +#define IWN_SDID_6x05_5 0x1326 +#define IWN_SDID_6x05_6 0x1311 +#define IWN_SDID_6x05_7 0x1316 +#define IWN_SDID_6x05_8 0xC020 +#define IWN_SDID_6x05_9 0xC220 +#define IWN_SDID_6x05_10 0x4820 +#define IWN_SDID_6x05_11 0x1304 +#define IWN_SDID_6x05_12 0x1305 +/* + * -------------------------------------------------------------------------- + * Device ID for 6050 WiFi/WiMax Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_6050_1 0x0087 +#define IWN_DID_6050_2 0x0089 +/* SubDevice ID */ +#define IWN_SDID_6050_1 0x1301 +#define IWN_SDID_6050_2 0x1306 +#define IWN_SDID_6050_3 0x1321 +#define IWN_SDID_6050_4 0x1326 +#define IWN_SDID_6050_5 0x1311 +#define IWN_SDID_6050_6 0x1316 +/* + * -------------------------------------------------------------------------- + * Device ID for 6150 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_6150_1 0x0885 +#define IWN_DID_6150_2 0x0886 +/* SubDevice ID */ +#define IWN_SDID_6150_1 0x1305 +#define IWN_SDID_6150_2 0x1307 +#define IWN_SDID_6150_3 0x1325 +#define IWN_SDID_6150_4 0x1327 +#define IWN_SDID_6150_5 0x1315 +#define IWN_SDID_6150_6 0x1317 +/* + * -------------------------------------------------------------------------- + * Device ID for 6035 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_6035_1 0x088E +#define IWN_DID_6035_2 0x088F +/* SubDevice ID */ +#define IWN_SDID_6035_1 0x4060 +#define IWN_SDID_6035_2 0x4260 +#define IWN_SDID_6035_3 0x4460 +#define IWN_SDID_6035_4 0x4860 +/* + * -------------------------------------------------------------------------- + * Device ID for 1030 and 6030 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_x030_1 0x008A +#define IWN_DID_x030_2 0x008B +#define IWN_DID_x030_3 0x0090 +#define IWN_DID_x030_4 0x0091 +/* SubDevice ID */ +#define IWN_SDID_x030_1 0x5305 +#define IWN_SDID_x030_2 0x5307 +#define IWN_SDID_x030_3 0x5325 +#define IWN_SDID_x030_4 0x5327 +#define IWN_SDID_x030_5 0x5315 +#define IWN_SDID_x030_6 0x5317 +#define IWN_SDID_x030_7 0x5211 +#define IWN_SDID_x030_8 0x5215 +#define IWN_SDID_x030_9 0x5216 +#define IWN_SDID_x030_10 0x5201 +#define IWN_SDID_x030_11 0x5205 +#define IWN_SDID_x030_12 0x5206 +#define IWN_SDID_x030_13 0x5207 +#define IWN_SDID_x030_14 0x5221 +#define IWN_SDID_x030_15 0x5225 +#define IWN_SDID_x030_16 0x5226 +/* + * -------------------------------------------------------------------------- + * Device ID for 130 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_130_1 0x0896 +#define IWN_DID_130_2 0x0897 +/* SubDevice ID */ +#define IWN_SDID_130_1 0x5005 +#define IWN_SDID_130_2 0x5007 +#define IWN_SDID_130_3 0x5015 +#define IWN_SDID_130_4 0x5017 +#define IWN_SDID_130_5 0x5025 +#define IWN_SDID_130_6 0x5027 + +/* + * -------------------------------------------------------------------------- + * Device ID for 100 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_100_1 0x08AE +#define IWN_DID_100_2 0x08AF +/* SubDevice ID */ +#define IWN_SDID_100_1 0x1005 +#define IWN_SDID_100_2 0x1007 +#define IWN_SDID_100_3 0x1015 +#define IWN_SDID_100_4 0x1017 +#define IWN_SDID_100_5 0x1025 +#define IWN_SDID_100_6 0x1027 + +/* + * -------------------------------------------------------------------------- + * Device ID for 5x00 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_5x00_1 0x4232 +#define IWN_DID_5x00_2 0x4237 +#define IWN_DID_5x00_3 0x4235 +#define IWN_DID_5x00_4 0x4236 +/* SubDevice ID */ +#define IWN_SDID_5x00_1 0x1201 +#define IWN_SDID_5x00_2 0x1301 +#define IWN_SDID_5x00_3 0x1204 +#define IWN_SDID_5x00_4 0x1304 +#define IWN_SDID_5x00_5 0x1205 +#define IWN_SDID_5x00_6 0x1305 +#define IWN_SDID_5x00_7 0x1206 +#define IWN_SDID_5x00_8 0x1306 +#define IWN_SDID_5x00_9 0x1221 +#define IWN_SDID_5x00_10 0x1321 +#define IWN_SDID_5x00_11 0x1224 +#define IWN_SDID_5x00_12 0x1324 +#define IWN_SDID_5x00_13 0x1225 +#define IWN_SDID_5x00_14 0x1325 +#define IWN_SDID_5x00_15 0x1226 +#define IWN_SDID_5x00_16 0x1326 +#define IWN_SDID_5x00_17 0x1211 +#define IWN_SDID_5x00_18 0x1311 +#define IWN_SDID_5x00_19 0x1214 +#define IWN_SDID_5x00_20 0x1314 +#define IWN_SDID_5x00_21 0x1215 +#define IWN_SDID_5x00_22 0x1315 +#define IWN_SDID_5x00_23 0x1216 +#define IWN_SDID_5x00_24 0x1316 +#define IWN_SDID_5x00_25 0x1021 +#define IWN_SDID_5x00_26 0x1121 +#define IWN_SDID_5x00_27 0x1024 +#define IWN_SDID_5x00_28 0x1124 +#define IWN_SDID_5x00_29 0x1001 +#define IWN_SDID_5x00_30 0x1101 +#define IWN_SDID_5x00_31 0x1004 +#define IWN_SDID_5x00_32 0x1104 +#define IWN_SDID_5x00_33 0x1011 +#define IWN_SDID_5x00_34 0x1111 +#define IWN_SDID_5x00_35 0x1014 +#define IWN_SDID_5x00_36 0x1114 +/* + * -------------------------------------------------------------------------- + * Device ID for 5x50 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_5x50_1 0x423A +#define IWN_DID_5x50_2 0x423B +#define IWN_DID_5x50_3 0x423C +#define IWN_DID_5x50_4 0x423D +/* SubDevice ID */ +#define IWN_SDID_5x50_1 0x1001 +#define IWN_SDID_5x50_2 0x1021 +#define IWN_SDID_5x50_3 0x1011 +#define IWN_SDID_5x50_4 0x1201 +#define IWN_SDID_5x50_5 0x1301 +#define IWN_SDID_5x50_6 0x1206 +#define IWN_SDID_5x50_7 0x1306 +#define IWN_SDID_5x50_8 0x1221 +#define IWN_SDID_5x50_9 0x1321 +#define IWN_SDID_5x50_10 0x1211 +#define IWN_SDID_5x50_11 0x1311 +#define IWN_SDID_5x50_12 0x1216 +#define IWN_SDID_5x50_13 0x1316 +/* + * -------------------------------------------------------------------------- + * Device ID for 4965 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_4965_1 0x4229 +#define IWN_DID_4965_2 0x422d +#define IWN_DID_4965_3 0x4230 +#define IWN_DID_4965_4 0x4233 + +#endif /* ! __IF_IWN_DEVID_H__ */ diff --git a/sys/dev/iwn/if_iwnreg.h b/sys/dev/iwn/if_iwnreg.h index 74b4ece63c6e..3285e19580f5 100644 --- a/sys/dev/iwn/if_iwnreg.h +++ b/sys/dev/iwn/if_iwnreg.h @@ -200,19 +200,6 @@ #define IWN_GP_CNTRL_SLEEP (1 << 4) #define IWN_GP_CNTRL_RFKILL (1 << 27) -/* 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_4965 0 -#define IWN_HW_REV_TYPE_5300 2 -#define IWN_HW_REV_TYPE_5350 3 -#define IWN_HW_REV_TYPE_5150 4 -#define IWN_HW_REV_TYPE_5100 5 -#define IWN_HW_REV_TYPE_1000 6 -#define IWN_HW_REV_TYPE_6000 7 -#define IWN_HW_REV_TYPE_6050 8 -#define IWN_HW_REV_TYPE_6005 11 - /* Possible flags for register IWN_GIO_CHICKEN. */ #define IWN_GIO_CHICKEN_L1A_NO_L0S_RX (1 << 23) #define IWN_GIO_CHICKEN_DIS_L0S_TIMER (1 << 29) |