summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/MAC/src/pe/include/schApi.h3
-rw-r--r--CORE/MAC/src/pe/sch/schBeaconGen.c35
2 files changed, 29 insertions, 9 deletions
diff --git a/CORE/MAC/src/pe/include/schApi.h b/CORE/MAC/src/pe/include/schApi.h
index 111480b0a827..3c45a8b9bdce 100644
--- a/CORE/MAC/src/pe/include/schApi.h
+++ b/CORE/MAC/src/pe/include/schApi.h
@@ -93,7 +93,8 @@ void schSetBeaconInterval(tpAniSirGlobal pMac,tpPESession psessionEntry);
tSirRetStatus schSendBeaconReq( tpAniSirGlobal, tANI_U8 *, tANI_U16, tpPESession psessionEntry );
-void limUpdateProbeRspTemplateIeBitmapBeacon1(tpAniSirGlobal,tDot11fBeacon1*,tANI_U32*,tDot11fProbeResponse*);
+tSirRetStatus limUpdateProbeRspTemplateIeBitmapBeacon1(tpAniSirGlobal,
+ tDot11fBeacon1*, tpPESession psessionEntry);
void limUpdateProbeRspTemplateIeBitmapBeacon2(tpAniSirGlobal,tDot11fBeacon2*,tANI_U32*,tDot11fProbeResponse*);
void SetProbeRspIeBitmap(tANI_U32*,tANI_U32);
tANI_U32 limSendProbeRspTemplateToHal(tpAniSirGlobal,tpPESession,
diff --git a/CORE/MAC/src/pe/sch/schBeaconGen.c b/CORE/MAC/src/pe/sch/schBeaconGen.c
index 7be0d7464122..10e7b7ef3aa7 100644
--- a/CORE/MAC/src/pe/sch/schBeaconGen.c
+++ b/CORE/MAC/src/pe/sch/schBeaconGen.c
@@ -275,9 +275,14 @@ tSirRetStatus schSetFixedBeaconFields(tpAniSirGlobal pMac,tpPESession psessionEn
vos_mem_set(( tANI_U8* )&(psessionEntry->probeRespFrame),
sizeof(psessionEntry->probeRespFrame), 0);
- /* Can be efficiently updated whenever new IE added in Probe response in future */
- limUpdateProbeRspTemplateIeBitmapBeacon1(pMac,pBcn1,&psessionEntry->DefProbeRspIeBitmap[0],
- &psessionEntry->probeRespFrame);
+ /* Can be efficiently updated whenever new IE added
+ * in Probe response in future
+ */
+ if (limUpdateProbeRspTemplateIeBitmapBeacon1(pMac, pBcn1,
+ psessionEntry) != eSIR_SUCCESS) {
+ schLog(pMac, LOGE,
+ FL("Failed to build ProbeRsp template"));
+ }
}
nStatus = dot11fPackBeacon1( pMac, pBcn1, ptr,
@@ -511,11 +516,21 @@ tSirRetStatus schSetFixedBeaconFields(tpAniSirGlobal pMac,tpPESession psessionEn
return eSIR_SUCCESS;
}
-void limUpdateProbeRspTemplateIeBitmapBeacon1(tpAniSirGlobal pMac,
+tSirRetStatus limUpdateProbeRspTemplateIeBitmapBeacon1(tpAniSirGlobal pMac,
tDot11fBeacon1* beacon1,
- tANI_U32* DefProbeRspIeBitmap,
- tDot11fProbeResponse* prb_rsp)
+ tpPESession psessionEntry)
{
+ tANI_U32* DefProbeRspIeBitmap;
+ tDot11fProbeResponse* prb_rsp;
+
+ if (!psessionEntry) {
+ schLog(pMac, LOGE, FL("PESession is null!"));
+ return eSIR_FAILURE;
+ }
+
+ DefProbeRspIeBitmap = &psessionEntry->DefProbeRspIeBitmap[0];
+ prb_rsp = &psessionEntry->probeRespFrame;
+
prb_rsp->BeaconInterval = beacon1->BeaconInterval;
vos_mem_copy((void *)&prb_rsp->Capabilities, (void *)&beacon1->Capabilities,
sizeof(beacon1->Capabilities));
@@ -524,8 +539,10 @@ void limUpdateProbeRspTemplateIeBitmapBeacon1(tpAniSirGlobal pMac,
if(beacon1->SSID.present)
{
SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_SSID_EID);
- /* populating it, because probe response has to go with SSID even in hidden case */
- PopulateDot11fSSID2( pMac, &prb_rsp->SSID );
+ /* populating it, because probe response has to go with
+ * SSID even in hidden case
+ */
+ PopulateDot11fSSID(pMac, &psessionEntry->ssId, &prb_rsp->SSID);
}
/* supported rates */
if(beacon1->SuppRates.present)
@@ -545,6 +562,8 @@ void limUpdateProbeRspTemplateIeBitmapBeacon1(tpAniSirGlobal pMac,
}
/* IBSS params will not be present in the Beacons transmitted by AP */
+
+ return eSIR_SUCCESS;
}
void limUpdateProbeRspTemplateIeBitmapBeacon2(tpAniSirGlobal pMac,