summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-01-14 14:53:04 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-01-14 14:54:39 +0530
commitdaf2113bdfc6ffebc2faf4dc373a868a623db564 (patch)
treef662a7e214a5daf6386ae11e4fed3df1eb27cbae
parentfa363a7e4aa8ab99e13803620cfa3455c98af0a3 (diff)
parentf56c613acfbac2d928e0ac4eca93611f2a5e8c4f (diff)
Release 4.0.10.14 QCACLD WLAN Driver
Merge remote-tracking branch 'origin/caf/caf-wlan/master' into HEAD * origin/caf/caf-wlan/master: Cafstaging Release 4.0.10.14 qcacld: Delete STA after SA query timeout qcacld: Channel avoidance for MDM AP-MCC Change-Id: Idf4ba772b9fc9f5602c547edd061977ec6366c2c
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/MAC/inc/sirMacProtDef.h8
-rw-r--r--CORE/MAC/src/cfg/cfgApi.c48
-rw-r--r--CORE/MAC/src/cfg/cfgUtil/dot11f.frms12
-rw-r--r--CORE/MAC/src/include/cfgApi.h8
-rw-r--r--CORE/MAC/src/include/dot11f.h38
-rw-r--r--CORE/MAC/src/include/parserApi.h28
-rw-r--r--CORE/MAC/src/include/sirParams.h4
-rw-r--r--CORE/MAC/src/pe/include/limSession.h31
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMessageQueue.c41
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c4
-rw-r--r--CORE/MAC/src/pe/lim/limSession.c29
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.c42
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.h7
-rw-r--r--CORE/MAC/src/pe/sch/schBeaconGen.c17
-rw-r--r--CORE/SAP/src/sapChSelect.c152
-rw-r--r--CORE/SAP/src/sapFsm.c24
-rw-r--r--CORE/SAP/src/sapInternal.h43
-rw-r--r--CORE/SERVICES/WMA/wma.c71
-rw-r--r--CORE/SYS/legacy/src/utils/src/dot11f.c250
-rw-r--r--CORE/SYS/legacy/src/utils/src/parserApi.c83
-rw-r--r--CORE/WDA/inc/wlan_qct_wda.h4
-rw-r--r--Kbuild4
23 files changed, 836 insertions, 116 deletions
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index 46edc1089e64..6dceacdae333 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 10
#define QWLAN_VERSION_EXTRA ""
-#define QWLAN_VERSION_BUILD 13
+#define QWLAN_VERSION_BUILD 14
-#define QWLAN_VERSIONSTR "4.0.10.13"
+#define QWLAN_VERSIONSTR "4.0.10.14"
#define AR6320_REV1_VERSION 0x5000000
diff --git a/CORE/MAC/inc/sirMacProtDef.h b/CORE/MAC/inc/sirMacProtDef.h
index 084fab729147..495d67f1d7da 100644
--- a/CORE/MAC/inc/sirMacProtDef.h
+++ b/CORE/MAC/inc/sirMacProtDef.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -378,6 +378,12 @@
#endif
#define SIR_MAC_MAX_SUPPORTED_MCS_SET 16
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+#define SIR_MAC_QCOM_VENDOR_EID 200
+#define SIR_MAC_QCOM_VENDOR_OUI "\x00\xA0\xC6"
+#define SIR_MAC_QCOM_VENDOR_SIZE 3
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
/// Workaround IE to change beacon length when it is 4*n+1
#define SIR_MAC_ANI_WORKAROUND_EID 255
#define SIR_MAC_ANI_WORKAROUND_EID_MIN 0
diff --git a/CORE/MAC/src/cfg/cfgApi.c b/CORE/MAC/src/cfg/cfgApi.c
index 5008619b78c1..fded8e2bc561 100644
--- a/CORE/MAC/src/cfg/cfgApi.c
+++ b/CORE/MAC/src/cfg/cfgApi.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1077,4 +1077,50 @@ Notify(tpAniSirGlobal pMac, tANI_U16 cfgId, tANI_U32 ntfMask)
} /*** end Notify() ***/
+/**
+ * cfg_get_vendor_ie_ptr_from_oui() - returns IE pointer in IE buffer given its
+ * OUI and OUI size
+ * @mac_ctx: mac context.
+ * @oui: OUI string.
+ * @oui_size: length of OUI string
+ * One can provide multiple line descriptions
+ * for arguments.
+ * @ie: ie buffer
+ * @ie_len: length of ie buffer
+ *
+ * This function parses the IE buffer and finds the given OUI and returns its
+ * pointer
+ *
+ * Return: pointer of given OUI IE else NULL
+ */
+uint8_t* cfg_get_vendor_ie_ptr_from_oui(tpAniSirGlobal mac_ctx,
+ uint8_t *oui,
+ uint8_t oui_size,
+ uint8_t *ie,
+ uint16_t ie_len)
+{
+ int32_t left = ie_len;
+ uint8_t *ptr = ie;
+ uint8_t elem_id, elem_len;
+
+ while(left >= 2) {
+ elem_id = ptr[0];
+ elem_len = ptr[1];
+ left -= 2;
+ if(elem_len > left) {
+ cfgLog(mac_ctx, LOGE,
+ FL("Invalid IEs eid = %d elem_len=%d left=%d"),
+ elem_id, elem_len, left);
+ return NULL;
+ }
+ if (SIR_MAC_EID_VENDOR == elem_id) {
+ if(memcmp(&ptr[2], oui, oui_size)==0)
+ return ptr;
+ }
+
+ left -= elem_len;
+ ptr += (elem_len + 2);
+ }
+ return NULL;
+}
// ---------------------------------------------------------------------
diff --git a/CORE/MAC/src/cfg/cfgUtil/dot11f.frms b/CORE/MAC/src/cfg/cfgUtil/dot11f.frms
index ba553e7094a7..9064ec5540f2 100644
--- a/CORE/MAC/src/cfg/cfgUtil/dot11f.frms
+++ b/CORE/MAC/src/cfg/cfgUtil/dot11f.frms
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2007,2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2006-2007,2014-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2033,6 +2033,12 @@ IE Vendor3IE (EID_VENDOR_SPECIFIC) OUI (0x00, 0x16, 0x32)
{
}
+IE QComVendorIE (EID_VENDOR_SPECIFIC) OUI (0x00, 0xA0, 0xC6)
+{
+ type, 1;
+ data[0..255];
+}
+
IE ESETrafStrmMet (EID_VENDOR_SPECIFIC) OUI (0x00, 0x40, 0x96, 0x07)
{
tsid, 1;
@@ -3124,6 +3130,7 @@ FRAME Beacon // C.f. Sec. 7.2.3.1
OPTIE Vendor2IE;
OPTIE Vendor3IE;
OPTIE ChannelSwitchWrapper;
+ OPTIE QComVendorIE;
} // End frame Beacon.
// Ok, here's the story on Beacon1 & Beacon2. We presumably beacon a lot
@@ -3207,6 +3214,7 @@ FRAME Beacon2
OPTIE Vendor2IE;
OPTIE Vendor3IE;
OPTIE ChannelSwitchWrapper;
+ OPTIE QComVendorIE;
}
// This frame is just Beacon with its Fixed Fields stripped out. It's handy
@@ -3267,6 +3275,7 @@ FRAME BeaconIEs
OPTIE Vendor2IE;
OPTIE Vendor3IE;
OPTIE ChannelSwitchWrapper;
+ OPTIE QComVendorIE;
} // End frame BeaconIEs.
@@ -3473,6 +3482,7 @@ FRAME ProbeResponse // 7.2.3.9
OPTIE Vendor2IE;
OPTIE Vendor3IE;
OPTIE ChannelSwitchWrapper;
+ OPTIE QComVendorIE;
} // End frame ProbeResponse.
FRAME Authentication // 7.2.3.10
diff --git a/CORE/MAC/src/include/cfgApi.h b/CORE/MAC/src/include/cfgApi.h
index 6691e728497b..b3a10218efa0 100644
--- a/CORE/MAC/src/include/cfgApi.h
+++ b/CORE/MAC/src/include/cfgApi.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2012,2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2012,2014-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -125,4 +125,10 @@ void cfgCleanup(tpAniSirGlobal pMac);
extern tANI_U8 *gCfgParamName[];
+uint8_t* cfg_get_vendor_ie_ptr_from_oui(tpAniSirGlobal mac_ctx,
+ uint8_t *oui,
+ uint8_t oui_size,
+ uint8_t *ie,
+ uint16_t ie_len);
+
#endif /* __CFGAPI_H */
diff --git a/CORE/MAC/src/include/dot11f.h b/CORE/MAC/src/include/dot11f.h
index 36dabd9dc391..c81bdc053131 100644
--- a/CORE/MAC/src/include/dot11f.h
+++ b/CORE/MAC/src/include/dot11f.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -37,9 +37,9 @@
*
*
* This file was automatically generated by 'framesc'
- * Mon Dec 1 15:21:01 2014 from the following file(s):
+ * Tue Jan 13 11:09:30 2015 from the following file(s):
*
- * dot11f.frms
+ * CORE/MAC/src/cfg/cfgUtil/dot11f.frms
*
* PLEASE DON'T EDIT THIS FILE BY HAND!
*
@@ -2649,6 +2649,7 @@ tANI_U32 dot11fPackIeAID(tpAniSirGlobal, tDot11fIEAID*, tANI_U8*, tANI_U32, tANI
tANI_U32 dot11fGetPackedIEAID(tpAniSirGlobal, tDot11fIEAID*, tANI_U32*);
+
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
@@ -4532,6 +4533,33 @@ tANI_U32 dot11fGetPackedIEQBSSLoad(tpAniSirGlobal, tDot11fIEQBSSLoad*, tANI_U32*
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
+// EID 221 (0xdd) {OUI 0x00, 0xa0, 0xc6}
+typedef struct sDot11fIEQComVendorIE {
+ tANI_U8 present;
+ tANI_U8 type;
+ tANI_U8 num_data;
+ tANI_U8 data[255];
+} tDot11fIEQComVendorIE;
+
+#define DOT11F_EID_QCOMVENDORIE ( 221 )
+
+// N.B. These #defines do *not* include the EID & length
+#define DOT11F_IE_QCOMVENDORIE_MIN_LEN ( 4 )
+
+#define DOT11F_IE_QCOMVENDORIE_MAX_LEN ( 259 )
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+tANI_U32 dot11fUnpackIeQComVendorIE(tpAniSirGlobal, tANI_U8*,tANI_U8, tDot11fIEQComVendorIE*);
+
+tANI_U32 dot11fPackIeQComVendorIE(tpAniSirGlobal, tDot11fIEQComVendorIE*, tANI_U8*, tANI_U32, tANI_U32*);
+
+tANI_U32 dot11fGetPackedIEQComVendorIE(tpAniSirGlobal, tDot11fIEQComVendorIE*, tANI_U32*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
// EID 46 (0x2e)
typedef struct sDot11fIEQOSCapsAp {
tANI_U8 present;
@@ -6073,6 +6101,7 @@ typedef struct sDot11fBeacon{
tDot11fIEVendor2IE Vendor2IE;
tDot11fIEVendor3IE Vendor3IE;
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
+ tDot11fIEQComVendorIE QComVendorIE;
} tDot11fBeacon;
#define DOT11F_BEACON ( 8 )
@@ -6150,6 +6179,7 @@ typedef struct sDot11fBeacon2{
tDot11fIEVendor2IE Vendor2IE;
tDot11fIEVendor3IE Vendor3IE;
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
+ tDot11fIEQComVendorIE QComVendorIE;
} tDot11fBeacon2;
#define DOT11F_BEACON2 ( 10 )
@@ -6215,6 +6245,7 @@ typedef struct sDot11fBeaconIEs{
tDot11fIEVendor2IE Vendor2IE;
tDot11fIEVendor3IE Vendor3IE;
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
+ tDot11fIEQComVendorIE QComVendorIE;
} tDot11fBeaconIEs;
#define DOT11F_BEACONIES ( 11 )
@@ -6834,6 +6865,7 @@ typedef struct sDot11fProbeResponse{
tDot11fIEVendor2IE Vendor2IE;
tDot11fIEVendor3IE Vendor3IE;
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
+ tDot11fIEQComVendorIE QComVendorIE;
} tDot11fProbeResponse;
#define DOT11F_PROBERESPONSE ( 37 )
diff --git a/CORE/MAC/src/include/parserApi.h b/CORE/MAC/src/include/parserApi.h
index 8876dd50d249..67ed406fb5c6 100644
--- a/CORE/MAC/src/include/parserApi.h
+++ b/CORE/MAC/src/include/parserApi.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -56,6 +56,21 @@
#define IS_2X2_CHAIN(__chain) ((__chain & 0x3) == 0x3)
#define DISABLE_NSS2_MCS 0xC
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+#define QCOM_VENDOR_IE_MCC_AVOID_CH 0x01
+
+struct sAvoidChannelIE {
+ /* following must be 0xDD (221) */
+ uint8_t tag_number;
+ uint8_t length;
+ /* following must be 00-A0-C6 */
+ uint8_t oui[3];
+ /* following must be 0x01 */
+ uint8_t type;
+ uint8_t channels[1];
+};
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
typedef struct sSirCountryInformation
{
tANI_U8 countryString[COUNTRY_STRING_LENGTH];
@@ -148,6 +163,9 @@ typedef struct sSirProbeRespBeacon
tANI_U8 Vendor3IEPresent;
tDot11fIEIBSSParams IBSSParams;
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ tDot11fIEQComVendorIE AvoidChannelIE;
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
} tSirProbeRespBeacon, *tpSirProbeRespBeacon;
// probe Request structure
@@ -502,6 +520,14 @@ PopulateDot11fChanSwitchWrapper(tpAniSirGlobal pMac,
tDot11fIEChannelSwitchWrapper *pDot11f,
tpPESession psessionEntry);
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+/* Populate a tDot11fIEQComVendorIE */
+void
+populate_dot11f_avoid_channels_ie(tpAniSirGlobal mac_ctx,
+ tDot11fIEQComVendorIE *dot11f,
+ tpPESession session_entry);
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
/// Populate a tDot11fIECountry
tSirRetStatus
PopulateDot11fCountry(tpAniSirGlobal pMac,
diff --git a/CORE/MAC/src/include/sirParams.h b/CORE/MAC/src/include/sirParams.h
index db441d7b62c8..840351a6eccf 100644
--- a/CORE/MAC/src/include/sirParams.h
+++ b/CORE/MAC/src/include/sirParams.h
@@ -694,6 +694,10 @@ typedef struct sSirMbMsgP2p
#define SIR_HAL_WLAN_AUTO_RESUME_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 309)
#endif
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+#define SIR_HAL_UPDATE_Q2Q_IE_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 310)
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
#define SIR_HAL_MSG_TYPES_END (SIR_HAL_MSG_TYPES_BEGIN + 0x1FF)
// CFG message types
diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h
index abba9026a425..18879619c1b5 100644
--- a/CORE/MAC/src/pe/include/limSession.h
+++ b/CORE/MAC/src/pe/include/limSession.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -483,6 +483,10 @@ typedef struct sPESession // Added to Support BT-AMP
*/
tANI_U16 old_protection_state;
tSirMacAddr prev_ap_bssid;
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ /* tells if Q2Q IE, from another MDM device in AP MCC mode was recvd */
+ bool sap_advertise_avoid_ch_ie;
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
}tPESession, *tpPESession;
/*-------------------------------------------------------------------------
@@ -610,16 +614,19 @@ tpPESession peFindSessionByPeerSta(tpAniSirGlobal pMac, tANI_U8* sa, tANI_U8* s
--------------------------------------------------------------------------*/
void peDeleteSession(tpAniSirGlobal pMac, tpPESession psessionEntry);
-
-/*--------------------------------------------------------------------------
- \brief peDeleteSession() - Returns the SME session ID and Transaction ID .
-
-
- \param pMac - pointer to global adapter context
- \param sessionId -session ID of the session which needs to be deleted.
-
- \sa
- --------------------------------------------------------------------------*/
-
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+/**
+ * pe_find_session_by_sme_session_id() - looks up the PE session for given sme
+ * session id
+ * @mac_ctx: pointer to global adapter context
+ * @sme_session_id: sme session id
+ *
+ * looks up the PE session for given sme session id
+ *
+ * Return: pe session entry for given sme session if found else NULL
+ */
+tpPESession pe_find_session_by_sme_session_id(tpAniSirGlobal mac_ctx,
+ uint8_t sme_session_id);
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
#endif //#if !defined( __LIM_SESSION_H )
diff --git a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
index 558d51f86d1c..a19977717e96 100644
--- a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
+++ b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1096,6 +1096,13 @@ void limProcessOemDataRsp(tpAniSirGlobal pMac, tANI_U32* body)
void
limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
{
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ uint8_t vdev_id = 0;
+ uint8_t i;
+ tpPESession session_entry = NULL;
+ tUpdateBeaconParams beacon_params;
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
tANI_U8 deferMsg = false;
tLinkStateParams *linkStateParams;
#if defined WLAN_FEATURE_VOWIFI_11R
@@ -1780,7 +1787,37 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
case WDA_DEL_STA_SELF_RSP:
limProcessDelStaSelfRsp(pMac, limMsg);
break;
-
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ case WDA_UPDATE_Q2Q_IE_IND:
+ /*
+ * this device is operating AP in MCC mode, update Q2Q IE in
+ * beacon template
+ */
+ vos_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams));
+ beacon_params.paramChangeBitmap = 0;
+ for ( i = 0; i < pMac->lim.maxBssId; i++) {
+ vdev_id = ((tANI_U8*)limMsg->bodyptr)[i];
+ session_entry = pe_find_session_by_sme_session_id(pMac,
+ vdev_id);
+ if(session_entry == NULL)
+ continue;
+ session_entry->sap_advertise_avoid_ch_ie =
+ (tANI_U8)limMsg->bodyval;
+
+ beacon_params.bssIdx = session_entry->bssIdx;
+ schSetFixedBeaconFields(pMac, session_entry);
+
+ beacon_params.beaconInterval =
+ session_entry->beaconParams.beaconInterval;
+ beacon_params.paramChangeBitmap |=
+ PARAM_BCN_INTERVAL_CHANGED;
+ limSendBeaconParams(pMac,
+ &beacon_params,
+ session_entry);
+ }
+ vos_mem_free(limMsg->bodyptr);
+ break;
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
case WDA_DELETE_BSS_RSP:
limHandleDeleteBssRsp(pMac,limMsg); //wrapper routine to handle delete bss response
break;
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 1f6c40489c7e..fff3ad639930 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1890,7 +1890,7 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
sizeof( pSmeJoinReq->bssDescription.length ) -
GET_FIELD_OFFSET( tSirBssDescription, ieFields ));
- vendorIE = limGetVendorIEOuiPtr(pMac, SIR_MAC_CISCO_OUI,
+ vendorIE = cfg_get_vendor_ie_ptr_from_oui(pMac, SIR_MAC_CISCO_OUI,
SIR_MAC_CISCO_OUI_SIZE,
((tANI_U8 *)&pSmeJoinReq->bssDescription.ieFields) , ieLen);
diff --git a/CORE/MAC/src/pe/lim/limSession.c b/CORE/MAC/src/pe/lim/limSession.c
index 4941e3a31ced..ca64c730c42b 100644
--- a/CORE/MAC/src/pe/lim/limSession.c
+++ b/CORE/MAC/src/pe/lim/limSession.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -474,6 +474,33 @@ tpPESession peFindSessionByBssIdx(tpAniSirGlobal pMac, tANI_U8 bssIdx)
return NULL;
}
+/**
+ * pe_find_session_by_sme_session_id() - looks up the PE session for given sme
+ * session id
+ * @mac_ctx: pointer to global adapter context
+ * @sme_session_id: sme session id
+ *
+ * looks up the PE session for given sme session id
+ *
+ * Return: pe session entry for given sme session if found else NULL
+ */
+tpPESession pe_find_session_by_sme_session_id(tpAniSirGlobal mac_ctx,
+ tANI_U8 sme_session_id)
+{
+ uint8_t i;
+ for (i = 0; i < mac_ctx->lim.maxBssId; i++) {
+ if ( (mac_ctx->lim.gpSession[i].valid) &&
+ (mac_ctx->lim.gpSession[i].smeSessionId ==
+ sme_session_id) ) {
+ return &mac_ctx->lim.gpSession[i];
+ }
+ }
+ limLog(mac_ctx, LOG4,
+ FL("Session lookup fails for smeSessionID: %d"),
+ sme_session_id);
+ return NULL;
+}
+
/*--------------------------------------------------------------------------
\brief peFindSessionBySessionId() - looks up the PE session given the session ID.
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index 23b29b257f6d..7cc1971a51af 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -6936,39 +6936,6 @@ v_U8_t* limGetIEPtr(tpAniSirGlobal pMac, v_U8_t *pIes, int length, v_U8_t eid,eS
return NULL;
}
-/* return NULL if oui is not found in ie
- return !NULL pointer to vendor IE (starting from 0xDD) if oui is found
- */
-v_U8_t* limGetVendorIEOuiPtr(tpAniSirGlobal pMac, tANI_U8 *oui, tANI_U8 oui_size, tANI_U8 *ie, tANI_U16 ie_len)
-{
- int left = ie_len;
- v_U8_t *ptr = ie;
- v_U8_t elem_id, elem_len;
-
- while(left >= 2)
- {
- elem_id = ptr[0];
- elem_len = ptr[1];
- left -= 2;
- if(elem_len > left)
- {
- limLog( pMac, LOGE,
- FL("****Invalid IEs eid = %d elem_len=%d left=%d*****"),
- elem_id,elem_len,left);
- return NULL;
- }
- if (SIR_MAC_EID_VENDOR == elem_id)
- {
- if(memcmp(&ptr[2], oui, oui_size)==0)
- return ptr;
- }
-
- left -= elem_len;
- ptr += (elem_len + 2);
- }
- return NULL;
-}
-
//Returns length of P2P stream and Pointer ie passed to this function is filled with noa stream
v_U8_t limBuildP2pIe(tpAniSirGlobal pMac, tANI_U8 *ie, tANI_U8 *data, tANI_U8 ie_len)
@@ -7195,7 +7162,12 @@ void limPmfSaQueryTimerHandler(void *pMacGlobal, tANI_U32 param)
pSta->pmfSaQueryRetryCount++;
if (pSta->pmfSaQueryRetryCount >= maxRetries)
{
- limLog(pMac, LOGE, FL("SA Query timed out"));
+ limLog(pMac, LOGE, FL("SA Query timed out,Deleting STA"));
+ limPrintMacAddr(pMac, pSta->staAddr, LOGE);
+ limSendDisassocMgmtFrame(pMac,
+ eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON,
+ pSta->staAddr, psessionEntry, FALSE);
+ limTriggerSTAdeletion(pMac, pSta, psessionEntry);
pSta->pmfSaQueryState = DPH_SA_QUERY_TIMED_OUT;
return;
}
diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h
index ae83c1559e6a..7b08e1024c92 100644
--- a/CORE/MAC/src/pe/lim/limUtils.h
+++ b/CORE/MAC/src/pe/lim/limUtils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -437,17 +437,16 @@ v_U8_t* limGetIEPtr(tpAniSirGlobal pMac, v_U8_t *pIes, int length, v_U8_t eid,eS
tANI_U8 limUnmapChannel(tANI_U8 mapChannel);
#define limGetWscIEPtr(pMac, ie, ie_len) \
- limGetVendorIEOuiPtr(pMac, SIR_MAC_WSC_OUI, SIR_MAC_WSC_OUI_SIZE, ie, ie_len)
+ cfg_get_vendor_ie_ptr_from_oui(pMac, SIR_MAC_WSC_OUI, SIR_MAC_WSC_OUI_SIZE, ie, ie_len)
#define limGetP2pIEPtr(pMac, ie, ie_len) \
- limGetVendorIEOuiPtr(pMac, SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE, ie, ie_len)
+ cfg_get_vendor_ie_ptr_from_oui(pMac, SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE, ie, ie_len)
v_U8_t limGetNoaAttrStreamInMultP2pIes(tpAniSirGlobal pMac,v_U8_t* noaStream,v_U8_t noaLen,v_U8_t overFlowLen);
v_U8_t limGetNoaAttrStream(tpAniSirGlobal pMac, v_U8_t*pNoaStream,tpPESession psessionEntry);
v_U8_t limBuildP2pIe(tpAniSirGlobal pMac, tANI_U8 *ie, tANI_U8 *data, tANI_U8 ie_len);
tANI_BOOLEAN limIsNOAInsertReqd(tpAniSirGlobal pMac);
-v_U8_t* limGetVendorIEOuiPtr(tpAniSirGlobal pMac, tANI_U8 *oui, tANI_U8 oui_size, tANI_U8 *ie, tANI_U16 ie_len);
tANI_BOOLEAN limIsconnectedOnDFSChannel(tANI_U8 currentChannel);
tANI_U8 limGetCurrentOperatingChannel(tpAniSirGlobal pMac);
diff --git a/CORE/MAC/src/pe/sch/schBeaconGen.c b/CORE/MAC/src/pe/sch/schBeaconGen.c
index 558fbca08a86..b099bd7e6739 100644
--- a/CORE/MAC/src/pe/sch/schBeaconGen.c
+++ b/CORE/MAC/src/pe/sch/schBeaconGen.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -352,6 +352,10 @@ tSirRetStatus schSetFixedBeaconFields(tpAniSirGlobal pMac,tpPESession psessionEn
}
}
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ /* populate proprietary IE for MDM device operating in AP-MCC */
+ populate_dot11f_avoid_channels_ie(pMac, &pBcn2->QComVendorIE, psessionEntry);
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
if (psessionEntry->dot11mode != WNI_CFG_DOT11_MODE_11B)
PopulateDot11fERPInfo( pMac, &pBcn2->ERPInfo, psessionEntry );
@@ -593,6 +597,17 @@ void limUpdateProbeRspTemplateIeBitmapBeacon2(tpAniSirGlobal pMac,
sizeof(beacon2->ChanSwitchAnn));
}
+
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ if(beacon2->QComVendorIE.present)
+ {
+ SetProbeRspIeBitmap(DefProbeRspIeBitmap, SIR_MAC_QCOM_VENDOR_EID);
+ vos_mem_copy((void *)&prb_rsp->QComVendorIE,
+ (void *)&beacon2->QComVendorIE,
+ sizeof(beacon2->QComVendorIE));
+ }
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
/* ERP information */
if(beacon2->ERPInfo.present)
{
diff --git a/CORE/SAP/src/sapChSelect.c b/CORE/SAP/src/sapChSelect.c
index 7cd30ce2d706..c9626c26ce8c 100644
--- a/CORE/SAP/src/sapChSelect.c
+++ b/CORE/SAP/src/sapChSelect.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -68,6 +68,11 @@
#endif
#include "wlan_hdd_main.h"
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+#include "limUtils.h"
+#include "parserApi.h"
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
/*--------------------------------------------------------------------------
Function definitions
--------------------------------------------------------------------------*/
@@ -182,6 +187,136 @@ typedef enum {
#define CHANNEL_165 165
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+/**
+ * sap_check_in_avoid_ch_list() - checks if given channel present is channel
+ * avoidance list
+ * avoid_channels_info struct
+ * @sap_ctx: sap context.
+ * @channel: channel to be checked in sap_ctx's avoid ch list
+ *
+ * sap_ctx contains sap_avoid_ch_info strcut containing the list of channels on
+ * which MDM device's AP with MCC was detected. This function checks if given
+ * channel is present in that list.
+ *
+ * Return: true, if channel was present, false othersie.
+ */
+bool
+sap_check_in_avoid_ch_list(ptSapContext sap_ctx, uint8_t channel)
+{
+ uint8_t i = 0;
+ struct sap_avoid_channels_info *ie_info =
+ &sap_ctx->sap_detected_avoid_ch_ie;
+
+ for (i = 0; i < sizeof(ie_info->channels); i++) {
+ if (ie_info->channels[i] == channel) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * sap_check_n_add_channel() - checks and add given channel in sap context's
+ * avoid_channels_info struct
+ * @sap_ctx: sap context.
+ * @new_channel: channel to be added to sap_ctx's avoid ch info
+ *
+ * sap_ctx contains sap_avoid_ch_info strcut containing the list of channels on
+ * which MDM device's AP with MCC was detected. This function will add channels
+ * to that list after checking for duplicates.
+ *
+ * Return: true: if channel was added or already present
+ * else false: if channel list was already full.
+ */
+bool
+sap_check_n_add_channel(ptSapContext sap_ctx,
+ uint8_t new_channel)
+{
+ uint8_t i = 0;
+ struct sap_avoid_channels_info *ie_info =
+ &sap_ctx->sap_detected_avoid_ch_ie;
+
+ for (i = 0; i < sizeof(ie_info->channels); i++) {
+ if (ie_info->channels[i] == new_channel)
+ break;
+
+ if (ie_info->channels[i] == 0) {
+ ie_info->channels[i] = new_channel;
+ break;
+ }
+ }
+ if(i == sizeof(ie_info->channels))
+ return false;
+ else
+ return true;
+}
+
+/**
+ * sap_process_avoid_ie() - processes the detected Q2Q IE
+ * context's avoid_channels_info struct
+ * @hal: hal handle
+ * @sap_ctx: sap context.
+ * @scan_result: scan results for ACS scan.
+ *
+ * Detection of Q2Q IE indicates presence of another MDM device with its AP
+ * operating in MCC mode. This function parses the scan results and processes
+ * the Q2Q IE if found. It then extracts the channels and populates them in
+ * sap_ctx sturct. It also increases the weights of those channels so that
+ * ACS logic will avoid those channels in its selection algorigthm.
+ *
+ * Return: void
+ */
+
+void
+sap_process_avoid_ie(tHalHandle hal,
+ ptSapContext sap_ctx,
+ tScanResultHandle scan_result)
+{
+ uint8_t i;
+ uint32_t total_ie_len = 0;
+ uint8_t *temp_ptr = NULL;
+ uint8_t num_channels;
+ struct sAvoidChannelIE *avoid_ch_ie;
+ tCsrScanResultInfo *node = NULL;
+ tpAniSirGlobal mac_ctx = NULL;
+
+ mac_ctx = PMAC_STRUCT(hal);
+ node = sme_ScanResultGetFirst(hal, scan_result);
+
+ while (node) {
+ total_ie_len = (node->BssDescriptor.length +
+ sizeof(tANI_U16) + sizeof(tANI_U32) -
+ sizeof(tSirBssDescription));
+ temp_ptr = cfg_get_vendor_ie_ptr_from_oui(mac_ctx,
+ SIR_MAC_QCOM_VENDOR_OUI,
+ SIR_MAC_QCOM_VENDOR_SIZE,
+ ((tANI_U8 *)&node->BssDescriptor.ieFields),
+ total_ie_len);
+
+ if (temp_ptr) {
+ avoid_ch_ie = (struct sAvoidChannelIE*)temp_ptr;
+ num_channels = avoid_ch_ie->length -
+ SIR_MAC_QCOM_VENDOR_SIZE - 1;
+ if (avoid_ch_ie->type != QCOM_VENDOR_IE_MCC_AVOID_CH) {
+ continue;
+ }
+ sap_ctx->sap_detected_avoid_ch_ie.present = 1;
+ for (i = 0; i < num_channels; i++) {
+ VOS_TRACE( VOS_MODULE_ID_SAP,
+ VOS_TRACE_LEVEL_DEBUG,
+ "Q2Q IE - avoid ch %d",
+ avoid_ch_ie->channels[i]);
+ /* add this channel to to_avoid channel list */
+ sap_check_n_add_channel(sap_ctx,
+ avoid_ch_ie->channels[i]);
+ }
+ } /* if (temp_ptr) */
+ node = sme_ScanResultGetNext(hal, scan_result);
+ }
+}
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
#ifdef FEATURE_WLAN_CH_AVOID
/*==========================================================================
FUNCTION sapUpdateUnsafeChannelList
@@ -660,6 +795,16 @@ v_BOOL_t sapChanSelInit(tHalHandle halHandle,
channelnum++, pChans++) {
chSafe = VOS_TRUE;
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ if(sap_check_in_avoid_ch_list(pSapCtx, *pChans)) {
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
+ "Ch %d used by another MDM device with SAP in MCC",
+ *pChans);
+ chSafe = VOS_FALSE;
+ continue;
+ }
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
/* check if the channel is in NOL blacklist */
if(sapDfsIsChannelInNolList(pSapCtx, *pChans,
PHY_SINGLE_CHANNEL_CENTERED))
@@ -2503,6 +2648,11 @@ v_U8_t sapSelectChannel(tHalHandle halHandle, ptSapContext pSapCtx, tScanResult
#endif /* SOFTAP_CHANNEL_RANGE */
}
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ /* process avoid channel IE to collect all channels to avoid */
+ sap_process_avoid_ie(halHandle, pSapCtx, pScanResult);
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
// Initialize the structure pointed by pSpectInfoParams
if (sapChanSelInit( halHandle, pSpectInfoParams, pSapCtx ) != eSAP_TRUE ) {
VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c
index 745d95278e3e..026205a6eb57 100644
--- a/CORE/SAP/src/sapFsm.c
+++ b/CORE/SAP/src/sapFsm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1340,6 +1340,9 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
v_BOOL_t isOutOfRange = VOS_FALSE;
chan_bonding_bitmap channelBitmap;
v_U8_t i = 0;
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ uint8_t j = 0;
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
v_U8_t channelID;
tHalHandle hHal = VOS_GET_HAL_CB(sapContext->pvosGCtx);
tpAniSirGlobal pMac;
@@ -1484,6 +1487,25 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
}
}
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ /* avoid channels on which another MDM AP in MCC mode is detected. */
+ if (sapContext->sap_detected_avoid_ch_ie.present) {
+ for( j=0;
+ j < sizeof(sapContext->sap_detected_avoid_ch_ie.channels);
+ j++) {
+ if (sapContext->sap_detected_avoid_ch_ie.channels[j]
+ == channelID) {
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_LOW,
+ FL("index: %d, Channel = %d, avoided due to "
+ "presence of another AP+AP MCC device in same "
+ "channel."),
+ i, channelID);
+ sapContext->SapAllChnlList.channelList[i].valid = VOS_FALSE;
+ }
+ }
+ }
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
/* check if the channel is within ACS channel range */
isOutOfRange = sapAcsChannelCheck(sapContext,
channelID);
diff --git a/CORE/SAP/src/sapInternal.h b/CORE/SAP/src/sapInternal.h
index d9e0b1c5320a..147463128853 100644
--- a/CORE/SAP/src/sapInternal.h
+++ b/CORE/SAP/src/sapInternal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -159,6 +159,32 @@ typedef struct sSapAcsChannelInfo {
v_U32_t weight;
}tSapAcsChannelInfo;
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+/* max MDM devices in vicinity supported for this feature */
+#define SAP_MCC_CH_AVOIDANCE_MAX_DEV 1
+/* max SAP per MDM devices */
+#define SAP_MCC_CH_AVOIDANCE_MAX_SAP_PER_DEV 2
+/* max channels a SAP will take, 4 right now for 80 MHz */
+#define SAP_MCC_CH_AVOIDANCE_MAX_CH_PER_AP 4
+/*
+ * In a setup having two MDM both operating in AP+AP MCC scenario
+ * if both the AP decides to use same or close channel set, CTS to
+ * self, mechanism is causing issues with connectivity. For this, its
+ * proposed that 2nd MDM devices which comes up later should detect
+ * presence of first MDM device via special Q2Q IE present in becon
+ * and avoid those channels mentioned in IE.
+ *
+ * Following struct will keep this info in sapCtx struct, and will be used
+ * to avoid such channels in Random Channel Select in case of radar ind.
+ */
+struct sap_avoid_channels_info {
+ bool present;
+ uint8_t channels[SAP_MCC_CH_AVOIDANCE_MAX_DEV *
+ SAP_MCC_CH_AVOIDANCE_MAX_SAP_PER_DEV *
+ SAP_MCC_CH_AVOIDANCE_MAX_CH_PER_AP];
+};
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
typedef struct sSapContext {
vos_lock_t SapGlobalLock;
@@ -275,6 +301,21 @@ typedef struct sSapContext {
tANI_BOOLEAN isCacEndNotified;
tANI_BOOLEAN isCacStartNotified;
tANI_BOOLEAN is_sap_ready_for_chnl_chng;
+
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ /*
+ * In a setup having two MDM both operating in AP+AP MCC scenario
+ * if both the AP decides to use same or close channel set, CTS to
+ * self, mechanism is causing issues with connectivity. For this, its
+ * proposed that 2nd MDM devices which comes up later should detect
+ * presence of first MDM device via special Q2Q IE present in becon
+ * and avoid those channels mentioned in IE.
+ *
+ * this struct contains the list of channels on which another MDM AP
+ * in MCC mode were detected.
+ */
+ struct sap_avoid_channels_info sap_detected_avoid_ch_ie;
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
} *ptSapContext;
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 2f5a2aa2b1dc..e595bb16c3f4 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -942,6 +942,64 @@ static int wma_vdev_start_resp_handler(void *handle, u_int8_t *cmd_param_info,
return 0;
}
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+/**
+ * wma_find_mcc_ap() - finds if device is operating AP in MCC mode or not
+ * @wma: wma handle.
+ * @vdev_id: vdev ID of device for which MCC has to be checked
+ * @add: flag indicating if current device is added or deleted
+ *
+ * This function parses through all the interfaces in wma and finds if
+ * any of those devces are in MCC mode with AP. If such a vdev is found
+ * involved AP vdevs are sent WDA_UPDATE_Q2Q_IE_IND msg to update their
+ * beacon template to include Q2Q IE.
+ *
+ * Return: void
+ */
+void wma_find_mcc_ap(tp_wma_handle wma,
+ uint8_t vdev_id,
+ bool add)
+{
+ uint8_t i;
+ uint16_t prev_ch_freq = 0;
+ bool is_ap = false;
+ bool result = false;
+ uint8_t * ap_vdev_ids = NULL;
+ uint8_t num_ch = 0;
+
+ ap_vdev_ids = vos_mem_malloc(wma->max_bssid);
+ if (!ap_vdev_ids) {
+ return;
+ }
+
+ for(i = 0; i < wma->max_bssid; i++) {
+ ap_vdev_ids[i] = -1;
+ if( add == false && i == vdev_id)
+ continue;
+
+ if( wma->interfaces[i].vdev_up || (i == vdev_id && add) ) {
+
+ if(wma->interfaces[i].type == WMI_VDEV_TYPE_AP) {
+ is_ap = true;
+ ap_vdev_ids[i] = i;
+ }
+
+ if(wma->interfaces[i].mhz != prev_ch_freq) {
+ num_ch++;
+ prev_ch_freq = wma->interfaces[i].mhz;
+ }
+ }
+ }
+
+ if( is_ap && (num_ch > 1) )
+ result = true;
+ else
+ result = false;
+
+ wma_send_msg(wma, WDA_UPDATE_Q2Q_IE_IND, (void*)ap_vdev_ids, result);
+}
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
static int wma_vdev_start_rsp_ind(tp_wma_handle wma, u_int8_t *buf)
{
struct wma_target_req *req_msg;
@@ -985,6 +1043,11 @@ static int wma_vdev_start_rsp_ind(tp_wma_handle wma, u_int8_t *buf)
vos_timer_stop(&req_msg->event_timeout);
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ if (resp_event->status == VOS_STATUS_SUCCESS)
+ wma_find_mcc_ap(wma, resp_event->vdev_id, true);
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
iface = &wma->interfaces[resp_event->vdev_id];
if (req_msg->msg_type == WDA_CHNL_SWITCH_REQ) {
tpSwitchChannelParams params =
@@ -1778,6 +1841,9 @@ static int wma_vdev_stop_ind(tp_wma_handle wma, u_int8_t *buf)
resp_event->vdev_id);
} else {
wma->interfaces[resp_event->vdev_id].vdev_up = FALSE;
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ wma_find_mcc_ap(wma, resp_event->vdev_id, false);
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
}
ol_txrx_vdev_flush(iface->handle);
WMA_LOGD("%s, vdev_id: %d, un-pausing tx_ll_queue for VDEV_STOP rsp",
@@ -9822,6 +9888,9 @@ void wma_vdev_resp_timer(void *data)
tgt_req->vdev_id);
} else {
wma->interfaces[tgt_req->vdev_id].vdev_up = FALSE;
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ wma_find_mcc_ap(wma, tgt_req->vdev_id, false);
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
}
ol_txrx_vdev_flush(iface->handle);
WMA_LOGD("%s, vdev_id: %d, un-pausing tx_ll_queue for WDA_DELETE_BSS_REQ timeout",
diff --git a/CORE/SYS/legacy/src/utils/src/dot11f.c b/CORE/SYS/legacy/src/utils/src/dot11f.c
index 4e3eba08638a..37b5421f68bb 100644
--- a/CORE/SYS/legacy/src/utils/src/dot11f.c
+++ b/CORE/SYS/legacy/src/utils/src/dot11f.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -35,9 +35,9 @@
*
*
* This file was automatically generated by 'framesc'
- * Mon Dec 1 15:21:01 2014 from the following file(s):
+ * Tue Jan 13 11:09:30 2015 from the following file(s):
*
- * dot11f.frms
+ * CORE/MAC/src/cfg/cfgUtil/dot11f.frms
*
* PLEASE DON'T EDIT THIS FILE BY HAND!
*
@@ -2424,6 +2424,8 @@ tANI_U32 dot11fUnpackIeAID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tD
#define SigIeAID ( 0x001d )
+
+
tANI_U32 dot11fUnpackIeCFParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIECFParams *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
@@ -4189,6 +4191,24 @@ tANI_U32 dot11fUnpackIeQBSSLoad(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iele
#define SigIeQBSSLoad ( 0x0058 )
+tANI_U32 dot11fUnpackIeQComVendorIE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEQComVendorIE *pDst)
+{
+ tANI_U32 status = DOT11F_PARSE_SUCCESS;
+ (void) pBuf; (void)ielen; /* Shutup the compiler */
+ if (pDst->present) status = DOT11F_DUPLICATE_IE;
+ pDst->present = 1;
+ pDst->type = *pBuf;
+ pBuf += 1;
+ ielen -= (tANI_U8)1;
+ pDst->num_data = (tANI_U8)( ielen );
+ DOT11F_MEMCPY(pCtx, pDst->data, pBuf, ( ielen ) );
+ (void)pCtx;
+ return status;
+} /* End dot11fUnpackIeQComVendorIE. */
+
+#define SigIeQComVendorIE ( 0x0059 )
+
+
tANI_U32 dot11fUnpackIeQOSCapsAp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEQOSCapsAp *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
@@ -4206,7 +4226,7 @@ tANI_U32 dot11fUnpackIeQOSCapsAp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeQOSCapsAp. */
-#define SigIeQOSCapsAp ( 0x0059 )
+#define SigIeQOSCapsAp ( 0x005a )
tANI_U32 dot11fUnpackIeQOSCapsStation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEQOSCapsStation *pDst)
@@ -4228,7 +4248,7 @@ tANI_U32 dot11fUnpackIeQOSCapsStation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U
return status;
} /* End dot11fUnpackIeQOSCapsStation. */
-#define SigIeQOSCapsStation ( 0x005a )
+#define SigIeQOSCapsStation ( 0x005b )
tANI_U32 dot11fUnpackIeQosMapSet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEQosMapSet *pDst)
@@ -4248,7 +4268,7 @@ tANI_U32 dot11fUnpackIeQosMapSet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeQosMapSet. */
-#define SigIeQosMapSet ( 0x005b )
+#define SigIeQosMapSet ( 0x005c )
tANI_U32 dot11fUnpackIeQuiet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEQuiet *pDst)
@@ -4271,7 +4291,7 @@ tANI_U32 dot11fUnpackIeQuiet(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen,
return status;
} /* End dot11fUnpackIeQuiet. */
-#define SigIeQuiet ( 0x005c )
+#define SigIeQuiet ( 0x005d )
tANI_U32 dot11fUnpackIeRCPIIE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERCPIIE *pDst)
@@ -4285,7 +4305,7 @@ tANI_U32 dot11fUnpackIeRCPIIE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen,
return status;
} /* End dot11fUnpackIeRCPIIE. */
-#define SigIeRCPIIE ( 0x005d )
+#define SigIeRCPIIE ( 0x005e )
static const tFFDefn FFS_RICDataDesc[ ] = {
@@ -4325,7 +4345,7 @@ tANI_U32 dot11fUnpackIeRICDataDesc(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i
return status;
} /* End dot11fUnpackIeRICDataDesc. */
-#define SigIeRICDataDesc ( 0x005e )
+#define SigIeRICDataDesc ( 0x005f )
tANI_U32 dot11fUnpackIeRSN(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERSN *pDst)
@@ -4428,7 +4448,7 @@ tANI_U32 dot11fUnpackIeRSN(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tD
return status;
} /* End dot11fUnpackIeRSN. */
-#define SigIeRSN ( 0x005f )
+#define SigIeRSN ( 0x0060 )
tANI_U32 dot11fUnpackIeRSNIIE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERSNIIE *pDst)
@@ -4442,7 +4462,7 @@ tANI_U32 dot11fUnpackIeRSNIIE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen,
return status;
} /* End dot11fUnpackIeRSNIIE. */
-#define SigIeRSNIIE ( 0x0060 )
+#define SigIeRSNIIE ( 0x0061 )
tANI_U32 dot11fUnpackIeRSNOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIERSNOpaque *pDst)
@@ -4462,7 +4482,7 @@ tANI_U32 dot11fUnpackIeRSNOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeRSNOpaque. */
-#define SigIeRSNOpaque ( 0x0061 )
+#define SigIeRSNOpaque ( 0x0062 )
tANI_U32 dot11fUnpackIeSuppChannels(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESuppChannels *pDst)
@@ -4482,7 +4502,7 @@ tANI_U32 dot11fUnpackIeSuppChannels(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8
return status;
} /* End dot11fUnpackIeSuppChannels. */
-#define SigIeSuppChannels ( 0x0062 )
+#define SigIeSuppChannels ( 0x0063 )
tANI_U32 dot11fUnpackIeSuppOperatingClasses(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESuppOperatingClasses *pDst)
@@ -4502,7 +4522,7 @@ tANI_U32 dot11fUnpackIeSuppOperatingClasses(tpAniSirGlobal pCtx, tANI_U8 *pBuf,
return status;
} /* End dot11fUnpackIeSuppOperatingClasses. */
-#define SigIeSuppOperatingClasses ( 0x0063 )
+#define SigIeSuppOperatingClasses ( 0x0064 )
tANI_U32 dot11fUnpackIeSuppRates(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIESuppRates *pDst)
@@ -4530,7 +4550,7 @@ tANI_U32 dot11fUnpackIeSuppRates(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeSuppRates. */
-#define SigIeSuppRates ( 0x0064 )
+#define SigIeSuppRates ( 0x0065 )
tANI_U32 dot11fUnpackIeTIM(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETIM *pDst)
@@ -4559,7 +4579,7 @@ tANI_U32 dot11fUnpackIeTIM(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tD
return status;
} /* End dot11fUnpackIeTIM. */
-#define SigIeTIM ( 0x0065 )
+#define SigIeTIM ( 0x0066 )
tANI_U32 dot11fUnpackIeTPCReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETPCReport *pDst)
@@ -4576,7 +4596,7 @@ tANI_U32 dot11fUnpackIeTPCReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeTPCReport. */
-#define SigIeTPCReport ( 0x0066 )
+#define SigIeTPCReport ( 0x0067 )
tANI_U32 dot11fUnpackIeTPCRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETPCRequest *pDst)
@@ -4589,7 +4609,7 @@ tANI_U32 dot11fUnpackIeTPCRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ie
return status;
} /* End dot11fUnpackIeTPCRequest. */
-#define SigIeTPCRequest ( 0x0067 )
+#define SigIeTPCRequest ( 0x0068 )
tANI_U32 dot11fUnpackIeTimeoutInterval(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIETimeoutInterval *pDst)
@@ -4606,7 +4626,7 @@ tANI_U32 dot11fUnpackIeTimeoutInterval(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_
return status;
} /* End dot11fUnpackIeTimeoutInterval. */
-#define SigIeTimeoutInterval ( 0x0068 )
+#define SigIeTimeoutInterval ( 0x0069 )
tANI_U32 dot11fUnpackIeVHTCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVHTCaps *pDst)
@@ -4659,7 +4679,7 @@ tANI_U32 dot11fUnpackIeVHTCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen
return status;
} /* End dot11fUnpackIeVHTCaps. */
-#define SigIeVHTCaps ( 0x0069 )
+#define SigIeVHTCaps ( 0x006a )
tANI_U32 dot11fUnpackIeVHTExtBssLoad(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVHTExtBssLoad *pDst)
@@ -4685,7 +4705,7 @@ tANI_U32 dot11fUnpackIeVHTExtBssLoad(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8
return status;
} /* End dot11fUnpackIeVHTExtBssLoad. */
-#define SigIeVHTExtBssLoad ( 0x006a )
+#define SigIeVHTExtBssLoad ( 0x006b )
tANI_U32 dot11fUnpackIeVHTOperation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVHTOperation *pDst)
@@ -4708,7 +4728,7 @@ tANI_U32 dot11fUnpackIeVHTOperation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8
return status;
} /* End dot11fUnpackIeVHTOperation. */
-#define SigIeVHTOperation ( 0x006b )
+#define SigIeVHTOperation ( 0x006c )
tANI_U32 dot11fUnpackIeVendor1IE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVendor1IE *pDst)
@@ -4721,7 +4741,7 @@ tANI_U32 dot11fUnpackIeVendor1IE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeVendor1IE. */
-#define SigIeVendor1IE ( 0x006c )
+#define SigIeVendor1IE ( 0x006d )
tANI_U32 dot11fUnpackIeVendor2IE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVendor2IE *pDst)
@@ -4734,7 +4754,7 @@ tANI_U32 dot11fUnpackIeVendor2IE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeVendor2IE. */
-#define SigIeVendor2IE ( 0x006d )
+#define SigIeVendor2IE ( 0x006e )
tANI_U32 dot11fUnpackIeVendor3IE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEVendor3IE *pDst)
@@ -4747,7 +4767,7 @@ tANI_U32 dot11fUnpackIeVendor3IE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeVendor3IE. */
-#define SigIeVendor3IE ( 0x006e )
+#define SigIeVendor3IE ( 0x006f )
tANI_U32 dot11fUnpackIeWAPI(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWAPI *pDst)
@@ -4816,7 +4836,7 @@ tANI_U32 dot11fUnpackIeWAPI(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, t
return status;
} /* End dot11fUnpackIeWAPI. */
-#define SigIeWAPI ( 0x006f )
+#define SigIeWAPI ( 0x0070 )
tANI_U32 dot11fUnpackIeWAPIOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWAPIOpaque *pDst)
@@ -4836,7 +4856,7 @@ tANI_U32 dot11fUnpackIeWAPIOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ie
return status;
} /* End dot11fUnpackIeWAPIOpaque. */
-#define SigIeWAPIOpaque ( 0x0070 )
+#define SigIeWAPIOpaque ( 0x0071 )
tANI_U32 dot11fUnpackIeWFATPC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWFATPC *pDst)
@@ -4853,7 +4873,7 @@ tANI_U32 dot11fUnpackIeWFATPC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen,
return status;
} /* End dot11fUnpackIeWFATPC. */
-#define SigIeWFATPC ( 0x0071 )
+#define SigIeWFATPC ( 0x0072 )
tANI_U32 dot11fUnpackIeWFDIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWFDIEOpaque *pDst)
@@ -4873,7 +4893,7 @@ tANI_U32 dot11fUnpackIeWFDIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i
return status;
} /* End dot11fUnpackIeWFDIEOpaque. */
-#define SigIeWFDIEOpaque ( 0x0072 )
+#define SigIeWFDIEOpaque ( 0x0073 )
tANI_U32 dot11fUnpackIeWMMCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMCaps *pDst)
@@ -4901,7 +4921,7 @@ tANI_U32 dot11fUnpackIeWMMCaps(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen
return status;
} /* End dot11fUnpackIeWMMCaps. */
-#define SigIeWMMCaps ( 0x0073 )
+#define SigIeWMMCaps ( 0x0074 )
tANI_U32 dot11fUnpackIeWMMInfoAp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMInfoAp *pDst)
@@ -4922,7 +4942,7 @@ tANI_U32 dot11fUnpackIeWMMInfoAp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeWMMInfoAp. */
-#define SigIeWMMInfoAp ( 0x0074 )
+#define SigIeWMMInfoAp ( 0x0075 )
tANI_U32 dot11fUnpackIeWMMInfoStation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMInfoStation *pDst)
@@ -4947,7 +4967,7 @@ tANI_U32 dot11fUnpackIeWMMInfoStation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U
return status;
} /* End dot11fUnpackIeWMMInfoStation. */
-#define SigIeWMMInfoStation ( 0x0075 )
+#define SigIeWMMInfoStation ( 0x0076 )
tANI_U32 dot11fUnpackIeWMMParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWMMParams *pDst)
@@ -5040,7 +5060,7 @@ tANI_U32 dot11fUnpackIeWMMParams(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeWMMParams. */
-#define SigIeWMMParams ( 0x0076 )
+#define SigIeWMMParams ( 0x0077 )
tANI_U32 dot11fUnpackIeWPA(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWPA *pDst)
@@ -5122,7 +5142,7 @@ tANI_U32 dot11fUnpackIeWPA(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tD
return status;
} /* End dot11fUnpackIeWPA. */
-#define SigIeWPA ( 0x0077 )
+#define SigIeWPA ( 0x0078 )
tANI_U32 dot11fUnpackIeWPAOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWPAOpaque *pDst)
@@ -5142,7 +5162,7 @@ tANI_U32 dot11fUnpackIeWPAOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeWPAOpaque. */
-#define SigIeWPAOpaque ( 0x0078 )
+#define SigIeWPAOpaque ( 0x0079 )
static const tTLVDefn TLVS_WSC[ ] = {
@@ -5180,7 +5200,7 @@ tANI_U32 dot11fUnpackIeWSC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tD
return status;
} /* End dot11fUnpackIeWSC. */
-#define SigIeWSC ( 0x0079 )
+#define SigIeWSC ( 0x007a )
static const tTLVDefn TLVS_WscAssocReq[ ] = {
@@ -5199,7 +5219,7 @@ tANI_U32 dot11fUnpackIeWscAssocReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i
return status;
} /* End dot11fUnpackIeWscAssocReq. */
-#define SigIeWscAssocReq ( 0x007a )
+#define SigIeWscAssocReq ( 0x007b )
static const tTLVDefn TLVS_WscAssocRes[ ] = {
@@ -5218,7 +5238,7 @@ tANI_U32 dot11fUnpackIeWscAssocRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i
return status;
} /* End dot11fUnpackIeWscAssocRes. */
-#define SigIeWscAssocRes ( 0x007b )
+#define SigIeWscAssocRes ( 0x007c )
static const tTLVDefn TLVS_WscBeacon[ ] = {
@@ -5243,7 +5263,7 @@ tANI_U32 dot11fUnpackIeWscBeacon(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 iel
return status;
} /* End dot11fUnpackIeWscBeacon. */
-#define SigIeWscBeacon ( 0x007c )
+#define SigIeWscBeacon ( 0x007d )
static const tTLVDefn TLVS_WscBeaconProbeRes[ ] = {
@@ -5276,7 +5296,7 @@ tANI_U32 dot11fUnpackIeWscBeaconProbeRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tAN
return status;
} /* End dot11fUnpackIeWscBeaconProbeRes. */
-#define SigIeWscBeaconProbeRes ( 0x007d )
+#define SigIeWscBeaconProbeRes ( 0x007e )
tANI_U32 dot11fUnpackIeWscIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEWscIEOpaque *pDst)
@@ -5296,7 +5316,7 @@ tANI_U32 dot11fUnpackIeWscIEOpaque(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i
return status;
} /* End dot11fUnpackIeWscIEOpaque. */
-#define SigIeWscIEOpaque ( 0x007e )
+#define SigIeWscIEOpaque ( 0x007f )
static const tTLVDefn TLVS_WscProbeReq[ ] = {
@@ -5327,7 +5347,7 @@ tANI_U32 dot11fUnpackIeWscProbeReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i
return status;
} /* End dot11fUnpackIeWscProbeReq. */
-#define SigIeWscProbeReq ( 0x007f )
+#define SigIeWscProbeReq ( 0x0080 )
static const tTLVDefn TLVS_WscProbeRes[ ] = {
@@ -5360,7 +5380,7 @@ tANI_U32 dot11fUnpackIeWscProbeRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i
return status;
} /* End dot11fUnpackIeWscProbeRes. */
-#define SigIeWscProbeRes ( 0x0080 )
+#define SigIeWscProbeRes ( 0x0081 )
static const tTLVDefn TLVS_WscReassocRes[ ] = {
@@ -5379,7 +5399,7 @@ tANI_U32 dot11fUnpackIeWscReassocRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8
return status;
} /* End dot11fUnpackIeWscReassocRes. */
-#define SigIeWscReassocRes ( 0x0081 )
+#define SigIeWscReassocRes ( 0x0082 )
static const tFFDefn FFS_AddBAReq[] = {
@@ -7977,6 +7997,7 @@ tANI_U32 dot11fUnpackAuthentication(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32
{offsetof(tDot11fBeacon, Vendor2IE), offsetof(tDot11fIEVendor2IE, present), 0, "Vendor2IE" , 0, 5, 5, SigIeVendor2IE, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2IE, 0, },
{offsetof(tDot11fBeacon, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE" , 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, },
{offsetof(tDot11fBeacon, ChannelSwitchWrapper), offsetof(tDot11fIEChannelSwitchWrapper, present), 0, "ChannelSwitchWrapper" , 0, 2, 7, SigIeChannelSwitchWrapper, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, },
+ {offsetof(tDot11fBeacon, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 6, 261, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, },
{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, };
tANI_U32 dot11fUnpackBeacon(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fBeacon *pFrm)
@@ -8927,6 +8948,17 @@ tANI_U32 dot11fUnpackBeacon(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, t
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->ChannelSwitchWrapper.WiderBWChanSwitchAnn.newCenterChanFreq1, 1);
}
}
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("QComVendorIE:\n"));
+ if (!pFrm->QComVendorIE.present)
+ {
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n"));
+ }
+ else
+ {
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.type, 1);
+ FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("num_data: %d.\n"), pFrm->QComVendorIE.num_data);
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* ) pFrm->QComVendorIE.data, pFrm->QComVendorIE.num_data);
+ }
}
# endif // DOT11F_DUMP_FRAMES
return status;
@@ -9066,6 +9098,7 @@ tANI_U32 dot11fUnpackBeacon1(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf,
{offsetof(tDot11fBeacon2, Vendor2IE), offsetof(tDot11fIEVendor2IE, present), 0, "Vendor2IE" , 0, 5, 5, SigIeVendor2IE, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2IE, 0, },
{offsetof(tDot11fBeacon2, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE" , 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, },
{offsetof(tDot11fBeacon2, ChannelSwitchWrapper), offsetof(tDot11fIEChannelSwitchWrapper, present), 0, "ChannelSwitchWrapper" , 0, 2, 7, SigIeChannelSwitchWrapper, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, },
+ {offsetof(tDot11fBeacon2, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 6, 261, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, },
{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, };
tANI_U32 dot11fUnpackBeacon2(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fBeacon2 *pFrm)
@@ -9864,6 +9897,17 @@ tANI_U32 dot11fUnpackBeacon2(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf,
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->ChannelSwitchWrapper.WiderBWChanSwitchAnn.newCenterChanFreq1, 1);
}
}
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("QComVendorIE:\n"));
+ if (!pFrm->QComVendorIE.present)
+ {
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n"));
+ }
+ else
+ {
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.type, 1);
+ FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("num_data: %d.\n"), pFrm->QComVendorIE.num_data);
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* ) pFrm->QComVendorIE.data, pFrm->QComVendorIE.num_data);
+ }
}
# endif // DOT11F_DUMP_FRAMES
return status;
@@ -9923,6 +9967,7 @@ tANI_U32 dot11fUnpackBeacon2(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf,
{offsetof(tDot11fBeaconIEs, Vendor2IE), offsetof(tDot11fIEVendor2IE, present), 0, "Vendor2IE" , 0, 5, 5, SigIeVendor2IE, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2IE, 0, },
{offsetof(tDot11fBeaconIEs, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE" , 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, },
{offsetof(tDot11fBeaconIEs, ChannelSwitchWrapper), offsetof(tDot11fIEChannelSwitchWrapper, present), 0, "ChannelSwitchWrapper" , 0, 2, 7, SigIeChannelSwitchWrapper, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, },
+ {offsetof(tDot11fBeaconIEs, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 6, 261, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, },
{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, };
tANI_U32 dot11fUnpackBeaconIEs(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fBeaconIEs *pFrm)
@@ -10981,6 +11026,17 @@ tANI_U32 dot11fUnpackBeaconIEs(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->ChannelSwitchWrapper.WiderBWChanSwitchAnn.newCenterChanFreq1, 1);
}
}
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("QComVendorIE:\n"));
+ if (!pFrm->QComVendorIE.present)
+ {
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n"));
+ }
+ else
+ {
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.type, 1);
+ FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("num_data: %d.\n"), pFrm->QComVendorIE.num_data);
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* ) pFrm->QComVendorIE.data, pFrm->QComVendorIE.num_data);
+ }
}
# endif // DOT11F_DUMP_FRAMES
return status;
@@ -13317,6 +13373,7 @@ tANI_U32 dot11fUnpackProbeRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n
{offsetof(tDot11fProbeResponse, Vendor2IE), offsetof(tDot11fIEVendor2IE, present), 0, "Vendor2IE" , 0, 5, 5, SigIeVendor2IE, {0, 144, 76, 0, 0}, 3, DOT11F_EID_VENDOR2IE, 0, },
{offsetof(tDot11fProbeResponse, Vendor3IE), offsetof(tDot11fIEVendor3IE, present), 0, "Vendor3IE" , 0, 5, 5, SigIeVendor3IE, {0, 22, 50, 0, 0}, 3, DOT11F_EID_VENDOR3IE, 0, },
{offsetof(tDot11fProbeResponse, ChannelSwitchWrapper), offsetof(tDot11fIEChannelSwitchWrapper, present), 0, "ChannelSwitchWrapper" , 0, 2, 7, SigIeChannelSwitchWrapper, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANNELSWITCHWRAPPER, 0, },
+ {offsetof(tDot11fProbeResponse, QComVendorIE), offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE" , 0, 6, 261, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, },
{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, };
tANI_U32 dot11fUnpackProbeResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fProbeResponse *pFrm)
@@ -14321,6 +14378,17 @@ tANI_U32 dot11fUnpackProbeResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->ChannelSwitchWrapper.WiderBWChanSwitchAnn.newCenterChanFreq1, 1);
}
}
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("QComVendorIE:\n"));
+ if (!pFrm->QComVendorIE.present)
+ {
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n"));
+ }
+ else
+ {
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.type, 1);
+ FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("num_data: %d.\n"), pFrm->QComVendorIE.num_data);
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* ) pFrm->QComVendorIE.data, pFrm->QComVendorIE.num_data);
+ }
}
# endif // DOT11F_DUMP_FRAMES
return status;
@@ -19476,6 +19544,9 @@ static tANI_U32 UnpackCore(tpAniSirGlobal pCtx,
case SigIeQBSSLoad:
status |= dot11fUnpackIeQBSSLoad(pCtx, pBufRemaining, len, ( tDot11fIEQBSSLoad* )(pFrm + pIe->offset + sizeof(tDot11fIEQBSSLoad)*countOffset) );
break;
+ case SigIeQComVendorIE:
+ status |= dot11fUnpackIeQComVendorIE(pCtx, pBufRemaining, len, ( tDot11fIEQComVendorIE* )(pFrm + pIe->offset + sizeof(tDot11fIEQComVendorIE)*countOffset) );
+ break;
case SigIeQOSCapsAp:
status |= dot11fUnpackIeQOSCapsAp(pCtx, pBufRemaining, len, ( tDot11fIEQOSCapsAp* )(pFrm + pIe->offset + sizeof(tDot11fIEQOSCapsAp)*countOffset) );
break;
@@ -21666,6 +21737,11 @@ static tANI_U32 GetPackedSizeCore(tpAniSirGlobal pCtx,
byteCount = 5;
pIePresent = ( (tDot11fIEQBSSLoad* )(pFrm + pIe->offset + offset * i ))->present;
break;
+ case SigIeQComVendorIE:
+ offset = sizeof(tDot11fIEQComVendorIE);
+ byteCount = ((tDot11fIEQComVendorIE* )(pFrm + pIe->offset + sizeof(tDot11fIEQComVendorIE) * i ))->num_data + 1;
+ pIePresent = ( (tDot11fIEQComVendorIE* )(pFrm + pIe->offset + offset * i ))->present;
+ break;
case SigIeQOSCapsAp:
offset = sizeof(tDot11fIEQOSCapsAp);
byteCount = 1;
@@ -25212,6 +25288,7 @@ tANI_U32 dot11fPackIeAID(tpAniSirGlobal pCtx,
return DOT11F_PARSE_SUCCESS;
} /* End dot11fPackIeAID. */
+
tANI_U32 dot11fPackIeCFParams(tpAniSirGlobal pCtx,
tDot11fIECFParams *pSrc,
tANI_U8 *pBuf,
@@ -28062,6 +28139,44 @@ tANI_U32 dot11fPackIeQBSSLoad(tpAniSirGlobal pCtx,
return DOT11F_PARSE_SUCCESS;
} /* End dot11fPackIeQBSSLoad. */
+tANI_U32 dot11fPackIeQComVendorIE(tpAniSirGlobal pCtx,
+ tDot11fIEQComVendorIE *pSrc,
+ tANI_U8 *pBuf,
+ tANI_U32 nBuf,
+ tANI_U32 *pnConsumed)
+{
+ tANI_U8* pIeLen = 0;
+ tANI_U32 nConsumedOnEntry = *pnConsumed;
+ tANI_U32 nNeeded = 0U;
+ nNeeded += (pSrc->num_data + 1);
+ while ( pSrc->present )
+ {
+ if ( nNeeded > nBuf ) return DOT11F_BUFFER_OVERFLOW;
+ *pBuf = 221;
+ ++pBuf; ++(*pnConsumed);
+ pIeLen = pBuf;
+ ++pBuf; ++(*pnConsumed);
+ *pBuf = 0x0;
+ ++pBuf; ++(*pnConsumed);
+ *pBuf = 0xa0;
+ ++pBuf; ++(*pnConsumed);
+ *pBuf = 0xc6;
+ ++pBuf; ++(*pnConsumed);
+ *pBuf = pSrc->type;
+ *pnConsumed += 1;
+ pBuf += 1;
+ DOT11F_MEMCPY(pCtx, pBuf, &( pSrc->data ), pSrc->num_data);
+ *pnConsumed += pSrc->num_data;
+ // fieldsEndFlag = 1
+ break;
+ }
+ (void)pCtx;
+ if (pIeLen)
+ {
+ *pIeLen = *pnConsumed - nConsumedOnEntry - 2;
+ }
+ return DOT11F_PARSE_SUCCESS;
+} /* End dot11fPackIeQComVendorIE. */
tANI_U32 dot11fPackIeQOSCapsAp(tpAniSirGlobal pCtx,
tDot11fIEQOSCapsAp *pSrc,
tANI_U8 *pBuf,
@@ -33168,6 +33283,17 @@ tANI_U32 dot11fPackBeacon(tpAniSirGlobal pCtx, tDot11fBeacon *pFrm, tANI_U8 *pBu
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->ChannelSwitchWrapper.WiderBWChanSwitchAnn.newCenterChanFreq1, 1);
}
}
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("QComVendorIE:\n"));
+ if (!pFrm->QComVendorIE.present)
+ {
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("Not present.\n"));
+ }
+ else
+ {
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* )&pFrm->QComVendorIE.type, 1);
+ FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("num_data: %d.\n"), pFrm->QComVendorIE.num_data);
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), ( tANI_U8* ) pFrm->QComVendorIE.data, pFrm->QComVendorIE.num_data);
+ }
FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), FRFL("to:\n"));
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON), pBuf, nBuf);
}
@@ -34050,6 +34176,17 @@ tANI_U32 dot11fPackBeacon2(tpAniSirGlobal pCtx, tDot11fBeacon2 *pFrm, tANI_U8 *p
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->ChannelSwitchWrapper.WiderBWChanSwitchAnn.newCenterChanFreq1, 1);
}
}
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("QComVendorIE:\n"));
+ if (!pFrm->QComVendorIE.present)
+ {
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("Not present.\n"));
+ }
+ else
+ {
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* )&pFrm->QComVendorIE.type, 1);
+ FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("num_data: %d.\n"), pFrm->QComVendorIE.num_data);
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), ( tANI_U8* ) pFrm->QComVendorIE.data, pFrm->QComVendorIE.num_data);
+ }
FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), FRFL("to:\n"));
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACON2), pBuf, nBuf);
}
@@ -35113,6 +35250,17 @@ tANI_U32 dot11fPackBeaconIEs(tpAniSirGlobal pCtx, tDot11fBeaconIEs *pFrm, tANI_U
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->ChannelSwitchWrapper.WiderBWChanSwitchAnn.newCenterChanFreq1, 1);
}
}
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("QComVendorIE:\n"));
+ if (!pFrm->QComVendorIE.present)
+ {
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("Not present.\n"));
+ }
+ else
+ {
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* )&pFrm->QComVendorIE.type, 1);
+ FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("num_data: %d.\n"), pFrm->QComVendorIE.num_data);
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), ( tANI_U8* ) pFrm->QComVendorIE.data, pFrm->QComVendorIE.num_data);
+ }
FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), FRFL("to:\n"));
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_BEACONIES), pBuf, nBuf);
}
@@ -38122,6 +38270,17 @@ tANI_U32 dot11fPackProbeResponse(tpAniSirGlobal pCtx, tDot11fProbeResponse *pFrm
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->ChannelSwitchWrapper.WiderBWChanSwitchAnn.newCenterChanFreq1, 1);
}
}
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("QComVendorIE:\n"));
+ if (!pFrm->QComVendorIE.present)
+ {
+ FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("Not present.\n"));
+ }
+ else
+ {
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* )&pFrm->QComVendorIE.type, 1);
+ FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("num_data: %d.\n"), pFrm->QComVendorIE.num_data);
+ FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), ( tANI_U8* ) pFrm->QComVendorIE.data, pFrm->QComVendorIE.num_data);
+ }
FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), FRFL("to:\n"));
FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_PROBERESPONSE), pBuf, nBuf);
}
@@ -42840,6 +42999,9 @@ static tANI_U32 PackCore(tpAniSirGlobal pCtx,
case SigIeQBSSLoad:
status |= dot11fPackIeQBSSLoad(pCtx, ( tDot11fIEQBSSLoad* )(pSrc + pIe->offset + sizeof(tDot11fIEQBSSLoad) * i ), pBufRemaining, nBufRemaining, &len);
break;
+ case SigIeQComVendorIE:
+ status |= dot11fPackIeQComVendorIE(pCtx, ( tDot11fIEQComVendorIE* )(pSrc + pIe->offset + sizeof(tDot11fIEQComVendorIE) * i ), pBufRemaining, nBufRemaining, &len);
+ break;
case SigIeQOSCapsAp:
status |= dot11fPackIeQOSCapsAp(pCtx, ( tDot11fIEQOSCapsAp* )(pSrc + pIe->offset + sizeof(tDot11fIEQOSCapsAp) * i ), pBufRemaining, nBufRemaining, &len);
break;
diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c
index 8d4f238b2b3a..fc52c74ca750 100644
--- a/CORE/SYS/legacy/src/utils/src/parserApi.c
+++ b/CORE/SYS/legacy/src/utils/src/parserApi.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -272,6 +272,73 @@ PopulateDot11fChanSwitchAnn(tpAniSirGlobal pMac,
pDot11f->present = 1;
} // End PopulateDot11fChanSwitchAnn.
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+void
+populate_dot11f_avoid_channels_ie(tpAniSirGlobal mac_ctx,
+ tDot11fIEQComVendorIE *dot11f,
+ tpPESession pe_session)
+{
+ dot11f->present = pe_session->sap_advertise_avoid_ch_ie;
+
+ if (!dot11f->present)
+ return;
+
+ dot11f->type = QCOM_VENDOR_IE_MCC_AVOID_CH;
+
+ if(pe_session->htSecondaryChannelOffset ==
+ PHY_DOUBLE_CHANNEL_LOW_PRIMARY &&
+ pe_session->htSupportedChannelWidthSet == 1) {
+ dot11f->num_data = 2;
+ dot11f->data[0] = pe_session->currentOperChannel;
+ dot11f->data[1] = dot11f->data[0] + 4;
+ }
+
+ if(pe_session->htSecondaryChannelOffset ==
+ PHY_DOUBLE_CHANNEL_HIGH_PRIMARY &&
+ pe_session->htSupportedChannelWidthSet == 1) {
+ dot11f->num_data = 2;
+ dot11f->data[0] = pe_session->currentOperChannel;
+ dot11f->data[1] = dot11f->data[0] - 4;
+ }
+
+ if(pe_session->htSecondaryChannelOffset ==
+ PHY_SINGLE_CHANNEL_CENTERED ||
+ pe_session->htSupportedChannelWidthSet == 0) {
+ dot11f->num_data = 1;
+ dot11f->data[0] = pe_session->currentOperChannel;
+ }
+
+ if (pe_session->vhtCapability) {
+ if (pe_session->vhtTxChannelWidthSet ==
+ WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ) {
+ dot11f->num_data = 4;
+ if(pe_session->currentOperChannel >= 36 &&
+ pe_session->currentOperChannel <= 48) {
+ dot11f->data[0] = 36;
+ } else if(pe_session->currentOperChannel >= 52
+ && pe_session->currentOperChannel <= 64) {
+ dot11f->data[0] = 52;
+ } else if(pe_session->currentOperChannel >= 100 &&
+ pe_session->currentOperChannel <= 112) {
+ dot11f->data[0] = 100;
+ } else if(pe_session->currentOperChannel >= 116 &&
+ pe_session->currentOperChannel <= 128) {
+ dot11f->data[0] = 116;
+ } else if(pe_session->currentOperChannel >= 132 &&
+ pe_session->currentOperChannel <= 144) {
+ dot11f->data[0] = 132;
+ } else if(pe_session->currentOperChannel >= 149 &&
+ pe_session->currentOperChannel <= 161) {
+ dot11f->data[0] = 149;
+ }
+ dot11f->data[1] = dot11f->data[0] + 4;
+ dot11f->data[2] = dot11f->data[0] + 8;
+ dot11f->data[3] = dot11f->data[0] + 12;
+ }
+ }
+}
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
void
PopulateDot11fChanSwitchWrapper(tpAniSirGlobal pMac,
tDot11fIEChannelSwitchWrapper *pDot11f,
@@ -3618,6 +3685,20 @@ sirConvertBeaconFrame2Struct(tpAniSirGlobal pMac,
pBeaconStruct->Vendor2IEPresent = pBeacon->Vendor2IE.present;
pBeaconStruct->Vendor3IEPresent = pBeacon->Vendor3IE.present;
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ if(pBeacon->QComVendorIE.present) {
+ pBeaconStruct->AvoidChannelIE.present =
+ pBeacon->QComVendorIE.present;
+ pBeaconStruct->AvoidChannelIE.num_data =
+ pBeacon->QComVendorIE.num_data;
+ pBeaconStruct->AvoidChannelIE.type =
+ pBeacon->QComVendorIE.type;
+ vos_mem_copy(pBeaconStruct->AvoidChannelIE.data,
+ pBeacon->QComVendorIE.data,
+ sizeof(pBeacon->QComVendorIE.data));
+ }
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
vos_mem_free(pBeacon);
return eSIR_SUCCESS;
diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h
index 2bc001b3f83b..9ffe6fd9edd0 100644
--- a/CORE/WDA/inc/wlan_qct_wda.h
+++ b/CORE/WDA/inc/wlan_qct_wda.h
@@ -1022,6 +1022,10 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_WLAN_AUTO_RESUME_IND SIR_HAL_WLAN_AUTO_RESUME_IND
#endif
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+#define WDA_UPDATE_Q2Q_IE_IND SIR_HAL_UPDATE_Q2Q_IE_IND
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
tSirRetStatus wdaPostCtrlMsg(tpAniSirGlobal pMac, tSirMsgQ *pMsg);
#define HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME 0x40 // Bit 6 will be used to control BD rate for Management frames
diff --git a/Kbuild b/Kbuild
index b9fc234f5726..37b4d1898aa3 100644
--- a/Kbuild
+++ b/Kbuild
@@ -1331,6 +1331,10 @@ CDEFINES += -DTARGET_DUMP_FOR_NON_QC_PLATFORM
endif
endif
+ifeq ($(CONFIG_ARCH_MDM9640), y)
+CDEFINES += -DFEATURE_AP_MCC_CH_AVOIDANCE
+endif
+
KBUILD_CPPFLAGS += $(CDEFINES)
# Currently, for versions of gcc which support it, the kernel Makefile