浏览代码

qcacmn: Wait until START cmd is removed from ser active queue

When START cmd is activated in scheduler context, due to system load
the scheduler may not process the START cmd time for certain time.
During which if VDEV is checked for INIT state, we proceed to
further operation and return.

Now, start cmd in scheduler will be processed, which will try to bring
up the VDEV leading to undefined issue.

To fix this
1. When we are waiting on VDEV to move to INIT state, we should also wait
until START cmd is removed from serialization active queue.
2.With this we ensure that START cmd processing is completed in the
scheduler context as well as make sure that STOP moves from pending to
active and moves the VDEV SM to INIT state.

Change-Id: I51d0a695cd8c0a8b54e74226e04f9cd32ce58e4f
CRs-Fixed: 2894578
Santosh Anbu 4 年之前
父节点
当前提交
09231b4fd6
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. 9 2
      umac/cmn_services/utils/src/wlan_utility.c

+ 9 - 2
umac/cmn_services/utils/src/wlan_utility.c

@@ -26,6 +26,7 @@
 #include <qdf_module.h>
 #include <wlan_vdev_mlme_api.h>
 #include "cfg_ucfg_api.h"
+#include <wlan_serialization_api.h>
 
 uint32_t wlan_chan_to_freq(uint8_t chan)
 {
@@ -293,13 +294,16 @@ static void wlan_vdev_down_pending(struct wlan_objmgr_pdev *pdev,
 	unsigned long *vdev_id_map = (unsigned long *)arg;
 	uint8_t id = 0;
 	struct wlan_objmgr_psoc *psoc;
+	enum wlan_serialization_cmd_type cmd_type;
 
 	psoc = wlan_pdev_get_psoc(pdev);
 	if (!psoc)
 		return;
 
+	cmd_type = wlan_serialization_get_vdev_active_cmd_type(vdev);
 	wlan_vdev_obj_lock(vdev);
-	if (wlan_vdev_mlme_is_init_state(vdev) != QDF_STATUS_SUCCESS) {
+	if ((wlan_vdev_mlme_is_init_state(vdev) != QDF_STATUS_SUCCESS) ||
+	    (cmd_type == WLAN_SER_CMD_VDEV_START_BSS)) {
 		id = wlan_vdev_get_id(vdev);
 		/* Invalid vdev id */
 		if (id >= wlan_psoc_get_max_vdev_count(psoc)) {
@@ -319,6 +323,7 @@ static void wlan_vdev_ap_down_pending(struct wlan_objmgr_pdev *pdev,
 	unsigned long *vdev_id_map = (unsigned long *)arg;
 	uint8_t id = 0;
 	struct wlan_objmgr_psoc *psoc;
+	enum wlan_serialization_cmd_type cmd_type;
 
 	psoc = wlan_pdev_get_psoc(pdev);
 	if (!psoc)
@@ -327,8 +332,10 @@ static void wlan_vdev_ap_down_pending(struct wlan_objmgr_pdev *pdev,
 	if (wlan_vdev_mlme_get_opmode(vdev) != QDF_SAP_MODE)
 		return;
 
+	cmd_type = wlan_serialization_get_vdev_active_cmd_type(vdev);
 	wlan_vdev_obj_lock(vdev);
-	if (wlan_vdev_mlme_is_init_state(vdev) != QDF_STATUS_SUCCESS) {
+	if ((wlan_vdev_mlme_is_init_state(vdev) != QDF_STATUS_SUCCESS) ||
+	    (cmd_type == WLAN_SER_CMD_VDEV_START_BSS)) {
 		id = wlan_vdev_get_id(vdev);
 		/* Invalid vdev id */
 		if (id >= wlan_psoc_get_max_vdev_count(psoc)) {