@@ -121,8 +121,8 @@ typedef union {
121
121
122
122
/** @brief Parameters for an SSID scan. */
123
123
typedef struct {
124
- uint8_t * ssid ; /**< SSID of AP */
125
- uint8_t * bssid ; /**< MAC address of AP */
124
+ uint8_t * ssid ; /**< SSID of AP */
125
+ uint8_t * bssid ; /**< MAC address of AP */
126
126
uint8_t channel ; /**< channel, scan the specific channel */
127
127
bool show_hidden ; /**< enable to scan AP whose SSID is hidden */
128
128
wifi_scan_type_t scan_type ; /**< scan type, active or passive */
@@ -156,30 +156,30 @@ typedef struct {
156
156
wifi_cipher_type_t pairwise_cipher ; /**< pairwise cipher of AP */
157
157
wifi_cipher_type_t group_cipher ; /**< group cipher of AP */
158
158
wifi_ant_t ant ; /**< antenna used to receive beacon from AP */
159
- uint32_t phy_11b :1 ; /**< bit: 0 flag to identify if 11b mode is enabled or not */
160
- uint32_t phy_11g :1 ; /**< bit: 1 flag to identify if 11g mode is enabled or not */
161
- uint32_t phy_11n :1 ; /**< bit: 2 flag to identify if 11n mode is enabled or not */
162
- uint32_t phy_lr :1 ; /**< bit: 3 flag to identify if low rate is enabled or not */
163
- uint32_t wps :1 ; /**< bit: 4 flag to identify if WPS is supported or not */
164
- uint32_t reserved :27 ; /**< bit: 5..31 reserved */
159
+ uint32_t phy_11b : 1 ; /**< bit: 0 flag to identify if 11b mode is enabled or not */
160
+ uint32_t phy_11g : 1 ; /**< bit: 1 flag to identify if 11g mode is enabled or not */
161
+ uint32_t phy_11n : 1 ; /**< bit: 2 flag to identify if 11n mode is enabled or not */
162
+ uint32_t phy_lr : 1 ; /**< bit: 3 flag to identify if low rate is enabled or not */
163
+ uint32_t wps : 1 ; /**< bit: 4 flag to identify if WPS is supported or not */
164
+ uint32_t reserved : 27 ; /**< bit: 5..31 reserved */
165
165
wifi_country_t country ; /**< country information of AP */
166
166
} wifi_ap_record_t ;
167
167
168
168
typedef enum {
169
169
WIFI_FAST_SCAN = 0 , /**< Do fast scan, scan will end after find SSID match AP */
170
170
WIFI_ALL_CHANNEL_SCAN , /**< All channel scan, scan will end after scan all the channel */
171
- }wifi_scan_method_t ;
171
+ } wifi_scan_method_t ;
172
172
173
173
typedef enum {
174
174
WIFI_CONNECT_AP_BY_SIGNAL = 0 , /**< Sort match AP in scan list by RSSI */
175
175
WIFI_CONNECT_AP_BY_SECURITY , /**< Sort match AP in scan list by security mode */
176
- }wifi_sort_method_t ;
176
+ } wifi_sort_method_t ;
177
177
178
178
/** @brief Structure describing parameters for a WiFi fast scan */
179
179
typedef struct {
180
180
int8_t rssi ; /**< The minimum rssi to accept in the fast scan mode */
181
181
wifi_auth_mode_t authmode ; /**< The weakest authmode to accept in the fast scan mode */
182
- }wifi_fast_scan_threshold_t ;
182
+ } wifi_fast_scan_threshold_t ;
183
183
184
184
typedef enum {
185
185
WIFI_PS_NONE , /**< No power save */
@@ -238,11 +238,11 @@ typedef union {
238
238
/** @brief Description of STA associated with AP */
239
239
typedef struct {
240
240
uint8_t mac [6 ]; /**< mac address */
241
- uint32_t phy_11b :1 ; /**< bit: 0 flag to identify if 11b mode is enabled or not */
242
- uint32_t phy_11g :1 ; /**< bit: 1 flag to identify if 11g mode is enabled or not */
243
- uint32_t phy_11n :1 ; /**< bit: 2 flag to identify if 11n mode is enabled or not */
244
- uint32_t phy_lr :1 ; /**< bit: 3 flag to identify if low rate is enabled or not */
245
- uint32_t reserved :28 ; /**< bit: 4..31 reserved */
241
+ uint32_t phy_11b : 1 ; /**< bit: 0 flag to identify if 11b mode is enabled or not */
242
+ uint32_t phy_11g : 1 ; /**< bit: 1 flag to identify if 11g mode is enabled or not */
243
+ uint32_t phy_11n : 1 ; /**< bit: 2 flag to identify if 11n mode is enabled or not */
244
+ uint32_t phy_lr : 1 ; /**< bit: 3 flag to identify if low rate is enabled or not */
245
+ uint32_t reserved : 28 ; /**< bit: 4..31 reserved */
246
246
} wifi_sta_info_t ;
247
247
248
248
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP8266 soft-AP */
@@ -298,31 +298,31 @@ typedef struct {
298
298
299
299
/** @brief Received packet radio metadata header, this is the common header at the beginning of all promiscuous mode RX callback buffers */
300
300
typedef struct {
301
- signed rssi :8 ; /**< signal intensity of packet */
302
- unsigned rate :4 ; /**< data rate */
303
- unsigned is_group :1 ;
304
- unsigned :1 ; /**< reserve */
305
- unsigned sig_mode :2 ; /**< 0:is not 11n packet; 1:is 11n packet */
306
- unsigned legacy_length :12 ;
307
- unsigned damatch0 :1 ;
308
- unsigned damatch1 :1 ;
309
- unsigned bssidmatch0 :1 ;
310
- unsigned bssidmatch1 :1 ;
311
- unsigned mcs :7 ; /**< if is 11n packet, shows the modulation(range from 0 to 76) */
312
- unsigned cwb :1 ; /**< if is 11n packet, shows if is HT40 packet or not */
313
- unsigned HT_length :16 ; /**< reserve */
314
- unsigned smoothing :1 ; /**< reserve */
315
- unsigned not_sounding :1 ; /**< reserve */
316
- unsigned :1 ; /**< reserve */
317
- unsigned aggregation :1 ; /**< Aggregation */
318
- unsigned stbc :2 ; /**< STBC */
319
- unsigned fec_coding :1 ; /**< Flag is set for 11n packets which are LDPC */
320
- unsigned sgi :1 ; /**< SGI */
321
- unsigned rxend_state :8 ;
322
- unsigned ampdu_cnt :8 ; /**< ampdu cnt */
323
- unsigned channel :4 ; /**< which channel this packet in */
324
- unsigned :4 ; /**< reserve */
325
- signed noise_floor :8 ;
301
+ signed rssi : 8 ; /**< signal intensity of packet */
302
+ unsigned rate : 4 ; /**< data rate */
303
+ unsigned is_group : 1 ;
304
+ unsigned : 1 ; /**< reserve */
305
+ unsigned sig_mode : 2 ; /**< 0:is not 11n packet; 1:is 11n packet */
306
+ unsigned legacy_length : 12 ;
307
+ unsigned damatch0 : 1 ;
308
+ unsigned damatch1 : 1 ;
309
+ unsigned bssidmatch0 : 1 ;
310
+ unsigned bssidmatch1 : 1 ;
311
+ unsigned mcs : 7 ; /**< if is 11n packet, shows the modulation(range from 0 to 76) */
312
+ unsigned cwb : 1 ; /**< if is 11n packet, shows if is HT40 packet or not */
313
+ unsigned HT_length : 16 ; /**< reserve */
314
+ unsigned smoothing : 1 ; /**< reserve */
315
+ unsigned not_sounding : 1 ; /**< reserve */
316
+ unsigned : 1 ; /**< reserve */
317
+ unsigned aggregation : 1 ; /**< Aggregation */
318
+ unsigned stbc : 2 ; /**< STBC */
319
+ unsigned fec_coding : 1 ; /**< Flag is set for 11n packets which are LDPC */
320
+ unsigned sgi : 1 ; /**< SGI */
321
+ unsigned rxend_state : 8 ;
322
+ unsigned ampdu_cnt : 8 ; /**< ampdu cnt */
323
+ unsigned channel : 4 ; /**< which channel this packet in */
324
+ unsigned : 4 ; /**< reserve */
325
+ signed noise_floor : 8 ;
326
326
} wifi_pkt_rx_ctrl_t ;
327
327
328
328
/** @brief Payload passed to 'buf' parameter of promiscuous mode RX callback.
0 commit comments