23 #ifndef INCLUDED_WHD_TYPES_INT_H_ 24 #define INCLUDED_WHD_TYPES_INT_H_ 38 #define MAX_BUS_HEADER_SIZE 4 43 #define WHD_ETHERNET_SIZE (14) 48 #define WHD_ETHERTYPE_IPv4 0x0800 49 #define WHD_ETHERTYPE_IPv6 0x86DD 50 #define WHD_ETHERTYPE_ARP 0x0806 51 #define WHD_ETHERTYPE_RARP 0x8035 52 #define WHD_ETHERTYPE_EAPOL 0x888E 53 #define WHD_ETHERTYPE_DOT1AS 0x88F7 54 #define WHD_ETHERTYPE_8021Q 0x8100 57 #define WL_BSS_FLAGS_FROM_BEACON 0x01 58 #define WL_BSS_FLAGS_FROM_CACHE 0x02 59 #define WL_BSS_FLAGS_RSSI_ONCHANNEL 0x04 60 #define WL_BSS_FLAGS_HS20 0x08 61 #define WL_BSS_FLAGS_RSSI_INVALID 0x10 62 #define WL_BSS_FLAGS_RSSI_INACCURATE 0x20 63 #define WL_BSS_FLAGS_SNR_INVALID 0x40 64 #define WL_BSS_FLAGS_NF_INVALID 0x80 66 #define HT_CAPABILITIES_IE_LENGTH (26) 67 #define DOT11_OUI_LEN (3) 69 #define WHD_ETHER_ADDR_STR_LEN (18) 70 #define WHD_ETHER_ADDR_LEN (6) 72 #define CHECK_IOCTL_BUFFER(buff) if (buff == \ 73 NULL){ WPRINT_WHD_ERROR( ("Buffer alloc failed in function %s at line %d \n", \ 74 __func__, __LINE__) ); \ 75 return WHD_BUFFER_ALLOC_FAIL; } 76 #define CHECK_RETURN(expr) { \ 77 whd_result_t check_res = (expr); \ 78 if (check_res != WHD_SUCCESS) \ 80 WPRINT_WHD_ERROR( ("Function %s failed at line %d checkres = %u \n", \ 82 (unsigned int)check_res) ); \ 87 #define CHECK_RETURN_UNSUPPORTED_OK(expr) { whd_result_t check_res = (expr); \ 88 if (check_res != WHD_SUCCESS) \ 93 #define CHECK_RETURN_UNSUPPORTED_CONTINUE(expr) { whd_result_t check_res = (expr); \ 94 if (check_res != WHD_SUCCESS && check_res != WHD_WLAN_UNSUPPORTED) \ 99 #define RETURN_WITH_ASSERT(expr) { whd_result_t check_res = (expr); \ 100 whd_assert("Command failed\n", check_res == WHD_SUCCESS); \ 103 #define CHECK_RETURN_IGNORE(expr) { whd_result_t check_res = (expr); \ 104 if (check_res != WHD_SUCCESS) \ 109 #define CHECK_IFP_NULL(ifp) if (ifp == \ 110 NULL){ WPRINT_WHD_ERROR( ( \ 111 "Interface is not up/NULL and failed in function %s at line %d \n", \ 112 __func__, __LINE__) ); \ 113 return WHD_UNKNOWN_INTERFACE; } 115 #define CHECK_DRIVER_NULL(driver) if (driver == \ 116 NULL){ WPRINT_WHD_ERROR( ( \ 117 "WHD driver is not up/NULL and failed in function %s at line %d \n", \ 118 __func__, __LINE__) ); \ 119 return WHD_DOES_NOT_EXIST; } 121 #define MIN_OF(x, y) ( (x) < (y) ? (x) : (y) ) 122 #define MAX_OF(x, y) ( (x) > (y) ? (x) : (y) ) 125 #define ROUND_UP(x, y) ( (x) % (y) ? (x) + (y) - ( (x) % (y) ) : (x) ) 129 #define DIV_ROUND_UP(m, n) ( ( (m) + (n) - 1 ) / (n) ) 132 #define WHD_WRITE_16(pointer, value) (*( (uint16_t *)pointer ) = value) 133 #define WHD_WRITE_32(pointer, value) (*( (uint32_t *)pointer ) = value) 134 #define WHD_READ_16(pointer) *( (uint16_t *)pointer ) 135 #define WHD_READ_32(pointer) *( (uint32_t *)pointer ) 140 #define NULL_MAC(a) ( ( ( ( (unsigned char *)a )[0] ) == 0 ) && \ 141 ( ( ( (unsigned char *)a )[1] ) == 0 ) && \ 142 ( ( ( (unsigned char *)a )[2] ) == 0 ) && \ 143 ( ( ( (unsigned char *)a )[3] ) == 0 ) && \ 144 ( ( ( (unsigned char *)a )[4] ) == 0 ) && \ 145 ( ( ( (unsigned char *)a )[5] ) == 0 ) ) 150 #define BROADCAST_ID(a) ( ( ( ( (unsigned char *)a )[0] ) == 255 ) && \ 151 ( ( ( (unsigned char *)a )[1] ) == 255 ) && \ 152 ( ( ( (unsigned char *)a )[2] ) == 255 ) && \ 153 ( ( ( (unsigned char *)a )[3] ) == 255 ) && \ 154 ( ( ( (unsigned char *)a )[4] ) == 255 ) && \ 155 ( ( ( (unsigned char *)a )[5] ) == 255 ) ) 158 #define REFERENCE_DEBUG_ONLY_VARIABLE(x) ( (void)(x) ) 161 #define UNUSED_PARAMETER(x) ( (void)(x) ) 164 #define UNUSED_VARIABLE(x) ( (void)(x) ) 166 #if defined (__IAR_SYSTEMS_ICC__) 167 #define DISABLE_COMPILER_WARNING(x) _Pragma(#x) 168 #define ENABLE_COMPILER_WARNING(x) _Pragma(#x) 170 #define DISABLE_COMPILER_WARNING(x) 171 #define ENABLE_COMPILER_WARNING(x) 196 DOT11_IE_ID_SSID = 0,
197 DOT11_IE_ID_SUPPORTED_RATES = 1,
198 DOT11_IE_ID_FH_PARAMETER_SET = 2,
199 DOT11_IE_ID_DSSS_PARAMETER_SET = 3,
200 DOT11_IE_ID_CF_PARAMETER_SET = 4,
202 DOT11_IE_ID_IBSS_PARAMETER_SET = 6,
203 DOT11_IE_ID_COUNTRY = 7,
204 DOT11_IE_ID_HOPPING_PATTERN_PARAMETERS = 8,
205 DOT11_IE_ID_HOPPING_PATTERN_TABLE = 9,
206 DOT11_IE_ID_REQUEST = 10,
207 DOT11_IE_ID_BSS_LOAD = 11,
208 DOT11_IE_ID_EDCA_PARAMETER_SET = 12,
209 DOT11_IE_ID_TSPEC = 13,
210 DOT11_IE_ID_TCLAS = 14,
211 DOT11_IE_ID_SCHEDULE = 15,
212 DOT11_IE_ID_CHALLENGE_TEXT = 16,
214 DOT11_IE_ID_POWER_CONSTRAINT = 32,
215 DOT11_IE_ID_POWER_CAPABILITY = 33,
216 DOT11_IE_ID_TPC_REQUEST = 34,
217 DOT11_IE_ID_TPC_REPORT = 35,
218 DOT11_IE_ID_SUPPORTED_CHANNELS = 36,
219 DOT11_IE_ID_CHANNEL_SWITCH_ANNOUNCEMENT = 37,
220 DOT11_IE_ID_MEASUREMENT_REQUEST = 38,
221 DOT11_IE_ID_MEASUREMENT_REPORT = 39,
222 DOT11_IE_ID_QUIET = 40,
223 DOT11_IE_ID_IBSS_DFS = 41,
224 DOT11_IE_ID_ERP = 42,
225 DOT11_IE_ID_TS_DELAY = 43,
226 DOT11_IE_ID_TCLAS_PROCESSING = 44,
227 DOT11_IE_ID_HT_CAPABILITIES = 45,
228 DOT11_IE_ID_QOS_CAPABILITY = 46,
230 DOT11_IE_ID_RSN = 48,
232 DOT11_IE_ID_EXTENDED_SUPPORTED_RATES = 50,
233 DOT11_IE_ID_AP_CHANNEL_REPORT = 51,
234 DOT11_IE_ID_NEIGHBOR_REPORT = 52,
235 DOT11_IE_ID_RCPI = 53,
236 DOT11_IE_ID_MOBILITY_DOMAIN = 54,
237 DOT11_IE_ID_FAST_BSS_TRANSITION = 55,
238 DOT11_IE_ID_TIMEOUT_INTERVAL = 56,
239 DOT11_IE_ID_RIC_DATA = 57,
240 DOT11_IE_ID_DSE_REGISTERED_LOCATION = 58,
241 DOT11_IE_ID_SUPPORTED_OPERATING_CLASSES = 59,
242 DOT11_IE_ID_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT = 60,
243 DOT11_IE_ID_HT_OPERATION = 61,
244 DOT11_IE_ID_SECONDARY_CHANNEL_OFFSET = 62,
245 DOT11_IE_ID_BSS_AVERAGE_ACCESS_DELAY = 63,
246 DOT11_IE_ID_ANTENNA = 64,
247 DOT11_IE_ID_RSNI = 65,
248 DOT11_IE_ID_MEASUREMENT_PILOT_TRANSMISSION = 66,
249 DOT11_IE_ID_BSS_AVAILABLE_ADMISSION_CAPACITY = 67,
250 DOT11_IE_ID_BSS_AC_ACCESS_DELAY = 68,
251 DOT11_IE_ID_TIME_ADVERTISEMENT = 69,
252 DOT11_IE_ID_RM_ENABLED_CAPABILITIES = 70,
253 DOT11_IE_ID_MULTIPLE_BSSID = 71,
254 DOT11_IE_ID_20_40_BSS_COEXISTENCE = 72,
255 DOT11_IE_ID_20_40_BSS_INTOLERANT_CHANNEL_REPORT = 73,
256 DOT11_IE_ID_OVERLAPPING_BSS_SCAN_PARAMETERS = 74,
257 DOT11_IE_ID_RIC_DESCRIPTOR = 75,
258 DOT11_IE_ID_MANAGEMENT_MIC = 76,
259 DOT11_IE_ID_EVENT_REQUEST = 78,
260 DOT11_IE_ID_EVENT_REPORT = 79,
261 DOT11_IE_ID_DIAGNOSTIC_REQUEST = 80,
262 DOT11_IE_ID_DIAGNOSTIC_REPORT = 81,
263 DOT11_IE_ID_LOCATION_PARAMETERS = 82,
264 DOT11_IE_ID_NONTRANSMITTED_BSSID_CAPABILITY = 83,
265 DOT11_IE_ID_SSID_LIST = 84,
266 DOT11_IE_ID_MULTIPLE_BSSID_INDEX = 85,
267 DOT11_IE_ID_FMS_DESCRIPTOR = 86,
268 DOT11_IE_ID_FMS_REQUEST = 87,
269 DOT11_IE_ID_FMS_RESPONSE = 88,
270 DOT11_IE_ID_QOS_TRAFFIC_CAPABILITY = 89,
271 DOT11_IE_ID_BSS_MAX_IDLE_PERIOD = 90,
272 DOT11_IE_ID_TFS_REQUEST = 91,
273 DOT11_IE_ID_TFS_RESPONSE = 92,
274 DOT11_IE_ID_WNM_SLEEP_MODE = 93,
275 DOT11_IE_ID_TIM_BROADCAST_REQUEST = 94,
276 DOT11_IE_ID_TIM_BROADCAST_RESPONSE = 95,
277 DOT11_IE_ID_COLLOCATED_INTERFERENCE_REPORT = 96,
278 DOT11_IE_ID_CHANNEL_USAGE = 97,
279 DOT11_IE_ID_TIME_ZONE = 98,
280 DOT11_IE_ID_DMS_REQUEST = 99,
281 DOT11_IE_ID_DMS_RESPONSE = 100,
282 DOT11_IE_ID_LINK_IDENTIFIER = 101,
283 DOT11_IE_ID_WAKEUP_SCHEDULE = 102,
285 DOT11_IE_ID_CHANNEL_SWITCH_TIMING = 104,
286 DOT11_IE_ID_PTI_CONTROL = 105,
287 DOT11_IE_ID_TPU_BUFFER_STATUS = 106,
288 DOT11_IE_ID_INTERWORKING = 107,
289 DOT11_IE_ID_ADVERTISMENT_PROTOCOL = 108,
290 DOT11_IE_ID_EXPEDITED_BANDWIDTH_REQUEST = 109,
291 DOT11_IE_ID_QOS_MAP_SET = 110,
292 DOT11_IE_ID_ROAMING_CONSORTIUM = 111,
293 DOT11_IE_ID_EMERGENCY_ALERT_IDENTIFIER = 112,
294 DOT11_IE_ID_MESH_CONFIGURATION = 113,
295 DOT11_IE_ID_MESH_ID = 114,
296 DOT11_IE_ID_MESH_LINK_METRIC_REPORT = 115,
297 DOT11_IE_ID_CONGESTION_NOTIFICATION = 116,
298 DOT11_IE_ID_MESH_PEERING_MANAGEMENT = 117,
299 DOT11_IE_ID_MESH_CHANNEL_SWITCH_PARAMETERS = 118,
300 DOT11_IE_ID_MESH_AWAKE_WINDOW = 119,
301 DOT11_IE_ID_BEACON_TIMING = 120,
302 DOT11_IE_ID_MCCAOP_SETUP_REQUEST = 121,
303 DOT11_IE_ID_MCCAOP_SETUP_REPLY = 122,
304 DOT11_IE_ID_MCCAOP_ADVERTISMENT = 123,
305 DOT11_IE_ID_MCCAOP_TEARDOWN = 124,
306 DOT11_IE_ID_GANN = 125,
307 DOT11_IE_ID_RANN = 126,
308 DOT11_IE_ID_EXTENDED_CAPABILITIES = 127,
310 DOT11_IE_ID_PREQ = 130,
311 DOT11_IE_ID_PREP = 131,
312 DOT11_IE_ID_PERR = 132,
314 DOT11_IE_ID_PXU = 137,
315 DOT11_IE_ID_PXUC = 138,
316 DOT11_IE_ID_AUTHENTICATED_MESH_PEERING_EXCHANGE = 139,
317 DOT11_IE_ID_MIC = 140,
318 DOT11_IE_ID_DESTINATION_URI = 141,
319 DOT11_IE_ID_U_APSD_COEXISTENCE = 142,
321 DOT11_IE_ID_MCCAOP_ADVERTISMENT_OVERVIEW = 174,
323 DOT11_IE_ID_VENDOR_SPECIFIC = 221,
327 uint32_t whd_wifi_get_iovar_value(
whd_interface_t ifp,
const char *iovar, uint32_t *value);
329 const uint16_t *lengths,
const uint8_t num_buffers);
330 uint32_t whd_wifi_set_iovar_value(
whd_interface_t ifp,
const char *iovar, uint32_t value);
363 const uint16_t *in_buffer_lengths,
const uint8_t num_buffers);
375 uint16_t out_length);
399 const uint16_t *in_buffer_lengths,
const uint8_t num_buffers);
#define MAX_BUS_HEADER_SIZE
Max bus header size for all bus types (sdio/spi)
Structure for storing a MAC address (Wi-Fi Media Access Control address).
uint32_t whd_wifi_get_iovar_buffer(whd_interface_t ifp, const char *iovar_name, uint8_t *out_buffer, uint16_t out_length)
Sends an IOVAR command.
uint32_t whd_wifi_set_iovar_void(whd_interface_t ifp, const char *iovar)
Sends an IOVAR command.
uint32_t whd_wifi_set_iovar_buffer(whd_interface_t ifp, const char *iovar, void *buffer, uint16_t buffer_length)
Sends an IOVAR command.
uint32_t whd_wifi_set_iovar_buffers(whd_interface_t ifp, const char *iovar, const void **in_buffers, const uint16_t *lengths, const uint8_t num_buffers)
Sends an IOVAR command.
whd_buffer_t whd_buffer_queue_ptr_t
type definition for whd_buffer_t