Merges https://github.com/espressif/esp-idf/pull/2490
Signed-off-by: David Cermak <cermak@espressif.com>