qcacld-3.0: Add Support to offload icmp feature to fw
Add support to offload icmp feature to fw in case of suspended state to avoid high power consumption. Change-Id: I3ff19d71eac530c75be57e6b52b975e755ff2a53 CRs-Fixed: 3042452
This commit is contained in:

committed by
Madan Koyyalamudi

父節點
29adcfaef4
當前提交
37026bc3ff
@@ -522,5 +522,19 @@ target_if_pmo_psoc_send_idle_monitor_cmd(struct wlan_objmgr_psoc *psoc,
|
||||
*/
|
||||
void target_if_pmo_register_tx_ops(struct wlan_pmo_tx_ops *tx_ops);
|
||||
|
||||
#ifdef WLAN_FEATURE_ICMP_OFFLOAD
|
||||
/**
|
||||
* target_if_pmo_send_icmp_offload_req() - sends icmp request to fwr
|
||||
* @psoc: objmgr psoc
|
||||
* @pmo_icmp_req: icmp offload request
|
||||
*
|
||||
* This functions sends icmp request to fwr.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS
|
||||
target_if_pmo_send_icmp_offload_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_icmp_offload *pmo_icmp_req);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
49
components/target_if/pmo/src/target_if_pmo_icmp.c
Normal file
49
components/target_if/pmo/src/target_if_pmo_icmp.c
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (c) 2021, 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 above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: target_if_pmo_icmp.c
|
||||
*
|
||||
* Target interface file for pmo component to
|
||||
* send icmp offload related cmd and process event.
|
||||
*/
|
||||
|
||||
#include "target_if.h"
|
||||
#include "target_if_pmo.h"
|
||||
#include "wmi_unified_api.h"
|
||||
|
||||
QDF_STATUS
|
||||
target_if_pmo_send_icmp_offload_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct pmo_icmp_offload *pmo_icmp_req)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
wmi_unified_t wmi_handle;
|
||||
|
||||
if (!psoc) {
|
||||
target_if_err("psoc handle is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||
if (!wmi_handle) {
|
||||
target_if_err("Invalid wmi handle");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
status = wmi_unified_config_icmp_offload_cmd(wmi_handle, pmo_icmp_req);
|
||||
|
||||
return status;
|
||||
}
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "target_if_pmo.h"
|
||||
#include "wlan_pmo_common_public_struct.h"
|
||||
#include "wlan_pmo_icmp.h"
|
||||
|
||||
#ifdef WLAN_FEATURE_PACKET_FILTERING
|
||||
static inline
|
||||
@@ -51,6 +52,17 @@ static inline void
|
||||
update_pmo_igmp_tx_ops(struct wlan_pmo_tx_ops *pmo_tx_ops)
|
||||
{}
|
||||
#endif
|
||||
#ifdef WLAN_FEATURE_ICMP_OFFLOAD
|
||||
static void tgt_if_pmo_icmp_tx_ops(struct wlan_pmo_tx_ops *pmo_tx_ops)
|
||||
{
|
||||
pmo_tx_ops->send_icmp_offload_req =
|
||||
target_if_pmo_send_icmp_offload_req;
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
tgt_if_pmo_icmp_tx_ops(struct wlan_pmo_tx_ops *pmo_tx_ops)
|
||||
{}
|
||||
#endif
|
||||
void target_if_pmo_register_tx_ops(struct wlan_pmo_tx_ops *pmo_tx_ops)
|
||||
{
|
||||
if (!pmo_tx_ops) {
|
||||
@@ -138,5 +150,6 @@ void target_if_pmo_register_tx_ops(struct wlan_pmo_tx_ops *pmo_tx_ops)
|
||||
pmo_tx_ops->psoc_send_idle_roam_suspend_mode =
|
||||
target_if_pmo_psoc_send_idle_monitor_cmd;
|
||||
tgt_if_pmo_reg_pkt_filter_ops(pmo_tx_ops);
|
||||
tgt_if_pmo_icmp_tx_ops(pmo_tx_ops);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user