mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacmn: Fix purging of active command during sme close session
In wlan_serialization_purge_cmd_list, driver stops the active cmd timer and destroy it and thus in wlan_ser_cancel_non_scan_cmd as driver is not able to get the timer the active cmd is not removed. As wlan_ser_cancel_non_scan_cmd already takes care of the stopping and destroying the timer and remove the logic from wlan_serialization_purge_cmd_list. Also update the active command bitmask and active/pending blocking flags when an command is flushed. Change-Id: Ie206f08920c2830c935d0aacb204dc4ee2676c91 CRs-Fixed: 2324890
This commit is contained in:
parent
9066ad3aa7
commit
3e940d1376
2 changed files with 13 additions and 38 deletions
|
|
@ -386,11 +386,8 @@ void wlan_serialization_purge_cmd_list(
|
|||
bool purge_nonscan_pending_queue,
|
||||
bool purge_all_queues)
|
||||
{
|
||||
struct wlan_serialization_timer *ser_timer;
|
||||
struct wlan_ser_psoc_obj *psoc_ser_obj;
|
||||
struct wlan_ser_pdev_obj *ser_pdev_obj;
|
||||
struct wlan_objmgr_pdev *pdev = NULL;
|
||||
uint32_t i = 0;
|
||||
|
||||
if (!psoc) {
|
||||
ser_err("Invalid psoc");
|
||||
|
|
@ -401,45 +398,13 @@ void wlan_serialization_purge_cmd_list(
|
|||
ser_err("Invalid ser_pdev_obj");
|
||||
return;
|
||||
}
|
||||
psoc_ser_obj = wlan_serialization_get_psoc_obj(psoc);
|
||||
if (!psoc_ser_obj) {
|
||||
ser_err("Invalid psoc_ser_obj");
|
||||
return;
|
||||
}
|
||||
|
||||
pdev = wlan_serialization_get_first_pdev(psoc);
|
||||
if (!pdev) {
|
||||
ser_err("Invalid pdev");
|
||||
return;
|
||||
}
|
||||
for (i = 0; psoc_ser_obj->max_active_cmds > i; i++) {
|
||||
ser_timer = &psoc_ser_obj->timers[i];
|
||||
if (!ser_timer->cmd)
|
||||
continue;
|
||||
if (vdev && (vdev != ser_timer->cmd->vdev))
|
||||
continue;
|
||||
/*
|
||||
* if request is to purge active scan then don't de-activate
|
||||
* non-scan cmds. If request is to purge all queues then
|
||||
* de-activate all the timers.
|
||||
*/
|
||||
if (!purge_all_queues && purge_scan_active_queue &&
|
||||
(ser_timer->cmd->cmd_type >= WLAN_SER_CMD_NONSCAN))
|
||||
continue;
|
||||
/*
|
||||
* if request is to purge active nonscan then don't de-activate
|
||||
* scan cmds. If request is to purge all queues then
|
||||
* de-activate all the timers.
|
||||
*/
|
||||
if (!purge_all_queues && purge_nonscan_active_queue &&
|
||||
(ser_timer->cmd->cmd_type < WLAN_SER_CMD_NONSCAN))
|
||||
continue;
|
||||
|
||||
if (QDF_STATUS_SUCCESS !=
|
||||
wlan_serialization_find_and_stop_timer(
|
||||
psoc,
|
||||
ser_timer->cmd))
|
||||
ser_err("some error in stopping timer");
|
||||
}
|
||||
if (purge_all_queues || purge_scan_active_queue) {
|
||||
wlan_ser_cancel_scan_cmd(ser_pdev_obj,
|
||||
pdev,
|
||||
|
|
|
|||
|
|
@ -629,8 +629,18 @@ wlan_ser_cancel_non_scan_cmd(
|
|||
|
||||
wlan_serialization_acquire_lock(&pdev_q->pdev_queue_lock);
|
||||
|
||||
if (!is_active_queue)
|
||||
if (is_active_queue) {
|
||||
if (cmd_bkup.is_blocking)
|
||||
pdev_q->blocking_cmd_active = 0;
|
||||
pdev_q->vdev_active_cmd_bitmap &=
|
||||
~(1 << wlan_vdev_get_id(cmd_bkup.vdev));
|
||||
} else {
|
||||
if (cmd_bkup.is_blocking)
|
||||
pdev_q->blocking_cmd_waiting--;
|
||||
|
||||
status = WLAN_SER_CMD_IN_PENDING_LIST;
|
||||
}
|
||||
|
||||
|
||||
if (!vdev && !pdev)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue