summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwnreg.h
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2014-02-10 19:08:59 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2014-02-10 19:08:59 +0000
commit1b1ae4ae9fd71017528666bfec2f3eeebc225055 (patch)
treed4af852ca69d8213c553cc1700202ab4b2a0de17 /sys/dev/pci/if_iwnreg.h
parentacc5ed84ab007a73ee1a15974db63ab28196a3de (diff)
Intel Centrino Wireless-N 2230 support. From Fabian Raetz, with a little bit
of polishing from yours truly. Tested by Fabian and Benoit Lecocq.
Diffstat (limited to 'sys/dev/pci/if_iwnreg.h')
-rw-r--r--sys/dev/pci/if_iwnreg.h76
1 files changed, 63 insertions, 13 deletions
diff --git a/sys/dev/pci/if_iwnreg.h b/sys/dev/pci/if_iwnreg.h
index 005efd8622c..424116c2047 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.45 2013/11/26 20:33:17 deraadt Exp $ */
+/* $OpenBSD: if_iwnreg.h,v 1.46 2014/02/10 19:08:58 kettenis Exp $ */
/*-
* Copyright (c) 2007, 2008
@@ -205,6 +205,7 @@
#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
/* Possible flags for register IWN_GIO_CHICKEN. */
#define IWN_GIO_CHICKEN_L1A_NO_L0S_RX (1 << 23)
@@ -219,6 +220,7 @@
#define IWN_GP_DRIVER_RADIO_2X2_IPA (2 << 0)
#define IWN_GP_DRIVER_CALIB_VER6 (1 << 2)
#define IWN_GP_DRIVER_6050_1X2 (1 << 3)
+#define IWN_GP_DRIVER_RADIO_IQ_INVERT (1 << 7)
/* Possible flags for register IWN_UCODE_GP1_CLR. */
#define IWN_UCODE_GP1_RFKILL (1 << 1)
@@ -852,15 +854,15 @@ struct iwn_bluetooth {
struct iwn6000_btcoex_config {
uint8_t flags;
-#define IWN_BT_FLAG_COEX6000_CHAN_INHIBITION 1
-#define IWN_BT_FLAG_COEX6000_MODE_MASK ((1 << 3) | (1 << 4) | (1 << 5))
-#define IWN_BT_FLAG_COEX6000_MODE_SHIFT 3
-#define IWN_BT_FLAG_COEX6000_MODE_DISABLED 0
-#define IWN_BT_FLAG_COEX6000_MODE_LEGACY_2W 1
-#define IWN_BT_FLAG_COEX6000_MODE_3W 2
-#define IWN_BT_FLAG_COEX6000_MODE_4W 3
-#define IWN_BT_FLAG_UCODE_DEFAULT (1<<6)
-#define IWN_BT_FLAG_SYNC_2_BT_DISABLE (1<<7)
+#define IWN_BT_COEX6000_CHAN_INHIBITION 1
+#define IWN_BT_COEX6000_MODE_MASK ((1 << 3) | (1 << 4) | (1 << 5))
+#define IWN_BT_COEX6000_MODE_SHIFT 3
+#define IWN_BT_COEX6000_MODE_DISABLED 0
+#define IWN_BT_COEX6000_MODE_LEGACY_2W 1
+#define IWN_BT_COEX6000_MODE_3W 2
+#define IWN_BT_COEX6000_MODE_4W 3
+#define IWN_BT_UCODE_DEFAULT (1<<6)
+#define IWN_BT_SYNC_2_BT_DISABLE (1<<7)
uint8_t lead_time;
uint8_t max_kill;
@@ -878,6 +880,25 @@ struct iwn6000_btcoex_config {
uint16_t rx_prio_boost;
} __packed;
+struct iwn2000_btcoex_config {
+ uint8_t flags; /* same as in iwn6000_btcoex_config */
+ uint8_t lead_time;
+ uint8_t max_kill;
+ uint8_t bt3_t7_timer;
+ uint32_t kill_ack;
+ uint32_t kill_cts;
+ uint8_t sample_time;
+ uint8_t bt3_t2_timer;
+ uint16_t bt4_reaction;
+ uint32_t lookup_table[12];
+ uint16_t bt4_decision;
+ uint16_t valid;
+ uint32_t prio_boost;
+ uint8_t reserved;
+ uint8_t tx_prio_boost;
+ uint16_t rx_prio_boost;
+} __packed;
+
/* Structure for command IWN_CMD_BT_COEX_PRIOTABLE */
struct iwn_btcoex_priotable {
uint8_t calib_init1;
@@ -967,11 +988,14 @@ struct iwn_phy_calib {
#define IWN5000_PHY_CALIB_CRYSTAL 15
#define IWN5000_PHY_CALIB_BASE_BAND 16
#define IWN5000_PHY_CALIB_TX_IQ_PERIODIC 17
-#define IWN5000_PHY_CALIB_TEMP_OFFSET 18
-
#define IWN5000_PHY_CALIB_RESET_NOISE_GAIN 18
#define IWN5000_PHY_CALIB_NOISE_GAIN 19
+#define IWN6000_PHY_CALIB_TEMP_OFFSET 18
+#define IWN2000_PHY_CALIB_TEMP_OFFSET 18
+
+#define IWN5000_PHY_CALIB_MAX 253
+
uint8_t group;
uint8_t ngroups;
uint8_t isvalid;
@@ -987,7 +1011,7 @@ struct iwn5000_phy_calib_crystal {
uint8_t reserved[2];
} __packed;
-struct iwn5000_phy_calib_temp_offset {
+struct iwn6000_phy_calib_temp_offset {
uint8_t code;
uint8_t group;
uint8_t ngroups;
@@ -998,6 +1022,17 @@ struct iwn5000_phy_calib_temp_offset {
uint16_t reserved;
} __packed;
+struct iwn2000_phy_calib_temp_offset {
+ uint8_t code;
+ uint8_t group;
+ uint8_t ngroups;
+ uint8_t isvalid;
+ int16_t offset_high;
+ int16_t offset_low;
+ int16_t burnt_voltage_ref;
+ int16_t reserved;
+} __packed;
+
struct iwn_phy_calib_gain {
uint8_t code;
uint8_t group;
@@ -1366,6 +1401,8 @@ struct iwn_fw_tlv {
#define IWN_FW_TLV_INIT_DATA 4
#define IWN_FW_TLV_BOOT_TEXT 5
#define IWN_FW_TLV_PBREQ_MAXLEN 6
+#define IWN_FW_TLV_ENH_SENS 14
+#define IWN_FW_TLV_PHY_CALIB 15
uint16_t alt;
uint32_t len;
@@ -1411,6 +1448,7 @@ struct iwn_fw_tlv {
#define IWN5000_EEPROM_CRYSTAL 0x128
#define IWN5000_EEPROM_TEMP 0x12a
#define IWN5000_EEPROM_VOLT 0x12b
+#define IWN2000_EEPROM_RAWTEMP 0x12b
/* Possible flags for IWN_EEPROM_SKU_CAP. */
#define IWN_EEPROM_SKU_CAP_11N (1 << 6)
@@ -1719,6 +1757,18 @@ static const struct iwn_sensitivity_limits iwn6000_sensitivity_limits = {
100
};
+static const struct iwn_sensitivity_limits iwn2000_sensitivity_limits = {
+ 105, 110,
+ 192, 232,
+ 80, 145,
+ 128, 232,
+ 125, 175,
+ 160, 310,
+ 97,
+ 97,
+ 100
+};
+
/* Map TID to TX scheduler's FIFO. */
static const uint8_t iwn_tid2fifo[] = {
1, 0, 0, 1, 2, 2, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 3