*/
esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);
+/**
+ * @brief Set maximum WiFi transmiting power
+ *
+ * @attention WiFi transmiting power is divided to six levels in phy init data.
+ * Level0 represents highest transmiting power and level5 represents lowest
+ * transmiting power. Packets of different rates are transmitted in
+ * different powers according to the configuration in phy init data.
+ * This API only sets maximum WiFi transmiting power. If this API is called,
+ * the transmiting power of every packet will be less than or equal to the
+ * value set by this API. If this API is not called, the value of maximum
+ * transmitting power set in phy_init_data.bin or menuconfig (depend on
+ * whether to use phy init data in partition or not) will be used. Default
+ * value is level0. Values passed in power are mapped to transmit power
+ * levels as follows:
+ * - [78, 127]: level0
+ * - [76, 77]: level1
+ * - [74, 75]: level2
+ * - [68, 73]: level3
+ * - [60, 67]: level4
+ * - [52, 59]: level5
+ * - [44, 51]: level5 - 2dBm
+ * - [34, 43]: level5 - 4.5dBm
+ * - [28, 33]: level5 - 6dBm
+ * - [20, 27]: level5 - 8dBm
+ * - [8, 19]: level5 - 11dBm
+ * - [-128, 7]: level5 - 14dBm
+ *
+ * @param power Maximum WiFi transmiting power.
+ *
+ * @return
+ * - ESP_OK: succeed
+ * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
+ * - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
+ */
+esp_err_t esp_wifi_set_max_tx_power(int8_t power);
+
+/**
+ * @brief Get maximum WiFi transmiting power
+ *
+ * @attention This API gets maximum WiFi transmiting power. Values got
+ * from power are mapped to transmit power levels as follows:
+ * - 78: 19.5dBm
+ * - 76: 19dBm
+ * - 74: 18.5dBm
+ * - 68: 17dBm
+ * - 60: 15dBm
+ * - 52: 13dBm
+ * - 44: 11dBm
+ * - 34: 8.5dBm
+ * - 28: 7dBm
+ * - 20: 5dBm
+ * - 8: 2dBm
+ * - -4: -1dBm
+ *
+ * @param power Maximum WiFi transmiting power.
+ *
+ * @return
+ * - ESP_OK: succeed
+ * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
+ * - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
+ * - ESP_ERR_WIFI_ARG: invalid argument
+ */
+esp_err_t esp_wifi_get_max_tx_power(int8_t *power);
+
#ifdef __cplusplus
}
#endif