浏览代码

qcacld-3.0: Ignore the last channel event data

The last channel event data whose command flag is set to 1.
It’s basically an event with empty data only to indicate
scan event completion. The process of WMI_CHAN_INFO_EVENTID
should ignore it or it takes the freq 0 as selecting first
clean channel for ACS which is not expected.

Change-Id: Ia64b4ad16fa3571363f16fe419cf861fbbe19038
CRs-Fixed: 3306049
Paul Zhang 2 年之前
父节点
当前提交
a7ec19fb25
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      core/wma/src/wma_features.c

+ 7 - 0
core/wma/src/wma_features.c

@@ -5114,6 +5114,13 @@ int wma_chan_info_event_handler(void *handle, uint8_t *event_buf,
 		mac->chan_info_cb(&buf);
 	}
 
+	/* Ignore the last channel event data whose command flag is set to 1.
+	 * It’s basically an event with empty data only to indicate scan event
+	 * completion.
+	 */
+	if (event->cmd_flags == WMI_CHAN_INFO_END_RESP)
+		return 0;
+
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(wma->psoc, event->vdev_id,
 						    WLAN_LEGACY_WMA_ID);