Explorar o código

qcacld-3.0: Fix improper type casting and return status

Propagate from qcacld-2.0 to qcacld-3.0

In rrmProcessBeaconReportReq(), the return value is not the same
enum type with the routine definition. In dfs_process_radarevent(),
2 variables type are not same in a comparison. Add fix to correct
it.

Change-Id: Ibc5fbf70e2632a22971f33b769b31737a40123e7
CRs-Fixed: 979671
Yingying Tang %!s(int64=8) %!d(string=hai) anos
pai
achega
76caff9ef2
Modificáronse 2 ficheiros con 5 adicións e 2 borrados
  1. 3 1
      core/mac/src/pe/rrm/rrm_api.c
  2. 2 1
      core/sap/dfs/src/dfs_process_radarevent.c

+ 3 - 1
core/mac/src/pe/rrm/rrm_api.c

@@ -696,7 +696,9 @@ rrm_process_beacon_report_req(tpAniSirGlobal pMac,
 	mmhMsg.bodyptr = pSmeBcnReportReq;
 	MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
 			 pSessionEntry->peSessionId, mmhMsg.type));
-	return lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
+	if (eSIR_SUCCESS != lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT))
+		return eRRM_FAILURE;
+	return eRRM_SUCCESS;
 }
 
 /* -------------------------------------------------------------------- */

+ 2 - 1
core/sap/dfs/src/dfs_process_radarevent.c

@@ -721,7 +721,8 @@ int dfs_process_radarevent(struct ath_dfs *dfs,
 						 */
 
 						if ((deltaT >
-						     (dfs->dfs_pri_multiplier *
+						     ((u_int64_t)dfs->
+						       dfs_pri_multiplier *
 						      rf->rf_maxpri))
 						    || (deltaT <
 							rf->rf_minpri)) {