summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiran Kumar Lokere <klokere@qca.qualcomm.com>2013-11-06 20:41:18 -0800
committerMadan Mohan Koyyalamudi <mkoyyala@qca.qualcomm.com>2013-11-27 20:01:44 -0800
commit0fe38eae2c7760cb30bd2555be6f50267a4ecf51 (patch)
treec918c22bba151e13d86a5c2da5805508b1164cb8
parent944e5b11a414cf5e260c94e250a9268981881140 (diff)
Fix the zero Tx power value issue.
Pass the MAX and REG power values to the FW, so that FW uses the appropriate power value for Tx packets. Change-Id: I7f1ebd0ab70bc8f32b67a6305d3e1b2190055cec CRs-Fixed: 574133
-rw-r--r--CORE/MAC/src/pe/lim/limAssocUtils.c4
-rw-r--r--CORE/SERVICES/WMA/wma.c36
-rw-r--r--CORE/WDA/inc/legacy/halMsgApi.h1
3 files changed, 34 insertions, 7 deletions
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c
index 13293367992b..67fe8e5ce9e4 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.c
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.c
@@ -2277,6 +2277,8 @@ limAddSta(
/* Update SME session ID */
pAddStaParams->smesessionId = psessionEntry->smeSessionId;
+ pAddStaParams->maxTxPower = psessionEntry->maxTxPower;
+
if (psessionEntry->parsedAssocReq != NULL)
{
// Get a copy of the already parsed Assoc Request
@@ -2602,6 +2604,8 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio
/* Update SME session ID */
pAddStaParams->smesessionId = psessionEntry->smeSessionId;
+
+ pAddStaParams->maxTxPower = psessionEntry->maxTxPower;
// This will indicate HAL to "allocate" a new STA index
pAddStaParams->staIdx = staIdx;
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 8c4da4489e34..8eb60cad34fe 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -3282,7 +3282,7 @@ static VOS_STATUS wma_vdev_start(tp_wma_handle wma,
cmd->beacon_interval = req->beacon_intval;
cmd->dtim_period = req->dtim_period;
/* FIXME: Find out min, max and regulatory power levels */
- WMI_SET_CHANNEL_MIN_POWER(chan, req->max_txpow);
+ WMI_SET_CHANNEL_REG_POWER(chan, req->max_txpow);
/* TODO: Handle regulatory class, max antenna */
@@ -4367,7 +4367,8 @@ wma_update_cfg_params(tp_wma_handle wma, tSirMsgQ *cfgParam)
static void
wma_vdev_set_bss_params(tp_wma_handle wma, int vdev_id,
tSirMacBeaconInterval beaconInterval, tANI_U8 dtimPeriod,
- tANI_U8 shortSlotTimeSupported, tANI_U8 llbCoexist)
+ tANI_U8 shortSlotTimeSupported, tANI_U8 llbCoexist,
+ tPowerdBm maxTxPower)
{
int ret;
uint32_t slot_time;
@@ -4386,6 +4387,17 @@ wma_vdev_set_bss_params(tp_wma_handle wma, int vdev_id,
if (ret)
WMA_LOGE("failed to set WMI_VDEV_PARAM_DTIM_PERIOD\n");
+ if (!maxTxPower)
+ {
+ WMA_LOGE("Setting Tx power limit to 0\n");
+ }
+
+ ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id,
+ WMI_VDEV_PARAM_TX_PWRLIMIT,
+ maxTxPower);
+ if (ret)
+ WMA_LOGE("failed to set WMI_VDEV_PARAM_TX_PWRLIMIT\n");
+
/* Slot time */
if (shortSlotTimeSupported)
slot_time = WMI_VDEV_SLOT_TIME_SHORT;
@@ -4446,7 +4458,7 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss)
req.chan = add_bss->currentOperChannel;
req.chan_offset = add_bss->currentExtChannel;
req.vht_capable = add_bss->vhtCapable;
-#if defined WLAN_FEATURE_VOWIF
+#if defined WLAN_FEATURE_VOWIFI
req.max_txpow = add_bss->maxTxPower;
#else
req.max_txpow = 0;
@@ -4493,6 +4505,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
ol_txrx_peer_handle peer;
VOS_STATUS status;
struct wma_txrx_node *iface;
+ tPowerdBm maxTxPower = 0;
pdev = vos_get_context(VOS_MODULE_ID_TXRX, wma->vos_context);
vdev_id = add_bss->staContext.smesessionId;
@@ -4520,10 +4533,12 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
req.vdev_id = vdev_id;
req.chan = add_bss->currentOperChannel;
req.chan_offset = add_bss->currentExtChannel;
-#if defined WLAN_FEATURE_VOWIF
+#if defined WLAN_FEATURE_VOWIFI
req.max_txpow = add_bss->maxTxPower;
+ maxTxPower = add_bss->maxTxPower;
#else
req.max_txpow = 0;
+ maxTxPower = 0;
#endif
req.beacon_intval = add_bss->beaconInterval;
req.dtim_period = add_bss->dtimPeriod;
@@ -4579,7 +4594,8 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
add_bss->staContext.smesessionId);
wma_vdev_set_bss_params(wma, add_bss->staContext.smesessionId,
add_bss->beaconInterval, add_bss->dtimPeriod,
- add_bss->shortSlotTimeSupported, add_bss->llbCoexist);
+ add_bss->shortSlotTimeSupported, add_bss->llbCoexist,
+ maxTxPower);
}
/*
* Store the bssid in interface table, bssid will
@@ -4885,6 +4901,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
VOS_STATUS status = VOS_STATUS_SUCCESS;
ol_txrx_peer_handle peer;
struct wma_txrx_node *iface;
+ tPowerdBm maxTxPower;
pdev = vos_get_context(VOS_MODULE_ID_TXRX, wma->vos_context);
iface = &wma->interfaces[params->smesessionId];
@@ -4925,9 +4942,14 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
wmi_unified_send_peer_assoc(wma, params->nwType,
params);
}
+#if defined WLAN_FEATURE_VOWIFI
+ maxTxPower = params->maxTxPower;
+#else
+ maxTxPower = 0;
+#endif
wma_vdev_set_bss_params(wma, params->smesessionId, iface->beaconInterval,
- iface->dtimPeriod, iface->shortSlotTimeSupported, iface->llbCoexist);
-
+ iface->dtimPeriod, iface->shortSlotTimeSupported,
+ iface->llbCoexist, maxTxPower);
wma_roam_scan_offload_init_connect(wma, params->smesessionId);
params->csaOffloadEnable = 0;
diff --git a/CORE/WDA/inc/legacy/halMsgApi.h b/CORE/WDA/inc/legacy/halMsgApi.h
index c8708a4a62bb..25b9bfcefecc 100644
--- a/CORE/WDA/inc/legacy/halMsgApi.h
+++ b/CORE/WDA/inc/legacy/halMsgApi.h
@@ -296,6 +296,7 @@ typedef struct
tANI_U16 ht_caps;
tANI_U32 vht_caps;
tSirNwType nwType;
+ tPowerdBm maxTxPower;
} tAddStaParams, *tpAddStaParams;