]> granicus.if.org Git - esp-idf/commitdiff
esp32/tcpip_adapter: softap supports max 10 stations
authorLiu Zhi Fu <liuzhifu@espressif.com>
Fri, 28 Oct 2016 08:53:49 +0000 (16:53 +0800)
committerLiu Zhi Fu <liuzhifu@espressif.com>
Fri, 28 Oct 2016 08:53:49 +0000 (16:53 +0800)
The max number of stations softap supports is modified from 8 to 10

components/esp32/include/esp_wifi_types.h
components/esp32/lib
components/tcpip_adapter/include/tcpip_adapter.h
components/tcpip_adapter/tcpip_adapter_lwip.c

index 0ea719a65b603ee23567c1735dd3a001019540b6..3304a8a3ea1d55d2ad431eb44e7da42539fada8c 100644 (file)
@@ -154,10 +154,10 @@ typedef struct {
     uint8_t mac[6];  /**< mac address of sta that associated with ESP32 soft-AP */
 }wifi_sta_info_t;
 
-#define ESP_WIFI_MAX_CONN_NUM  (8+2)       /**< max number of sta the eSP32 soft-AP can connect */
+#define ESP_WIFI_MAX_CONN_NUM  (10)       /**< max number of sta the ESP32 soft-AP can connect */
 typedef struct {
     wifi_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM]; /**< station list */
-    uint8_t         num; /**< number of station that associated with ESP32 soft-AP */
+    int       num; /**< number of station that associated with ESP32 soft-AP */
 }wifi_sta_list_t;
 
 typedef enum {
index 12b3435fc0cd04efc249d52d71efb1cdecda50f8..9d18fd1a8f7610130e69f8be74ec68f6399221b1 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 12b3435fc0cd04efc249d52d71efb1cdecda50f8
+Subproject commit 9d18fd1a8f7610130e69f8be74ec68f6399221b1
index 218325320e397aa65090f33fe97a6009c2146e2b..e84701688433d46cc1bd6a34dac1893ec08aa418 100644 (file)
@@ -73,8 +73,8 @@ typedef struct {
 }tcpip_adapter_sta_info_t;
 
 typedef struct {
-    tcpip_adapter_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM+2];
-    uint8_t num;
+    tcpip_adapter_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM];
+    int num;
 }tcpip_adapter_sta_list_t;
 #endif
 
index 677368008dff14887844077e2c6db32cbf9dc3ed..9b6e9d94fa1b9454a1e37a961c8f30709e76266f 100644 (file)
@@ -598,6 +598,7 @@ esp_err_t tcpip_adapter_get_sta_list(wifi_sta_list_t *wifi_sta_list, tcpip_adapt
         return ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS;
 
     memset(tcpip_sta_list, 0, sizeof(tcpip_adapter_sta_list_t));
+    tcpip_sta_list->num = wifi_sta_list->num;
     for (i=0; i<wifi_sta_list->num; i++){
         memcpy(tcpip_sta_list->sta[i].mac, wifi_sta_list->sta[i].mac, 6);
         dhcp_search_ip_on_mac(tcpip_sta_list->sta[i].mac, &tcpip_sta_list->sta[i].ip);