driver: wifi: esp32: enable iface when enable ap mode
when ap mode is enable, we don't enable iface by `net_eth_carrier_on` before, this will cause wifi tx error. this patch fix this issues. Signed-off-by: YuLong Yao <feilongphone@gmail.com>
This commit is contained in:
parent
c031c9359e
commit
af0583d87d
1 changed files with 3 additions and 0 deletions
|
@ -289,6 +289,7 @@ static void esp_wifi_event_task(void)
|
|||
break;
|
||||
case ESP32_WIFI_EVENT_AP_STOP:
|
||||
esp32_data.state = ESP32_AP_STOPPED;
|
||||
net_eth_carrier_off(esp32_wifi_iface);
|
||||
break;
|
||||
case ESP32_WIFI_EVENT_AP_STACONNECTED:
|
||||
esp32_data.state = ESP32_AP_CONNECTED;
|
||||
|
@ -459,6 +460,8 @@ static int esp32_wifi_ap_enable(const struct device *dev,
|
|||
return -EAGAIN;
|
||||
}
|
||||
|
||||
net_eth_carrier_on(esp32_wifi_iface);
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue