qcacmn: Additional flag to mark cmds both for activation and cancel
Adding additional flag for commands which has been marked for activation and for which cancel has been received. After the commands marked for activation and also marked for cancel really gets active, we remove the command from the active queue. Change-Id: I5eb42459e216ad8cbcee15ce9a7572dec7f776a2 CRs-Fixed: 2326639
This commit is contained in:
@@ -276,9 +276,22 @@ QDF_STATUS wlan_serialization_activate_cmd(
|
|||||||
|
|
||||||
wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock);
|
wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock);
|
||||||
|
|
||||||
if (QDF_IS_STATUS_ERROR(status))
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
wlan_serialization_dequeue_cmd(&cmd_list->cmd, true);
|
wlan_serialization_dequeue_cmd(&cmd_list->cmd, true);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Cmd was marked for activation and cancel
|
||||||
|
* was received before activation so the command
|
||||||
|
* should be immediately removed after activation
|
||||||
|
*/
|
||||||
|
if (qdf_atomic_test_bit(CMD_ACTIVE_MARKED_FOR_CANCEL,
|
||||||
|
&cmd_list->cmd_in_use))
|
||||||
|
wlan_serialization_cmd_cancel_handler(
|
||||||
|
ser_pdev_obj, &cmd_list->cmd,
|
||||||
|
NULL, NULL, cmd_list->cmd.cmd_type,
|
||||||
|
WLAN_SERIALIZATION_ACTIVE_QUEUE);
|
||||||
error:
|
error:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@@ -490,15 +490,16 @@ wlan_ser_cancel_non_scan_cmd(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Cancel request received for a cmd in active
|
/* Cancel request received for a cmd in active
|
||||||
* queue which has not been activated yet, we
|
* queue which has not been activated yet, we mark
|
||||||
* should assert here
|
* it as CMD_ACTIVE_MARKED_FOR_CANCEL and remove
|
||||||
|
* the cmd after activation
|
||||||
*/
|
*/
|
||||||
if (qdf_atomic_test_bit(CMD_MARKED_FOR_ACTIVATION,
|
if (qdf_atomic_test_bit(CMD_MARKED_FOR_ACTIVATION,
|
||||||
&cmd_list->cmd_in_use)) {
|
&cmd_list->cmd_in_use)) {
|
||||||
wlan_serialization_release_lock(
|
qdf_atomic_set_bit(CMD_ACTIVE_MARKED_FOR_CANCEL,
|
||||||
&pdev_q->pdev_queue_lock);
|
&cmd_list->cmd_in_use);
|
||||||
status = WLAN_SER_CMD_MARKED_FOR_ACTIVATION;
|
status = WLAN_SER_CMD_MARKED_FOR_ACTIVATION;
|
||||||
goto error;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_status = wlan_serialization_find_and_stop_timer(
|
qdf_status = wlan_serialization_find_and_stop_timer(
|
||||||
@@ -589,7 +590,6 @@ wlan_ser_cancel_non_scan_cmd(
|
|||||||
|
|
||||||
wlan_serialization_release_lock(&pdev_q->pdev_queue_lock);
|
wlan_serialization_release_lock(&pdev_q->pdev_queue_lock);
|
||||||
|
|
||||||
error:
|
|
||||||
ser_exit();
|
ser_exit();
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@@ -237,15 +237,16 @@ wlan_ser_cancel_scan_cmd(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Cancel request received for a cmd in active
|
/* Cancel request received for a cmd in active
|
||||||
* queue which has not been activated yet, we
|
* queue which has not been activated yet, we mark
|
||||||
* should assert here
|
* it as CMD_ACTIVE_MARKED_FOR_CANCEL and remove
|
||||||
|
* the cmd after activation
|
||||||
*/
|
*/
|
||||||
if (qdf_atomic_test_bit(CMD_MARKED_FOR_ACTIVATION,
|
if (qdf_atomic_test_bit(CMD_MARKED_FOR_ACTIVATION,
|
||||||
&cmd_list->cmd_in_use)) {
|
&cmd_list->cmd_in_use)) {
|
||||||
wlan_serialization_release_lock(
|
qdf_atomic_set_bit(CMD_ACTIVE_MARKED_FOR_CANCEL,
|
||||||
&pdev_q->pdev_queue_lock);
|
&cmd_list->cmd_in_use);
|
||||||
status = WLAN_SER_CMD_MARKED_FOR_ACTIVATION;
|
status = WLAN_SER_CMD_MARKED_FOR_ACTIVATION;
|
||||||
goto error;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_status = wlan_serialization_find_and_stop_timer(
|
qdf_status = wlan_serialization_find_and_stop_timer(
|
||||||
@@ -312,7 +313,6 @@ wlan_ser_cancel_scan_cmd(
|
|||||||
|
|
||||||
wlan_serialization_release_lock(&pdev_q->pdev_queue_lock);
|
wlan_serialization_release_lock(&pdev_q->pdev_queue_lock);
|
||||||
|
|
||||||
error:
|
|
||||||
ser_exit();
|
ser_exit();
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@@ -635,6 +635,7 @@ QDF_STATUS wlan_serialization_peek_next(
|
|||||||
*/
|
*/
|
||||||
#define CMD_MARKED_FOR_ACTIVATION 1
|
#define CMD_MARKED_FOR_ACTIVATION 1
|
||||||
#define CMD_IS_ACTIVE 2
|
#define CMD_IS_ACTIVE 2
|
||||||
|
#define CMD_ACTIVE_MARKED_FOR_CANCEL 3
|
||||||
/**
|
/**
|
||||||
* struct wlan_serialization_timer - Timer used for serialization
|
* struct wlan_serialization_timer - Timer used for serialization
|
||||||
* @cmd: Cmd to which the timer is linked
|
* @cmd: Cmd to which the timer is linked
|
||||||
|
Reference in New Issue
Block a user