summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Xu <pxu@qca.qualcomm.com>2014-06-04 12:10:09 -0700
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-06-17 20:00:12 -0700
commite776b7ebd2a7b84c6a0e22b780e604cf0606e243 (patch)
tree46ae60c2587a147e527b4c553545e8010a6926eb
parentfaa84b99f03b8680d5e7536512dcc412d52f0215 (diff)
qca-cld:lim: Add new message type for setting HT20/40 mode.
To support OBSS HT20/40 coex feature, a new message type for setting HT20/40 mode of SAP is added. When SAP HT20/40 mode is changed, a message is sent to Lim in order to change the beacon content accordingly. Change-Id: Iec668252d05492cf7254f602c302272a624260aa CRs-fixed: 639836
-rw-r--r--CORE/MAC/inc/sirApi.h11
-rw-r--r--CORE/MAC/inc/sirMacProtDef.h8
-rw-r--r--CORE/MAC/inc/wniApi.h4
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMessageQueue.c9
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c62
5 files changed, 94 insertions, 0 deletions
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index f478bdc4b0d0..4c38f2e35424 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -3510,6 +3510,17 @@ typedef struct sSirChangeBIParams
tANI_U8 sessionId; // Session ID
} tSirChangeBIParams, *tpSirChangeBIParams;
+#ifdef QCA_HT_2040_COEX
+typedef struct sSirSetHT2040Mode
+{
+ tANI_U16 messageType;
+ tANI_U16 length;
+ tANI_U8 cbMode;
+ tSirMacAddr bssId;
+ tANI_U8 sessionId; // Session ID
+} tSirSetHT2040Mode, *tpSirSetHT2040Mode;
+#endif
+
#define SIR_WPS_UUID_LEN 16
#define SIR_WPS_PBC_WALK_TIME 120 // 120 Second
diff --git a/CORE/MAC/inc/sirMacProtDef.h b/CORE/MAC/inc/sirMacProtDef.h
index 2dc55f862a53..d0e316b76f71 100644
--- a/CORE/MAC/inc/sirMacProtDef.h
+++ b/CORE/MAC/inc/sirMacProtDef.h
@@ -1845,6 +1845,14 @@ typedef enum eSirMacHTChannelWidth
eHT_MAX_CHANNEL_WIDTH
} tSirMacHTChannelWidth;
+typedef enum eSirMacHTChannelType
+{
+ eHT_CHAN_NO_HT = 0,
+ eHT_CHAN_HT20 = 1,
+ eHT_CHAN_HT40MINUS = 2,
+ eHT_CHAN_HT40PLUS = 3
+} tSirMacHTChannelType;
+
//Packet struct for HT capability
typedef __ani_attr_pre_packed struct sHtCaps {
tANI_U16 advCodingCap: 1;
diff --git a/CORE/MAC/inc/wniApi.h b/CORE/MAC/inc/wniApi.h
index 79a7fae0335b..4f420b7d48eb 100644
--- a/CORE/MAC/inc/wniApi.h
+++ b/CORE/MAC/inc/wniApi.h
@@ -396,6 +396,10 @@ enum eWniMsgTypes
eWNI_SME_LINK_SPEED_IND,//Indicate linkspeed response from WMA
eWNI_SME_CSA_OFFLOAD_EVENT,
eWNI_SME_UPDATE_ADDITIONAL_IES, // indicates Additional IE from hdd to PE
+#ifdef QCA_HT_2040_COEX
+ eWNI_SME_SET_HT_2040_MODE,
+#endif
+
eWNI_SME_MSG_TYPES_END
};
diff --git a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
index 8cb1e9e85dfd..35c7dd094238 100644
--- a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
+++ b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
@@ -2181,6 +2181,15 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
vos_mem_free((v_VOID_t*)limMsg->bodyptr);
limMsg->bodyptr = NULL;
break;
+
+#ifdef QCA_HT_2040_COEX
+ case eWNI_SME_SET_HT_2040_MODE:
+ limProcessSmeReqMessages(pMac, limMsg);
+ vos_mem_free((v_VOID_t*)limMsg->bodyptr);
+ limMsg->bodyptr = NULL;
+ break;
+#endif
+
default:
vos_mem_free((v_VOID_t*)limMsg->bodyptr);
limMsg->bodyptr = NULL;
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index c72038e77ae9..8561b31c6d42 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -57,6 +57,7 @@
#include "limSendMessages.h"
#include "limApi.h"
#include "wmmApsd.h"
+#include "sirMacProtDef.h"
#include "sapApi.h"
@@ -4732,7 +4733,62 @@ __limProcessSmeChangeBI(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
return;
} /*** end __limProcessSmeChangeBI(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) ***/
+#ifdef QCA_HT_2040_COEX
+static void __limProcessSmeSetHT2040Mode(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
+{
+ tpSirSetHT2040Mode pSetHT2040Mode;
+ tpPESession psessionEntry;
+ tANI_U8 sessionId = 0;
+
+ PELOG1(limLog(pMac, LOG1,
+ FL("received Set HT 20/40 mode message")););
+ if(pMsgBuf == NULL)
+ {
+ limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
+ return;
+ }
+ pSetHT2040Mode = (tpSirSetHT2040Mode)pMsgBuf;
+
+ if((psessionEntry = peFindSessionByBssid(pMac, pSetHT2040Mode->bssId,
+ &sessionId)) == NULL)
+ {
+ limLog(pMac, LOG1, FL("Session does not exist for given BSSID "));
+ limPrintMacAddr(pMac, pSetHT2040Mode->bssId, LOG1);
+ return;
+ }
+
+ limLog(pMac, LOG1, FL("Update session entry for cbMod=%d"),
+ pSetHT2040Mode->cbMode);
+ /*Update sessionEntry HT related fields*/
+ switch(pSetHT2040Mode->cbMode)
+ {
+ case PHY_SINGLE_CHANNEL_CENTERED:
+ psessionEntry->htSupportedChannelWidthSet = eHT_CHANNEL_WIDTH_20MHZ;
+ psessionEntry->htSecondaryChannelOffset = PHY_SINGLE_CHANNEL_CENTERED;
+ psessionEntry->htRecommendedTxWidthSet = eHT_CHANNEL_WIDTH_20MHZ;
+ break;
+ case PHY_DOUBLE_CHANNEL_LOW_PRIMARY:
+ psessionEntry->htSupportedChannelWidthSet = eHT_CHANNEL_WIDTH_40MHZ;
+ psessionEntry->htSecondaryChannelOffset = PHY_DOUBLE_CHANNEL_LOW_PRIMARY;
+ psessionEntry->htRecommendedTxWidthSet = eHT_CHANNEL_WIDTH_40MHZ;
+ break;
+ case PHY_DOUBLE_CHANNEL_HIGH_PRIMARY:
+ psessionEntry->htSupportedChannelWidthSet = eHT_CHANNEL_WIDTH_40MHZ;
+ psessionEntry->htSecondaryChannelOffset = PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
+ psessionEntry->htRecommendedTxWidthSet = eHT_CHANNEL_WIDTH_40MHZ;
+ break;
+ default:
+ limLog(pMac, LOGE,FL("Invalid cbMode"));
+ return;
+ }
+
+ /* Update beacon */
+ schSetFixedBeaconFields(pMac, psessionEntry);
+ limSendBeaconInd(pMac, psessionEntry);
+ return;
+}
+#endif
/** -------------------------------------------------------------
\fn limProcessSmeDelBaPeerInd
@@ -5889,6 +5945,12 @@ limProcessSmeReqMessages(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
__limProcessSmeChangeBI(pMac, pMsgBuf );
break;
+#ifdef QCA_HT_2040_COEX
+ case eWNI_SME_SET_HT_2040_MODE:
+ __limProcessSmeSetHT2040Mode(pMac, pMsgBuf);
+ break;
+#endif
+
#if defined WLAN_FEATURE_VOWIFI
case eWNI_SME_NEIGHBOR_REPORT_REQ_IND:
case eWNI_SME_BEACON_REPORT_RESP_XMIT_IND: