]> granicus.if.org Git - esp-idf/commitdiff
esp32: fix some wifi phy mode bugs
authorLiu Zhi Fu <liuzhifu@espressif.com>
Tue, 24 Apr 2018 08:22:33 +0000 (16:22 +0800)
committerzhangyanjiao <zhangyanjiao@espressif.com>
Wed, 25 Apr 2018 12:32:18 +0000 (20:32 +0800)
Fix several WiFi phy mode bugs

components/esp32/include/esp_wifi.h
components/esp32/include/esp_wifi_types.h
components/esp32/lib

index beb36e270901f929ee08c468061d14a3d8bf3ee5..beb624df16b45c1d54acb807e2a91da5691cde97 100755 (executable)
@@ -397,6 +397,9 @@ esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_re
   * @brief     Get information of AP which the ESP32 station is associated with
   *
   * @param     ap_info  the wifi_ap_record_t to hold AP information
+  *            sta can get the connected ap's phy mode info through the struct member
+  *            phy_11b,phy_11g,phy_11n,phy_lr in the wifi_ap_record_t struct.
+  *            For example, phy_11b = 1 imply that ap support 802.11b mode
   *
   * @return
   *    - ESP_OK: succeed
@@ -714,6 +717,9 @@ esp_err_t esp_wifi_get_config(wifi_interface_t interface, wifi_config_t *conf);
   * @attention SSC only API
   *
   * @param[out] sta  station list
+  *             ap can get the connected sta's phy mode info through the struct member
+  *             phy_11b,phy_11g,phy_11n,phy_lr in the wifi_sta_info_t struct.
+  *             For example, phy_11b = 1 imply that sta support 802.11b mode
   *
   * @return
   *    - ESP_OK: succeed
index 455238baf1b2c20c48cfd9afe7e3f657f2704462..e46fcf05ce191a95c3f394ab3616c73c085483c5 100755 (executable)
@@ -230,6 +230,11 @@ typedef union {
 /** @brief Description of STA associated with AP */
 typedef struct {
     uint8_t mac[6];  /**< mac address */
+    uint32_t phy_11b:1;      /**< bit: 0 flag to identify if 11b mode is enabled or not */
+    uint32_t phy_11g:1;      /**< bit: 1 flag to identify if 11g mode is enabled or not */
+    uint32_t phy_11n:1;      /**< bit: 2 flag to identify if 11n mode is enabled or not */
+    uint32_t phy_lr:1;       /**< bit: 3 flag to identify if low rate is enabled or not */
+    uint32_t reserved:28;    /**< bit: 4..31 reserved */
 } wifi_sta_info_t;
 
 #define ESP_WIFI_MAX_CONN_NUM  (10)       /**< max number of stations which can connect to ESP32 soft-AP */
index 0810a36f80def38a5d82593c1ca989f746297a53..3ca7b8a9afdc01a1f0714072cc59c8509481e395 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0810a36f80def38a5d82593c1ca989f746297a53
+Subproject commit 3ca7b8a9afdc01a1f0714072cc59c8509481e395