diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-commands.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 2857287be4fd..e91507531923 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -977,6 +977,7 @@ struct iwl_qosparam_cmd { | |||
977 | #define STA_MODIFY_TX_RATE_MSK 0x04 | 977 | #define STA_MODIFY_TX_RATE_MSK 0x04 |
978 | #define STA_MODIFY_ADDBA_TID_MSK 0x08 | 978 | #define STA_MODIFY_ADDBA_TID_MSK 0x08 |
979 | #define STA_MODIFY_DELBA_TID_MSK 0x10 | 979 | #define STA_MODIFY_DELBA_TID_MSK 0x10 |
980 | #define STA_MODIFY_SLEEP_TX_COUNT_MSK 0x20 | ||
980 | 981 | ||
981 | /* Receiver address (actually, Rx station's index into station table), | 982 | /* Receiver address (actually, Rx station's index into station table), |
982 | * combined with Traffic ID (QOS priority), in format used by Tx Scheduler */ | 983 | * combined with Traffic ID (QOS priority), in format used by Tx Scheduler */ |
@@ -1107,7 +1108,14 @@ struct iwl4965_addsta_cmd { | |||
1107 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ | 1108 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ |
1108 | __le16 add_immediate_ba_ssn; | 1109 | __le16 add_immediate_ba_ssn; |
1109 | 1110 | ||
1110 | __le32 reserved2; | 1111 | /* |
1112 | * Number of packets OK to transmit to station even though | ||
1113 | * it is asleep -- used to synchronise PS-poll and u-APSD | ||
1114 | * responses while ucode keeps track of STA sleep state. | ||
1115 | */ | ||
1116 | __le16 sleep_tx_count; | ||
1117 | |||
1118 | __le16 reserved2; | ||
1111 | } __attribute__ ((packed)); | 1119 | } __attribute__ ((packed)); |
1112 | 1120 | ||
1113 | /* 5000 */ | 1121 | /* 5000 */ |
@@ -1138,7 +1146,14 @@ struct iwl_addsta_cmd { | |||
1138 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ | 1146 | * Set modify_mask bit STA_MODIFY_ADDBA_TID_MSK to use this field. */ |
1139 | __le16 add_immediate_ba_ssn; | 1147 | __le16 add_immediate_ba_ssn; |
1140 | 1148 | ||
1141 | __le32 reserved2; | 1149 | /* |
1150 | * Number of packets OK to transmit to station even though | ||
1151 | * it is asleep -- used to synchronise PS-poll and u-APSD | ||
1152 | * responses while ucode keeps track of STA sleep state. | ||
1153 | */ | ||
1154 | __le16 sleep_tx_count; | ||
1155 | |||
1156 | __le16 reserved2; | ||
1142 | } __attribute__ ((packed)); | 1157 | } __attribute__ ((packed)); |
1143 | 1158 | ||
1144 | 1159 | ||
@@ -1690,6 +1705,21 @@ enum { | |||
1690 | TX_ABORT_REQUIRED_MSK = 0x80000000, /* bits 31:31 */ | 1705 | TX_ABORT_REQUIRED_MSK = 0x80000000, /* bits 31:31 */ |
1691 | }; | 1706 | }; |
1692 | 1707 | ||
1708 | static inline u32 iwl_tx_status_to_mac80211(u32 status) | ||
1709 | { | ||
1710 | status &= TX_STATUS_MSK; | ||
1711 | |||
1712 | switch (status) { | ||
1713 | case TX_STATUS_SUCCESS: | ||
1714 | case TX_STATUS_DIRECT_DONE: | ||
1715 | return IEEE80211_TX_STAT_ACK; | ||
1716 | case TX_STATUS_FAIL_DEST_PS: | ||
1717 | return IEEE80211_TX_STAT_TX_FILTERED; | ||
1718 | default: | ||
1719 | return 0; | ||
1720 | } | ||
1721 | } | ||
1722 | |||
1693 | static inline bool iwl_is_tx_success(u32 status) | 1723 | static inline bool iwl_is_tx_success(u32 status) |
1694 | { | 1724 | { |
1695 | status &= TX_STATUS_MSK; | 1725 | status &= TX_STATUS_MSK; |
@@ -3071,6 +3101,10 @@ struct statistics_general { | |||
3071 | __le32 reserved3; | 3101 | __le32 reserved3; |
3072 | } __attribute__ ((packed)); | 3102 | } __attribute__ ((packed)); |
3073 | 3103 | ||
3104 | #define UCODE_STATISTICS_CLEAR_MSK (0x1 << 0) | ||
3105 | #define UCODE_STATISTICS_FREQUENCY_MSK (0x1 << 1) | ||
3106 | #define UCODE_STATISTICS_NARROW_BAND_MSK (0x1 << 2) | ||
3107 | |||
3074 | /* | 3108 | /* |
3075 | * REPLY_STATISTICS_CMD = 0x9c, | 3109 | * REPLY_STATISTICS_CMD = 0x9c, |
3076 | * 3945 and 4965 identical. | 3110 | * 3945 and 4965 identical. |