1 /* 2 * Copyright (C) 2019-2020 Alibaba Group Holding Limited 3 */ 4 5 #ifndef DEVICE_WIFI_H 6 #define DEVICE_WIFI_H 7 8 #include <stdio.h> 9 #include <stdlib.h> 10 #include <stdint.h> 11 #include <string.h> 12 #include <stdbool.h> 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 #define WIFI_NUMBER_WEP_KEYS (4) /**< The group number of WEP keys. */ 19 #define WIFI_MAX_WEP_KEY_LENGTH (26) /**< The maximum length of each WEP key. */ 20 21 #define WIFI_PROTOCOL_11B 1 22 #define WIFI_PROTOCOL_11G 2 23 #define WIFI_PROTOCOL_11N 4 24 #define WIFI_PROTOCOL_LR 8 25 26 #define MAX_SSID_SIZE 32 27 #define MAX_PASSWD_SIZE 64 28 29 30 typedef enum { 31 /** base code */ 32 WIFI_ERR_OK = 0, 33 WIFI_ERR_NO_MEM, /*!< Out of memory */ 34 WIFI_ERR_ARG, /*!< Invalid argument */ 35 WIFI_ERR_NOT_SUPPORT, /*!< Indicates that API is not supported yet */ 36 WIFI_ERR_FAIL, /*!< General fail code */ 37 38 /** general code */ 39 WIFI_ERR_NOT_INIT, /*!< WiFi driver is not initialized by #hal_wifi_initialize */ 40 WIFI_ERR_INIT, /*!< WiFi driver was initialized by #hal_wifi_initialize */ 41 WIFI_ERR_NOT_START, /*!< WiFi driver is not started by #hal_wifi_start */ 42 WIFI_ERR_START, /*!< WiFi driver was started by #csi_wifi_start */ 43 WIFI_ERR_IF,/*!< WiFi interface error */ 44 WIFI_ERR_MODE, /*!< WiFi mode error */ 45 WIFI_ERR_STATE,/*!< WiFi internal state error */ 46 WIFI_ERR_NVS,/*!< WiFi internal NVS module error */ 47 WIFI_ERR_HANDLE, /*!< Invalid handle argument */ 48 WIFI_ERR_AUTHMODE, /*!< Invalid auth mode */ 49 WIFI_ERR_MAC,/*!< MAC address is invalid */ 50 WIFI_ERR_SSID,/*!< SSID is invalid */ 51 WIFI_ERR_PASSWORD,/*!< Password is invalid */ 52 WIFI_ERR_TIMEOUT,/*!< Timeout error */ 53 WIFI_ERR_WAKE_FAIL, /*!< WiFi is in sleep state(RF closed) and wakeup fail */ 54 WIFI_ERR_REGISTRAR,/*!< WPS registrar is not supported */ 55 WIFI_ERR_WPS_TYPE, /*!< WPS type error */ 56 WIFI_ERR_WPS_SM, /*!< WPS state machine is not initialized */ 57 58 /** connection code */ 59 WIFI_ERR_CONN_UNSPECIFIED, 60 WIFI_ERR_CONN_AUTH_EXPIRE, 61 WIFI_ERR_CONN_AUTH_LEAVE, 62 WIFI_ERR_CONN_ASSOC_EXPIRE, 63 WIFI_ERR_CONN_ASSOC_TOOMANY, 64 WIFI_ERR_CONN_NOT_AUTHED, 65 WIFI_ERR_CONN_NOT_ASSOCED, 66 WIFI_ERR_CONN_ASSOC_LEAVE, 67 WIFI_ERR_CONN_ASSOC_NOT_AUTHED, 68 WIFI_ERR_CONN_DISASSOC_PWRCAP_BAD, 69 WIFI_ERR_CONN_DISASSOC_SUPCHAN_BAD, 70 WIFI_ERR_CONN_IE_INVALID, 71 WIFI_ERR_CONN_MIC_FAILURE, 72 WIFI_ERR_CONN_4WAY_HANDSHAKE_TIMEOUT, 73 WIFI_ERR_CONN_GROUP_KEY_UPDATE_TIMEOUT, 74 WIFI_ERR_CONN_IE_IN_4WAY_DIFFERS, 75 WIFI_ERR_CONN_GROUP_CIPHER_INVALID, 76 WIFI_ERR_CONN_PAIRWISE_CIPHER_INVALID, 77 WIFI_ERR_CONN_AKMP_INVALID, 78 WIFI_ERR_CONN_UNSUPP_RSN_IE_VERSION, 79 WIFI_ERR_CONN_INVALID_RSN_IE_CAP, 80 WIFI_ERR_CONN_802_1X_AUTH_FAILED, 81 WIFI_ERR_CONN_CIPHER_SUITE_REJECTED, 82 WIFI_ERR_CONN_BEACON_TIMEOUT, 83 WIFI_ERR_CONN_NO_AP_FOUND, 84 WIFI_ERR_CONN_AUTH_FAIL, 85 WIFI_ERR_CONN_ASSOC_FAIL, 86 WIFI_ERR_CONN_HANDSHAKE_TIMEOUT, 87 88 WIFI_ERR_MAX, 89 } wifi_err_code_t; 90 91 92 typedef enum { 93 WIFI_EVT_WIFI_READY = 0, /**< WiFi ready */ 94 WIFI_EVT_SCAN_DONE, /**< finish scanning AP */ 95 WIFI_EVT_STA_START, /**< station start */ 96 WIFI_EVT_STA_STOP, /**< station stop */ 97 WIFI_EVT_STA_CONNECTED, /**< station connected to AP */ 98 WIFI_EVT_STA_DISCONNECTED, /**< station disconnected from AP */ 99 WIFI_EVT_STA_AUTHMODE_CHANGE, /**< the auth mode of AP connected by station changed */ 100 WIFI_EVT_STA_WPS_ER_SUCCESS, /**< station wps succeeds in enrollee mode */ 101 WIFI_EVT_STA_WPS_ER_FAILED, /**< station wps fails in enrollee mode */ 102 WIFI_EVT_STA_WPS_ER_TIMEOUT, /**< station wps timeout in enrollee mode */ 103 WIFI_EVT_STA_WPS_ER_PIN, /**< station wps pin code in enrollee mode */ 104 105 WIFI_EVT_AP_START, /**< soft-AP start */ 106 WIFI_EVT_AP_STOP, /**< soft-AP stop */ 107 WIFI_EVT_AP_STACONNECTED, /**< a station connected to soft-AP */ 108 WIFI_EVT_AP_STADISCONNECTED, /**< a station disconnected from soft-AP */ 109 WIFI_EVT_AP_PROBEREQRECVED, /**< Receive probe request packet in soft-AP interface */ 110 111 WIFI_EVT_P2P_DEVICE_FOUND, /**< P2P device found */ 112 WIFI_EVT_P2P_DEVICE_LOST, /**< P2P device lost */ 113 WIFI_EVT_P2P_GROUP_STARTED, /**< P2P group set up */ 114 WIFI_EVT_P2P_GROUP_REMOVED, /**< P2P group terminated */ 115 WIFI_EVT_P2P_GROUP_FORMATION_SUCCESS, /**< P2P group formation has been completed successfully */ 116 WIFI_EVT_P2P_GROUP_FORMATION_FAILURE, /**< P2P group formation failed */ 117 WIFI_EVT_P2P_GO_NEG_REQUEST, /**< P2P Go negotiation request */ 118 WIFI_EVT_P2P_GO_NEG_SUCCESS, /**< P2P Go negotiation success */ 119 WIFI_EVT_P2P_GO_NEG_FAILURE, /**< P2P Go negotiation fail */ 120 WIFI_EVT_P2P_PROV_DISC_SHOW_PIN, /**< P2P display a PIN that will be entered on the peer. */ 121 WIFI_EVT_P2P_PROV_DISC_ENTER_PIN, /**< P2P enter a PIN displayed on the peer. */ 122 WIFI_EVT_P2P_PROV_DISC_PBC_REQ, /**< P2P request from the peer for local p2p device to connect using PBC. */ 123 WIFI_EVT_P2P_PROV_DISC_PBC_RESP, /**< P2P accept provision discovery request to connect using PBC. */ 124 WIFI_EVT_P2P_INVITATION_RECEIVED, /**< P2P invitation request received */ 125 WIFI_EVT_P2P_INVITATION_RESULT, /**< P2P invitation result */ 126 WIFI_EVT_MAX 127 } wifi_event_id_t; 128 129 typedef enum { 130 WIFI_MODE_NULL = 0, /**< null mode */ 131 WIFI_MODE_STA, /**< WiFi station mode */ 132 WIFI_MODE_AP, /**< WiFi soft-AP mode */ 133 WIFI_MODE_APSTA, /**< WiFi station + soft-AP mode */ 134 WIFI_MODE_P2P, /**< WiFi P2P mode */ 135 WIFI_MODE_MAX 136 } wifi_mode_t; 137 138 /*\brief 139 This enumeration defines the wireless encryption type to indicate 140 the Wi-Fi device’s encryption attribute. 141 */ 142 typedef enum { 143 WIFI_ENC_WEP = 0, 144 WIFI_ENC_OPEN = 1, 145 WIFI_ENC_TKIP = 4, 146 WIFI_ENC_AES = 6, 147 WIFI_ENC_TKIP_AES_MIX = 8, 148 WIFI_ENC_MAX 149 } wifi_encrypt_type_t; 150 151 typedef struct { 152 uint8_t wep_key[WIFI_NUMBER_WEP_KEYS][WIFI_MAX_WEP_KEY_LENGTH]; /**< There are four WEP keys. */ 153 uint8_t wep_key_length[WIFI_NUMBER_WEP_KEYS]; /**< WEP key length. */ 154 uint8_t wep_tx_key_index; /**< Default key index for TX frames using WEP. */ 155 } wifi_wep_key_t; 156 157 typedef enum { 158 WIFI_AUTH_OPEN = 0, 159 WIFI_AUTH_WEP, 160 WIFI_AUTH_WPA_PSK, 161 WIFI_AUTH_WPA2_PSK, 162 WIFI_AUTH_WPA_WPA2_PSK, 163 WIFI_AUTH_WPA2_ENTERPRISE, 164 WIFI_AUTH_MAX 165 } wifi_auth_mode_t; 166 167 typedef enum { 168 WIFI_SCAN_MODE_ACTIVE = 0, /**< active scan */ 169 WIFI_SCAN_MODE_PASSIVE, /**< passive scan */ 170 } wifi_scan_mode_t; 171 172 typedef enum { 173 WIFI_LPM_NONE, /**< No power save */ 174 WIFI_LPM_KEEP_SOCKET, /**< power save with socket maintain */ 175 WIFI_LPM_KEEP_LINK, /**< power save with wifi link connecting maintain */ 176 WIFI_LPM_POWEROFF, /**< power save with power off */ 177 } wifi_lpm_mode_t; 178 179 typedef enum { 180 WIFI_STATUS_LINK_DOWN = 0, 181 WIFI_STATUS_LINK_UP, 182 WIFI_STATUS_GOTIP, 183 } wifi_status_link_t; 184 185 typedef enum { 186 WIFI_STORAGE_FLASH, /**< all configuration will strore in both memory and flash */ 187 WIFI_STORAGE_RAM, /**< all configuration will only store in the memory */ 188 } wifi_storage_t; 189 190 typedef enum wifi_sec_type_e { 191 SECURITY_TYPE_NONE, /* Open system. */ 192 SECURITY_TYPE_WEP, /* Wired Equivalent Privacy. WEP security. */ 193 SECURITY_TYPE_WPA_TKIP, /* WPA /w TKIP */ 194 SECURITY_TYPE_WPA_AES, /* WPA /w AES */ 195 SECURITY_TYPE_WPA2_TKIP, /* WPA2 /w TKIP */ 196 SECURITY_TYPE_WPA2_AES, /* WPA2 /w AES */ 197 SECURITY_TYPE_WPA2_MIXED, /* WPA2 /w AES or TKIP */ 198 SECURITY_TYPE_AUTO, /* It is used when calling @ref micoWlanStartAdv, MICO read security type from scan result. */ 199 } wifi_sec_type_t; 200 201 typedef struct { 202 char* partner; 203 char* project; 204 char* app_net; 205 char* cloud; 206 char* os; 207 char* type; 208 } wifi_base_info_t; 209 210 typedef struct { 211 uint32_t min; /**< minimum active scan time per channel, units: millisecond */ 212 uint32_t max; /**< maximum active scan time per channel, units: millisecond, values above 1500ms may 213 cause station to disconnect from AP and are not recommended. */ 214 } wifi_active_scan_time_t; 215 216 typedef union { 217 wifi_active_scan_time_t active; /**< active scan time per channel */ 218 uint32_t passive; /**< passive scan time per channel, units: millisecond, values above 1500ms may 219 cause station to disconnect from AP and are not recommended. */ 220 } wifi_scan_time_t; 221 222 typedef struct { 223 uint8_t ssid[MAX_SSID_SIZE + 1]; /**< SSID of AP */ 224 uint8_t bssid[6]; /**< MAC address of AP */ 225 uint8_t channel; /**< channel, scan the specific channel */ 226 bool show_hidden; /**< enable to scan AP whose SSID is hidden */ 227 wifi_scan_mode_t scan_mode; /**< scan modE, active or passive */ 228 wifi_scan_time_t scan_time; /**< scan time per channel */ 229 } wifi_scan_config_t; 230 231 typedef enum { 232 WIFI_SECOND_CHAN_NONE = 0, /**< the channel width is HT20 */ 233 WIFI_SECOND_CHAN_ABOVE, /**< the channel width is HT40 and the second channel is above the primary channel */ 234 WIFI_SECOND_CHAN_BELOW, /**< the channel width is HT40 and the second channel is below the primary channel */ 235 } wifi_second_chan_t; 236 237 typedef struct { 238 wifi_status_link_t link_status; /* if not connected, following data is not valid */ 239 uint8_t bssid[6]; /* MAC address of AP */ 240 uint8_t ssid[MAX_SSID_SIZE + 1]; /* SSID of AP */ 241 uint8_t channel; /* channel of AP */ 242 int8_t rssi; /* signal strength of AP */ 243 wifi_encrypt_type_t encryptmode; /* encrypt mode of AP */ 244 wifi_auth_mode_t authmode; /* authmode of AP */ 245 } wifi_ap_record_t; 246 247 typedef enum { 248 WIFI_BW_HT20 = 1, /* Bandwidth is HT20 */ 249 WIFI_BW_HT40_MINUS, /* Bandwidth is HT40 */ 250 WIFI_BW_HT40_PLUS, /* Bandwidth is HT40 */ 251 WIFI_BW_HT40_AUTO, 252 } wifi_bandwidth_t; 253 254 typedef enum { 255 WIFI_COUNTRY_CN = 0, /**< country China, channel range [1, 14] */ 256 WIFI_COUNTRY_JP, /**< country Japan, channel range [1, 14] */ 257 WIFI_COUNTRY_US, /**< country USA, channel range [1, 11] */ 258 WIFI_COUNTRY_EU, /**< country Europe, channel range [1, 13] */ 259 WIFI_COUNTRY_MAX 260 } wifi_country_t; 261 262 typedef struct { 263 uint8_t mac[6]; /**< mac address of sta that associated with soft-AP */ 264 } wifi_sta_info_t; 265 266 #define HAL_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to soft-AP */ 267 268 typedef struct { 269 wifi_sta_info_t sta[HAL_WIFI_MAX_CONN_NUM]; /**< station list */ 270 int num; /**< number of station that associated with soft-AP */ 271 } wifi_sta_list_t; 272 273 typedef struct { 274 int present; /* this config is activated, default to 0 */ 275 uint8_t listen_interval; /** STA's listen interval, default to 0 */ 276 char bssid[6]; /** indicate Target AP's bssid, default to {0x00, 0x00, 0x00, 0x00, 0x00, 0x00} */ 277 uint8_t channel;/* set a channel that can speed up a connection procedure, default yo 0*/ 278 wifi_sec_type_t sec_type; /* Security type, @ref wlan_sec_type_t */ 279 } wifi_config_sta_adv_t; 280 281 typedef struct { 282 int present; //this config is activated, default to 0 283 uint8_t dtim_interval; //DTIM interval ,default to 0 284 uint8_t channel; //ap's channel, default to 0 285 uint8_t beacon_interval; //default to 0 286 int hide_ssid; //hide the ssid, default to 0 287 int max_sta_number; //max sta number, default to 0 288 } wifi_config_ap_adv_t; 289 290 typedef struct { 291 int present; //this config is activated, default to 0 292 wifi_auth_mode_t auth_mode; //wifi auth, WEP/WPA, ... 293 wifi_encrypt_type_t encrypt_type; //wifi encrypt, TKIP, AES, ... 294 wifi_wep_key_t wep_keys; //wep keys, if auth is not WEP, not need to fill 295 } wifi_config_sec_adv_t; 296 297 298 typedef struct { 299 wifi_mode_t mode; /* DHCP mode: @ref wlanInterfaceTypedef. */ 300 char ssid[MAX_SSID_SIZE + 1]; /* SSID of the wlan needs to be connected. */ 301 char password[MAX_PASSWD_SIZE + 1]; /* Security key of the wlan needs to be connected, ignored in an open system. */ 302 303 wifi_config_sta_adv_t sta_config; //if set to sta mode, may config this 304 wifi_config_ap_adv_t ap_config; //if set to AP mode, may config this 305 wifi_config_sec_adv_t sec_config; //if have advanced security setting, config this 306 } wifi_config_t; 307 308 typedef struct { 309 signed rssi: 8; /**< signal intensity of packet */ 310 unsigned rate: 5; /**< data rate */ 311 unsigned : 1; /**< reserve */ 312 unsigned sig_mode: 2; /**< 0:is not 11n packet; 1:is 11n packet */ 313 unsigned : 16; /**< reserve */ 314 unsigned mcs: 7; /**< if is 11n packet, shows the modulation(range from 0 to 76) */ 315 unsigned cwb: 1; /**< if is 11n packet, shows if is HT40 packet or not */ 316 unsigned : 16; /**< reserve */ 317 unsigned smoothing: 1; /**< reserve */ 318 unsigned not_sounding: 1; /**< reserve */ 319 unsigned : 1; /**< reserve */ 320 unsigned aggregation: 1; /**< Aggregation */ 321 unsigned stbc: 2; /**< STBC */ 322 unsigned fec_coding: 1; /**< if is 11n packet, shows if is LDPC packet or not */ 323 unsigned sgi: 1; /**< SGI */ 324 unsigned noise_floor: 8; /**< noise floor */ 325 unsigned ampdu_cnt: 8; /**< ampdu cnt */ 326 unsigned channel: 4; /**< which channel this packet in */ 327 unsigned : 12; /**< reserve */ 328 unsigned timestamp: 32; /**< timestamp */ 329 unsigned : 32; /**< reserve */ 330 unsigned : 32; /**< reserve */ 331 unsigned sig_len: 12; /**< It is really lenth of packet */ 332 unsigned : 12; /**< reserve */ 333 unsigned rx_state: 8; /**< rx state */ 334 } wifi_pkt_rx_ctrl_t; 335 336 typedef struct { 337 wifi_pkt_rx_ctrl_t rx_ctrl; 338 uint8_t payload[0]; /**< ieee80211 packet buff, The length of payload is described by sig_len */ 339 } wifi_promiscuous_pkt_t; 340 341 /** 342 \brief Promiscuous frame type 343 */ 344 typedef enum { 345 WIFI_PKT_CTRL, /**< control type, receive packet buf is wifi_pkt_rx_ctrl_t */ 346 WIFI_PKT_MGMT, /**< management type, receive packet buf is wifi_promiscuous_pkt_t */ 347 WIFI_PKT_DATA, /**< data type, receive packet buf is wifi_promiscuous_pkt_t */ 348 WIFI_PKT_MISC, /**< other type, receive packet buf is wifi_promiscuous_pkt_t */ 349 } wifi_promiscuous_pkt_type_t; 350 351 typedef enum { 352 FRAME_FILTER_MODE_FORWARD = 1, /*!< Packet filter engine forwards matching packets, discards non-matching packets */ 353 FRAME_FILTER_MODE_DISCARD = 0, /*!< Packet filter engine discards matching packets, forwards non-matching packets */ 354 } frame_filter_mode_t; 355 356 typedef enum { 357 FRAME_FILTER_RULE_POSITIVE_MATCHING = 0, /*!< Specifies that a filter should match a given pattern */ 358 FRAME_FILTER_RULE_NEGATIVE_MATCHING = 1, /*!< Specifies that a filter should NOT match a given pattern */ 359 } frame_filter_rule_t; 360 361 struct wifi_frame_filter_list { 362 struct wifi_frame_filter_list *next; 363 struct wifi_frame_filter_list *prev; 364 }; 365 366 typedef struct wifi_frame_filter_list wifi_frame_filter_list_t; 367 368 /** 369 * Structure describing a frame filter list item 370 */ 371 typedef struct { 372 wifi_frame_filter_list_t filter_list; 373 uint32_t id; /*!< Unique identifier for a packet filter item */ 374 frame_filter_rule_t rule; /*!< Filter matches are either POSITIVE or NEGATIVE matching */ 375 uint16_t offset; /*!< Offset in bytes to start filtering (referenced to the start of the 802.11 packet) */ 376 uint16_t mask_size; /*!< Size of the mask in bytes */ 377 uint8_t *mask; /*!< Pattern mask bytes to be ANDed with the pattern eg. "\xff00" (must be in network byte order) */ 378 uint8_t *pattern; /*!< Pattern bytes used to filter eg. "\x0800" (must be in network byte order) */ 379 bool enabled_status; /*!< Indicates if the filter is enabled */ 380 } wifi_frame_filter_t; 381 382 typedef struct { 383 uint8_t dhcp; /* DHCP mode: @ref DHCP_Disable, @ref DHCP_Client, @ref DHCP_Server. */ 384 char ip[16]; /* Local IP address on the target wlan interface: @ref wlanInterfaceTypedef. */ 385 char gate[16]; /* Router IP address on the target wlan interface: @ref wlanInterfaceTypedef. */ 386 char mask[16]; /* Netmask on the target wlan interface: @ref wlanInterfaceTypedef. */ 387 char dns[16]; /* DNS server IP address. */ 388 char mac[16]; /* MAC address, example: "C89346112233". */ 389 char broadcastip[16]; 390 } wifi_ip_stat_t; 391 392 typedef struct { 393 char ssid[32 + 1]; /* The SSID of an access point. */ 394 int8_t ap_power; /* Received Signal Strength Indication, min: -110, max: 0 */ 395 char bssid[6]; /* The BSSID of an access point. */ 396 uint8_t channel; /* The RF frequency, 1-13 */ 397 wifi_sec_type_t sec_type; /* Security type, @ref wlan_sec_type_t */ 398 } ap_list_t; 399 400 typedef struct { 401 int *channel_list; /**< channel list */ 402 int channel_num; /**< number of channel that associated with soft-AP */ 403 } wifi_channel_list_t; 404 405 /* 406 * Scan result using normal scan. 407 */ 408 typedef struct { 409 char ap_num; /* The number of access points found in scanning. */ 410 411 ap_list_t *ap_list; 412 } wifi_scan_result_t, scan_ap_list_t; 413 414 typedef struct { 415 int rssi; /* Received Signal Strength Indication */ 416 int snr; /* Signal to Noise Ratio */ 417 int per; /* Packet Error Rate (PPM)*/ 418 } wifi_link_info_t; 419 420 typedef int32_t (*wifi_rxcb_t)(void *buffer, uint16_t len, void *ebuf); 421 typedef void (* wifi_promiscuous_cb_t)(wifi_promiscuous_pkt_t *buf, wifi_promiscuous_pkt_type_t type); 422 typedef void (*monitor_data_cb_t)(uint8_t *data, int len, wifi_link_info_t *info); 423 424 typedef struct { 425 int netdev_type; 426 void *drv_ops; 427 void *priv; 428 } netdev_t; 429 430 typedef struct { 431 void *data; 432 int len; 433 } raw_frame_t; 434 /* 435 * The event call back function called at specific events occurred. 436 * 437 * @note For HAL implementors, these callbacks must be 438 * called under normal task context, not from interrupt. 439 */ 440 typedef struct { 441 void (*sta_connect_fail)(netdev_t *dev, wifi_err_code_t err, void *arg); 442 void (*status_change)(netdev_t *dev, wifi_event_id_t stat, void *arg); 443 void (*scan_compeleted)(netdev_t *dev, uint16_t number, wifi_ap_record_t *ap_records); 444 void (*fatal_err)(netdev_t *dev, void *arg); 445 } wifi_event_func; 446 447 typedef enum 448 { 449 WIFI_DEV_CMD_GET_BASE_INFO, 450 WIFI_DEV_CMD_SET_MODE, 451 WIFI_DEV_CMD_GET_MODE, 452 WIFI_DEV_CMD_INSTALL_EVENT_CB, 453 WIFI_DEV_CMD_CANCEL_CONNECT, 454 455 WIFI_DEV_CMD_SET_MAC, 456 WIFI_DEV_CMD_GET_MAC, 457 WIFI_DEV_CMD_SET_LPM, 458 WIFI_DEV_CMD_GET_LPM, 459 460 WIFI_DEV_CMD_NOTIFY_IP_STATE2DRV, 461 462 WIFI_DEV_CMD_START_SCAN, 463 WIFI_DEV_CMD_CONNECT, 464 WIFI_DEV_CMD_DISCONNECT, 465 WIFI_DEV_CMD_STA_GET_LINK_STATUS, 466 WIFI_DEV_CMD_AP_GET_STA_LIST, 467 WIFI_DEV_CMD_START_MONITOR, 468 WIFI_DEV_CMD_STOP_MONITOR, 469 WIFI_DEV_CMD_SEND_80211_RAW_FRAME, 470 WIFI_DEV_CMD_SET_CHANNEL, 471 WIFI_DEV_CMD_GET_CHANNEL, 472 WIFI_DEV_CMD_START_SPECIFIED_SCAN, 473 WIFI_DEV_CMD_REGISTER_MONITOR_CB, 474 WIFI_DEV_CMD_START_MGNT_MONITOR, 475 WIFI_DEV_CMD_STOP_MGNT_MONITOR, 476 WIFI_DEV_CMD_REGISTER_MGNT_MONITOR_CB, 477 WIFI_DEV_CMD_SET_SMARTCFG, 478 WIFI_DEV_CMD_SET_CHANNELLIST, 479 WIFI_DEV_CMD_GET_CHANNELLIST, 480 481 } rt_wlan_cmd_t; 482 483 484 /** compatibility */ 485 486 #ifdef __cplusplus 487 } 488 #endif 489 490 #endif 491 492