summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2010-03-10 16:24:37 -0800
committerDmitry Shmidt <dimitrysh@google.com>2010-03-10 16:24:37 -0800
commit005bbf20350954d05c8a111d3f487d6fddb049bb (patch)
treee98b2977074ccb66104d4af647b20fa593bbee98
parent79e900421c74530eaf337d72d3b3f7fce7725617 (diff)
downloadwlan-005bbf20350954d05c8a111d3f487d6fddb049bb.tar.gz
wl1271: Sync with Moto drop
Change-Id: If1cb49c1b8ac4cc1fc63eba70928484d31065b08 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r--m4_100310.patch654
-rw-r--r--wl1271/TWD/Ctrl/CmdBldCfgIE.c3
-rw-r--r--wl1271/TWD/Ctrl/CmdBldCmd.c2
-rw-r--r--wl1271/TWD/FirmwareApi/public_radio.h8
-rw-r--r--wl1271/config/tiwlan.ini2
-rw-r--r--wl1271/platforms/os/common/build/linux/common.inc10
-rw-r--r--wl1271/platforms/os/common/src/osRgstry.c6
-rw-r--r--wl1271/platforms/os/linux/build/common.inc10
-rw-r--r--wl1271/platforms/os/linux/src/CmdInterpretWext.c55
-rw-r--r--wl1271/platforms/os/linux/src/RxBuf.c2
-rw-r--r--wl1271/platforms/os/linux/src/WlanDrvIf.c66
-rw-r--r--wl1271/stad/src/Connection_Managment/admCtrlWpa.c5
-rw-r--r--wl1271/stad/src/Connection_Managment/admCtrlWpa2.c11
-rw-r--r--wl1271/stad/src/Connection_Managment/conn.c4
-rw-r--r--wl1271/stad/src/Sta_Management/assocSM.c26
-rw-r--r--wl1271/stad/src/Sta_Management/currBss.c23
-rw-r--r--wl1271/stad/src/Sta_Management/mlmeParser.c5
-rw-r--r--wl1271/stad/src/Sta_Management/qosMngr.c30
-rw-r--r--wl1271/stad/src/Sta_Management/scanResultTable.c23
-rw-r--r--wl1271/stad/src/Sta_Management/siteHash.c3
-rw-r--r--wl1271/stad/src/Sta_Management/siteMgr.c60
-rw-r--r--wl1271/utils/osDot11.h4
-rw-r--r--wl1271/utils/queue.c108
-rw-r--r--wl1271/utils/rate.c5
-rw-r--r--wl1271/utils/timer.c4
25 files changed, 1007 insertions, 122 deletions
diff --git a/m4_100310.patch b/m4_100310.patch
new file mode 100644
index 00000000..bfe4b954
--- /dev/null
+++ b/m4_100310.patch
@@ -0,0 +1,654 @@
+diff -Nar wl1271/TWD/Ctrl/CmdBldCfgIE.c wl1271.new/wilink_6_1/TWD/Ctrl/CmdBldCfgIE.c
+775a776
+> {
+776a778,779
+> }
+>
+diff -Nar wl1271/TWD/Ctrl/CmdBldCmd.c wl1271.new/wilink_6_1/TWD/Ctrl/CmdBldCmd.c
+549a550
+> {
+550a552
+> }
+diff -Nar wl1271/TWD/FirmwareApi/public_radio.h wl1271.new/wilink_6_1/TWD/FirmwareApi/public_radio.h
+1069a1070,1071
+> #define NVS_TX_LENGTH_INDEX ((NVS_TX_TYPE_INDEX) + 1) /* 1 (26) */
+> #define NVS_TX_PARAM_INDEX ((NVS_TX_LENGTH_INDEX) + 2) /* 3 (28) */
+1139a1142,1144
+> #define NVS_RX_TYPE_INDEX ((NVS_TX_PARAM_INDEX) + (NVS_TX_PARAM_LENGTH)) /* 316 (341) */
+> #define NVS_RX_LENGTH_INDEX ((NVS_RX_TYPE_INDEX) + 1) /* 317 (342) */
+> #define NVS_RX_PARAM_INDEX ((NVS_RX_LENGTH_INDEX) + 2) /* 319 (344) */
+1142a1148,1150
+> #define NVS_VERSION_TYPE_INDEX ((NVS_RX_PARAM_INDEX) + (NVS_RX_PARAM_LENGTH)) /* 338 (363) */
+> #define NVS_VERSION_LENGTH_INDEX ((NVS_VERSION_TYPE_INDEX) + 1) /* 339 (364) */
+> #define NVS_VERSION_PARAMETER_INDEX ((NVS_VERSION_LENGTH_INDEX) + 2) /* 340 (365) */
+diff -Nar wl1271/config/tiwlan.ini wl1271.new/wilink_6_1/config/tiwlan.ini
+184c184
+< ConsecutivePsPollDeliveryFailureThreshold = 20 # Number of failed PsPoll's to start ACTIVE time out
+---
+> ConsecutivePsPollDeliveryFailureThreshold = 4 # Number of failed PsPoll's to start ACTIVE time out
+diff -Nar wl1271/platforms/os/common/build/linux/common.inc wl1271.new/wilink_6_1/platforms/os/common/build/linux/common.inc
+35a36,41
+>
+> #
+> # Compile with GEM support or not
+> #
+> GEM ?= n
+>
+86a93,96
+> ifeq ($(GEM),y)
+> DK_DEFINES += -D GEM_SUPPORTED
+> endif
+>
+diff -Nar wl1271/platforms/os/common/src/osRgstry.c wl1271.new/wilink_6_1/platforms/os/common/src/osRgstry.c
+164,165c164,167
+< NDIS_STRING STRdot11BasicRateMask_N = NDIS_STRING_CONST( "STRdot11BasicRateMask_N");
+< NDIS_STRING STRdot11SupportedRateMask_N = NDIS_STRING_CONST( "STRdot11SupportedRateMask_N");
+---
+> /*** MODS_BEGIN_FOR_11N_RATE_REPORTING ***/
+> NDIS_STRING STRdot11BasicRateMask_N = NDIS_STRING_CONST( "dot11BasicRateMask_N");
+> NDIS_STRING STRdot11SupportedRateMask_N = NDIS_STRING_CONST( "dot11SupportedRateMask_N");
+> /*** MODS_END_FOR_11N_RATE_REPORTING ***/
+diff -Nar wl1271/platforms/os/linux/build/common.inc wl1271.new/wilink_6_1/platforms/os/linux/build/common.inc
+34a35,40
+>
+> #
+> # Compile with GEM support or not
+> #
+> GEM ?= n
+>
+85a92,95
+> ifeq ($(GEM),y)
+> DK_DEFINES += -D GEM_SUPPORTED
+> endif
+>
+diff -Nar wl1271/platforms/os/linux/src/CmdInterpretWext.c wl1271.new/wilink_6_1/platforms/os/linux/src/CmdInterpretWext.c
+302a303,306
+> /* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+> ScanBssType_e smeDesiredBssType = BSS_ANY;
+> paramInfo_t *pParam2;
+> /* MODS_END_FOR_11N_RATE_REPORTING */
+335a340,351
+> /* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+> pParam2 = (paramInfo_t *)os_memoryAlloc(pCmdInterpret->hOs, sizeof(paramInfo_t));
+> if (pParam2)
+> {
+> pParam2->paramType = SME_DESIRED_BSS_TYPE_PARAM;
+> pParam2->paramLength = sizeof(ScanBssType_e);
+> res = cmdDispatch_GetParam(pCmdInterpret->hCmdDispatch, pParam2);
+> CHECK_PENDING_RESULT(res,pParam2)
+> smeDesiredBssType = pParam2->content.smeDesiredBSSType;
+> os_memoryFree(pCmdInterpret->hOs, pParam2, sizeof(paramInfo_t));
+> }
+> /* MODS_END_FOR_11N_RATE_REPORTING */
+341c357,378
+< range->bitrate[i] = ((pParam->content.siteMgrDesiredSupportedRateSet.ratesString[i] & 0x7F) * 500000);
+---
+> /* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+> switch(pParam->content.siteMgrDesiredSupportedRateSet.ratesString[i] & 0x7F)
+> {
+> case NET_RATE_MCS0:
+> case NET_RATE_MCS1:
+> case NET_RATE_MCS2:
+> case NET_RATE_MCS3:
+> case NET_RATE_MCS4:
+> case NET_RATE_MCS5:
+> case NET_RATE_MCS6:
+> case NET_RATE_MCS7:
+> if (BSS_INDEPENDENT == smeDesiredBssType)
+> continue;
+> default:
+> range->bitrate[i] = ((pParam->content.siteMgrDesiredSupportedRateSet.ratesString[i] & 0x7F) * 500000);
+> if (63500000 == range->bitrate[i])
+> {
+> range->bitrate[i] = 65000000; /* convert special code 0x7F to 65Mbps */
+> }
+> break;
+> }
+> /* MODS_END_FOR_11N_RATE_REPORTING */
+712,713c749,751
+< for (j=0; j<16; j++)
+< {
+---
+> /* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+> for (j=0; j<32; j++)
+> {
+716c754,763
+< iwe.u.bitrate.value = ((my_current->SupportedRates[j] & 0x7f) * 500000);
+---
+> if ((my_current->SupportedRates[j] & 0x7f) == NET_RATE_MCS7)
+> {
+> iwe.u.bitrate.value = 65000000; /* convert the special code 0x7f to 65Mbps */
+> }
+> else
+> {
+> iwe.u.bitrate.value = ((my_current->SupportedRates[j] & 0x7f) * 500000);
+> }
+> /* printk("Supported Rates [%d] = %d\n", j, iwe.u.bitrate.value); */
+> /* MODS_END_FOR_11N_RATE_REPORTING */
+diff -Nar wl1271/platforms/os/linux/src/RxBuf.c wl1271.new/wilink_6_1/platforms/os/linux/src/RxBuf.c
+56a57
+> {
+57a59
+> }
+diff -Nar wl1271/platforms/os/linux/src/WlanDrvIf.c wl1271.new/wilink_6_1/platforms/os/linux/src/WlanDrvIf.c
+639c639,640
+< if (!drv->tCommon.hDrvMain) {
+---
+> if (!drv->tCommon.hDrvMain)
+> {
+774c775,776
+< if (dev == NULL) {
+---
+> if (dev == NULL)
+> {
+807c809,810
+< if (res != 0) {
+---
+> if (res != 0)
+> {
+862c865,866
+< if (!drv) {
+---
+> if (!drv)
+> {
+1017c1021,1022
+< if (drv && drv->wl_sock) {
+---
+> if (drv && drv->wl_sock)
+> {
+1024c1029,1030
+< if (drv->irq) {
+---
+> if (drv->irq)
+> {
+1038,1061c1044,1067
+< if (drv->tCommon.tFwImage.pImage) {
+< os_memoryFree (drv, drv->tCommon.tFwImage.pImage, drv->tCommon.tFwImage.uSize);
+< #ifdef TI_MEM_ALLOC_TRACE
+< os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
+< __FUNCTION__, __LINE__, drv->tCommon.tFwImage.uSize,
+< -drv->tCommon.tFwImage.uSize);
+< #endif
+< }
+< if (drv->tCommon.tNvsImage.pImage) {
+< kfree (drv->tCommon.tNvsImage.pImage);
+< #ifdef TI_MEM_ALLOC_TRACE
+< os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
+< __FUNCTION__, __LINE__, drv->tCommon.tNvsImage.uSize,
+< -drv->tCommon.tNvsImage.uSize);
+< #endif
+< }
+< if (drv->tCommon.tIniFile.pImage) {
+< kfree (drv->tCommon.tIniFile.pImage);
+< #ifdef TI_MEM_ALLOC_TRACE
+< os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
+< __FUNCTION__, __LINE__, drv->tCommon.tIniFile.uSize,
+< -drv->tCommon.tIniFile.uSize);
+< #endif
+< }
+---
+> if (drv->tCommon.tFwImage.pImage)
+> {
+> os_memoryFree (drv, drv->tCommon.tFwImage.pImage, drv->tCommon.tFwImage.uSize);
+> #ifdef TI_MEM_ALLOC_TRACE
+> os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
+> __FUNCTION__, __LINE__, drv->tCommon.tFwImage.uSize, -drv->tCommon.tFwImage.uSize);
+> #endif
+> }
+> if (drv->tCommon.tNvsImage.pImage)
+> {
+> kfree (drv->tCommon.tNvsImage.pImage);
+> #ifdef TI_MEM_ALLOC_TRACE
+> os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
+> __FUNCTION__, __LINE__, drv->tCommon.tNvsImage.uSize, -drv->tCommon.tNvsImage.uSize);
+> #endif
+> }
+> if (drv->tCommon.tIniFile.pImage)
+> {
+> kfree (drv->tCommon.tIniFile.pImage);
+> #ifdef TI_MEM_ALLOC_TRACE
+> os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
+> __FUNCTION__, __LINE__, drv->tCommon.tIniFile.uSize, -drv->tCommon.tIniFile.uSize);
+> #endif
+> }
+diff -Nar wl1271/stad/src/Connection_Managment/admCtrlWpa.c wl1271.new/wilink_6_1/stad/src/Connection_Managment/admCtrlWpa.c
+1074c1074,1075
+<
+---
+> /*** OMAPS00214746_CHANGE_START ***/
+> #if 0
+1080c1081
+<
+---
+> #endif
+diff -Nar wl1271/stad/src/Connection_Managment/admCtrlWpa2.c wl1271.new/wilink_6_1/stad/src/Connection_Managment/admCtrlWpa2.c
+822a823,824
+> /*** OMAPS00214746_CHANGE_START ***/
+> #if 0
+823a826,829
+> #else
+> ECipherSuite uSuite, bSuite;
+> #endif
+> /*** OMAPS00214746_CHANGE_END ***/
+841a848,849
+> /*** OMAPS00214746_CHANGE_START ***/
+> #if 0 /*** Delete the following check ***/
+848a857,859
+> #endif /*** End of Deletion ***/
+> /*** OMAPS00214746_CHANGE_END ***/
+>
+diff -Nar wl1271/stad/src/Connection_Managment/conn.c wl1271.new/wilink_6_1/stad/src/Connection_Managment/conn.c
+104,105c104,105
+<
+< os_memoryZero(hOs, (void *)pConn, sizeof(conn_t));
+---
+> os_memoryZero (pConn->hOs, pConn, sizeof(conn_t));
+>
+diff -Nar wl1271/stad/src/Sta_Management/assocSM.c wl1271.new/wilink_6_1/stad/src/Sta_Management/assocSM.c
+1364c1364,1370
+<
+---
+>
+> /*** OMAPS00214746_CHANGE_START ***/
+> ECipherSuite eCipherSuite = TWD_CIPHER_NONE; /* To be used for checking whether
+> AP supports HT rates and TKIP
+> */
+> /*** OMAPS00214746_CHANGE_END ***/
+>
+1528a1535,1545
+> /*** OMAPS00214746_CHANGE_START ***/
+> /* Privacy - Used later on HT */
+> param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
+> status = rsn_getParam(pCtx->hRsn, &param);
+>
+> if(status == TI_OK)
+> {
+> eCipherSuite = param.content.rsnEncryptionStatus;
+> }
+> /*** OMAPS00214746_CHANGE_END ***/
+>
+1532a1550,1551
+> /*** OMAPS00214746_CHANGE_START ***/
+> #if 0
+1533a1553,1557
+> #else
+> /* Disallow TKIP with HT Rates: If this is the case - discard HT rates from Association Request */
+> if((TI_TRUE == param.content.bPrimarySiteHtSupport) && (eCipherSuite != TWD_CIPHER_TKIP))
+> #endif
+> /*** OMAPS00214746_CHANGE_END ***/
+diff -Nar wl1271/stad/src/Sta_Management/currBss.c wl1271.new/wilink_6_1/stad/src/Sta_Management/currBss.c
+83a84,85
+> #include "smePrivate.h"
+> #include "conn.h"
+660a663
+> {
+662c665
+<
+---
+> }
+781a785
+> {
+782a787
+> }
+1017a1023,1025
+> TSme *pSme = (TSme*)pCurrBSS->hSme;
+> conn_t *pConn = (conn_t *)pSme->hConn;
+>
+1028c1036
+< if( roamingEventType == ROAMING_TRIGGER_BSS_LOSS )
+---
+> if (roamingEventType == ROAMING_TRIGGER_BSS_LOSS)
+1033c1041,1048
+< sme_Restart (pCurrBSS->hSme);
+---
+> if (pConn->currentConnType == CONNECTION_SELF)
+> {
+> return;
+> }
+> else
+> {
+> sme_Restart (pCurrBSS->hSme);
+> }
+1110a1126
+> {
+1111a1128
+> }
+diff -Nar wl1271/stad/src/Sta_Management/mlmeParser.c wl1271.new/wilink_6_1/stad/src/Sta_Management/mlmeParser.c
+135c135,136
+< if (!pParam) {
+---
+> if (!pParam)
+> {
+820c821
+< return TI_OK;
+---
+> return status;
+diff -Nar wl1271/stad/src/Sta_Management/qosMngr.c wl1271.new/wilink_6_1/stad/src/Sta_Management/qosMngr.c
+120c120,122
+< return NULL;
+---
+> {
+> return NULL;
+> }
+549,550c551,552
+< TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite:failed to init NON_QOS Queue Traffic parameters!!!\n\n");
+< return status;
+---
+> TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite:failed to init NON_QOS Queue Traffic parameters!!!\n\n");
+> return status;
+1706c1708
+< TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite: Signal TSPEC was not re-negotiated while voice was \n");
+---
+> TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite: Signal TSPEC was not re-negotiated while voice was \n");
+1754c1756,1757
+< return TI_NOK;
+---
+> status = qosMngr_setSite(hQosMngr, assocRsp);
+> return status;
+1789c1792
+< TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "qosMngr_setSite:failed to init NON_QOS parameters!!!\n\n");
+---
+> TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "qosMngr_setSite:failed to init NON_QOS parameters!!!\n\n");
+1797c1800
+< TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "Warning: qosMngr_setSite NO active protocls To set \n");
+---
+> TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "Warning: qosMngr_setSite NO active protocls To set \n");
+2130a2134
+> #if 0
+2136a2141
+> #endif
+2778c2783
+< TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames: Ignore !!!");
+---
+> TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames: Ignore !!!");
+2795c2800
+< tsInfo.tsInfoArr[1] = *pData;
+---
+> tsInfo.tsInfoArr[1] = *pData;
+2804c2809
+< TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "QosMngr_receiveActionFrames: DELTS [ acID = %d ] \n", acID);
+---
+> TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "QosMngr_receiveActionFrames: DELTS [ acID = %d ] \n", acID);
+2829c2834
+< TRACE3(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames: DELTS [ acID = %d userPriority = %d currentUserPriority = %d] Current State in not ADMITED !! \n", acID, userPriority,pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority);
+---
+> TRACE3(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames: DELTS [ acID = %d userPriority = %d currentUserPriority = %d] Current State in not ADMITED !! \n", acID, userPriority,pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority);
+2872c2877
+< TRACE1(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "QosMngr_receiveActionFrames: Receive unknown action code = %d -> Ignore !! \n",action);
+---
+> TRACE1(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "QosMngr_receiveActionFrames: Receive unknown action code = %d -> Ignore !! \n",action);
+2971a2977
+>
+diff -Nar wl1271/stad/src/Sta_Management/scanResultTable.c wl1271.new/wilink_6_1/stad/src/Sta_Management/scanResultTable.c
+596a597,599
+> /*** MODS_BEGIN_FOR_11N_RATE_REPORTING ***/
+> TI_UINT32 uMcsSupportedRateMask = 0, uMcsbasicRateMask=0;
+> /*** MODS_END_FOR_11N_RATE_REPORTING ***/
+663a667,686
+>
+> /*** MODS_BEGIN_FOR_11N_RATE_REPORTING ***/
+> if (pFrame->parsedIEs->content.iePacket.pHtCapabilities != NULL)
+> {
+> /* MCS build rates bit map */
+> rate_McsNetStrToDrvBitmap (&uMcsSupportedRateMask,
+> (pFrame->parsedIEs->content.iePacket.pHtCapabilities->aHtCapabilitiesIe + DOT11_HT_CAPABILITIES_MCS_RATE_OFFSET));
+>
+> pSite->rateMask.supportedRateMask |= uMcsSupportedRateMask;
+> }
+>
+> if (pFrame->parsedIEs->content.iePacket.pHtInformation != NULL)
+> {
+> /* MCS build rates bit map */
+> rate_McsNetStrToDrvBitmap (&uMcsbasicRateMask,
+> (pFrame->parsedIEs->content.iePacket.pHtInformation->aHtInformationIe + DOT11_HT_INFORMATION_MCS_RATE_OFFSET));
+>
+> pSite->rateMask.basicRateMask |= uMcsbasicRateMask;
+> }
+> /*** MODS_END_FOR_11N_RATE_REPORTING ***/
+diff -Nar wl1271/stad/src/Sta_Management/siteHash.c wl1271.new/wilink_6_1/stad/src/Sta_Management/siteHash.c
+173c173,174
+< if ((pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE) && (tableIndex==1))
+---
+> if ((pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE) &&
+> (tableIndex==1))
+diff -Nar wl1271/stad/src/Sta_Management/siteMgr.c wl1271.new/wilink_6_1/stad/src/Sta_Management/siteMgr.c
+294a295
+> {
+295a297
+> }
+607a610,611
+> PowerMgr_t *pPowerMgr = (PowerMgr_t*)pSiteMgr->hPowerMgr;
+> static PowerMgr_PowerMode_e desiredPowerModeProfile;
+726a731,739
+>
+> /*
+> * Set the system to Active power save
+> */
+> desiredPowerModeProfile = pPowerMgr->desiredPowerModeProfile;
+> param.paramType = POWER_MGR_POWER_MODE;
+> param.content.powerMngPowerMode.PowerMode = POWER_MODE_ACTIVE;
+> param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_USER_PRIORITY;
+> powerMgr_setParam(pSiteMgr->hPowerMgr,&param);
+732a746,753
+>
+> /*
+> * Set the system to last power mode
+> */
+> param.paramType = POWER_MGR_POWER_MODE;
+> param.content.powerMngPowerMode.PowerMode = desiredPowerModeProfile;
+> param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_USER_PRIORITY;
+> powerMgr_setParam(pSiteMgr->hPowerMgr,&param);
+736,738c757,758
+< param.paramType = SME_WSC_PB_MODE_PARAM;
+< sme_SetParam (pSiteMgr->hSmeSm, &param);
+<
+---
+> param.paramType = SME_WSC_PB_MODE_PARAM;
+> sme_SetParam (pSiteMgr->hSmeSm, &param);
+2930c2950
+< TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_CONSOLE,"-- BSSID = %x-%x-%x-%x-%x-%x\n",
+---
+> TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_CONSOLE,"-- BSSID = %02x-%02x-%02x-%02x-%02x-%02x\n",
+2936c2956
+< WLAN_OS_REPORT(("-- BSSID = %x-%x-%x-%x-%x-%x\n",
+---
+> WLAN_OS_REPORT(("-- BSSID = %02x-%02x-%02x-%02x-%02x-%02x\n",
+3118a3139,3156
+> /* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+> if (rateMask & DRV_RATE_MASK_MCS_7_OFDM)
+> return DRV_RATE_MCS_7;
+> if (rateMask & DRV_RATE_MASK_MCS_6_OFDM)
+> return DRV_RATE_MCS_6;
+> if (rateMask & DRV_RATE_MASK_MCS_5_OFDM)
+> return DRV_RATE_MCS_5;
+> if (rateMask & DRV_RATE_MASK_MCS_4_OFDM)
+> return DRV_RATE_MCS_4;
+> if (rateMask & DRV_RATE_MASK_MCS_3_OFDM)
+> return DRV_RATE_MCS_3;
+> if (rateMask & DRV_RATE_MASK_MCS_2_OFDM)
+> return DRV_RATE_MCS_2;
+> if (rateMask & DRV_RATE_MASK_MCS_1_OFDM)
+> return DRV_RATE_MCS_1;
+> if (rateMask & DRV_RATE_MASK_MCS_0_OFDM)
+> return DRV_RATE_MCS_0;
+> /* MODS_END_FOR_11N_RATE_REPORTING */
+3686a3725,3726
+> /* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+> #if 0
+3688a3729,3738
+> #else
+> {
+> if (pSiteMgr->pDesiredParams->siteMgrDesiredBSSType == BSS_INFRASTRUCTURE)
+> b11nEnable = TI_TRUE;
+> else
+> b11nEnable = TI_FALSE;
+> }
+> #endif
+> /* MODS_END_FOR_11N_RATE_REPORTING */
+>
+diff -Nar wl1271/utils/osDot11.h wl1271.new/wilink_6_1/utils/osDot11.h
+204c204,206
+< typedef TI_UINT8 OS_802_11_RATES_EX[16];
+---
+> /* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+> typedef TI_UINT8 OS_802_11_RATES_EX[32];
+> /* MODS_END_FOR_11N_RATE_REPORTING */
+diff -Nar wl1271/utils/queue.c wl1271.new/wilink_6_1/utils/queue.c
+180,183c180,188
+< /* Alert if the queue is unloaded before it was cleared from items */
+< if (pQue->uCount)
+< {
+< TRACE0(pQue->hReport, REPORT_SEVERITY_ERROR, "que_Destroy() Queue Not Empty!!");
+---
+> if (pQue)
+> {
+> /* Alert if the queue is unloaded before it was cleared from items */
+> if (pQue->uCount)
+> {
+> TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING, "que_Destroy() Queue Not Empty!!");
+> }
+> /* free Queue object */
+> os_memoryFree (pQue->hOs, pQue, sizeof(TQueue));
+185,186d189
+< /* free Queue object */
+< os_memoryFree (pQue->hOs, pQue, sizeof(TQueue));
+233,235c236
+<
+< /* Check queue limit */
+< if(pQue->uCount < pQue->uLimit)
+---
+> if (pQue)
+237,253c238,239
+< /* Find NodeHeader in the given item */
+< pQueNodeHdr = (TQueNodeHdr *)((TI_UINT8*)hItem + pQue->uNodeHeaderOffset);
+<
+< /* Verify that pNext is NULL --> Sanity check that this item is not already linked to a queue */
+< if (pQueNodeHdr->pNext)
+< {
+< /* Not an error since we have a case where a timer may expire twice in a row (in TxDataQueue) */
+< TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING, "que_Enqueue(): Trying to enqueue an item that is already enqueued!!");
+< return TI_NOK;
+< }
+<
+< /* Enqueue item and increment items counter */
+< AddToHead (pQueNodeHdr, &pQue->tHead);
+< pQue->uCount++;
+<
+< #ifdef TI_DBG
+< if (pQue->uCount > pQue->uMaxCount)
+---
+> /* Check queue limit */
+> if(pQue->uCount < pQue->uLimit)
+255c241,264
+< pQue->uMaxCount = pQue->uCount;
+---
+> /* Find NodeHeader in the given item */
+> pQueNodeHdr = (TQueNodeHdr *)((TI_UINT8*)hItem + pQue->uNodeHeaderOffset);
+>
+> /* Verify that pNext is NULL --> Sanity check that this item is not already linked to a queue */
+> if (pQueNodeHdr->pNext)
+> {
+> /* Not an error since we have a case where a timer may expire twice in a row (in TxDataQueue) */
+> TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING, "que_Enqueue(): Trying to enqueue an item that is already enqueued!!");
+> return TI_NOK;
+> }
+>
+> /* Enqueue item and increment items counter */
+> AddToHead (pQueNodeHdr, &pQue->tHead);
+> pQue->uCount++;
+>
+> #ifdef TI_DBG
+> if (pQue->uCount > pQue->uMaxCount)
+> {
+> pQue->uMaxCount = pQue->uCount;
+> }
+> TRACE0(pQue->hReport, REPORT_SEVERITY_INFORMATION , "que_Enqueue(): Enqueued Successfully\n");
+> #endif
+>
+> return TI_OK;
+257,258d265
+< TRACE0(pQue->hReport, REPORT_SEVERITY_INFORMATION , "que_Enqueue(): Enqueued Successfully\n");
+< #endif
+260,265c267,269
+< return TI_OK;
+< }
+<
+< /*
+< * Queue is overflowed, return TI_NOK.
+< */
+---
+> /*
+> * Queue is overflowed, return TI_NOK.
+> */
+267,268c271,272
+< pQue->uOverflow++;
+< TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING , "que_Enqueue(): Queue Overflow\n");
+---
+> pQue->uOverflow++;
+> TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING , "que_Enqueue(): Queue Overflow\n");
+270c274
+<
+---
+> }
+290,291c294,295
+<
+< if (pQue->uCount)
+---
+>
+> if (pQue)
+293c297,302
+< /* Queue is not empty, take packet from the queue tail */
+---
+> if (pQue->uCount)
+> {
+> /* Queue is not empty, take packet from the queue tail */
+>
+> /* find pointer to the node entry */
+> hItem = (TI_HANDLE)((TI_UINT8*)pQue->tHead.pPrev - pQue->uNodeHeaderOffset);
+295,299c304,305
+< /* find pointer to the node entry */
+< hItem = (TI_HANDLE)((TI_UINT8*)pQue->tHead.pPrev - pQue->uNodeHeaderOffset);
+<
+< DelFromTail (pQue->tHead.pPrev); /* remove node from the queue */
+< pQue->uCount--;
+---
+> DelFromTail (pQue->tHead.pPrev); /* remove node from the queue */
+> pQue->uCount--;
+301c307
+< #ifdef TI_DBG
+---
+> #ifdef TI_DBG
+304c310
+< #endif
+---
+> #endif
+306c312,313
+< return (hItem);
+---
+> return (hItem);
+> }
+420,422d426
+<
+<
+<
+diff -Nar wl1271/utils/rate.c wl1271.new/wilink_6_1/utils/rate.c
+711c711,713
+< #if 0
+---
+> /* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+> #if 1 // enable the 11n rate conversions
+> /* MODS_END_FOR_11N_RATE_REPORTING */
+808d809
+<
+diff -Nar wl1271/utils/timer.c wl1271.new/wilink_6_1/utils/timer.c
+132c132
+<
+---
+> #if 0
+136c136
+<
+---
+> #endif
+diff -Nar wl1271/wpa_supplicant_lib/driver_ti.c wl1271.new/wilink_6_1/wpa_supplicant_lib/driver_ti.c
+617a618
+> scan_exit(drv); /* Clear scan cache */
diff --git a/wl1271/TWD/Ctrl/CmdBldCfgIE.c b/wl1271/TWD/Ctrl/CmdBldCfgIE.c
index 8d642ce4..d03227c6 100644
--- a/wl1271/TWD/Ctrl/CmdBldCfgIE.c
+++ b/wl1271/TWD/Ctrl/CmdBldCfgIE.c
@@ -773,7 +773,10 @@ TI_STATUS cmdBld_CfgIeStatisitics (TI_HANDLE hCmdBld, void *fCb, TI_HANDLE hCb)
pCfg = os_memoryAlloc(pCmdBld->hOs, sizeof(ACXStatistics_t));
if (!pCfg)
+ {
return status;
+ }
+
/* Set information element header */
pCfg->EleHdr.id = ACX_STATISTICS;
pCfg->EleHdr.len = sizeof(*pCfg) - sizeof(EleHdrStruct);
diff --git a/wl1271/TWD/Ctrl/CmdBldCmd.c b/wl1271/TWD/Ctrl/CmdBldCmd.c
index 27f205be..14e195db 100644
--- a/wl1271/TWD/Ctrl/CmdBldCmd.c
+++ b/wl1271/TWD/Ctrl/CmdBldCmd.c
@@ -547,7 +547,9 @@ TI_STATUS cmdBld_StartPeriodicScan (TI_HANDLE hCmdBld, TPeriodicScanParams *pPer
default: /* More than one SSID - copy SSIDs to SSID list command */
pFWSsidList = os_memoryAlloc(pCmdBld->hOs, sizeof(ConnScanSSIDList_t));
if (!pFWSsidList)
+ {
return TI_NOK;
+ }
if ((TI_UINT8)pPeriodicScanParams->uSsidListFilterEnabled == 1)
tFWPeriodicScanParams.ssidFilterType = (ScanSsidFilterType_e)SCAN_SSID_FILTER_TYPE_LIST;
diff --git a/wl1271/TWD/FirmwareApi/public_radio.h b/wl1271/TWD/FirmwareApi/public_radio.h
index 1755e4b2..88e983d7 100644
--- a/wl1271/TWD/FirmwareApi/public_radio.h
+++ b/wl1271/TWD/FirmwareApi/public_radio.h
@@ -1067,6 +1067,8 @@ typedef enum TXPWR_CFG0__VGA_STEP_ENMT
/* NVS definition start here */
#define NVS_TX_TYPE_INDEX 0
+#define NVS_TX_LENGTH_INDEX ((NVS_TX_TYPE_INDEX) + 1) /* 1 (26) */
+#define NVS_TX_PARAM_INDEX ((NVS_TX_LENGTH_INDEX) + 2) /* 3 (28) */
#define START_TYPE_INDEX_IN_TLV 0
#define TLV_TYPE_LENGTH 1
@@ -1137,9 +1139,15 @@ typedef enum TXPWR_CFG0__VGA_STEP_ENMT
#define NVS_TX_PARAM_LENGTH NVS_TX_PARAM_LENGTH_NVS_V2
/* NVS RX version */
+#define NVS_RX_TYPE_INDEX ((NVS_TX_PARAM_INDEX) + (NVS_TX_PARAM_LENGTH)) /* 316 (341) */
+#define NVS_RX_LENGTH_INDEX ((NVS_RX_TYPE_INDEX) + 1) /* 317 (342) */
+#define NVS_RX_PARAM_INDEX ((NVS_RX_LENGTH_INDEX) + 2) /* 319 (344) */
#define NVS_RX_PARAM_LENGTH NUMBER_OF_RX_BIP_EFUSE_PARAMETERS_E /* 19 */
/* NVS version parameter length */
+#define NVS_VERSION_TYPE_INDEX ((NVS_RX_PARAM_INDEX) + (NVS_RX_PARAM_LENGTH)) /* 338 (363) */
+#define NVS_VERSION_LENGTH_INDEX ((NVS_VERSION_TYPE_INDEX) + 1) /* 339 (364) */
+#define NVS_VERSION_PARAMETER_INDEX ((NVS_VERSION_LENGTH_INDEX) + 2) /* 340 (365) */
#define NVS_VERSION_PARAMETER_LENGTH 3
/* NVS max length */
diff --git a/wl1271/config/tiwlan.ini b/wl1271/config/tiwlan.ini
index 4998a781..569dd3ff 100644
--- a/wl1271/config/tiwlan.ini
+++ b/wl1271/config/tiwlan.ini
@@ -181,7 +181,7 @@ TxEnergyDetection = 0 # Use 1 for enabling
TriggeredScanTimeOut = 50000 # Maximum time in Us between 2 channels on triggered scan
# PsPoll delivery failure solution
PsPollDeliveryFailureRecoveryPeriod = 20 # Time in Ms to stay ACTIVE ('0' to disable feature)
-ConsecutivePsPollDeliveryFailureThreshold = 20 # Number of failed PsPoll's to start ACTIVE time out
+ConsecutivePsPollDeliveryFailureThreshold = 4 # Number of failed PsPoll's to start ACTIVE time out
# Weights in percent for RSSI/SNR Average calculations
diff --git a/wl1271/platforms/os/common/build/linux/common.inc b/wl1271/platforms/os/common/build/linux/common.inc
index 305e8642..86e9235c 100644
--- a/wl1271/platforms/os/common/build/linux/common.inc
+++ b/wl1271/platforms/os/common/build/linux/common.inc
@@ -33,6 +33,12 @@ FW ?= 1273
#
XCC ?= n
+
+#
+# Compile with GEM support or not
+#
+GEM ?= n
+
#
# Choose the bus type (n for SDIO, y for WSPI)
#
@@ -84,6 +90,10 @@ ifeq ($(XCC),y)
DK_DEFINES += -D XCC_MODULE_INCLUDED
endif
+ifeq ($(GEM),y)
+ DK_DEFINES += -D GEM_SUPPORTED
+endif
+
ifeq ($(INTR),n)
DK_DEFINES += -D PRIODIC_INTERRUPT
endif
diff --git a/wl1271/platforms/os/common/src/osRgstry.c b/wl1271/platforms/os/common/src/osRgstry.c
index 736d8726..f2cc7311 100644
--- a/wl1271/platforms/os/common/src/osRgstry.c
+++ b/wl1271/platforms/os/common/src/osRgstry.c
@@ -161,8 +161,10 @@ NDIS_STRING STRdot11BasicRateMask_A = NDIS_STRING_CONST( "dot11BasicRa
NDIS_STRING STRdot11SupportedRateMask_A = NDIS_STRING_CONST( "dot11SupportedRateMaskA");
NDIS_STRING STRdot11BasicRateMask_AG = NDIS_STRING_CONST( "dot11BasicRateMaskAG");
NDIS_STRING STRdot11SupportedRateMask_AG = NDIS_STRING_CONST( "dot11SupportedRateMaskAG");
-NDIS_STRING STRdot11BasicRateMask_N = NDIS_STRING_CONST( "STRdot11BasicRateMask_N");
-NDIS_STRING STRdot11SupportedRateMask_N = NDIS_STRING_CONST( "STRdot11SupportedRateMask_N");
+/*** MODS_BEGIN_FOR_11N_RATE_REPORTING ***/
+NDIS_STRING STRdot11BasicRateMask_N = NDIS_STRING_CONST( "dot11BasicRateMask_N");
+NDIS_STRING STRdot11SupportedRateMask_N = NDIS_STRING_CONST( "dot11SupportedRateMask_N");
+/*** MODS_END_FOR_11N_RATE_REPORTING ***/
NDIS_STRING STRRadio11_RxLevel = NDIS_STRING_CONST( "Radio11_RxLevel");
NDIS_STRING STRRadio11_LNA = NDIS_STRING_CONST( "Radio11_LNA");
diff --git a/wl1271/platforms/os/linux/build/common.inc b/wl1271/platforms/os/linux/build/common.inc
index 544a854a..407c2ca2 100644
--- a/wl1271/platforms/os/linux/build/common.inc
+++ b/wl1271/platforms/os/linux/build/common.inc
@@ -32,6 +32,12 @@ FW ?= 1273
#
XCC ?= n
+
+#
+# Compile with GEM support or not
+#
+GEM ?= n
+
#
# Choose the bus type (n for SDIO, y for WSPI)
#
@@ -83,6 +89,10 @@ ifeq ($(XCC),y)
DK_DEFINES += -D XCC_MODULE_INCLUDED
endif
+ifeq ($(GEM),y)
+ DK_DEFINES += -D GEM_SUPPORTED
+endif
+
ifeq ($(INTR),n)
DK_DEFINES += -D PRIODIC_INTERRUPT
endif
diff --git a/wl1271/platforms/os/linux/src/CmdInterpretWext.c b/wl1271/platforms/os/linux/src/CmdInterpretWext.c
index 656626fc..01e44511 100644
--- a/wl1271/platforms/os/linux/src/CmdInterpretWext.c
+++ b/wl1271/platforms/os/linux/src/CmdInterpretWext.c
@@ -300,6 +300,10 @@ int cmdInterpret_convertAndExecute(TI_HANDLE hCmdInterpret, TConfigCommand *cmdO
struct iw_point *data = (struct iw_point *) cmdObj->buffer1;
struct iw_range *range = (struct iw_range *) cmdObj->buffer2;
int i;
+/* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+ ScanBssType_e smeDesiredBssType = BSS_ANY;
+ paramInfo_t *pParam2;
+/* MODS_END_FOR_11N_RATE_REPORTING */
/* Reset structure */
data->length = sizeof(struct iw_range);
@@ -333,12 +337,45 @@ int cmdInterpret_convertAndExecute(TI_HANDLE hCmdInterpret, TConfigCommand *cmdO
res = cmdDispatch_GetParam (pCmdInterpret->hCmdDispatch, pParam );
CHECK_PENDING_RESULT(res,pParam)
+/* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+ pParam2 = (paramInfo_t *)os_memoryAlloc(pCmdInterpret->hOs, sizeof(paramInfo_t));
+ if (pParam2)
+ {
+ pParam2->paramType = SME_DESIRED_BSS_TYPE_PARAM;
+ pParam2->paramLength = sizeof(ScanBssType_e);
+ res = cmdDispatch_GetParam(pCmdInterpret->hCmdDispatch, pParam2);
+ CHECK_PENDING_RESULT(res,pParam2)
+ smeDesiredBssType = pParam2->content.smeDesiredBSSType;
+ os_memoryFree(pCmdInterpret->hOs, pParam2, sizeof(paramInfo_t));
+ }
+/* MODS_END_FOR_11N_RATE_REPORTING */
/* Number of entries in the rates list */
range->num_bitrates = pParam->content.siteMgrDesiredSupportedRateSet.len;
for (i=0; i<pParam->content.siteMgrDesiredSupportedRateSet.len; i++)
{
- range->bitrate[i] = ((pParam->content.siteMgrDesiredSupportedRateSet.ratesString[i] & 0x7F) * 500000);
+/* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+ switch(pParam->content.siteMgrDesiredSupportedRateSet.ratesString[i] & 0x7F)
+ {
+ case NET_RATE_MCS0:
+ case NET_RATE_MCS1:
+ case NET_RATE_MCS2:
+ case NET_RATE_MCS3:
+ case NET_RATE_MCS4:
+ case NET_RATE_MCS5:
+ case NET_RATE_MCS6:
+ case NET_RATE_MCS7:
+ if (BSS_INDEPENDENT == smeDesiredBssType)
+ continue;
+ default:
+ range->bitrate[i] = ((pParam->content.siteMgrDesiredSupportedRateSet.ratesString[i] & 0x7F) * 500000);
+ if (63500000 == range->bitrate[i])
+ {
+ range->bitrate[i] = 65000000; /* convert special code 0x7F to 65Mbps */
+ }
+ break;
+ }
+/* MODS_END_FOR_11N_RATE_REPORTING */
}
/* RTS threshold */
@@ -709,11 +746,21 @@ int cmdInterpret_convertAndExecute(TI_HANDLE hCmdInterpret, TConfigCommand *cmdO
os_memorySet (pCmdInterpret->hOs, &iwe, 0, sizeof(iwe));
iwe.cmd = SIOCGIWRATE;
current_val = event + IW_EV_LCP_LEN;
- for (j=0; j<16; j++)
- {
+/* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+ for (j=0; j<32; j++)
+ {
if (my_current->SupportedRates[j])
{
- iwe.u.bitrate.value = ((my_current->SupportedRates[j] & 0x7f) * 500000);
+ if ((my_current->SupportedRates[j] & 0x7f) == NET_RATE_MCS7)
+ {
+ iwe.u.bitrate.value = 65000000; /* convert the special code 0x7f to 65Mbps */
+ }
+ else
+ {
+ iwe.u.bitrate.value = ((my_current->SupportedRates[j] & 0x7f) * 500000);
+ }
+ /* printk("Supported Rates [%d] = %d\n", j, iwe.u.bitrate.value); */
+/* MODS_END_FOR_11N_RATE_REPORTING */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
current_val = iwe_stream_add_value(event, current_val, end_buf, &iwe,IW_EV_PARAM_LEN);
#else
diff --git a/wl1271/platforms/os/linux/src/RxBuf.c b/wl1271/platforms/os/linux/src/RxBuf.c
index 61972928..4a18acf3 100644
--- a/wl1271/platforms/os/linux/src/RxBuf.c
+++ b/wl1271/platforms/os/linux/src/RxBuf.c
@@ -54,7 +54,9 @@ void *RxBufAlloc(TI_HANDLE hOs, TI_UINT32 len,PacketClassTag_e ePacketClassTag)
skb = alloc_skb(alloc_len, GFP_ATOMIC);
if (!skb)
+ {
return NULL;
+ }
rx_head = (rx_head_t *)skb->head;
rx_head->skb = skb;
skb_reserve(skb, RX_HEAD_LEN_ALIGNED + WSPI_PAD_BYTES);
diff --git a/wl1271/platforms/os/linux/src/WlanDrvIf.c b/wl1271/platforms/os/linux/src/WlanDrvIf.c
index 7f5368ea..7985384b 100644
--- a/wl1271/platforms/os/linux/src/WlanDrvIf.c
+++ b/wl1271/platforms/os/linux/src/WlanDrvIf.c
@@ -636,7 +636,8 @@ int wlanDrvIf_Start (struct net_device *dev)
ti_dprintf (TIWLAN_LOG_OTHER, "wlanDrvIf_Start()\n");
printk("%s\n", __func__);
- if (!drv->tCommon.hDrvMain) {
+ if (!drv->tCommon.hDrvMain)
+ {
ti_dprintf (TIWLAN_LOG_ERROR, "wlanDrvIf_Start() Driver not created!\n");
return -ENODEV;
}
@@ -771,7 +772,8 @@ static int wlanDrvIf_SetupNetif (TWlanDrvIfObj *drv)
/* Allocate network interface structure for the driver */
dev = alloc_etherdev (0);
- if (dev == NULL) {
+ if (dev == NULL)
+ {
ti_dprintf (TIWLAN_LOG_ERROR, "alloc_etherdev() failed\n");
return -ENOMEM;
}
@@ -804,7 +806,8 @@ static int wlanDrvIf_SetupNetif (TWlanDrvIfObj *drv)
wlanDrvWext_Init (dev);
res = register_netdev (dev);
- if (res != 0) {
+ if (res != 0)
+ {
ti_dprintf (TIWLAN_LOG_ERROR, "register_netdev() failed : %d\n", res);
kfree (dev);
return res;
@@ -859,7 +862,8 @@ static int wlanDrvIf_Create (void)
/* Allocate driver's structure */
drv = kmalloc (sizeof(TWlanDrvIfObj), GFP_KERNEL);
- if (!drv) {
+ if (!drv)
+ {
return -ENOMEM;
}
#ifdef TI_DBG
@@ -1014,14 +1018,16 @@ static void wlanDrvIf_Destroy (TWlanDrvIfObj *drv)
}
/* close the ipc_kernel socket*/
- if (drv && drv->wl_sock) {
+ if (drv && drv->wl_sock)
+ {
sock_release (drv->wl_sock->sk_socket);
}
/* Release the driver interrupt (or polling timer) */
#ifdef PRIODIC_INTERRUPT
os_timerDestroy (drv, drv->hPollTimer);
#else
- if (drv->irq) {
+ if (drv->irq)
+ {
hPlatform_freeInterrupt(drv);
}
#endif
@@ -1035,30 +1041,30 @@ static void wlanDrvIf_Destroy (TWlanDrvIfObj *drv)
/*
* Free init files memory
*/
- if (drv->tCommon.tFwImage.pImage) {
- os_memoryFree (drv, drv->tCommon.tFwImage.pImage, drv->tCommon.tFwImage.uSize);
-#ifdef TI_MEM_ALLOC_TRACE
- os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
- __FUNCTION__, __LINE__, drv->tCommon.tFwImage.uSize,
- -drv->tCommon.tFwImage.uSize);
-#endif
- }
- if (drv->tCommon.tNvsImage.pImage) {
- kfree (drv->tCommon.tNvsImage.pImage);
-#ifdef TI_MEM_ALLOC_TRACE
- os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
- __FUNCTION__, __LINE__, drv->tCommon.tNvsImage.uSize,
- -drv->tCommon.tNvsImage.uSize);
-#endif
- }
- if (drv->tCommon.tIniFile.pImage) {
- kfree (drv->tCommon.tIniFile.pImage);
-#ifdef TI_MEM_ALLOC_TRACE
- os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
- __FUNCTION__, __LINE__, drv->tCommon.tIniFile.uSize,
- -drv->tCommon.tIniFile.uSize);
-#endif
- }
+ if (drv->tCommon.tFwImage.pImage)
+ {
+ os_memoryFree (drv, drv->tCommon.tFwImage.pImage, drv->tCommon.tFwImage.uSize);
+ #ifdef TI_MEM_ALLOC_TRACE
+ os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
+ __FUNCTION__, __LINE__, drv->tCommon.tFwImage.uSize, -drv->tCommon.tFwImage.uSize);
+ #endif
+ }
+ if (drv->tCommon.tNvsImage.pImage)
+ {
+ kfree (drv->tCommon.tNvsImage.pImage);
+ #ifdef TI_MEM_ALLOC_TRACE
+ os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
+ __FUNCTION__, __LINE__, drv->tCommon.tNvsImage.uSize, -drv->tCommon.tNvsImage.uSize);
+ #endif
+ }
+ if (drv->tCommon.tIniFile.pImage)
+ {
+ kfree (drv->tCommon.tIniFile.pImage);
+ #ifdef TI_MEM_ALLOC_TRACE
+ os_printf ("MTT:%s:%d ::kfree(0x%p) : %d\n",
+ __FUNCTION__, __LINE__, drv->tCommon.tIniFile.uSize, -drv->tCommon.tIniFile.uSize);
+ #endif
+ }
/* Free the driver object */
#ifdef TI_DBG
diff --git a/wl1271/stad/src/Connection_Managment/admCtrlWpa.c b/wl1271/stad/src/Connection_Managment/admCtrlWpa.c
index 91339236..8bd486c2 100644
--- a/wl1271/stad/src/Connection_Managment/admCtrlWpa.c
+++ b/wl1271/stad/src/Connection_Managment/admCtrlWpa.c
@@ -1071,13 +1071,14 @@ TI_STATUS admCtrlWpa_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSiteP
wpaData.unicastSuite[0] = admCtrlWpa_validity.unicast;
*pEvaluation = admCtrlWpa_validity.evaluation;
}
-
+/*** OMAPS00214746_CHANGE_START ***/
+#if 0
if ((encryptionStatus == TWD_CIPHER_TKIP) && (pRsnSiteParams->pHTCapabilities->tHdr[0] != TI_FALSE) && (pRsnSiteParams->pHTInfo->tHdr[0] != TI_FALSE))
{
TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION,"Dismiss AP - HT with TKIP is not valid");
return TI_NOK; /* if the encyption is TKIP and the site does support HT(11n) the site can not be a candidate */
}
-
+#endif
/* Check privacy bit if not in mixed mode */
if (!pAdmCtrl->mixedMode)
{ /* There's no mixed mode, so make sure that the privacy Bit matches the privacy mode*/
diff --git a/wl1271/stad/src/Connection_Managment/admCtrlWpa2.c b/wl1271/stad/src/Connection_Managment/admCtrlWpa2.c
index d4688e6f..57eaedfb 100644
--- a/wl1271/stad/src/Connection_Managment/admCtrlWpa2.c
+++ b/wl1271/stad/src/Connection_Managment/admCtrlWpa2.c
@@ -820,7 +820,13 @@ TI_STATUS admCtrlWpa2_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSite
TI_STATUS status;
wpa2IeData_t wpa2Data;
TI_UINT8 *pWpa2Ie;
+/*** OMAPS00214746_CHANGE_START ***/
+#if 0
ECipherSuite uSuite, bSuite,encryptionStatus;
+#else
+ ECipherSuite uSuite, bSuite;
+#endif
+/*** OMAPS00214746_CHANGE_END ***/
TI_UINT8 i = 0;
TIWLN_SIMPLE_CONFIG_MODE wscMode = TIWLN_SIMPLE_CONFIG_OFF;
@@ -839,6 +845,8 @@ TI_STATUS admCtrlWpa2_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSite
{
return TI_NOK;
}
+/*** OMAPS00214746_CHANGE_START ***/
+#if 0 /*** Delete the following check ***/
pAdmCtrl->getCipherSuite(pAdmCtrl, &encryptionStatus);
if ((encryptionStatus == TWD_CIPHER_TKIP) && (pRsnSiteParams->pHTCapabilities->tHdr[0] != TI_FALSE) && (pRsnSiteParams->pHTInfo->tHdr[0] != TI_FALSE))
@@ -846,6 +854,9 @@ TI_STATUS admCtrlWpa2_evalSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TRsnSite
TRACE0(pAdmCtrl->hReport, REPORT_SEVERITY_INFORMATION,"Dismiss AP - HT with TKIP is not valid");
return TI_NOK; /* if the encyption is TKIP and the site does support HT(11n) the site can not be a candidate */
}
+#endif /*** End of Deletion ***/
+/*** OMAPS00214746_CHANGE_END ***/
+
/* Get Simple-Config state */
siteMgr_getParamWSC(pAdmCtrl->pRsn->hSiteMgr, &wscMode); /* SITE_MGR_SIMPLE_CONFIG_MODE */
status = admCtrl_parseIe(pAdmCtrl, pRsnData, &pWpa2Ie, RSN_IE_ID);
diff --git a/wl1271/stad/src/Connection_Managment/conn.c b/wl1271/stad/src/Connection_Managment/conn.c
index aa49b1cb..7772a4b2 100644
--- a/wl1271/stad/src/Connection_Managment/conn.c
+++ b/wl1271/stad/src/Connection_Managment/conn.c
@@ -101,8 +101,8 @@ TI_HANDLE conn_create(TI_HANDLE hOs)
{
return NULL;
}
-
- os_memoryZero(hOs, (void *)pConn, sizeof(conn_t));
+ os_memoryZero (pConn->hOs, pConn, sizeof(conn_t));
+
/* Creating connection Ibss SM */
status = fsm_Create(hOs, &pFsm, CONN_IBSS_NUM_STATES, CONN_IBSS_NUM_EVENTS);
if (status != TI_OK)
diff --git a/wl1271/stad/src/Sta_Management/assocSM.c b/wl1271/stad/src/Sta_Management/assocSM.c
index 457c1575..cdff5bab 100644
--- a/wl1271/stad/src/Sta_Management/assocSM.c
+++ b/wl1271/stad/src/Sta_Management/assocSM.c
@@ -1361,7 +1361,13 @@ TI_STATUS assoc_smRequestBuild(assoc_t *pCtx, TI_UINT8* reqBuf, TI_UINT32* reqLe
paramInfo_t param;
TTwdParamInfo tTwdParam;
TI_UINT16 capabilities;
-
+
+/*** OMAPS00214746_CHANGE_START ***/
+ ECipherSuite eCipherSuite = TWD_CIPHER_NONE; /* To be used for checking whether
+ AP supports HT rates and TKIP
+ */
+/*** OMAPS00214746_CHANGE_END ***/
+
pRequest = reqBuf;
*reqLen = 0;
@@ -1526,11 +1532,29 @@ TI_STATUS assoc_smRequestBuild(assoc_t *pCtx, TI_UINT8* reqBuf, TI_UINT32* reqLe
*reqLen += len;
}
+/*** OMAPS00214746_CHANGE_START ***/
+ /* Privacy - Used later on HT */
+ param.paramType = RSN_ENCRYPTION_STATUS_PARAM;
+ status = rsn_getParam(pCtx->hRsn, &param);
+
+ if(status == TI_OK)
+ {
+ eCipherSuite = param.content.rsnEncryptionStatus;
+ }
+/*** OMAPS00214746_CHANGE_END ***/
+
/* Primary Site support HT ? */
param.paramType = SITE_MGR_PRIMARY_SITE_HT_SUPPORT;
siteMgr_getParam(pCtx->hSiteMgr, &param);
+/*** OMAPS00214746_CHANGE_START ***/
+#if 0
if(TI_TRUE == param.content.bPrimarySiteHtSupport)
+#else
+ /* Disallow TKIP with HT Rates: If this is the case - discard HT rates from Association Request */
+ if((TI_TRUE == param.content.bPrimarySiteHtSupport) && (eCipherSuite != TWD_CIPHER_TKIP))
+#endif
+/*** OMAPS00214746_CHANGE_END ***/
{
status = StaCap_GetHtCapabilitiesIe (pCtx->hStaCap, pRequest, &len);
if (status != TI_OK)
diff --git a/wl1271/stad/src/Sta_Management/currBss.c b/wl1271/stad/src/Sta_Management/currBss.c
index 8d5c8469..aac2ffe3 100644
--- a/wl1271/stad/src/Sta_Management/currBss.c
+++ b/wl1271/stad/src/Sta_Management/currBss.c
@@ -81,6 +81,8 @@
#include "apConn.h"
#include "scanMngrApi.h"
#include "MacServices_api.h"
+#include "smePrivate.h"
+#include "conn.h"
#include "smeApi.h"
#include "sme.h"
#include "TWDriver.h"
@@ -658,8 +660,9 @@ TI_STATUS currBSS_probRespReceivedCallb(TI_HANDLE hCurrBSS,
pParam = (paramInfo_t *)os_memoryAlloc(pCurrBSS->hOs, sizeof(paramInfo_t));
if (!pParam)
+ {
return TI_NOK;
-
+ }
pParam->paramType = SITE_MGR_CURRENT_BSSID_PARAM;
siteMgr_getParam(pCurrBSS->hSiteMgr, pParam);
@@ -779,7 +782,9 @@ void currBSS_updateConnectedState(TI_HANDLE hCurrBSS, TI_BOOL isConnected, ScanB
pParam = (paramInfo_t *)os_memoryAlloc(pCurrBSS->hOs, sizeof(paramInfo_t));
if (!pParam)
+ {
return;
+ }
/* BSSID */
pParam->paramType = SITE_MGR_CURRENT_BSSID_PARAM;
@@ -1015,6 +1020,9 @@ static void currBSS_reportRoamingEvent(currBSS_t *pCurrBSS,
apConn_roamingTrigger_e roamingEventType,
roamingEventData_u *pRoamingEventData)
{
+ TSme *pSme = (TSme*)pCurrBSS->hSme;
+ conn_t *pConn = (conn_t *)pSme->hConn;
+
TRACE1(pCurrBSS->hReport, REPORT_SEVERITY_INFORMATION, "currBSS_reportRoamingEvent: trigger %d\n", roamingEventType);
if (pCurrBSS->isConnected)
@@ -1025,12 +1033,19 @@ static void currBSS_reportRoamingEvent(currBSS_t *pCurrBSS,
}
else /* IBSS */
{
- if( roamingEventType == ROAMING_TRIGGER_BSS_LOSS )
+ if (roamingEventType == ROAMING_TRIGGER_BSS_LOSS)
{
/* If in IBSS call the SME restart function, this logic issues a DISCONNECT
* event and tries to connect to other STA or establish self connection.
*/
- sme_Restart (pCurrBSS->hSme);
+ if (pConn->currentConnType == CONNECTION_SELF)
+ {
+ return;
+ }
+ else
+ {
+ sme_Restart (pCurrBSS->hSme);
+ }
}
}
}
@@ -1108,7 +1123,9 @@ static void currBSS_BackgroundScanQuality(TI_HANDLE hCurrBSS,
/* Update Site Table in order to represent the RSSI of current AP correctly in the utility */
pParam = (paramInfo_t *)os_memoryAlloc(pCurrBSS->hOs, sizeof(paramInfo_t));
if (!pParam)
+ {
return;
+ }
pParam->paramType = SITE_MGR_CURRENT_SIGNAL_PARAM;
pParam->content.siteMgrCurrentSignal.rssi = averageRssi;
siteMgr_setParam(pCurrBSS->hSiteMgr, pParam);
diff --git a/wl1271/stad/src/Sta_Management/mlmeParser.c b/wl1271/stad/src/Sta_Management/mlmeParser.c
index 4a0f4736..c1914db3 100644
--- a/wl1271/stad/src/Sta_Management/mlmeParser.c
+++ b/wl1271/stad/src/Sta_Management/mlmeParser.c
@@ -132,7 +132,8 @@ TI_STATUS mlmeParser_recv(TI_HANDLE hMlme, void *pBuffer, TRxAttr* pRxAttr)
}
pParam = (paramInfo_t *)os_memoryAlloc(pHandle->hOs, sizeof(paramInfo_t));
- if (!pParam) {
+ if (!pParam)
+ {
RxBufFree(pHandle->hOs, pBuffer);
return TI_NOK;
}
@@ -817,7 +818,7 @@ mlme_recv_end:
RxBufFree(pHandle->hOs, pBuffer);
if (status != TI_OK)
return TI_NOK;
- return TI_OK;
+ return status;
}
TI_STATUS mlmeParser_getFrameType(mlme_t *pMlme, TI_UINT16* pFrameCtrl, dot11MgmtSubType_e *pType)
diff --git a/wl1271/stad/src/Sta_Management/qosMngr.c b/wl1271/stad/src/Sta_Management/qosMngr.c
index 121797fc..ece2da80 100644
--- a/wl1271/stad/src/Sta_Management/qosMngr.c
+++ b/wl1271/stad/src/Sta_Management/qosMngr.c
@@ -117,7 +117,9 @@ TI_HANDLE qosMngr_create(TI_HANDLE hOs)
pQosMngr = os_memoryAlloc(hOs,sizeof(qosMngr_t));
if (pQosMngr == NULL)
- return NULL;
+ {
+ return NULL;
+ }
os_memoryZero (hOs, pQosMngr, sizeof(qosMngr_t));
@@ -546,8 +548,8 @@ TI_STATUS qosMngr_disconnect (TI_HANDLE hQosMngr, TI_BOOL bDisconnect)
status = verifyAndConfigTrafficParams(hQosMngr,&(pQosMngr->acParams[QOS_AC_BE].QtrafficParams));
if (status != TI_OK)
{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite:failed to init NON_QOS Queue Traffic parameters!!!\n\n");
- return status;
+ TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite:failed to init NON_QOS Queue Traffic parameters!!!\n\n");
+ return status;
}
/*
@@ -1703,7 +1705,7 @@ TRACE2(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "qosMngr_checkTspecRenegR
else if (pQosMngr->tspecRenegotiationParams[USER_PRIORITY_4].uUserPriority != MAX_USER_PRIORITY)
{
/* Signal TSPEC was not re-negotiated although requested to - ERROR */
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite: Signal TSPEC was not re-negotiated while voice was \n");
+ TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite: Signal TSPEC was not re-negotiated while voice was \n");
qosMngr_setAdmissionInfo(pQosMngr, USER_PRIORITY_4,
&pQosMngr->resourceMgmtTable.candidateTspecInfo[USER_PRIORITY_4],
STATUS_TRAFFIC_ADM_REQUEST_REJECT);
@@ -1751,7 +1753,8 @@ TI_STATUS qosMngr_setSite(TI_HANDLE hQosMngr, assocRsp_t *assocRsp)
{
pQosMngr->activeProtocol = QOS_NONE;
TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_setSite: setting active protocol QOS_WME params with non QOS_WME IE params frame, setting active protocol back to NONE \n");
- return TI_NOK;
+ status = qosMngr_setSite(hQosMngr, assocRsp);
+ return status;
}
status = setWmeSiteParams(pQosMngr, (TI_UINT8 *)assocRsp->WMEParams);
@@ -1786,7 +1789,7 @@ TI_STATUS qosMngr_setSite(TI_HANDLE hQosMngr, assocRsp_t *assocRsp)
status = verifyAndConfigQosParams(hQosMngr,&(pQosMngr->acParams[QOS_AC_BE].acQosParams));
if (status != TI_OK)
{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "qosMngr_setSite:failed to init NON_QOS parameters!!!\n\n");
+ TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "qosMngr_setSite:failed to init NON_QOS parameters!!!\n\n");
return TI_NOK;
}
}
@@ -1794,7 +1797,7 @@ TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "qosMngr_setSite:failed to in
break;
default:
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "Warning: qosMngr_setSite NO active protocls To set \n");
+ TRACE0(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "Warning: qosMngr_setSite NO active protocls To set \n");
break;
}
@@ -2128,12 +2131,14 @@ TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_SetPsRxStreaming: Not
return NOT_CONNECTED;
}
+#if 0
/* Verify that the AP supports QOS_WME */
if (pQosMngr->activeProtocol != QOS_WME)
{
TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "qosMngr_SetPsRxStreaming: Not connected to a QOS AP - Ignoring request !!!\n");
return NO_QOS_AP;
}
+#endif
/* Check TID validity */
if (uCurrTid > MAX_USER_PRIORITY)
@@ -2775,7 +2780,7 @@ TI_STATUS QosMngr_receiveActionFrames(TI_HANDLE hQosMngr, TI_UINT8* pData, TI_UI
(pQosMngr->activeProtocol != QOS_WME) ||
(pQosMngr->trafficAdmCtrlEnable == TI_FALSE) )
{
-TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames: Ignore !!!");
+ TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames: Ignore !!!");
return TI_NOK;
}
@@ -2792,7 +2797,7 @@ TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames:
/* Get TS-Info from TSpec IE in DELTS, and get from it the user-priority. */
tsInfo.tsInfoArr[0] = *pData;
pData++;
- tsInfo.tsInfoArr[1] = *pData;
+ tsInfo.tsInfoArr[1] = *pData;
pData++;
tsInfo.tsInfoArr[2] = *pData;
@@ -2801,7 +2806,7 @@ TRACE0(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames:
acID = WMEQosTagToACTable[userPriority];
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "QosMngr_receiveActionFrames: DELTS [ acID = %d ] \n", acID);
+ TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "QosMngr_receiveActionFrames: DELTS [ acID = %d ] \n", acID);
/* check if this AC is admitted with the correct userPriority */
@@ -2826,7 +2831,7 @@ TRACE1(pQosMngr->hReport, REPORT_SEVERITY_INFORMATION, "QosMngr_receiveActionFra
}
else
{
-TRACE3(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames: DELTS [ acID = %d userPriority = %d currentUserPriority = %d] Current State in not ADMITED !! \n", acID, userPriority,pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority);
+ TRACE3(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames: DELTS [ acID = %d userPriority = %d currentUserPriority = %d] Current State in not ADMITED !! \n", acID, userPriority,pQosMngr->resourceMgmtTable.currentTspecInfo[acID].userPriority);
}
}
@@ -2869,7 +2874,7 @@ TRACE3(pQosMngr->hReport, REPORT_SEVERITY_ERROR, "QosMngr_receiveActionFrames: D
}
else
{
-TRACE1(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "QosMngr_receiveActionFrames: Receive unknown action code = %d -> Ignore !! \n",action);
+ TRACE1(pQosMngr->hReport, REPORT_SEVERITY_WARNING, "QosMngr_receiveActionFrames: Receive unknown action code = %d -> Ignore !! \n",action);
}
return TI_OK;
@@ -2969,3 +2974,4 @@ static void qosMngr_storeTspecCandidateParams (tspecInfo_t *pCandidateParams, OS
pCandidateParams->streamDirection = BI_DIRECTIONAL;
pCandidateParams->mediumTime = 0;
}
+
diff --git a/wl1271/stad/src/Sta_Management/scanResultTable.c b/wl1271/stad/src/Sta_Management/scanResultTable.c
index 1ffb916d..ecbb749e 100644
--- a/wl1271/stad/src/Sta_Management/scanResultTable.c
+++ b/wl1271/stad/src/Sta_Management/scanResultTable.c
@@ -594,6 +594,9 @@ void scanResultTable_updateRates(TI_HANDLE hScanResultTable, TSiteEntry *pSite,
TScanResultTable *pScanResultTable = (TScanResultTable*)hScanResultTable;
TI_UINT8 maxBasicRate = 0, maxActiveRate = 0;
TI_UINT32 bitMapExtSupp = 0;
+/*** MODS_BEGIN_FOR_11N_RATE_REPORTING ***/
+ TI_UINT32 uMcsSupportedRateMask = 0, uMcsbasicRateMask=0;
+/*** MODS_END_FOR_11N_RATE_REPORTING ***/
if (pFrame->parsedIEs->content.iePacket.pRates == NULL)
{
@@ -661,6 +664,26 @@ void scanResultTable_updateRates(TI_HANDLE hScanResultTable, TSiteEntry *pSite,
pSite->rateMask.basicRateMask |= bitMapExtSupp;
}
+
+/*** MODS_BEGIN_FOR_11N_RATE_REPORTING ***/
+ if (pFrame->parsedIEs->content.iePacket.pHtCapabilities != NULL)
+ {
+ /* MCS build rates bit map */
+ rate_McsNetStrToDrvBitmap (&uMcsSupportedRateMask,
+ (pFrame->parsedIEs->content.iePacket.pHtCapabilities->aHtCapabilitiesIe + DOT11_HT_CAPABILITIES_MCS_RATE_OFFSET));
+
+ pSite->rateMask.supportedRateMask |= uMcsSupportedRateMask;
+ }
+
+ if (pFrame->parsedIEs->content.iePacket.pHtInformation != NULL)
+ {
+ /* MCS build rates bit map */
+ rate_McsNetStrToDrvBitmap (&uMcsbasicRateMask,
+ (pFrame->parsedIEs->content.iePacket.pHtInformation->aHtInformationIe + DOT11_HT_INFORMATION_MCS_RATE_OFFSET));
+
+ pSite->rateMask.basicRateMask |= uMcsbasicRateMask;
+ }
+/*** MODS_END_FOR_11N_RATE_REPORTING ***/
}
/**
diff --git a/wl1271/stad/src/Sta_Management/siteHash.c b/wl1271/stad/src/Sta_Management/siteHash.c
index 4a910d1f..26301ca8 100644
--- a/wl1271/stad/src/Sta_Management/siteHash.c
+++ b/wl1271/stad/src/Sta_Management/siteHash.c
@@ -170,7 +170,8 @@ siteEntry_t *findSiteEntry(siteMgr_t *pSiteMgr,
}
}
- if ((pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE) && (tableIndex==1))
+ if ((pSiteMgr->pDesiredParams->siteMgrDesiredDot11Mode == DOT11_DUAL_MODE) &&
+ (tableIndex==1))
{ /* change site table */
if (pCurrentSiteTable == &pSiteMgr->pSitesMgmtParams->dot11BG_sitesTables)
{
diff --git a/wl1271/stad/src/Sta_Management/siteMgr.c b/wl1271/stad/src/Sta_Management/siteMgr.c
index b4b026dc..6ca2dc4e 100644
--- a/wl1271/stad/src/Sta_Management/siteMgr.c
+++ b/wl1271/stad/src/Sta_Management/siteMgr.c
@@ -292,7 +292,9 @@ TI_HANDLE siteMgr_create(TI_HANDLE hOs)
pSiteMgr = os_memoryAlloc(hOs, sizeof(siteMgr_t));
if (pSiteMgr == NULL)
+ {
return NULL;
+ }
os_memoryZero(hOs, pSiteMgr, sizeof(siteMgr_t));
@@ -605,6 +607,8 @@ TI_STATUS siteMgr_setParam(TI_HANDLE hSiteMgr,
TI_UINT32 channel;
ESlotTime slotTime;
paramInfo_t param;
+ PowerMgr_t *pPowerMgr = (PowerMgr_t*)pSiteMgr->hPowerMgr;
+ static PowerMgr_PowerMode_e desiredPowerModeProfile;
switch(pParam->paramType)
{
@@ -724,18 +728,34 @@ TI_STATUS siteMgr_setParam(TI_HANDLE hSiteMgr,
param.paramType = RSN_WPA_PROMOTE_OPTIONS;
param.content.rsnWPAPromoteFlags = ADMCTRL_WPA_OPTION_ENABLE_PROMOTE_AUTH_MODE;
rsn_setParam(pSiteMgr->hRsn, &param);
+
+ /*
+ * Set the system to Active power save
+ */
+ desiredPowerModeProfile = pPowerMgr->desiredPowerModeProfile;
+ param.paramType = POWER_MGR_POWER_MODE;
+ param.content.powerMngPowerMode.PowerMode = POWER_MODE_ACTIVE;
+ param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_USER_PRIORITY;
+ powerMgr_setParam(pSiteMgr->hPowerMgr,&param);
}
else
{
param.paramType = RSN_WPA_PROMOTE_OPTIONS;
param.content.rsnWPAPromoteFlags = ADMCTRL_WPA_OPTION_NONE;
rsn_setParam(pSiteMgr->hRsn, &param);
+
+ /*
+ * Set the system to last power mode
+ */
+ param.paramType = POWER_MGR_POWER_MODE;
+ param.content.powerMngPowerMode.PowerMode = desiredPowerModeProfile;
+ param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_USER_PRIORITY;
+ powerMgr_setParam(pSiteMgr->hPowerMgr,&param);
}
/* update the SME on the WPS mode */
- param.paramType = SME_WSC_PB_MODE_PARAM;
- sme_SetParam (pSiteMgr->hSmeSm, &param);
-
+ param.paramType = SME_WSC_PB_MODE_PARAM;
+ sme_SetParam (pSiteMgr->hSmeSm, &param);
return TI_OK;
@@ -2927,13 +2947,13 @@ void siteMgr_printPrimarySiteDesc(TI_HANDLE hSiteMgr )
/* the driver logger can't print %s
* TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_CONSOLE, "-- SSID = %s \n",pPrimarySite->ssid.str);
*/
- TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_CONSOLE,"-- BSSID = %x-%x-%x-%x-%x-%x\n",
+ TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_CONSOLE,"-- BSSID = %02x-%02x-%02x-%02x-%02x-%02x\n",
pPrimarySite->bssid[0], pPrimarySite->bssid[1], pPrimarySite->bssid[2], pPrimarySite->bssid[3],
pPrimarySite->bssid[4], pPrimarySite->bssid[5]);
WLAN_OS_REPORT(("-- SSID = %s \n",pPrimarySite->ssid.str));
- WLAN_OS_REPORT(("-- BSSID = %x-%x-%x-%x-%x-%x\n",
+ WLAN_OS_REPORT(("-- BSSID = %02x-%02x-%02x-%02x-%02x-%02x\n",
pPrimarySite->bssid[0], pPrimarySite->bssid[1], pPrimarySite->bssid[2], pPrimarySite->bssid[3],
pPrimarySite->bssid[4], pPrimarySite->bssid[5]));
}
@@ -3116,6 +3136,24 @@ RETURN:
************************************************************************/
static ERate translateRateMaskToValue(siteMgr_t *pSiteMgr, TI_UINT32 rateMask)
{
+ /* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+ if (rateMask & DRV_RATE_MASK_MCS_7_OFDM)
+ return DRV_RATE_MCS_7;
+ if (rateMask & DRV_RATE_MASK_MCS_6_OFDM)
+ return DRV_RATE_MCS_6;
+ if (rateMask & DRV_RATE_MASK_MCS_5_OFDM)
+ return DRV_RATE_MCS_5;
+ if (rateMask & DRV_RATE_MASK_MCS_4_OFDM)
+ return DRV_RATE_MCS_4;
+ if (rateMask & DRV_RATE_MASK_MCS_3_OFDM)
+ return DRV_RATE_MCS_3;
+ if (rateMask & DRV_RATE_MASK_MCS_2_OFDM)
+ return DRV_RATE_MCS_2;
+ if (rateMask & DRV_RATE_MASK_MCS_1_OFDM)
+ return DRV_RATE_MCS_1;
+ if (rateMask & DRV_RATE_MASK_MCS_0_OFDM)
+ return DRV_RATE_MCS_0;
+/* MODS_END_FOR_11N_RATE_REPORTING */
if (rateMask & DRV_RATE_MASK_54_OFDM)
return DRV_RATE_54M;
if (rateMask & DRV_RATE_MASK_48_OFDM)
@@ -3684,8 +3722,20 @@ void siteMgr_ConfigRate(TI_HANDLE hSiteMgr)
pSiteMgr->pDesiredParams->siteMgrRegstrySuppRate[OperationMode] = SUPPORTED_RATE_SET_1_2_5_5_11;
}
+/* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+#if 0
/* use HT MCS rates */
StaCap_IsHtEnable (pSiteMgr->hStaCap, &b11nEnable);
+#else
+ {
+ if (pSiteMgr->pDesiredParams->siteMgrDesiredBSSType == BSS_INFRASTRUCTURE)
+ b11nEnable = TI_TRUE;
+ else
+ b11nEnable = TI_FALSE;
+ }
+#endif
+/* MODS_END_FOR_11N_RATE_REPORTING */
+
if (TI_TRUE == b11nEnable)
{
OperationMode = DOT11_N_MODE;
diff --git a/wl1271/utils/osDot11.h b/wl1271/utils/osDot11.h
index 4973e5c3..cc7cc25e 100644
--- a/wl1271/utils/osDot11.h
+++ b/wl1271/utils/osDot11.h
@@ -201,7 +201,9 @@ typedef enum _OS_802_11_NETWORK_MODE
/**/
typedef TI_UINT8 OS_802_11_RATES[8];
-typedef TI_UINT8 OS_802_11_RATES_EX[16];
+/* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+typedef TI_UINT8 OS_802_11_RATES_EX[32];
+/* MODS_END_FOR_11N_RATE_REPORTING */
typedef struct _OS_802_11_FIXED_IEs
{
diff --git a/wl1271/utils/queue.c b/wl1271/utils/queue.c
index 92439d4d..cce06d3e 100644
--- a/wl1271/utils/queue.c
+++ b/wl1271/utils/queue.c
@@ -177,13 +177,16 @@ TI_STATUS que_Destroy (TI_HANDLE hQue)
{
TQueue *pQue = (TQueue *)hQue;
- /* Alert if the queue is unloaded before it was cleared from items */
- if (pQue->uCount)
- {
- TRACE0(pQue->hReport, REPORT_SEVERITY_ERROR, "que_Destroy() Queue Not Empty!!");
+ if (pQue)
+ {
+ /* Alert if the queue is unloaded before it was cleared from items */
+ if (pQue->uCount)
+ {
+ TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING, "que_Destroy() Queue Not Empty!!");
+ }
+ /* free Queue object */
+ os_memoryFree (pQue->hOs, pQue, sizeof(TQueue));
}
- /* free Queue object */
- os_memoryFree (pQue->hOs, pQue, sizeof(TQueue));
return TI_OK;
}
@@ -230,44 +233,45 @@ TI_STATUS que_Enqueue (TI_HANDLE hQue, TI_HANDLE hItem)
TQueue *pQue = (TQueue *)hQue;
TQueNodeHdr *pQueNodeHdr; /* the Node-Header in the given item */
-
- /* Check queue limit */
- if(pQue->uCount < pQue->uLimit)
+ if (pQue)
{
- /* Find NodeHeader in the given item */
- pQueNodeHdr = (TQueNodeHdr *)((TI_UINT8*)hItem + pQue->uNodeHeaderOffset);
-
- /* Verify that pNext is NULL --> Sanity check that this item is not already linked to a queue */
- if (pQueNodeHdr->pNext)
- {
- /* Not an error since we have a case where a timer may expire twice in a row (in TxDataQueue) */
- TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING, "que_Enqueue(): Trying to enqueue an item that is already enqueued!!");
- return TI_NOK;
- }
-
- /* Enqueue item and increment items counter */
- AddToHead (pQueNodeHdr, &pQue->tHead);
- pQue->uCount++;
-
- #ifdef TI_DBG
- if (pQue->uCount > pQue->uMaxCount)
+ /* Check queue limit */
+ if(pQue->uCount < pQue->uLimit)
{
- pQue->uMaxCount = pQue->uCount;
+ /* Find NodeHeader in the given item */
+ pQueNodeHdr = (TQueNodeHdr *)((TI_UINT8*)hItem + pQue->uNodeHeaderOffset);
+
+ /* Verify that pNext is NULL --> Sanity check that this item is not already linked to a queue */
+ if (pQueNodeHdr->pNext)
+ {
+ /* Not an error since we have a case where a timer may expire twice in a row (in TxDataQueue) */
+ TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING, "que_Enqueue(): Trying to enqueue an item that is already enqueued!!");
+ return TI_NOK;
+ }
+
+ /* Enqueue item and increment items counter */
+ AddToHead (pQueNodeHdr, &pQue->tHead);
+ pQue->uCount++;
+
+#ifdef TI_DBG
+ if (pQue->uCount > pQue->uMaxCount)
+ {
+ pQue->uMaxCount = pQue->uCount;
+ }
+ TRACE0(pQue->hReport, REPORT_SEVERITY_INFORMATION , "que_Enqueue(): Enqueued Successfully\n");
+#endif
+
+ return TI_OK;
}
- TRACE0(pQue->hReport, REPORT_SEVERITY_INFORMATION , "que_Enqueue(): Enqueued Successfully\n");
- #endif
- return TI_OK;
- }
-
- /*
- * Queue is overflowed, return TI_NOK.
- */
+ /*
+ * Queue is overflowed, return TI_NOK.
+ */
#ifdef TI_DBG
- pQue->uOverflow++;
-TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING , "que_Enqueue(): Queue Overflow\n");
+ pQue->uOverflow++;
+ TRACE0(pQue->hReport, REPORT_SEVERITY_WARNING , "que_Enqueue(): Queue Overflow\n");
#endif
-
+ }
return TI_NOK;
}
@@ -287,23 +291,26 @@ TI_HANDLE que_Dequeue (TI_HANDLE hQue)
{
TQueue *pQue = (TQueue *)hQue;
TI_HANDLE hItem;
-
- if (pQue->uCount)
+
+ if (pQue)
{
- /* Queue is not empty, take packet from the queue tail */
+ if (pQue->uCount)
+ {
+ /* Queue is not empty, take packet from the queue tail */
+
+ /* find pointer to the node entry */
+ hItem = (TI_HANDLE)((TI_UINT8*)pQue->tHead.pPrev - pQue->uNodeHeaderOffset);
- /* find pointer to the node entry */
- hItem = (TI_HANDLE)((TI_UINT8*)pQue->tHead.pPrev - pQue->uNodeHeaderOffset);
-
- DelFromTail (pQue->tHead.pPrev); /* remove node from the queue */
- pQue->uCount--;
+ DelFromTail (pQue->tHead.pPrev); /* remove node from the queue */
+ pQue->uCount--;
- #ifdef TI_DBG
+#ifdef TI_DBG
/* Clear the pNext so we can do a sanity check when enqueuing this structre in the future */
((TQueNodeHdr *)((TI_UINT8*)hItem + pQue->uNodeHeaderOffset))->pNext = NULL;
- #endif
+#endif
- return (hItem);
+ return (hItem);
+ }
}
/* Queue is empty */
@@ -417,6 +424,3 @@ void que_Print(TI_HANDLE hQue)
}
#endif /* TI_DBG */
-
-
-
diff --git a/wl1271/utils/rate.c b/wl1271/utils/rate.c
index cb83212c..fe5928ac 100644
--- a/wl1271/utils/rate.c
+++ b/wl1271/utils/rate.c
@@ -708,7 +708,9 @@ TI_STATUS rate_DrvBitmapToNetStr (TI_UINT32 uSuppRatesBitMap,
* it is only for basic and extended rates, otherwise it will exceed 16 bytes string
* the code below is a sample and can be used in the future, if need to parse MCS rates bit map to string
*/
-#if 0
+/* MODS_BEGIN_FOR_11N_RATE_REPORTING */
+#if 1 // enable the 11n rate conversions
+/* MODS_END_FOR_11N_RATE_REPORTING */
if (uSuppRatesBitMap & DRV_RATE_MASK_MCS_0_OFDM)
{
if (uBasicRatesBitMap & DRV_RATE_MASK_MCS_0_OFDM)
@@ -805,7 +807,6 @@ TI_STATUS rate_DrvBitmapToNetStr (TI_UINT32 uSuppRatesBitMap,
}
}
#endif
-
*len = i;
return TI_OK;
diff --git a/wl1271/utils/timer.c b/wl1271/utils/timer.c
index 329e2134..8686b256 100644
--- a/wl1271/utils/timer.c
+++ b/wl1271/utils/timer.c
@@ -129,11 +129,11 @@ TI_STATUS tmr_Destroy (TI_HANDLE hTimerModule)
{
WLAN_OS_REPORT (("tmr_Destroy(): ERROR - Destroying Timer module but not all timers were destroyed!!\n"));
}
-
+#if 0
/* Clear queues (critical section is used inside these functions) */
tmr_ClearInitQueue (hTimerModule);
tmr_ClearOperQueue (hTimerModule);
-
+#endif
/* Destroy the module's queues (protect in critical section)) */
context_EnterCriticalSection (pTimerModule->hContext);
que_Destroy (pTimerModule->hInitQueue);