qcacld-3.0: Add ucfg_pmo_psoc_set_caps()

Provide PMO-specific device capabilities to PMO. This allows PMO to do
intersections between configuration and device capabilities.

Change-Id: If0a199f9be466d16cef900a29b14b73a2a4e52d0
CRs-Fixed: 2197828
此提交包含在:
Dustin Brown
2018-02-28 16:00:02 -08:00
提交者 nshrivas
父節點 757f448a04
當前提交 06259e5d96
共有 7 個檔案被更改,包括 94 行新增4 行删除

查看文件

@@ -160,6 +160,15 @@ QDF_STATUS pmo_core_get_psoc_config(struct wlan_objmgr_psoc *psoc,
QDF_STATUS pmo_core_update_psoc_config(struct wlan_objmgr_psoc *psoc,
struct pmo_psoc_cfg *psoc_cfg);
/**
* pmo_psoc_set_caps() - overwrite configured device capability flags
* @psoc: the psoc for which the capabilities apply
* @caps: the cabability information to configure
*
* Return: None
*/
void pmo_psoc_set_caps(struct wlan_objmgr_psoc *psoc,
struct pmo_device_caps *caps);
/**
* pmo_core_get_vdev_op_mode(): API to get the vdev operation mode

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2018 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
@@ -37,6 +37,7 @@
* @psoc_cfg: place holder for psoc configuration
* @pmo_tx_ops: transmit ops for PMO
* @wow: wow configuration
* @caps: PMO specific device capability bits
* @dp_hdl: psoc data path handle
* @htc_hdl: htc layer handle
* @hif_hdl: hif layer handle
@@ -49,6 +50,7 @@ struct pmo_psoc_priv_obj {
struct pmo_psoc_cfg psoc_cfg;
struct wlan_pmo_tx_ops pmo_tx_ops;
struct pmo_wow wow;
struct pmo_device_caps caps;
void *dp_hdl;
void *htc_hdl;
void *hif_hdl;

查看文件

@@ -205,6 +205,16 @@ out:
return status;
}
void pmo_psoc_set_caps(struct wlan_objmgr_psoc *psoc,
struct pmo_device_caps *caps)
{
struct pmo_psoc_priv_obj *psoc_ctx;
pmo_psoc_with_ctx(psoc, psoc_ctx) {
qdf_mem_copy(&psoc_ctx->caps, caps, sizeof(psoc_ctx->caps));
}
}
void pmo_core_psoc_set_hif_handle(struct wlan_objmgr_psoc *psoc,
void *hif_hdl)
{

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2018 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
@@ -316,5 +316,21 @@ struct pmo_psoc_cfg {
enum pmo_auto_pwr_detect_failure_mode auto_power_save_fail_mode;
};
/**
* pmo_device_caps - device capability flags (true if feature is supported)
* @apf: Android Packet Filter (aka BPF)
* @arp_ns_offload: APR/NS offload
* @packet_filter: Legacy "Packet Filter"
* @unified_wow: Firmware supports "interface pause" flag in WoW command.
* This allows both D0-WoW (bus up) and Non-D0-WoW (bus down) to use one
* unified command
*/
struct pmo_device_caps {
bool apf;
bool arp_ns_offload;
bool packet_filter;
bool unified_wow;
};
#endif /* end of _WLAN_PMO_COMMONP_STRUCT_H_ */

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2018 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
@@ -83,6 +83,16 @@ QDF_STATUS ucfg_pmo_get_psoc_config(struct wlan_objmgr_psoc *psoc,
QDF_STATUS ucfg_pmo_update_psoc_config(struct wlan_objmgr_psoc *psoc,
struct pmo_psoc_cfg *psoc_cfg);
/**
* ucfg_pmo_psoc_set_caps() - overwrite configured device capability flags
* @psoc: the psoc for which the capabilities apply
* @caps: the cabability information to configure
*
* Return: QDF_STATUS
*/
QDF_STATUS ucfg_pmo_psoc_set_caps(struct wlan_objmgr_psoc *psoc,
struct pmo_device_caps *caps);
/**
* pmo_ucfg_enable_wakeup_event() - enable wow wakeup events
* @psoc: objmgr psoc

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2018 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
@@ -43,6 +43,22 @@ QDF_STATUS ucfg_pmo_update_psoc_config(struct wlan_objmgr_psoc *psoc,
return pmo_core_update_psoc_config(psoc, psoc_cfg);
}
QDF_STATUS ucfg_pmo_psoc_set_caps(struct wlan_objmgr_psoc *psoc,
struct pmo_device_caps *caps)
{
QDF_BUG(psoc);
if (!psoc)
return QDF_STATUS_E_INVAL;
QDF_BUG(caps);
if (!caps)
return QDF_STATUS_E_INVAL;
pmo_psoc_set_caps(psoc, caps);
return QDF_STATUS_SUCCESS;
}
bool ucfg_pmo_is_ap_mode_supports_arp_ns(struct wlan_objmgr_psoc *psoc,
enum QDF_OPMODE vdev_opmode)
{