qcacld-3.0: pmo: Add API to get target suspend state

In USB devices even if the driver returns an error from bus_suspend,
still the kernel/platform goes into suspend as any error from USB
bus_suspend is ignored.
During suspend, if WoW or suspend was NACked by FW, we should not
send WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, WMI_PDEV_RESUME_CMDID to disable
WoW or resume device (in the next system resume)
Add new PMO API to get target suspend state and use it to check if
device should be resumed.

Change-Id: Ic6be05f4f2d36ffe174774b6cd55c6da6b1ea1b8
CRs-Fixed: 2421591
This commit is contained in:
Ajit Pal Singh
2019-03-28 19:16:35 +05:30
zatwierdzone przez nshrivas
rodzic 64350c5d68
commit e64f7f7d9b
7 zmienionych plików z 55 dodań i 5 usunięć

Wyświetl plik

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -207,6 +207,7 @@ struct wlan_pmo_tx_ops {
struct wlan_objmgr_psoc *psoc);
void (*update_target_suspend_flag)(
struct wlan_objmgr_psoc *psoc, uint8_t value);
bool (*is_target_suspended)(struct wlan_objmgr_psoc *psoc);
QDF_STATUS (*psoc_send_wow_enable_req)(struct wlan_objmgr_psoc *psoc,
struct pmo_wow_cmd_params *param);
QDF_STATUS (*psoc_send_supend_req)(struct wlan_objmgr_psoc *psoc,

Wyświetl plik

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -382,6 +382,14 @@ int pmo_tgt_psoc_get_pending_cmnds(struct wlan_objmgr_psoc *psoc);
void pmo_tgt_update_target_suspend_flag(struct wlan_objmgr_psoc *psoc,
uint8_t val);
/**
* pmo_tgt_is_target_suspended() - Get WMI target Suspend flag
* @psoc: objmgr psoc
*
* Return: true if target suspended, false otherwise.
*/
bool pmo_tgt_is_target_suspended(struct wlan_objmgr_psoc *psoc);
/**
* pmo_tgt_psoc_send_wow_enable_req() -Send wow enable request
* @psoc: objmgr psoc