diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_acx.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_acx.h | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_acx.h b/drivers/net/wireless/wl12xx/wl1251_acx.h index 2e7b1933a8f9..cafb91459504 100644 --- a/drivers/net/wireless/wl12xx/wl1251_acx.h +++ b/drivers/net/wireless/wl12xx/wl1251_acx.h | |||
@@ -1031,6 +1031,150 @@ struct acx_statistics { | |||
1031 | struct acx_rxpipe_statistics rxpipe; | 1031 | struct acx_rxpipe_statistics rxpipe; |
1032 | } __attribute__ ((packed)); | 1032 | } __attribute__ ((packed)); |
1033 | 1033 | ||
1034 | #define ACX_MAX_RATE_CLASSES 8 | ||
1035 | #define ACX_RATE_MASK_UNSPECIFIED 0 | ||
1036 | #define ACX_RATE_RETRY_LIMIT 10 | ||
1037 | |||
1038 | struct acx_rate_class { | ||
1039 | u32 enabled_rates; | ||
1040 | u8 short_retry_limit; | ||
1041 | u8 long_retry_limit; | ||
1042 | u8 aflags; | ||
1043 | u8 reserved; | ||
1044 | }; | ||
1045 | |||
1046 | struct acx_rate_policy { | ||
1047 | struct acx_header header; | ||
1048 | |||
1049 | u32 rate_class_cnt; | ||
1050 | struct acx_rate_class rate_class[ACX_MAX_RATE_CLASSES]; | ||
1051 | } __attribute__ ((packed)); | ||
1052 | |||
1053 | struct wl1251_acx_memory { | ||
1054 | __le16 num_stations; /* number of STAs to be supported. */ | ||
1055 | u16 reserved_1; | ||
1056 | |||
1057 | /* | ||
1058 | * Nmber of memory buffers for the RX mem pool. | ||
1059 | * The actual number may be less if there are | ||
1060 | * not enough blocks left for the minimum num | ||
1061 | * of TX ones. | ||
1062 | */ | ||
1063 | u8 rx_mem_block_num; | ||
1064 | u8 reserved_2; | ||
1065 | u8 num_tx_queues; /* From 1 to 16 */ | ||
1066 | u8 host_if_options; /* HOST_IF* */ | ||
1067 | u8 tx_min_mem_block_num; | ||
1068 | u8 num_ssid_profiles; | ||
1069 | __le16 debug_buffer_size; | ||
1070 | } __attribute__ ((packed)); | ||
1071 | |||
1072 | |||
1073 | #define ACX_RX_DESC_MIN 1 | ||
1074 | #define ACX_RX_DESC_MAX 127 | ||
1075 | #define ACX_RX_DESC_DEF 32 | ||
1076 | struct wl1251_acx_rx_queue_config { | ||
1077 | u8 num_descs; | ||
1078 | u8 pad; | ||
1079 | u8 type; | ||
1080 | u8 priority; | ||
1081 | __le32 dma_address; | ||
1082 | } __attribute__ ((packed)); | ||
1083 | |||
1084 | #define ACX_TX_DESC_MIN 1 | ||
1085 | #define ACX_TX_DESC_MAX 127 | ||
1086 | #define ACX_TX_DESC_DEF 16 | ||
1087 | struct wl1251_acx_tx_queue_config { | ||
1088 | u8 num_descs; | ||
1089 | u8 pad[2]; | ||
1090 | u8 attributes; | ||
1091 | } __attribute__ ((packed)); | ||
1092 | |||
1093 | #define MAX_TX_QUEUE_CONFIGS 5 | ||
1094 | #define MAX_TX_QUEUES 4 | ||
1095 | struct wl1251_acx_config_memory { | ||
1096 | struct acx_header header; | ||
1097 | |||
1098 | struct wl1251_acx_memory mem_config; | ||
1099 | struct wl1251_acx_rx_queue_config rx_queue_config; | ||
1100 | struct wl1251_acx_tx_queue_config tx_queue_config[MAX_TX_QUEUE_CONFIGS]; | ||
1101 | } __attribute__ ((packed)); | ||
1102 | |||
1103 | struct wl1251_acx_mem_map { | ||
1104 | struct acx_header header; | ||
1105 | |||
1106 | void *code_start; | ||
1107 | void *code_end; | ||
1108 | |||
1109 | void *wep_defkey_start; | ||
1110 | void *wep_defkey_end; | ||
1111 | |||
1112 | void *sta_table_start; | ||
1113 | void *sta_table_end; | ||
1114 | |||
1115 | void *packet_template_start; | ||
1116 | void *packet_template_end; | ||
1117 | |||
1118 | void *queue_memory_start; | ||
1119 | void *queue_memory_end; | ||
1120 | |||
1121 | void *packet_memory_pool_start; | ||
1122 | void *packet_memory_pool_end; | ||
1123 | |||
1124 | void *debug_buffer1_start; | ||
1125 | void *debug_buffer1_end; | ||
1126 | |||
1127 | void *debug_buffer2_start; | ||
1128 | void *debug_buffer2_end; | ||
1129 | |||
1130 | /* Number of blocks FW allocated for TX packets */ | ||
1131 | u32 num_tx_mem_blocks; | ||
1132 | |||
1133 | /* Number of blocks FW allocated for RX packets */ | ||
1134 | u32 num_rx_mem_blocks; | ||
1135 | } __attribute__ ((packed)); | ||
1136 | |||
1137 | /************************************************************************* | ||
1138 | |||
1139 | Host Interrupt Register (WiLink -> Host) | ||
1140 | |||
1141 | **************************************************************************/ | ||
1142 | |||
1143 | /* RX packet is ready in Xfer buffer #0 */ | ||
1144 | #define WL1251_ACX_INTR_RX0_DATA BIT(0) | ||
1145 | |||
1146 | /* TX result(s) are in the TX complete buffer */ | ||
1147 | #define WL1251_ACX_INTR_TX_RESULT BIT(1) | ||
1148 | |||
1149 | /* OBSOLETE */ | ||
1150 | #define WL1251_ACX_INTR_TX_XFR BIT(2) | ||
1151 | |||
1152 | /* RX packet is ready in Xfer buffer #1 */ | ||
1153 | #define WL1251_ACX_INTR_RX1_DATA BIT(3) | ||
1154 | |||
1155 | /* Event was entered to Event MBOX #A */ | ||
1156 | #define WL1251_ACX_INTR_EVENT_A BIT(4) | ||
1157 | |||
1158 | /* Event was entered to Event MBOX #B */ | ||
1159 | #define WL1251_ACX_INTR_EVENT_B BIT(5) | ||
1160 | |||
1161 | /* OBSOLETE */ | ||
1162 | #define WL1251_ACX_INTR_WAKE_ON_HOST BIT(6) | ||
1163 | |||
1164 | /* Trace meassge on MBOX #A */ | ||
1165 | #define WL1251_ACX_INTR_TRACE_A BIT(7) | ||
1166 | |||
1167 | /* Trace meassge on MBOX #B */ | ||
1168 | #define WL1251_ACX_INTR_TRACE_B BIT(8) | ||
1169 | |||
1170 | /* Command processing completion */ | ||
1171 | #define WL1251_ACX_INTR_CMD_COMPLETE BIT(9) | ||
1172 | |||
1173 | /* Init sequence is done */ | ||
1174 | #define WL1251_ACX_INTR_INIT_COMPLETE BIT(14) | ||
1175 | |||
1176 | #define WL1251_ACX_INTR_ALL 0xFFFFFFFF | ||
1177 | |||
1034 | enum { | 1178 | enum { |
1035 | ACX_WAKE_UP_CONDITIONS = 0x0002, | 1179 | ACX_WAKE_UP_CONDITIONS = 0x0002, |
1036 | ACX_MEM_CFG = 0x0003, | 1180 | ACX_MEM_CFG = 0x0003, |
@@ -1142,5 +1286,7 @@ int wl1251_acx_cts_protect(struct wl1251 *wl, | |||
1142 | enum acx_ctsprotect_type ctsprotect); | 1286 | enum acx_ctsprotect_type ctsprotect); |
1143 | int wl1251_acx_statistics(struct wl1251 *wl, struct acx_statistics *stats); | 1287 | int wl1251_acx_statistics(struct wl1251 *wl, struct acx_statistics *stats); |
1144 | int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime); | 1288 | int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime); |
1289 | int wl1251_acx_rate_policies(struct wl1251 *wl); | ||
1290 | int wl1251_acx_mem_cfg(struct wl1251 *wl); | ||
1145 | 1291 | ||
1146 | #endif /* __WL1251_ACX_H__ */ | 1292 | #endif /* __WL1251_ACX_H__ */ |