Merge b84e72e50a on remote branch

Change-Id: I93aaad3d3e52d2bbc84ef081bb9c9bd7c559ebe7
This commit is contained in:
Linux Build Service Account 2023-06-13 02:09:10 -07:00
commit 3686eea5bb
9 changed files with 70 additions and 17 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2017-2018, 2020-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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
@ -290,10 +291,12 @@ int pmo_core_psoc_clear_target_wake_up(struct wlan_objmgr_psoc *psoc);
* pmo_core_psoc_target_suspend_acknowledge() - update target susspend status
* @context: HTC_INIT_INFO->context
* @wow_nack: true when wow is rejected
* @reason_code : WoW status reason code
*
* Return: none
*/
void pmo_core_psoc_target_suspend_acknowledge(void *context, bool wow_nack);
void pmo_core_psoc_target_suspend_acknowledge(void *context, bool wow_nack,
uint16_t reason_code);
/**
* pmo_core_psoc_wakeup_host_event_received() - received host wake up event

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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
@ -421,14 +422,17 @@ bool pmo_core_is_wow_enabled(struct pmo_psoc_priv_obj *psoc_ctx)
* pmo_core_set_wow_nack() - Set wow nack flag
* @psoc_ctx: Pointer to objmgr psoc handle
* @value: true if received wow nack from else false
* @reason_code: WoW status reason code
*
* Return: None
*/
static inline
void pmo_core_set_wow_nack(struct pmo_psoc_priv_obj *psoc_ctx, bool value)
void pmo_core_set_wow_nack(struct pmo_psoc_priv_obj *psoc_ctx, bool value,
uint16_t reason_code)
{
qdf_spin_lock_bh(&psoc_ctx->lock);
psoc_ctx->wow.wow_nack = value;
psoc_ctx->wow.reason_code = reason_code;
qdf_spin_unlock_bh(&psoc_ctx->lock);
}
@ -449,6 +453,25 @@ bool pmo_core_get_wow_nack(struct pmo_psoc_priv_obj *psoc_ctx)
return value;
}
/**
* pmo_core_get_wow_reason_code() - Get wow status reason code
* @psoc_ctx: Pointer to objmgr psoc handle
*
* Return: wow status reason code
*/
static inline
uint16_t pmo_core_get_wow_reason_code(struct pmo_psoc_priv_obj *psoc_ctx)
{
uint16_t value;
qdf_spin_lock_bh(&psoc_ctx->lock);
value = psoc_ctx->wow.reason_code;
qdf_spin_unlock_bh(&psoc_ctx->lock);
return value;
}
/**
* pmo_core_update_wow_enable_cmd_sent() - update wow enable cmd sent flag
* @psoc_ctx: Pointer to objmgr psoc handle

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
@ -735,12 +735,13 @@ pmo_core_enable_wow_in_fw(struct wlan_objmgr_psoc *psoc,
struct pmo_psoc_cfg *psoc_cfg = &psoc_ctx->psoc_cfg;
QDF_STATUS status;
void *hif_ctx;
uint16_t reason_code;
pmo_enter();
hif_ctx = pmo_core_psoc_get_hif_handle(psoc);
qdf_event_reset(&psoc_ctx->wow.target_suspend);
pmo_core_set_wow_nack(psoc_ctx, false);
pmo_core_set_wow_nack(psoc_ctx, false, 0);
host_credits = pmo_tgt_psoc_get_host_credits(psoc);
wmi_pending_cmds = pmo_tgt_psoc_get_pending_cmnds(psoc);
pmo_debug("Credits:%d; Pending_Cmds: %d",
@ -847,7 +848,8 @@ pmo_core_enable_wow_in_fw(struct wlan_objmgr_psoc *psoc,
}
if (pmo_core_get_wow_nack(psoc_ctx)) {
pmo_err("FW not ready to WOW");
reason_code = pmo_core_get_wow_reason_code(psoc_ctx);
pmo_err("FW not ready to WOW reason code: %d", reason_code);
pmo_tgt_update_target_suspend_flag(psoc, false);
status = QDF_STATUS_E_AGAIN;
goto out;
@ -1514,7 +1516,8 @@ out:
return status;
}
void pmo_core_psoc_target_suspend_acknowledge(void *context, bool wow_nack)
void pmo_core_psoc_target_suspend_acknowledge(void *context, bool wow_nack,
uint16_t reason_code)
{
struct pmo_psoc_priv_obj *psoc_ctx;
struct wlan_objmgr_psoc *psoc = (struct wlan_objmgr_psoc *)context;
@ -1535,7 +1538,7 @@ void pmo_core_psoc_target_suspend_acknowledge(void *context, bool wow_nack)
psoc_ctx = pmo_psoc_get_priv(psoc);
pmo_core_set_wow_nack(psoc_ctx, wow_nack);
pmo_core_set_wow_nack(psoc_ctx, wow_nack, reason_code);
qdf_event_set(&psoc_ctx->wow.target_suspend);
if (!pmo_tgt_psoc_get_runtime_pm_in_progress(psoc)) {
if (wow_nack)

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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
@ -993,11 +994,14 @@ int ucfg_pmo_psoc_clear_target_wake_up(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_pmo_psoc_target_suspend_acknowledge() - Clear initial wake up status
* @psoc: objmgr psoc handle
* @context: caller-provided context
* @wow_nack: Was WoW NACK'ed
* @reason_code: WoW status reason code
*
* Return: None
*/
void ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack);
void ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack,
uint16_t reason_code);
/**
* ucfg_pmo_psoc_wakeup_host_event_received() - got host wake up evennt from fwr
@ -1665,7 +1669,8 @@ ucfg_pmo_psoc_clear_target_wake_up(struct wlan_objmgr_psoc *psoc)
}
static inline void
ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack)
ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack,
uint16_t reason_code)
{
}

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
@ -224,6 +224,7 @@ enum pmo_wow_state {
* @target_suspend: target suspend event
* @target_resume: target resume event
* @wow_nack: wow negative ack flag
* @reason_code : wow status reason code
* @wow_initial_wake_up: target initial wake up is received
* @wow_wake_lock: wow wake lock
* @lphb_cache: lphb cache
@ -245,7 +246,8 @@ struct pmo_wow {
enum pmo_wow_state wow_state;
qdf_event_t target_suspend;
qdf_event_t target_resume;
int wow_nack;
bool wow_nack;
uint16_t reason_code;
atomic_t wow_initial_wake_up;
qdf_wake_lock_t wow_wake_lock;
/*

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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
@ -486,9 +487,11 @@ int ucfg_pmo_psoc_clear_target_wake_up(struct wlan_objmgr_psoc *psoc)
return pmo_core_psoc_clear_target_wake_up(psoc);
}
void ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack)
void ucfg_pmo_psoc_target_suspend_acknowledge(void *context, bool wow_nack,
uint16_t reason_code)
{
pmo_core_psoc_target_suspend_acknowledge(context, wow_nack);
pmo_core_psoc_target_suspend_acknowledge(context, wow_nack,
reason_code);
}
void ucfg_pmo_psoc_wakeup_host_event_received(struct wlan_objmgr_psoc *psoc)

View file

@ -32,9 +32,9 @@
#define QWLAN_VERSION_MAJOR 2
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 8
#define QWLAN_VERSION_EXTRA "Z"
#define QWLAN_VERSION_BUILD 32
#define QWLAN_VERSION_EXTRA "B"
#define QWLAN_VERSION_BUILD 33
#define QWLAN_VERSIONSTR "2.0.8.32Z"
#define QWLAN_VERSIONSTR "2.0.8.33B"
#endif /* QWLAN_VERSION_H */

View file

@ -1839,6 +1839,13 @@ csr_check_band_freq_match(enum band_info band, uint32_t freq)
if (band == BAND_5G && WLAN_REG_IS_5GHZ_CH_FREQ(freq))
return true;
/*
* Not adding the band check for now as band_info will be soon
* replaced with reg_wifi_band enum
*/
if (WLAN_REG_IS_6GHZ_CHAN_FREQ(freq))
return true;
return false;
}

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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
@ -255,6 +256,9 @@ int __osif_vdev_sync_trans_start(struct net_device *net_dev,
dsc_vdev_trans_start);
osif_vdev_sync_unlock();
if (!errno)
osif_vdev_sync_wait_for_ops(*out_vdev_sync);
return errno;
}
@ -269,6 +273,9 @@ int __osif_vdev_sync_trans_start_wait(struct net_device *net_dev,
out_vdev_sync, desc,
dsc_vdev_trans_start_wait);
if (!errno)
osif_vdev_sync_wait_for_ops(*out_vdev_sync);
return errno;
}