diff options
| author | Edhar, Mahesh Kumar <c_medhar@qti.qualcomm.com> | 2013-11-22 11:33:13 +0530 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@qca.qualcomm.com> | 2013-12-03 14:39:35 -0800 |
| commit | c2e50797bc57d136e56340191b3cadc63f990e70 (patch) | |
| tree | 79259157f00d35be9a0d4be7874e724330ae3cc6 | |
| parent | 09021724ccaabf31dbb0ebed56f4e6f36b124e73 (diff) | |
CLD:changes to support iwpriv cmd to set/get power gating mode
below are the valid pwrgating value's
0 to disable power gating mode and
1 enable power gating mode.
WMI_PDEV_PARAM_POWER_GATING_SLEEP is used from host to
enable/disable power gating mode in fw.
Change-Id: I66bae8cdf57f73b7242919c4f23e4e439368641e
CRs-fixed: 573601
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_wext.c | 33 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 6 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.h | 1 |
3 files changed, 40 insertions, 0 deletions
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c index 331634fb22a0..2c50b3dde26d 100644 --- a/CORE/HDD/src/wlan_hdd_wext.c +++ b/CORE/HDD/src/wlan_hdd_wext.c @@ -200,6 +200,7 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2}, #define WE_SET_VHT_RATE 39 #define WE_DBGLOG_REPORT_ENABLE 40 #define WE_TXRX_FWSTATS_RESET 41 +#define WE_SET_POWER_GATING 42 #endif /* Private ioctls and their sub-ioctls */ @@ -234,6 +235,7 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2}, #define WE_GET_AMSDU 28 #define WE_GET_TXPOW_2G 29 #define WE_GET_TXPOW_5G 30 +#define WE_GET_POWER_GATING 31 #endif /* Private ioctls and their sub-ioctls */ @@ -4549,6 +4551,16 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf break; } + case WE_SET_POWER_GATING: + { + hddLog(LOG1, "WMI_PDEV_PARAM_POWER_GATING_SLEEP val %d", + set_value); + ret = process_wma_set_command((int)pAdapter->sessionId, + (int)WMI_PDEV_PARAM_POWER_GATING_SLEEP, + (set_value)? true:false, PDEV_CMD); + break; + } + /* Firmware debug log */ case WE_DBGLOG_LOG_LEVEL: { @@ -5033,6 +5045,17 @@ static int iw_setnone_getint(struct net_device *dev, struct iw_request_info *inf hddLog(LOG1, "5G tx_power %d", txpow5g); break; } + + case WE_GET_POWER_GATING: + { + hddLog(LOG1, "GET WMI_PDEV_PARAM_POWER_GATING_SLEEP"); + *value = wma_cli_get_command(wmapvosContext, + (int)pAdapter->sessionId, + (int)WMI_PDEV_PARAM_POWER_GATING_SLEEP, + PDEV_CMD); + break; + } + #endif default: @@ -7810,6 +7833,11 @@ static const struct iw_priv_args we_private_args[] = { 0, "txpow5g" }, + { WE_SET_POWER_GATING, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + 0, + "pwrgating" }, + /* Sub-cmds DBGLOG specific commands */ { WE_DBGLOG_LOG_LEVEL , IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, @@ -8013,6 +8041,11 @@ static const struct iw_priv_args we_private_args[] = { IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_txpow5g" }, + { WE_GET_POWER_GATING, + 0, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + "get_pwrgating" }, + #endif /* handlers for main ioctl */ diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 1bd3eba122b0..2b13e9388161 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -4199,6 +4199,9 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma, case WMI_PDEV_PARAM_RX_CHAIN_MASK: wma->pdevconfig.rxchainmask = privcmd->param_value; break; + case WMI_PDEV_PARAM_POWER_GATING_SLEEP: + wma->pdevconfig.pwrgating = privcmd->param_value; + break; case WMI_PDEV_PARAM_TXPOWER_LIMIT2G: wma->pdevconfig.txpow2g = privcmd->param_value; if ((pMac->roam.configParam.bandCapability == @@ -4313,6 +4316,9 @@ int wma_cli_get_command(void *wmapvosContext, int vdev_id, case WMI_PDEV_PARAM_TXPOWER_LIMIT5G: ret = wma->pdevconfig.txpow5g; break; + case WMI_PDEV_PARAM_POWER_GATING_SLEEP: + ret = wma->pdevconfig.pwrgating; + break; default: WMA_LOGE("Invalid cli_get pdev command/Not" " yet implemented 0x%x", param_id); diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index 6a8b5f13b31b..25626894463e 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -222,6 +222,7 @@ typedef struct { u_int32_t rxchainmask; u_int32_t txpow2g; u_int32_t txpow5g; + u_int32_t pwrgating; } pdev_cli_config_t; typedef struct { |
