qcacmn: Update blocking command flags atomically
When moving a blocking command from pending to active queue, we release the lock and call the activation cb. After the activation cb returns, we update the blocking cmd waiting flag based on the active cmd node's "is_blocking" param. If the activation cb is also resulting in removing the command, then after the cb returns, the active cmd node is returned to the free pool and our check fails, and we miss to update the blocking cmd waiting flag, resulting in no further commands moving to the active queue. The update to the blocking command should be done atomically, immediately after it moves to active queue and before releasing the lock for the activation callback. Change-Id: Idedccb16ce68bb2166fb3970cd231fe738ec6af2 CRs-Fixed: 2554767
This commit is contained in:
@@ -364,6 +364,9 @@ wlan_ser_move_non_scan_pending_to_active(
|
||||
qdf_atomic_set_bit(CMD_MARKED_FOR_ACTIVATION,
|
||||
&active_cmd_list->cmd_in_use);
|
||||
|
||||
if (active_cmd_list->cmd.is_blocking)
|
||||
pdev_queue->blocking_cmd_waiting--;
|
||||
|
||||
wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock);
|
||||
|
||||
wlan_serialization_activate_cmd(active_cmd_list, ser_pdev_obj,
|
||||
@@ -371,15 +374,11 @@ wlan_ser_move_non_scan_pending_to_active(
|
||||
|
||||
wlan_serialization_acquire_lock(&pdev_queue->pdev_queue_lock);
|
||||
|
||||
if (vdev_queue_lookup)
|
||||
if (vdev_queue_lookup || pdev_queue->blocking_cmd_active)
|
||||
break;
|
||||
|
||||
pending_node = NULL;
|
||||
|
||||
if (active_cmd_list->cmd.is_blocking) {
|
||||
pdev_queue->blocking_cmd_waiting--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock);
|
||||
|
Viittaa uudesa ongelmassa
Block a user