summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelvaraj, Sridhar <sselvara@codeaurora.org>2016-09-14 11:50:02 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-09-27 15:26:14 +0530
commit28bb71bec50f0abf7e20d209d002cc1f02cd13f1 (patch)
tree2eeb953c0f795cbc623719864e0d5c9bcf77d694
parenta1200b90eb31ac882ce908d94cc9410a425531d2 (diff)
qcacld-2.0: Send Vendor Specific TPC Report IE in probe request
qcacld-3.0 to qcacld-2.0 propagation. Send vendor specific TPC report IE as part of scan request IE to firmware. This IE will then be included in probe request sent by firmware for scan. Change-Id: I16e067de3980faa773d5027306795ca8e2a3c247 CRs-Fixed: 1062155
-rw-r--r--CORE/MAC/inc/sirMacProtDef.h4
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c28
2 files changed, 32 insertions, 0 deletions
diff --git a/CORE/MAC/inc/sirMacProtDef.h b/CORE/MAC/inc/sirMacProtDef.h
index 5e0a6d0ed7bf..1bcbb49601fc 100644
--- a/CORE/MAC/inc/sirMacProtDef.h
+++ b/CORE/MAC/inc/sirMacProtDef.h
@@ -458,6 +458,10 @@
#define SIR_MAC_CISCO_OUI "\x00\x40\x96"
#define SIR_MAC_CISCO_OUI_SIZE 3
+/* WFA vendor specific TPC OUI */
+#define SIR_MAC_WFA_TPC_OUI "\x00\x50\xF2\x08\x00"
+#define SIR_MAC_WFA_TPC_OUI_SIZE 5
+
// min size of wme oui header: oui(3) + type + subtype + version
#define SIR_MAC_OUI_WME_HDR_MIN 6
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 0415b5750a65..673ca466f3fc 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1199,9 +1199,14 @@ static eHalStatus limSendHalStartScanOffloadReq(tpAniSirGlobal pMac,
tANI_U8 *vht_cap_ie;
tANI_U16 vht_cap_len = 0;
#endif /* WLAN_FEATURE_11AC */
+ uint8_t *vendor_tpc_ie;
tSirRetStatus status, rc = eSIR_SUCCESS;
tDot11fIEExtCap extracted_extcap = {0};
bool extcap_present = true;
+ uint32_t lim_11h_enable = WNI_CFG_11H_ENABLED_STADEF;
+
+ wlan_cfgGetInt(pMac, WNI_CFG_11H_ENABLED, &lim_11h_enable);
+
pMac->lim.fOffloadScanPending = 0;
pMac->lim.fOffloadScanP2PSearch = 0;
@@ -1254,6 +1259,11 @@ static eHalStatus limSendHalStartScanOffloadReq(tpAniSirGlobal pMac,
#endif /* WLAN_FEATURE_11AC */
}
+ if (lim_11h_enable) {
+ addn_ie_len += DOT11F_IE_WFATPC_MAX_LEN + 2;
+ len += DOT11F_IE_WFATPC_MAX_LEN + 2;
+ }
+
pScanOffloadReq = vos_mem_malloc(len);
if ( NULL == pScanOffloadReq )
{
@@ -1358,6 +1368,24 @@ static eHalStatus limSendHalStartScanOffloadReq(tpAniSirGlobal pMac,
#endif /* WLAN_FEATURE_11AC */
}
+ if (lim_11h_enable) {
+ tDot11fIEWFATPC wfa_tpc;
+ vendor_tpc_ie = (uint8_t *) pScanOffloadReq +
+ pScanOffloadReq->uIEFieldOffset +
+ pScanOffloadReq->uIEFieldLen;
+ PopulateDot11fWFATPC(pMac, &wfa_tpc,
+ rrmGetMgmtTxPower(pMac, NULL), 0);
+ vendor_tpc_ie[0] = DOT11F_EID_WFATPC;
+ vendor_tpc_ie[1] = DOT11F_IE_WFATPC_MAX_LEN;
+ vos_mem_copy(&vendor_tpc_ie[2], SIR_MAC_WFA_TPC_OUI,
+ SIR_MAC_WFA_TPC_OUI_SIZE);
+ vos_mem_copy(&vendor_tpc_ie[SIR_MAC_WFA_TPC_OUI_SIZE + 2],
+ ((uint8_t *)&wfa_tpc) + 1,
+ DOT11F_IE_WFATPC_MAX_LEN
+ - SIR_MAC_WFA_TPC_OUI_SIZE);
+ pScanOffloadReq->uIEFieldLen += DOT11F_IE_WFATPC_MAX_LEN + 2;
+ }
+
rc = wdaPostCtrlMsg(pMac, &msg);
if (rc != eSIR_SUCCESS)
{