diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2011-01-22 16:46:49 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-27 16:03:53 -0500 |
commit | 9e09b5c96caf3f201f1dcb31539d6a6b2c36d0f9 (patch) | |
tree | 611368ae2d26f074b451caff912241592b6d8080 /drivers/net/wireless/ath/carl9170 | |
parent | 436d0d985383a2ede326f8ec5117d185690dc3f3 (diff) |
carl9170: update fw/hw headers
This patch syncs up the header files with
the project's main firmware carl9170fw.git.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/carl9170')
-rw-r--r-- | drivers/net/wireless/ath/carl9170/fwcmd.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/fwdesc.h | 28 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/hw.h | 25 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/version.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/wlan.h | 20 |
5 files changed, 71 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/carl9170/fwcmd.h b/drivers/net/wireless/ath/carl9170/fwcmd.h index 3680dfc70f46..30449d21b762 100644 --- a/drivers/net/wireless/ath/carl9170/fwcmd.h +++ b/drivers/net/wireless/ath/carl9170/fwcmd.h | |||
@@ -167,6 +167,7 @@ struct carl9170_rx_filter_cmd { | |||
167 | #define CARL9170_RX_FILTER_CTL_BACKR 0x20 | 167 | #define CARL9170_RX_FILTER_CTL_BACKR 0x20 |
168 | #define CARL9170_RX_FILTER_MGMT 0x40 | 168 | #define CARL9170_RX_FILTER_MGMT 0x40 |
169 | #define CARL9170_RX_FILTER_DATA 0x80 | 169 | #define CARL9170_RX_FILTER_DATA 0x80 |
170 | #define CARL9170_RX_FILTER_EVERYTHING (~0) | ||
170 | 171 | ||
171 | struct carl9170_bcn_ctrl_cmd { | 172 | struct carl9170_bcn_ctrl_cmd { |
172 | __le32 vif_id; | 173 | __le32 vif_id; |
diff --git a/drivers/net/wireless/ath/carl9170/fwdesc.h b/drivers/net/wireless/ath/carl9170/fwdesc.h index 71f3821f6058..921066822dd5 100644 --- a/drivers/net/wireless/ath/carl9170/fwdesc.h +++ b/drivers/net/wireless/ath/carl9170/fwdesc.h | |||
@@ -69,6 +69,9 @@ enum carl9170fw_feature_list { | |||
69 | /* Firmware RX filter | CARL9170_CMD_RX_FILTER */ | 69 | /* Firmware RX filter | CARL9170_CMD_RX_FILTER */ |
70 | CARL9170FW_RX_FILTER, | 70 | CARL9170FW_RX_FILTER, |
71 | 71 | ||
72 | /* Wake up on WLAN */ | ||
73 | CARL9170FW_WOL, | ||
74 | |||
72 | /* KEEP LAST */ | 75 | /* KEEP LAST */ |
73 | __CARL9170FW_FEATURE_NUM | 76 | __CARL9170FW_FEATURE_NUM |
74 | }; | 77 | }; |
@@ -78,6 +81,7 @@ enum carl9170fw_feature_list { | |||
78 | #define FIX_MAGIC "FIX\0" | 81 | #define FIX_MAGIC "FIX\0" |
79 | #define DBG_MAGIC "DBG\0" | 82 | #define DBG_MAGIC "DBG\0" |
80 | #define CHK_MAGIC "CHK\0" | 83 | #define CHK_MAGIC "CHK\0" |
84 | #define TXSQ_MAGIC "TXSQ" | ||
81 | #define LAST_MAGIC "LAST" | 85 | #define LAST_MAGIC "LAST" |
82 | 86 | ||
83 | #define CARL9170FW_SET_DAY(d) (((d) - 1) % 31) | 87 | #define CARL9170FW_SET_DAY(d) (((d) - 1) % 31) |
@@ -88,8 +92,10 @@ enum carl9170fw_feature_list { | |||
88 | #define CARL9170FW_GET_MONTH(m) ((((m) / 31) % 12) + 1) | 92 | #define CARL9170FW_GET_MONTH(m) ((((m) / 31) % 12) + 1) |
89 | #define CARL9170FW_GET_YEAR(y) ((y) / 372 + 10) | 93 | #define CARL9170FW_GET_YEAR(y) ((y) / 372 + 10) |
90 | 94 | ||
95 | #define CARL9170FW_MAGIC_SIZE 4 | ||
96 | |||
91 | struct carl9170fw_desc_head { | 97 | struct carl9170fw_desc_head { |
92 | u8 magic[4]; | 98 | u8 magic[CARL9170FW_MAGIC_SIZE]; |
93 | __le16 length; | 99 | __le16 length; |
94 | u8 min_ver; | 100 | u8 min_ver; |
95 | u8 cur_ver; | 101 | u8 cur_ver; |
@@ -170,6 +176,16 @@ struct carl9170fw_chk_desc { | |||
170 | #define CARL9170FW_CHK_DESC_SIZE \ | 176 | #define CARL9170FW_CHK_DESC_SIZE \ |
171 | (sizeof(struct carl9170fw_chk_desc)) | 177 | (sizeof(struct carl9170fw_chk_desc)) |
172 | 178 | ||
179 | #define CARL9170FW_TXSQ_DESC_MIN_VER 1 | ||
180 | #define CARL9170FW_TXSQ_DESC_CUR_VER 1 | ||
181 | struct carl9170fw_txsq_desc { | ||
182 | struct carl9170fw_desc_head head; | ||
183 | |||
184 | __le32 seq_table_addr; | ||
185 | } __packed; | ||
186 | #define CARL9170FW_TXSQ_DESC_SIZE \ | ||
187 | (sizeof(struct carl9170fw_txsq_desc)) | ||
188 | |||
173 | #define CARL9170FW_LAST_DESC_MIN_VER 1 | 189 | #define CARL9170FW_LAST_DESC_MIN_VER 1 |
174 | #define CARL9170FW_LAST_DESC_CUR_VER 2 | 190 | #define CARL9170FW_LAST_DESC_CUR_VER 2 |
175 | struct carl9170fw_last_desc { | 191 | struct carl9170fw_last_desc { |
@@ -189,8 +205,8 @@ struct carl9170fw_last_desc { | |||
189 | } | 205 | } |
190 | 206 | ||
191 | static inline void carl9170fw_fill_desc(struct carl9170fw_desc_head *head, | 207 | static inline void carl9170fw_fill_desc(struct carl9170fw_desc_head *head, |
192 | u8 magic[4], __le16 length, | 208 | u8 magic[CARL9170FW_MAGIC_SIZE], |
193 | u8 min_ver, u8 cur_ver) | 209 | __le16 length, u8 min_ver, u8 cur_ver) |
194 | { | 210 | { |
195 | head->magic[0] = magic[0]; | 211 | head->magic[0] = magic[0]; |
196 | head->magic[1] = magic[1]; | 212 | head->magic[1] = magic[1]; |
@@ -204,7 +220,7 @@ static inline void carl9170fw_fill_desc(struct carl9170fw_desc_head *head, | |||
204 | 220 | ||
205 | #define carl9170fw_for_each_hdr(desc, fw_desc) \ | 221 | #define carl9170fw_for_each_hdr(desc, fw_desc) \ |
206 | for (desc = fw_desc; \ | 222 | for (desc = fw_desc; \ |
207 | memcmp(desc->magic, LAST_MAGIC, 4) && \ | 223 | memcmp(desc->magic, LAST_MAGIC, CARL9170FW_MAGIC_SIZE) && \ |
208 | le16_to_cpu(desc->length) >= CARL9170FW_DESC_HEAD_SIZE && \ | 224 | le16_to_cpu(desc->length) >= CARL9170FW_DESC_HEAD_SIZE && \ |
209 | le16_to_cpu(desc->length) < CARL9170FW_DESC_MAX_LENGTH; \ | 225 | le16_to_cpu(desc->length) < CARL9170FW_DESC_MAX_LENGTH; \ |
210 | desc = (void *)((unsigned long)desc + le16_to_cpu(desc->length))) | 226 | desc = (void *)((unsigned long)desc + le16_to_cpu(desc->length))) |
@@ -218,8 +234,8 @@ static inline bool carl9170fw_supports(__le32 list, u8 feature) | |||
218 | } | 234 | } |
219 | 235 | ||
220 | static inline bool carl9170fw_desc_cmp(const struct carl9170fw_desc_head *head, | 236 | static inline bool carl9170fw_desc_cmp(const struct carl9170fw_desc_head *head, |
221 | const u8 descid[4], u16 min_len, | 237 | const u8 descid[CARL9170FW_MAGIC_SIZE], |
222 | u8 compatible_revision) | 238 | u16 min_len, u8 compatible_revision) |
223 | { | 239 | { |
224 | if (descid[0] == head->magic[0] && descid[1] == head->magic[1] && | 240 | if (descid[0] == head->magic[0] && descid[1] == head->magic[1] && |
225 | descid[2] == head->magic[2] && descid[3] == head->magic[3] && | 241 | descid[2] == head->magic[2] && descid[3] == head->magic[3] && |
diff --git a/drivers/net/wireless/ath/carl9170/hw.h b/drivers/net/wireless/ath/carl9170/hw.h index e85df6edfed3..4e30762dd903 100644 --- a/drivers/net/wireless/ath/carl9170/hw.h +++ b/drivers/net/wireless/ath/carl9170/hw.h | |||
@@ -463,6 +463,8 @@ | |||
463 | 463 | ||
464 | #define AR9170_PWR_REG_CHIP_REVISION (AR9170_PWR_REG_BASE + 0x010) | 464 | #define AR9170_PWR_REG_CHIP_REVISION (AR9170_PWR_REG_BASE + 0x010) |
465 | #define AR9170_PWR_REG_PLL_ADDAC (AR9170_PWR_REG_BASE + 0x014) | 465 | #define AR9170_PWR_REG_PLL_ADDAC (AR9170_PWR_REG_BASE + 0x014) |
466 | #define AR9170_PWR_PLL_ADDAC_DIV_S 2 | ||
467 | #define AR9170_PWR_PLL_ADDAC_DIV 0xffc | ||
466 | #define AR9170_PWR_REG_WATCH_DOG_MAGIC (AR9170_PWR_REG_BASE + 0x020) | 468 | #define AR9170_PWR_REG_WATCH_DOG_MAGIC (AR9170_PWR_REG_BASE + 0x020) |
467 | 469 | ||
468 | /* Faraday USB Controller */ | 470 | /* Faraday USB Controller */ |
@@ -471,6 +473,9 @@ | |||
471 | #define AR9170_USB_REG_MAIN_CTRL (AR9170_USB_REG_BASE + 0x000) | 473 | #define AR9170_USB_REG_MAIN_CTRL (AR9170_USB_REG_BASE + 0x000) |
472 | #define AR9170_USB_MAIN_CTRL_REMOTE_WAKEUP BIT(0) | 474 | #define AR9170_USB_MAIN_CTRL_REMOTE_WAKEUP BIT(0) |
473 | #define AR9170_USB_MAIN_CTRL_ENABLE_GLOBAL_INT BIT(2) | 475 | #define AR9170_USB_MAIN_CTRL_ENABLE_GLOBAL_INT BIT(2) |
476 | #define AR9170_USB_MAIN_CTRL_GO_TO_SUSPEND BIT(3) | ||
477 | #define AR9170_USB_MAIN_CTRL_RESET BIT(4) | ||
478 | #define AR9170_USB_MAIN_CTRL_CHIP_ENABLE BIT(5) | ||
474 | #define AR9170_USB_MAIN_CTRL_HIGHSPEED BIT(6) | 479 | #define AR9170_USB_MAIN_CTRL_HIGHSPEED BIT(6) |
475 | 480 | ||
476 | #define AR9170_USB_REG_DEVICE_ADDRESS (AR9170_USB_REG_BASE + 0x001) | 481 | #define AR9170_USB_REG_DEVICE_ADDRESS (AR9170_USB_REG_BASE + 0x001) |
@@ -499,6 +504,13 @@ | |||
499 | #define AR9170_USB_REG_INTR_GROUP (AR9170_USB_REG_BASE + 0x020) | 504 | #define AR9170_USB_REG_INTR_GROUP (AR9170_USB_REG_BASE + 0x020) |
500 | 505 | ||
501 | #define AR9170_USB_REG_INTR_SOURCE_0 (AR9170_USB_REG_BASE + 0x021) | 506 | #define AR9170_USB_REG_INTR_SOURCE_0 (AR9170_USB_REG_BASE + 0x021) |
507 | #define AR9170_USB_INTR_SRC0_SETUP BIT(0) | ||
508 | #define AR9170_USB_INTR_SRC0_IN BIT(1) | ||
509 | #define AR9170_USB_INTR_SRC0_OUT BIT(2) | ||
510 | #define AR9170_USB_INTR_SRC0_FAIL BIT(3) /* ??? */ | ||
511 | #define AR9170_USB_INTR_SRC0_END BIT(4) /* ??? */ | ||
512 | #define AR9170_USB_INTR_SRC0_ABORT BIT(7) | ||
513 | |||
502 | #define AR9170_USB_REG_INTR_SOURCE_1 (AR9170_USB_REG_BASE + 0x022) | 514 | #define AR9170_USB_REG_INTR_SOURCE_1 (AR9170_USB_REG_BASE + 0x022) |
503 | #define AR9170_USB_REG_INTR_SOURCE_2 (AR9170_USB_REG_BASE + 0x023) | 515 | #define AR9170_USB_REG_INTR_SOURCE_2 (AR9170_USB_REG_BASE + 0x023) |
504 | #define AR9170_USB_REG_INTR_SOURCE_3 (AR9170_USB_REG_BASE + 0x024) | 516 | #define AR9170_USB_REG_INTR_SOURCE_3 (AR9170_USB_REG_BASE + 0x024) |
@@ -506,6 +518,15 @@ | |||
506 | #define AR9170_USB_REG_INTR_SOURCE_5 (AR9170_USB_REG_BASE + 0x026) | 518 | #define AR9170_USB_REG_INTR_SOURCE_5 (AR9170_USB_REG_BASE + 0x026) |
507 | #define AR9170_USB_REG_INTR_SOURCE_6 (AR9170_USB_REG_BASE + 0x027) | 519 | #define AR9170_USB_REG_INTR_SOURCE_6 (AR9170_USB_REG_BASE + 0x027) |
508 | #define AR9170_USB_REG_INTR_SOURCE_7 (AR9170_USB_REG_BASE + 0x028) | 520 | #define AR9170_USB_REG_INTR_SOURCE_7 (AR9170_USB_REG_BASE + 0x028) |
521 | #define AR9170_USB_INTR_SRC7_USB_RESET BIT(1) | ||
522 | #define AR9170_USB_INTR_SRC7_USB_SUSPEND BIT(2) | ||
523 | #define AR9170_USB_INTR_SRC7_USB_RESUME BIT(3) | ||
524 | #define AR9170_USB_INTR_SRC7_ISO_SEQ_ERR BIT(4) | ||
525 | #define AR9170_USB_INTR_SRC7_ISO_SEQ_ABORT BIT(5) | ||
526 | #define AR9170_USB_INTR_SRC7_TX0BYTE BIT(6) | ||
527 | #define AR9170_USB_INTR_SRC7_RX0BYTE BIT(7) | ||
528 | |||
529 | #define AR9170_USB_REG_IDLE_COUNT (AR9170_USB_REG_BASE + 0x02f) | ||
509 | 530 | ||
510 | #define AR9170_USB_REG_EP_MAP (AR9170_USB_REG_BASE + 0x030) | 531 | #define AR9170_USB_REG_EP_MAP (AR9170_USB_REG_BASE + 0x030) |
511 | #define AR9170_USB_REG_EP1_MAP (AR9170_USB_REG_BASE + 0x030) | 532 | #define AR9170_USB_REG_EP1_MAP (AR9170_USB_REG_BASE + 0x030) |
@@ -581,6 +602,10 @@ | |||
581 | 602 | ||
582 | #define AR9170_USB_REG_MAX_AGG_UPLOAD (AR9170_USB_REG_BASE + 0x110) | 603 | #define AR9170_USB_REG_MAX_AGG_UPLOAD (AR9170_USB_REG_BASE + 0x110) |
583 | #define AR9170_USB_REG_UPLOAD_TIME_CTL (AR9170_USB_REG_BASE + 0x114) | 604 | #define AR9170_USB_REG_UPLOAD_TIME_CTL (AR9170_USB_REG_BASE + 0x114) |
605 | |||
606 | #define AR9170_USB_REG_WAKE_UP (AR9170_USB_REG_BASE + 0x120) | ||
607 | #define AR9170_USB_WAKE_UP_WAKE BIT(0) | ||
608 | |||
584 | #define AR9170_USB_REG_CBUS_CTRL (AR9170_USB_REG_BASE + 0x1f0) | 609 | #define AR9170_USB_REG_CBUS_CTRL (AR9170_USB_REG_BASE + 0x1f0) |
585 | #define AR9170_USB_CBUS_CTRL_BUFFER_END (BIT(1)) | 610 | #define AR9170_USB_CBUS_CTRL_BUFFER_END (BIT(1)) |
586 | 611 | ||
diff --git a/drivers/net/wireless/ath/carl9170/version.h b/drivers/net/wireless/ath/carl9170/version.h index ee0f84f2a2f6..15095c035169 100644 --- a/drivers/net/wireless/ath/carl9170/version.h +++ b/drivers/net/wireless/ath/carl9170/version.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __CARL9170_SHARED_VERSION_H | 1 | #ifndef __CARL9170_SHARED_VERSION_H |
2 | #define __CARL9170_SHARED_VERSION_H | 2 | #define __CARL9170_SHARED_VERSION_H |
3 | #define CARL9170FW_VERSION_YEAR 10 | 3 | #define CARL9170FW_VERSION_YEAR 11 |
4 | #define CARL9170FW_VERSION_MONTH 10 | 4 | #define CARL9170FW_VERSION_MONTH 1 |
5 | #define CARL9170FW_VERSION_DAY 29 | 5 | #define CARL9170FW_VERSION_DAY 22 |
6 | #define CARL9170FW_VERSION_GIT "1.9.0" | 6 | #define CARL9170FW_VERSION_GIT "1.9.2" |
7 | #endif /* __CARL9170_SHARED_VERSION_H */ | 7 | #endif /* __CARL9170_SHARED_VERSION_H */ |
diff --git a/drivers/net/wireless/ath/carl9170/wlan.h b/drivers/net/wireless/ath/carl9170/wlan.h index 24d63b583b6b..9e1324b67e08 100644 --- a/drivers/net/wireless/ath/carl9170/wlan.h +++ b/drivers/net/wireless/ath/carl9170/wlan.h | |||
@@ -251,7 +251,7 @@ struct carl9170_tx_superdesc { | |||
251 | u8 ampdu_commit_factor:1; | 251 | u8 ampdu_commit_factor:1; |
252 | u8 ampdu_unused_bit:1; | 252 | u8 ampdu_unused_bit:1; |
253 | u8 queue:2; | 253 | u8 queue:2; |
254 | u8 reserved:1; | 254 | u8 assign_seq:1; |
255 | u8 vif_id:3; | 255 | u8 vif_id:3; |
256 | u8 fill_in_tsf:1; | 256 | u8 fill_in_tsf:1; |
257 | u8 cab:1; | 257 | u8 cab:1; |
@@ -299,6 +299,7 @@ struct _ar9170_tx_hwdesc { | |||
299 | 299 | ||
300 | #define CARL9170_TX_SUPER_MISC_QUEUE 0x3 | 300 | #define CARL9170_TX_SUPER_MISC_QUEUE 0x3 |
301 | #define CARL9170_TX_SUPER_MISC_QUEUE_S 0 | 301 | #define CARL9170_TX_SUPER_MISC_QUEUE_S 0 |
302 | #define CARL9170_TX_SUPER_MISC_ASSIGN_SEQ 0x4 | ||
302 | #define CARL9170_TX_SUPER_MISC_VIF_ID 0x38 | 303 | #define CARL9170_TX_SUPER_MISC_VIF_ID 0x38 |
303 | #define CARL9170_TX_SUPER_MISC_VIF_ID_S 3 | 304 | #define CARL9170_TX_SUPER_MISC_VIF_ID_S 3 |
304 | #define CARL9170_TX_SUPER_MISC_FILL_IN_TSF 0x40 | 305 | #define CARL9170_TX_SUPER_MISC_FILL_IN_TSF 0x40 |
@@ -413,6 +414,23 @@ enum ar9170_txq { | |||
413 | __AR9170_NUM_TXQ, | 414 | __AR9170_NUM_TXQ, |
414 | }; | 415 | }; |
415 | 416 | ||
417 | /* | ||
418 | * This is an workaround for several undocumented bugs. | ||
419 | * Don't mess with the QoS/AC <-> HW Queue map, if you don't | ||
420 | * know what you are doing. | ||
421 | * | ||
422 | * Known problems [hardware]: | ||
423 | * * The MAC does not aggregate frames on anything other | ||
424 | * than the first HW queue. | ||
425 | * * when an AMPDU is placed [in the first hw queue] and | ||
426 | * additional frames are already queued on a different | ||
427 | * hw queue, the MAC will ALWAYS freeze. | ||
428 | * | ||
429 | * In a nutshell: The hardware can either do QoS or | ||
430 | * Aggregation but not both at the same time. As a | ||
431 | * result, this makes the device pretty much useless | ||
432 | * for any serious 802.11n setup. | ||
433 | */ | ||
416 | static const u8 ar9170_qmap[__AR9170_NUM_TXQ] = { 2, 1, 0, 3 }; | 434 | static const u8 ar9170_qmap[__AR9170_NUM_TXQ] = { 2, 1, 0, 3 }; |
417 | 435 | ||
418 | #define AR9170_TXQ_DEPTH 32 | 436 | #define AR9170_TXQ_DEPTH 32 |