Browse Source

qcacld-3.0: Remove check against WMI_SVC_MSG_MAX_SIZE

Structure roam_offload_synch_ind has element hlp_data which is of
size FILS_MAX_HLP_DATA_LEN is greater than WMI_SVC_MSG_MAX_SIZE.
Hence, remove check for size of roam_offload_synch_ind against
WMI_SVC_MSG_MAX_SIZE to avoid roam failure. Also, modify check
for validity of vdev id.

Change-Id: I1b9cef08e1d847f27b7057abf7189ef0f867b92f
CRs-Fixed: 2124786
Padma, Santhosh Kumar 7 years ago
parent
commit
1001d58cca
1 changed files with 1 additions and 4 deletions
  1. 1 4
      core/wma/src/wma_scan_roam.c

+ 1 - 4
core/wma/src/wma_scan_roam.c

@@ -2430,7 +2430,7 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
 		goto cleanup_label;
 	}
 
-	if (synch_event->vdev_id > wma->max_bssid) {
+	if (synch_event->vdev_id >= wma->max_bssid) {
 		WMA_LOGE("%s: received invalid vdev_id %d",
 			 __func__, synch_event->vdev_id);
 		goto cleanup_label;
@@ -2475,9 +2475,6 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
 		(sizeof(*synch_event) + sizeof(wmi_channel) +
 		 sizeof(wmi_key_material) + sizeof(uint32_t)))
 		goto cleanup_label;
-	if (sizeof(roam_offload_synch_ind) >
-		(WMI_SVC_MSG_MAX_SIZE - roam_synch_data_len))
-		goto cleanup_label;
 	roam_synch_data_len += sizeof(roam_offload_synch_ind);
 
 	cds_host_diag_log_work(&wma->roam_ho_wl,