Skip to content

Commit 8df9bbd

Browse files
committed
Merge branch 'bugfix/wifi_config_fixes_v4.4' into 'release/v4.4'
Add APIs to get Assoc id and negotiated phymode.(v4.4) See merge request espressif/esp-idf!22972
2 parents c0efc25 + dc33626 commit 8df9bbd

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

components/esp_wifi/include/esp_wifi.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,6 +1318,29 @@ esp_err_t esp_wifi_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t ra
13181318
*/
13191319
esp_err_t esp_wifi_disable_pmf_config(wifi_interface_t ifx);
13201320

1321+
/**
1322+
* @brief Get the Association id assigned to STA by AP
1323+
*
1324+
* @param[out] aid store the aid
1325+
*
1326+
* @attention aid = 0 if station is not connected to AP.
1327+
*
1328+
* @return
1329+
* - ESP_OK: succeed
1330+
*/
1331+
esp_err_t esp_wifi_sta_get_aid(uint16_t *aid);
1332+
1333+
/**
1334+
* @brief Get the negotiated phymode after connection.
1335+
*
1336+
* @param[out] phymode store the negotiated phymode.
1337+
*
1338+
* @attention Operation phy mode, BIT[5]: indicate whether LR enabled, BIT[0-4]: wifi_phy_mode_t
1339+
*
1340+
* @return
1341+
* - ESP_OK: succeed
1342+
*/
1343+
esp_err_t esp_wifi_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode);
13211344
#ifdef __cplusplus
13221345
}
13231346
#endif

components/esp_wifi/include/esp_wifi_types.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,19 @@ typedef enum {
350350

351351
#define WIFI_VENDOR_IE_ELEMENT_ID 0xDD
352352

353+
/**
354+
* @brief Operation Phymode
355+
*/
356+
typedef enum
357+
{
358+
WIFI_PHY_MODE_LR, /**< PHY mode for Low Rate */
359+
WIFI_PHY_MODE_11B, /**< PHY mode for 11b */
360+
WIFI_PHY_MODE_11G, /**< PHY mode for 11g */
361+
WIFI_PHY_MODE_HT20, /**< PHY mode for Bandwidth HT20 */
362+
WIFI_PHY_MODE_HT40, /**< PHY mode for Bandwidth HT40 */
363+
WIFI_PHY_MODE_HE20, /**< PHY mode for Bandwidth HE20 */
364+
} wifi_phy_mode_t;
365+
353366
/**
354367
* @brief Vendor Information Element header
355368
*

0 commit comments

Comments
 (0)