qcacld-3.0: Fix incorrect NULL pointer check for SAP

Propagate from qcacld-2.0 to qcacld-3.0

Currently there are some places where array name is compared to NULL
in SAP, add fix to correct it.

CRs-Fixed: 1063255
Change-Id: I736ac42dd08cd6d3375b7693e914e825dae6c702
This commit is contained in:
Yingying Tang
2016-10-20 17:43:59 +08:00
committed by snandini
orang tua 28602e90b1
melakukan 22facc1b25
2 mengubah file dengan 25 tambahan dan 27 penghapusan

Melihat File

@@ -1231,22 +1231,24 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
vhtSupport = 0;
centerFreq = 0;
if (pScanResult->BssDescriptor.ieFields != NULL) {
ieLen = GET_IE_LEN_IN_BSS(
pScanResult->BssDescriptor.length);
qdf_mem_set((uint8_t *) pBeaconStruct,
sizeof(tSirProbeRespBeacon), 0);
if ((sir_parse_beacon_ie
(pMac, pBeaconStruct, (uint8_t *)
(pScanResult->BssDescriptor.ieFields),
ieLen)) == eSIR_SUCCESS) {
sap_upd_chan_spec_params(pBeaconStruct,
&channelWidth, &secondaryChannelOffset,
&vhtSupport, &centerFreq,
&centerFreq_2);
}
}
ieLen = GET_IE_LEN_IN_BSS(
pScanResult->BssDescriptor.length);
qdf_mem_set((uint8_t *) pBeaconStruct,
sizeof(tSirProbeRespBeacon), 0);
if ((sir_parse_beacon_ie
(pMac, pBeaconStruct, (uint8_t *)
(pScanResult->BssDescriptor.ieFields),
ieLen)) == eSIR_SUCCESS)
sap_upd_chan_spec_params(
pBeaconStruct,
&channelWidth,
&secondaryChannelOffset,
&vhtSupport, &centerFreq,
&centerFreq_2);
/* Processing for each tCsrScanResultInfo in the tCsrScanResult DLink list */
for (chn_num = 0; chn_num < pSpectInfoParams->numSpectChans;
chn_num++) {

Melihat File

@@ -1272,23 +1272,19 @@ QDF_STATUS wlansap_clear_acl(void *pCtx)
return QDF_STATUS_E_RESOURCES;
}
if (pSapCtx->denyMacList != NULL) {
for (i = 0; i < (pSapCtx->nDenyMac - 1); i++) {
qdf_mem_zero((pSapCtx->denyMacList + i)->bytes,
QDF_MAC_ADDR_SIZE);
}
for (i = 0; i < (pSapCtx->nDenyMac - 1); i++) {
qdf_mem_zero((pSapCtx->denyMacList + i)->bytes,
QDF_MAC_ADDR_SIZE);
}
sap_print_acl(pSapCtx->denyMacList, pSapCtx->nDenyMac);
pSapCtx->nDenyMac = 0;
if (pSapCtx->acceptMacList != NULL) {
for (i = 0; i < (pSapCtx->nAcceptMac - 1); i++) {
qdf_mem_zero((pSapCtx->acceptMacList + i)->bytes,
QDF_MAC_ADDR_SIZE);
}
for (i = 0; i < (pSapCtx->nAcceptMac - 1); i++) {
qdf_mem_zero((pSapCtx->acceptMacList + i)->bytes,
QDF_MAC_ADDR_SIZE);
}
sap_print_acl(pSapCtx->acceptMacList, pSapCtx->nAcceptMac);
pSapCtx->nAcceptMac = 0;