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