feat(esp8266): make tx rate start from high to low

This commit is contained in:
Zhang Jun Hao
2018-08-01 12:28:48 +08:00
parent 3c806b7892
commit d56ce445fe
3 changed files with 16 additions and 0 deletions

View File

@ -49,6 +49,13 @@ config SCAN_AP_MAX
User can use own function "esp_wifi_scan_get_ap_num_max" to determin how many AP to scan , too.
config WIFI_TX_RATE_SEQUENCE_FROM_HIGH
bool "Set wifi tx rate from 54M to 1M"
default n
help
If this option is enabled, Wifi will try to send packets first from high rate(54M). If it fails, it will
try at low rate until the transmission is successful.
endmenu
menu PHY

View File

@ -56,3 +56,11 @@ size_t __attribute__((weak)) esp_wifi_scan_get_ap_num_max(void)
{
return CONFIG_SCAN_AP_MAX;
}
bool IRAM_ATTR esp_wifi_try_rate_from_high(void) {
#if CONFIG_WIFI_TX_RATE_SEQUENCE_FROM_HIGH
return true;
#else
return false;
#endif
}