TDLS 11ac IOT issue due to missing AID IE and wrong vhtCapInfo
Include AID IE in TDLS setup req/res frame. Set AID's bit 14/15
to 11'b. Include VHTCapIE in TDLS discovery response frame if
operating channel is 5Ghz.
Remove hardcoded supportedChannelWidthSet, ldpcCodingCap and
suBeamFormerCap in VHTCapIE in TDLS setup req/res and TDLS
discovery response, which misleads 3-rd party device.
Change-Id: I571a096035fecf69b39e52456bad3b3b5a0d6116
CRs-Fixed: 468772
diff --git a/CORE/MAC/src/pe/lim/limProcessTdls.c b/CORE/MAC/src/pe/lim/limProcessTdls.c
index 7cbb852..10fbc8a 100644
--- a/CORE/MAC/src/pe/lim/limProcessTdls.c
+++ b/CORE/MAC/src/pe/lim/limProcessTdls.c
@@ -981,6 +981,25 @@
/* Include HT Capability IE */
//This does not depend on peer capabilities. If it is supported then it should be included
PopulateDot11fHTCaps( pMac, psessionEntry, &tdlsDisRsp.HTCaps );
+ if (psessionEntry->currentOperChannel <= SIR_11B_CHANNEL_END)
+ {
+ tdlsDisRsp.HTCaps.present = 1;
+ tdlsDisRsp.HTCaps.supportedChannelWidthSet = 0;
+ }
+ else
+ {
+ if (tdlsDisRsp.HTCaps.present)
+ {
+ tdlsDisRsp.HTCaps.supportedChannelWidthSet = 1; // pVhtCaps->supportedChannelWidthSet;
+ }
+ }
+
+ /* Include VHT Capability IE */
+ PopulateDot11fVHTCaps( pMac, &tdlsDisRsp.VHTCaps );
+ if (psessionEntry->currentOperChannel <= SIR_11B_CHANNEL_END)
+ {
+ tdlsDisRsp.VHTCaps.present = 0;
+ }
/*
* now we pack it. First, how much space are we going to need?
@@ -1221,17 +1240,20 @@
if (psessionEntry->currentOperChannel <= SIR_11B_CHANNEL_END)
{
tdlsSetupReq.VHTCaps.present = 0;
- tdlsSetupReq.VHTCaps.supportedChannelWidthSet = 0;
- tdlsSetupReq.VHTCaps.ldpcCodingCap = 0;
- tdlsSetupReq.VHTCaps.suBeamFormerCap = 0;
}
else
{
if (tdlsSetupReq.VHTCaps.present)
{
- tdlsSetupReq.VHTCaps.supportedChannelWidthSet = 1; // pVhtCaps->supportedChannelWidthSet;
- tdlsSetupReq.VHTCaps.ldpcCodingCap = 1; // pVhtCaps->ldpcCodingCap
- tdlsSetupReq.VHTCaps.suBeamFormerCap = 1; // pVhtCaps->suBeamFormerCap
+ tANI_U16 aid;
+ tpDphHashNode pStaDs;
+
+ pStaDs = dphLookupHashEntry(pMac, peerMac, &aid , &psessionEntry->dph.dphHashTable);
+ if (NULL != pStaDs)
+ {
+ tdlsSetupReq.AID.present = 1;
+ tdlsSetupReq.AID.assocId = aid | LIM_AID_MASK; // set bit 14 and 15 1's
+ }
}
}
/*
@@ -1655,9 +1677,15 @@
{
if (tdlsSetupRsp.VHTCaps.present)
{
- tdlsSetupRsp.VHTCaps.supportedChannelWidthSet = 1; // pVhtCaps->supportedChannelWidthSet;
- tdlsSetupRsp.VHTCaps.ldpcCodingCap = 1; // pVhtCaps->ldpcCodingCap
- tdlsSetupRsp.VHTCaps.suBeamFormerCap = 1; // pVhtCaps->suBeamFormerCap
+ tANI_U16 aid;
+ tpDphHashNode pStaDs;
+
+ pStaDs = dphLookupHashEntry(pMac, peerMac, &aid , &psessionEntry->dph.dphHashTable);
+ if (NULL != pStaDs)
+ {
+ tdlsSetupRsp.AID.present = 1;
+ tdlsSetupRsp.AID.assocId = aid | LIM_AID_MASK; // set bit 14 and 15 1's
+ }
}
}
tdlsSetupRsp.Status.status = setupStatus ;