qcacld-3.0: Enable D0WOW for pcie
Enable FEATURE_WLAN_DOWOW for pcie. This is for backward compatible with rome fw. Change-Id: Ia2107ff6939666b4a0bd19d57149d17814f2dfb5 CRs-Fixed: 2070426
This commit is contained in:
@@ -1110,6 +1110,7 @@ void pmo_core_psoc_wakeup_host_event_received(struct wlan_objmgr_psoc *psoc)
|
||||
}
|
||||
|
||||
psoc_ctx = pmo_psoc_get_priv(psoc);
|
||||
psoc_ctx->wow.wow_state = pmo_wow_state_none;
|
||||
qdf_event_set(&psoc_ctx->wow.target_resume);
|
||||
out:
|
||||
PMO_EXIT();
|
||||
|
@@ -271,6 +271,7 @@ enum pmo_auto_pwr_detect_failure_mode {
|
||||
* @enable_mc_list: true if psoc supports mc addr list else false
|
||||
* @active_mode_offload: true if psoc supports active mode offload else false
|
||||
* @ap_arpns_support: true if psoc supports arp ns for ap mode
|
||||
* @d0_wow_supported: true if psoc supports D0 wow command
|
||||
* @max_wow_filters: maximum number of wow filter supported
|
||||
* @ra_ratelimit_enable: true when ra filtering ins eanbled else false
|
||||
* @ra_ratelimit_interval: ra packets interval
|
||||
@@ -298,6 +299,7 @@ struct pmo_psoc_cfg {
|
||||
bool enable_mc_list;
|
||||
bool active_mode_offload;
|
||||
bool ap_arpns_support;
|
||||
bool d0_wow_supported;
|
||||
uint8_t max_wow_filters;
|
||||
bool ra_ratelimit_enable;
|
||||
uint16_t ra_ratelimit_interval;
|
||||
|
@@ -102,6 +102,8 @@ int (*pmo_pld_auto_resume_cb)(void);
|
||||
* @psoc_get_runtime_pm_in_progress: fp to get runtime pm is in progress status
|
||||
* @psoc_send_host_wakeup_ind: fp tp send host wake indication to fwr
|
||||
* @psoc_send_target_resume_req: fp to send target resume request
|
||||
* @psoc_send_d0wow_enable_req: fp to send D0 WOW enable request
|
||||
* @psoc_send_d0wow_disable_req: fp to send D0 WOW disable request
|
||||
*/
|
||||
struct wlan_pmo_tx_ops {
|
||||
QDF_STATUS (*send_arp_offload_req)(struct wlan_objmgr_vdev *vdev,
|
||||
@@ -196,6 +198,10 @@ struct wlan_pmo_tx_ops {
|
||||
QDF_STATUS (*psoc_send_host_wakeup_ind)(struct wlan_objmgr_psoc *psoc);
|
||||
QDF_STATUS (*psoc_send_target_resume_req)(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
QDF_STATUS (*psoc_send_d0wow_enable_req)(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
QDF_STATUS (*psoc_send_d0wow_disable_req)(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
};
|
||||
|
||||
|
@@ -173,11 +173,26 @@ enum pmo_wow_action_wakeup_opertion {
|
||||
pmo_action_wakeup_del_set,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum pmo_wow_state: enumeration of wow state
|
||||
* @pmo_wow_state_none: not in wow state
|
||||
* @pmo_wow_state_legacy_d0: in d0 wow state trigger by legacy d0 wow command
|
||||
* @pmo_wow_state_unified_d0: in d0 wow state trigger by unified wow command
|
||||
* @pmo_wow_state_unified_d3: in d3 wow state trigger by unified wow command
|
||||
*/
|
||||
enum pmo_wow_state {
|
||||
pmo_wow_state_none = 0,
|
||||
pmo_wow_state_legacy_d0,
|
||||
pmo_wow_state_unified_d0,
|
||||
pmo_wow_state_unified_d3,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_wow - store wow patterns
|
||||
* @wow_enable: wow enable/disable
|
||||
* @wow_enable_cmd_sent: is wow enable command sent to fw
|
||||
* @is_wow_bus_suspended: true if bus is suspended
|
||||
* @wow_state: state of wow
|
||||
* @target_suspend: target suspend event
|
||||
* @target_resume: target resume event
|
||||
* @wow_nack: wow negative ack flag
|
||||
@@ -197,6 +212,7 @@ struct pmo_wow {
|
||||
bool wow_enable;
|
||||
bool wow_enable_cmd_sent;
|
||||
bool is_wow_bus_suspended;
|
||||
enum pmo_wow_state wow_state;
|
||||
qdf_event_t target_suspend;
|
||||
qdf_event_t target_resume;
|
||||
int wow_nack;
|
||||
|
@@ -133,14 +133,28 @@ void pmo_tgt_update_target_suspend_flag(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS pmo_tgt_psoc_send_wow_enable_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_wow_cmd_params *param)
|
||||
{
|
||||
struct pmo_psoc_priv_obj *psoc_ctx;
|
||||
struct wlan_pmo_tx_ops pmo_tx_ops;
|
||||
|
||||
psoc_ctx = pmo_psoc_get_priv(psoc);
|
||||
pmo_tx_ops = GET_PMO_TX_OPS_FROM_PSOC(psoc);
|
||||
|
||||
if (psoc_ctx->psoc_cfg.d0_wow_supported && !param->can_suspend_link) {
|
||||
if (!pmo_tx_ops.psoc_send_d0wow_enable_req) {
|
||||
pmo_err("psoc_send_d0wow_enable_req is null");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
psoc_ctx->wow.wow_state = pmo_wow_state_legacy_d0;
|
||||
pmo_debug("Sending D0WOW enable command...");
|
||||
return pmo_tx_ops.psoc_send_d0wow_enable_req(psoc);
|
||||
}
|
||||
|
||||
if (!pmo_tx_ops.psoc_send_wow_enable_req) {
|
||||
pmo_err("psoc_send_wow_enable_req is null");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
psoc_ctx->wow.wow_state = param->can_suspend_link ?
|
||||
pmo_wow_state_unified_d3 : pmo_wow_state_unified_d0;
|
||||
return pmo_tx_ops.psoc_send_wow_enable_req(psoc, param);
|
||||
}
|
||||
|
||||
@@ -189,14 +203,26 @@ bool pmo_tgt_psoc_get_runtime_pm_in_progress(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
QDF_STATUS pmo_tgt_psoc_send_host_wakeup_ind(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct pmo_psoc_priv_obj *psoc_ctx;
|
||||
struct wlan_pmo_tx_ops pmo_tx_ops;
|
||||
|
||||
psoc_ctx = pmo_psoc_get_priv(psoc);
|
||||
pmo_tx_ops = GET_PMO_TX_OPS_FROM_PSOC(psoc);
|
||||
|
||||
if (psoc_ctx->psoc_cfg.d0_wow_supported &&
|
||||
psoc_ctx->wow.wow_state == pmo_wow_state_legacy_d0) {
|
||||
if (!pmo_tx_ops.psoc_send_d0wow_disable_req) {
|
||||
pmo_err("psoc_send_d0wow_disable_req is null");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
pmo_debug("Sending D0WOW disable command...");
|
||||
return pmo_tx_ops.psoc_send_d0wow_disable_req(psoc);
|
||||
}
|
||||
|
||||
if (!pmo_tx_ops.psoc_send_host_wakeup_ind) {
|
||||
pmo_err("psoc_send_host_wakeup_ind is null");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
return pmo_tx_ops.psoc_send_host_wakeup_ind(psoc);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user