summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-02-19 19:58:14 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-02-19 19:58:14 -0800
commitaa57f24c536606920cf9d1d17facd60f9f0ef4f3 (patch)
treeb15a93e91e9e6c9a162243d7bd728c1d3c10a895
parentaa6be9e69113dea2f711080cff15c1aa1c959944 (diff)
parente810dd0b1e9fcaa0717ace3fc847d5f655b9db25 (diff)
Merge "Merge remote-tracking branch 'origin/caf/caf-wlan/master'"
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/MAC/src/pe/lim/limProcessActionFrame.c16
-rw-r--r--CORE/MAC/src/pe/lim/limSendSmeRspMessages.c2
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.c7
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.h3
-rw-r--r--CORE/SERVICES/WMA/wma.c56
-rw-r--r--CORE/WDA/inc/legacy/halMsgApi.h2
7 files changed, 71 insertions, 19 deletions
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index e3eb58a3cd44..63fc6b068fc6 100644
--- a/CORE/MAC/inc/qwlan_version.h
+++ b/CORE/MAC/inc/qwlan_version.h
@@ -42,9 +42,9 @@ BRIEF DESCRIPTION:
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 0
#define QWLAN_VERSION_EXTRA ""
-#define QWLAN_VERSION_BUILD 38
+#define QWLAN_VERSION_BUILD 39
-#define QWLAN_VERSIONSTR "1.0.0.38"
+#define QWLAN_VERSIONSTR "1.0.0.39"
#ifdef QCA_WIFI_2_0
diff --git a/CORE/MAC/src/pe/lim/limProcessActionFrame.c b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
index e2cdeb6f5168..090052542449 100644
--- a/CORE/MAC/src/pe/lim/limProcessActionFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
@@ -1823,7 +1823,6 @@ static void
__limProcessSMPowerSaveUpdate(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo ,tpPESession psessionEntry)
{
-#if 0
tpSirMacMgmtHdr pHdr;
tDot11fSMPowerSave frmSMPower;
tSirMacHTMIMOPowerSaveState state;
@@ -1832,9 +1831,9 @@ __limProcessSMPowerSaveUpdate(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo ,tpPES
tANI_U32 frameLen, nStatus;
tANI_U8 *pBody;
- pHdr = SIR_MAC_BD_TO_MPDUHEADER( pBd );
- pBody = SIR_MAC_BD_TO_MPDUDATA( pBd );
- frameLen = SIR_MAC_BD_TO_PAYLOAD_LEN( pBd );
+ pHdr = WDA_GET_RX_MAC_HEADER( pRxPacketInfo );
+ pBody = WDA_GET_RX_MPDU_DATA( pRxPacketInfo );
+ frameLen = WDA_GET_RX_PAYLOAD_LEN( pRxPacketInfo );
pSta = dphLookupHashEntry(pMac, pHdr->sa, &aid, &psessionEntry->dph.dphHashTable );
if( pSta == NULL ) {
@@ -1880,10 +1879,8 @@ __limProcessSMPowerSaveUpdate(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo ,tpPES
/** Update in the HAL Station Table for the Update of the Protection Mode */
pSta->htMIMOPSState = state;
- limPostSMStateUpdate(pMac,pSta->staIndex, pSta->htMIMOPSState);
-
-#endif
-
+ limPostSMStateUpdate(pMac,pSta->staIndex, pSta->htMIMOPSState,
+ pSta->staAddr, psessionEntry->smeSessionId);
}
#if defined WLAN_FEATURE_VOWIFI
@@ -2266,7 +2263,8 @@ limProcessActionFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession ps
/** Type of HT Action to be performed*/
switch(pActionHdr->actionID) {
case SIR_MAC_SM_POWER_SAVE:
- __limProcessSMPowerSaveUpdate(pMac, (tANI_U8 *) pRxPacketInfo,psessionEntry);
+ if ((psessionEntry->limSystemRole == eLIM_AP_ROLE) )
+ __limProcessSMPowerSaveUpdate(pMac, (tANI_U8 *) pRxPacketInfo,psessionEntry);
break;
default:
PELOGE(limLog(pMac, LOGE, FL("Action ID %d not handled in HT Action category"), pActionHdr->actionID);)
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index acbf1b4419c3..72c27b36946f 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -2781,9 +2781,9 @@ void limHandleDeleteBssRsp(tpAniSirGlobal pMac,tpSirMsgQ MsgQ)
tpDeleteBssParams pDelBss = (tpDeleteBssParams)(MsgQ->bodyptr);
if((psessionEntry = peFindSessionBySessionId(pMac,pDelBss->sessionId))==NULL)
{
- vos_mem_free(pDelBss);
limLog(pMac, LOGE,FL("Session Does not exist for given sessionID %d"),
pDelBss->sessionId);
+ vos_mem_free(pDelBss);
return;
}
if (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE)
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index df1872dc1dc4..365ac2beb408 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -6383,7 +6383,8 @@ returnFailure:
*/
tSirRetStatus
limPostSMStateUpdate(tpAniSirGlobal pMac,
- tANI_U16 staIdx, tSirMacHTMIMOPowerSaveState state)
+ tANI_U16 staIdx, tSirMacHTMIMOPowerSaveState state,
+ tANI_U8 *pPeerStaMac, tANI_U8 sessionId)
{
tSirRetStatus retCode = eSIR_SUCCESS;
tSirMsgQ msgQ;
@@ -6403,6 +6404,10 @@ limPostSMStateUpdate(tpAniSirGlobal pMac,
pMIMO_PSParams->htMIMOPSState = state;
pMIMO_PSParams->staIdx = staIdx;
pMIMO_PSParams->fsendRsp = true;
+ pMIMO_PSParams->sessionId = sessionId;
+ vos_mem_copy(pMIMO_PSParams->peerMac, pPeerStaMac,
+ sizeof( tSirMacAddr ));
+
msgQ.bodyptr = pMIMO_PSParams;
msgQ.bodyval = 0;
diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h
index 329f9c6ae48b..f5b07f1463da 100644
--- a/CORE/MAC/src/pe/lim/limUtils.h
+++ b/CORE/MAC/src/pe/lim/limUtils.h
@@ -330,7 +330,8 @@ tSirRetStatus limPostMsgDelBAInd( tpAniSirGlobal pMac,
tSirRetStatus limPostSMStateUpdate(tpAniSirGlobal pMac,
tANI_U16 StaIdx,
- tSirMacHTMIMOPowerSaveState MIMOPSState);
+ tSirMacHTMIMOPowerSaveState MIMOPSState,
+ tANI_U8 *pPeerStaMac, tANI_U8 sessionId);
void limDeleteStaContext(tpAniSirGlobal pMac, tpSirMsgQ limMsg);
void limProcessAddBaInd(tpAniSirGlobal pMac, tpSirMsgQ limMsg);
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 53c699254f94..952a100da081 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -2160,6 +2160,23 @@ static int wma_unified_bcntx_status_event_handler(void *handle, u_int8_t *cmd_pa
return -EINVAL;
}
+ resp_event = param_buf->fixed_param;
+
+ /* Check for valid handle to ensure session is not deleted in any race */
+ if (!wma->interfaces[resp_event->vdev_id].handle) {
+ WMA_LOGE("%s: The session does not exist", __func__);
+ return -EINVAL;
+ }
+
+ /* Beacon Tx Indication supports only AP mode. Ignore in other modes */
+ if ((wma->interfaces[resp_event->vdev_id].type != WMI_VDEV_TYPE_AP) ||
+ (wma->interfaces[resp_event->vdev_id].sub_type != 0)) {
+ WMA_LOGI("%s: Beacon Tx Indication does not support type %d and sub_type %d",
+ __func__, wma->interfaces[resp_event->vdev_id].type,
+ wma->interfaces[resp_event->vdev_id].sub_type);
+ return 0;
+ }
+
beacon_tx_complete_ind = (tSirFirstBeaconTxCompleteInd *)
adf_os_mem_alloc(NULL, sizeof(tSirFirstBeaconTxCompleteInd));
if (!beacon_tx_complete_ind) {
@@ -2167,8 +2184,6 @@ static int wma_unified_bcntx_status_event_handler(void *handle, u_int8_t *cmd_pa
return -ENOMEM;
}
- resp_event = param_buf->fixed_param;
-
beacon_tx_complete_ind->messageType = WDA_DFS_BEACON_TX_SUCCESS_IND;
beacon_tx_complete_ind->length = sizeof(tSirFirstBeaconTxCompleteInd);
beacon_tx_complete_ind->bssIdx = resp_event->vdev_id;
@@ -4489,9 +4504,9 @@ v_VOID_t wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
* T(HomeAway) = N * T(dwell) + (N+1) * T(cs)
* where N is number of channels scanned in single burst
*/
+ scan_params->dwell_time_active = roam_req->NeighborScanChannelMaxTime;
if (roam_req->HomeAwayTime < 2*WMA_ROAM_SCAN_CHANNEL_SWITCH_TIME) {
// clearly we can't follow home away time
- scan_params->dwell_time_active = roam_req->NeighborScanChannelMaxTime;
scan_params->burst_duration = scan_params->dwell_time_active;
} else {
channels_per_burst =
@@ -4505,8 +4520,6 @@ v_VOID_t wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
roam_req->HomeAwayTime - 2*WMA_ROAM_SCAN_CHANNEL_SWITCH_TIME;
scan_params->burst_duration = scan_params->dwell_time_active;
} else {
- scan_params->dwell_time_active =
- roam_req->NeighborScanChannelMaxTime;
scan_params->burst_duration =
channels_per_burst * scan_params->dwell_time_active;
}
@@ -14461,6 +14474,35 @@ static void wma_process_set_p2pgo_noa_Req(tp_wma_handle wma,
WMA_LOGD("%s: Exit", __func__);
}
+/* function : wma_process_set_mimops_req
+ * Descriptin : Set the received MiMo PS state to firmware.
+ * Args :
+ wma_handle : Pointer to WMA handle
+ * tSetMIMOPS : Pointer to MiMo PS struct
+ * Returns :
+ */
+static void wma_process_set_mimops_req(tp_wma_handle wma_handle,
+ tSetMIMOPS *mimops)
+{
+ /* Translate to what firmware understands */
+ if ( mimops->htMIMOPSState == eSIR_HT_MIMO_PS_DYNAMIC)
+ mimops->htMIMOPSState = WMI_PEER_MIMO_PS_DYNAMIC;
+ else if ( mimops->htMIMOPSState == eSIR_HT_MIMO_PS_STATIC)
+ mimops->htMIMOPSState = WMI_PEER_MIMO_PS_STATIC;
+ else if ( mimops->htMIMOPSState == eSIR_HT_MIMO_PS_NO_LIMIT)
+ mimops->htMIMOPSState = WMI_PEER_MIMO_PS_NONE;
+
+ WMA_LOGD("%s: htMIMOPSState = %d, sessionId = %d \
+ peerMac <%02x:%02x:%02x:%02x:%02x:%02x>", __func__,
+ mimops->htMIMOPSState, mimops->sessionId, mimops->peerMac[0],
+ mimops->peerMac[1], mimops->peerMac[2], mimops->peerMac[3],
+ mimops->peerMac[4], mimops->peerMac[5]);
+
+ wma_set_peer_param(wma_handle, mimops->peerMac,
+ WMI_PEER_MIMO_PS_STATE, mimops->htMIMOPSState,
+ mimops->sessionId);
+}
+
/*
* function : wma_mc_process_msg
* Descriptin :
@@ -14841,6 +14883,10 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
(tP2pPsParams *)msg->bodyptr);
vos_mem_free(msg->bodyptr);
break;
+ case WDA_SET_MIMOPS_REQ:
+ wma_process_set_mimops_req(wma_handle, (tSetMIMOPS *) msg->bodyptr);
+ vos_mem_free(msg->bodyptr);
+ break;
default:
WMA_LOGD("unknow msg type %x", msg->type);
diff --git a/CORE/WDA/inc/legacy/halMsgApi.h b/CORE/WDA/inc/legacy/halMsgApi.h
index 28b85b21deab..7fdd649db016 100644
--- a/CORE/WDA/inc/legacy/halMsgApi.h
+++ b/CORE/WDA/inc/legacy/halMsgApi.h
@@ -1195,6 +1195,8 @@ typedef struct sSet_MIMOPS
eHalStatus status;
tANI_U8 fsendRsp;
+ tSirMacAddr peerMac;
+ tANI_U8 sessionId;
} tSetMIMOPS, * tpSetMIMOPS;