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:
Deepthi Gowri
2012-01-31 19:39:06 +05:30
parent 6344a80689
commit ae5a4f7fc4
3 changed files with 18 additions and 4 deletions

View File

@@ -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)\"
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 \
qsap.c

View File

@@ -173,7 +173,7 @@ char *hw_mode[HW_MODE_UNKNOWN] = {
/** configuration file path */
char *pconffile = CONFIG_FILE;
char *fIni = INI_FILE;
char *fIni = WIFI_DRIVER_CONF_FILE;
s8 ini_file[64] = {0};
/**
@@ -2673,6 +2673,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen)
value = atoi(pVal);
if(TRUE != IS_VALID_TX_POWER(value))
goto error;
qsap_set_ini_filename();
snprintf(pVal, sizeof(u32), "%ld", value);
cNum = STR_TX_POWER_IN_INI;
ini = INI_CONF_FILE;

View File

@@ -78,6 +78,14 @@ enum error_val {
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 */
#define CONFIG_FILE "/data/misc/wifi/hostapd.conf"
@@ -90,9 +98,6 @@ enum error_val {
/** Deny list file name */
#define DENY_LIST_FILE "/data/hostapd/hostapd.deny"
/** Ini file */
#define INI_FILE "/system/etc/firmware/wlan/qcom_cfg.ini"
/** Default Ini file */
#define DEFAULT_INI_FILE "/persist/qcom/softap/qcom_cfg_default.ini"