esp32/lwip: some misc changes

1. Update phy to fix HT40 rx issue
2. Add code about RX_DONE/TX_DONE/Lock-free optimization
3. Fix wifi ioctl return value error
4. Add lwip statistics debug code
5. Modify TCP window size to 10 and send buffer size to 5
This commit is contained in:
Liu Zhi Fu
2016-11-28 18:36:14 +08:00
parent db1e86b3d9
commit 9a3f9af2db
9 changed files with 122 additions and 24 deletions

View File

@@ -161,12 +161,9 @@ wlanif_input(struct netif *netif, void *buffer, u16_t len, void* eb)
goto _exit;
#if (ESP_L2_TO_L3_COPY == 1)
//p = pbuf_alloc(PBUF_IP, len, PBUF_POOL);
p = pbuf_alloc(PBUF_RAW, len, PBUF_RAM);
if (p == NULL) {
#if ESP_PERF
g_rx_alloc_pbuf_fail_cnt++;
#endif
ESP_STATS_INC(esp.wlanif_input_pbuf_fail);
esp_wifi_internal_free_rx_buffer(eb);
return;
}
@@ -175,9 +172,7 @@ wlanif_input(struct netif *netif, void *buffer, u16_t len, void* eb)
#else
p = pbuf_alloc(PBUF_RAW, len, PBUF_REF);
if (p == NULL){
#if ESP_PERF
g_rx_alloc_pbuf_fail_cnt++;
#endif
ESP_STATS_INC(esp.wlanif_input_pbuf_fail);
return;
}
p->payload = buffer;
@@ -241,7 +236,7 @@ wlanif_init(struct netif *netif)
* The last argument should be replaced with your link speed, in units
* of bits per second.
*/
NETIF_INIT_SNMP(netif, snmp_ifType_ethernet_csmacd, LINK_SPEED_OF_YOUR_NETIF_IN_BPS);
NETIF_INIT_SNMP(netif, snmp_ifType_ethernet_csmacd, 100);
netif->name[0] = IFNAME0;
netif->name[1] = IFNAME1;