Add NDC support for "set Tx Power" command
Added support to change wlan softap Tx power using ndc command. It will write tx power cap to ini file. Change-Id: I5c9031ab35d67f4531e6f440b359d51c09a321d3 CRs-fixed: 329941
This commit is contained in:
@@ -32,6 +32,14 @@ ifdef WIFI_SDIO_IF_DRIVER_MODULE_NAME
|
|||||||
LOCAL_CFLAGS += -DWIFI_SDIO_IF_DRIVER_MODULE_NAME=\"$(WIFI_SDIO_IF_DRIVER_MODULE_NAME)\"
|
LOCAL_CFLAGS += -DWIFI_SDIO_IF_DRIVER_MODULE_NAME=\"$(WIFI_SDIO_IF_DRIVER_MODULE_NAME)\"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef WIFI_DRIVER_CONF_FILE
|
||||||
|
LOCAL_CFLAGS += -DWIFI_DRIVER_CONF_FILE=\"$(WIFI_DRIVER_CONF_FILE)\"
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef WIFI_DRIVER_DEF_CONF_FILE
|
||||||
|
LOCAL_CFLAGS += -DWIFI_DRIVER_DEF_CONF_FILE=\"$(WIFI_DRIVER_DEF_CONF_FILE)\"
|
||||||
|
endif
|
||||||
|
|
||||||
LOCAL_SRC_FILES := qsap_api.c \
|
LOCAL_SRC_FILES := qsap_api.c \
|
||||||
qsap.c
|
qsap.c
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ char *hw_mode[HW_MODE_UNKNOWN] = {
|
|||||||
|
|
||||||
/** configuration file path */
|
/** configuration file path */
|
||||||
char *pconffile = CONFIG_FILE;
|
char *pconffile = CONFIG_FILE;
|
||||||
char *fIni = INI_FILE;
|
char *fIni = WIFI_DRIVER_CONF_FILE;
|
||||||
s8 ini_file[64] = {0};
|
s8 ini_file[64] = {0};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2673,6 +2673,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen)
|
|||||||
value = atoi(pVal);
|
value = atoi(pVal);
|
||||||
if(TRUE != IS_VALID_TX_POWER(value))
|
if(TRUE != IS_VALID_TX_POWER(value))
|
||||||
goto error;
|
goto error;
|
||||||
|
qsap_set_ini_filename();
|
||||||
snprintf(pVal, sizeof(u32), "%ld", value);
|
snprintf(pVal, sizeof(u32), "%ld", value);
|
||||||
cNum = STR_TX_POWER_IN_INI;
|
cNum = STR_TX_POWER_IN_INI;
|
||||||
ini = INI_CONF_FILE;
|
ini = INI_CONF_FILE;
|
||||||
|
|||||||
@@ -78,6 +78,14 @@ enum error_val {
|
|||||||
eERR_LOAD_FAILED_SOFTAP
|
eERR_LOAD_FAILED_SOFTAP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef WIFI_DRIVER_CONF_FILE
|
||||||
|
#define WIFI_DRIVER_CONF_FILE NULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WIFI_DRIVER_DEF_CONF_FILE
|
||||||
|
#define WIFI_DRIVER_DEF_CONF_FILE NULL
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Configuration file name */
|
/** Configuration file name */
|
||||||
#define CONFIG_FILE "/data/misc/wifi/hostapd.conf"
|
#define CONFIG_FILE "/data/misc/wifi/hostapd.conf"
|
||||||
|
|
||||||
@@ -90,9 +98,6 @@ enum error_val {
|
|||||||
/** Deny list file name */
|
/** Deny list file name */
|
||||||
#define DENY_LIST_FILE "/data/hostapd/hostapd.deny"
|
#define DENY_LIST_FILE "/data/hostapd/hostapd.deny"
|
||||||
|
|
||||||
/** Ini file */
|
|
||||||
#define INI_FILE "/system/etc/firmware/wlan/qcom_cfg.ini"
|
|
||||||
|
|
||||||
/** Default Ini file */
|
/** Default Ini file */
|
||||||
#define DEFAULT_INI_FILE "/persist/qcom/softap/qcom_cfg_default.ini"
|
#define DEFAULT_INI_FILE "/persist/qcom/softap/qcom_cfg_default.ini"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user