diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-10-24 02:48:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:02:23 -0400 |
commit | 3fd07a1e5aba89d4be3696c46cb7297f1873195a (patch) | |
tree | 48a6c3b68e30136af93c48d35bd1ce08a9237c4d /drivers/net/wireless/iwlwifi/iwl-commands.h | |
parent | 8b30b1fe368ab03049435884c11c5c50e4c4ef0b (diff) |
iwlwifi: refactor TX response flow
This patch utilize 5000 new TX response command
which contains all necessary information and avoids
back referencing to the original TX frame.
It also change handling of software queue tracking
4965 flow is aligned with changes as much as possible.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-commands.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 50 |
1 files changed, 37 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 67680a74afde..8f8734fc4f39 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -1413,21 +1413,21 @@ enum { | |||
1413 | }; | 1413 | }; |
1414 | 1414 | ||
1415 | enum { | 1415 | enum { |
1416 | TX_STATUS_MSK = 0x000000ff, /* bits 0:7 */ | 1416 | TX_STATUS_MSK = 0x000000ff, /* bits 0:7 */ |
1417 | TX_STATUS_DELAY_MSK = 0x00000040, | 1417 | TX_STATUS_DELAY_MSK = 0x00000040, |
1418 | TX_STATUS_ABORT_MSK = 0x00000080, | 1418 | TX_STATUS_ABORT_MSK = 0x00000080, |
1419 | TX_PACKET_MODE_MSK = 0x0000ff00, /* bits 8:15 */ | 1419 | TX_PACKET_MODE_MSK = 0x0000ff00, /* bits 8:15 */ |
1420 | TX_FIFO_NUMBER_MSK = 0x00070000, /* bits 16:18 */ | 1420 | TX_FIFO_NUMBER_MSK = 0x00070000, /* bits 16:18 */ |
1421 | TX_RESERVED = 0x00780000, /* bits 19:22 */ | 1421 | TX_RESERVED = 0x00780000, /* bits 19:22 */ |
1422 | TX_POWER_PA_DETECT_MSK = 0x7f800000, /* bits 23:30 */ | 1422 | TX_POWER_PA_DETECT_MSK = 0x7f800000, /* bits 23:30 */ |
1423 | TX_ABORT_REQUIRED_MSK = 0x80000000, /* bits 31:31 */ | 1423 | TX_ABORT_REQUIRED_MSK = 0x80000000, /* bits 31:31 */ |
1424 | }; | 1424 | }; |
1425 | 1425 | ||
1426 | static inline int iwl_is_tx_success(u32 status) | 1426 | static inline bool iwl_is_tx_success(u32 status) |
1427 | { | 1427 | { |
1428 | status &= TX_STATUS_MSK; | 1428 | status &= TX_STATUS_MSK; |
1429 | return (status == TX_STATUS_SUCCESS) | 1429 | return (status == TX_STATUS_SUCCESS) || |
1430 | || (status == TX_STATUS_DIRECT_DONE); | 1430 | (status == TX_STATUS_DIRECT_DONE); |
1431 | } | 1431 | } |
1432 | 1432 | ||
1433 | 1433 | ||
@@ -1452,10 +1452,9 @@ enum { | |||
1452 | AGG_TX_STATE_DELAY_TX_MSK = 0x400 | 1452 | AGG_TX_STATE_DELAY_TX_MSK = 0x400 |
1453 | }; | 1453 | }; |
1454 | 1454 | ||
1455 | #define AGG_TX_STATE_LAST_SENT_MSK \ | 1455 | #define AGG_TX_STATE_LAST_SENT_MSK (AGG_TX_STATE_LAST_SENT_TTL_MSK | \ |
1456 | (AGG_TX_STATE_LAST_SENT_TTL_MSK | \ | 1456 | AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK | \ |
1457 | AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK | \ | 1457 | AGG_TX_STATE_LAST_SENT_BT_KILL_MSK) |
1458 | AGG_TX_STATE_LAST_SENT_BT_KILL_MSK) | ||
1459 | 1458 | ||
1460 | /* # tx attempts for first frame in aggregation */ | 1459 | /* # tx attempts for first frame in aggregation */ |
1461 | #define AGG_TX_STATE_TRY_CNT_POS 12 | 1460 | #define AGG_TX_STATE_TRY_CNT_POS 12 |
@@ -1528,6 +1527,28 @@ struct iwl4965_tx_resp { | |||
1528 | } u; | 1527 | } u; |
1529 | } __attribute__ ((packed)); | 1528 | } __attribute__ ((packed)); |
1530 | 1529 | ||
1530 | /* | ||
1531 | * definitions for initial rate index field | ||
1532 | * bits [3:0] inital rate index | ||
1533 | * bits [6:4] rate table color, used for the initial rate | ||
1534 | * bit-7 invalid rate indication | ||
1535 | * i.e. rate was not chosen from rate table | ||
1536 | * or rate table color was changed during frame retries | ||
1537 | * refer tlc rate info | ||
1538 | */ | ||
1539 | |||
1540 | #define IWL50_TX_RES_INIT_RATE_INDEX_POS 0 | ||
1541 | #define IWL50_TX_RES_INIT_RATE_INDEX_MSK 0x0f | ||
1542 | #define IWL50_TX_RES_RATE_TABLE_COLOR_POS 4 | ||
1543 | #define IWL50_TX_RES_RATE_TABLE_COLOR_MSK 0x70 | ||
1544 | #define IWL50_TX_RES_INV_RATE_INDEX_MSK 0x80 | ||
1545 | |||
1546 | /* refer to ra_tid */ | ||
1547 | #define IWL50_TX_RES_TID_POS 0 | ||
1548 | #define IWL50_TX_RES_TID_MSK 0x0f | ||
1549 | #define IWL50_TX_RES_RA_POS 4 | ||
1550 | #define IWL50_TX_RES_RA_MSK 0xf0 | ||
1551 | |||
1531 | struct iwl5000_tx_resp { | 1552 | struct iwl5000_tx_resp { |
1532 | u8 frame_count; /* 1 no aggregation, >1 aggregation */ | 1553 | u8 frame_count; /* 1 no aggregation, >1 aggregation */ |
1533 | u8 bt_kill_count; /* # blocked by bluetooth (unused for agg) */ | 1554 | u8 bt_kill_count; /* # blocked by bluetooth (unused for agg) */ |
@@ -1542,14 +1563,17 @@ struct iwl5000_tx_resp { | |||
1542 | * For agg: RTS + CTS + aggregation tx time + block-ack time. */ | 1563 | * For agg: RTS + CTS + aggregation tx time + block-ack time. */ |
1543 | __le16 wireless_media_time; /* uSecs */ | 1564 | __le16 wireless_media_time; /* uSecs */ |
1544 | 1565 | ||
1545 | __le16 reserved; | 1566 | u8 pa_status; /* RF power amplifier measurement (not used) */ |
1546 | __le32 pa_power1; /* RF power amplifier measurement (not used) */ | 1567 | u8 pa_integ_res_a[3]; |
1547 | __le32 pa_power2; | 1568 | u8 pa_integ_res_b[3]; |
1569 | u8 pa_integ_res_C[3]; | ||
1548 | 1570 | ||
1549 | __le32 tfd_info; | 1571 | __le32 tfd_info; |
1550 | __le16 seq_ctl; | 1572 | __le16 seq_ctl; |
1551 | __le16 byte_cnt; | 1573 | __le16 byte_cnt; |
1552 | __le32 tlc_info; | 1574 | u8 tlc_info; |
1575 | u8 ra_tid; /* tid (0:3), sta_id (4:7) */ | ||
1576 | __le16 frame_ctrl; | ||
1553 | /* | 1577 | /* |
1554 | * For non-agg: frame status TX_STATUS_* | 1578 | * For non-agg: frame status TX_STATUS_* |
1555 | * For agg: status of 1st frame, AGG_TX_STATE_*; other frame status | 1579 | * For agg: status of 1st frame, AGG_TX_STATE_*; other frame status |