mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
Merge changes I5ec5ce2a,If129b9c7,I86daffeb,Id50136f6,Id187b8e6,I22928dea,I15577c50,Ib952643a,Ib9984c43,Ic44825f4,If23398b0,I206d3008 into wlan-cmn.driver.lnx.1.0-dev
* changes: qcacmn: Use suspend_noirq callback instead of disabling irqs Release 5.1.0.23C qcacmn: Implement QDF API to get queue mapping and total ram size qcacmn: Fixing incorrect qdf_mem_set API usage in wmi_unified_non_tlv.c qcacmn: Fix for kernel panic in wifi down path for peregrine Release 5.1.0.23B qcacmn: Free WMI HB command buffer in case of errors Release 5.1.0.23A qcacmn: Add WMI API for setting bandwidth fairness Release 5.1.0.23 qcacmn: unmap buffer for CE destination ring en-queue error Release 5.1.0.22Z
This commit is contained in:
commit
b1880153b8
23 changed files with 238 additions and 99 deletions
|
|
@ -1,2 +1,2 @@
|
|||
Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.22Y
|
||||
Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.23C
|
||||
Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22C
|
||||
|
|
|
|||
|
|
@ -573,6 +573,8 @@ bool hif_can_suspend_link(struct hif_opaque_softc *);
|
|||
|
||||
int hif_bus_resume(struct hif_opaque_softc *);
|
||||
int hif_bus_suspend(struct hif_opaque_softc *);
|
||||
int hif_bus_resume_noirq(struct hif_opaque_softc *);
|
||||
int hif_bus_suspend_noirq(struct hif_opaque_softc *);
|
||||
|
||||
#ifdef FEATURE_RUNTIME_PM
|
||||
int hif_pre_runtime_suspend(struct hif_opaque_softc *hif_ctx);
|
||||
|
|
|
|||
|
|
@ -1647,6 +1647,8 @@ static int hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info)
|
|||
__func__, pipe_info->pipe_num,
|
||||
atomic_read(&pipe_info->recv_bufs_needed),
|
||||
pipe_info->nbuf_ce_enqueue_err_count);
|
||||
qdf_nbuf_unmap_single(scn->qdf_dev, nbuf,
|
||||
QDF_DMA_FROM_DEVICE);
|
||||
atomic_inc(&pipe_info->recv_bufs_needed);
|
||||
qdf_nbuf_free(nbuf);
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,34 @@ int hif_dummy_bus_resume(struct hif_softc *hif_ctx)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_suspend_noirq() - suspend the bus
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* dummy for busses that don't need to syncronize
|
||||
* with interrupt disable.
|
||||
*
|
||||
* Return: 0 for success and non-zero for failure
|
||||
*/
|
||||
int hif_dummy_bus_suspend_noirq(struct hif_softc *hif_ctx)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_resume_noirq() - resume the bus
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* dummy for busses that don't need to syncronize
|
||||
* with interrupt disable.
|
||||
*
|
||||
* Return: 0 for success and non-zero for failure
|
||||
*/
|
||||
int hif_dummy_bus_resume_noirq(struct hif_softc *hif_ctx)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_target_sleep_state_adjust() - api to adjust state of target
|
||||
* @scn: hif context
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ void hif_dummy_bus_prevent_linkdown(struct hif_softc *scn, bool flag);
|
|||
void hif_dummy_reset_soc(struct hif_softc *scn);
|
||||
int hif_dummy_bus_suspend(struct hif_softc *hif_ctx);
|
||||
int hif_dummy_bus_resume(struct hif_softc *hif_ctx);
|
||||
int hif_dummy_bus_suspend_noirq(struct hif_softc *hif_ctx);
|
||||
int hif_dummy_bus_resume_noirq(struct hif_softc *hif_ctx);
|
||||
int hif_dummy_target_sleep_state_adjust(struct hif_softc *scn,
|
||||
bool sleep_ok, bool wait_for_it);
|
||||
void hif_dummy_enable_power_management(struct hif_softc *hif_ctx,
|
||||
|
|
|
|||
|
|
@ -55,8 +55,10 @@ static void hif_intialize_default_ops(struct hif_softc *hif_sc)
|
|||
&hif_dummy_display_stats;
|
||||
bus_ops->hif_clear_stats =
|
||||
&hif_dummy_clear_stats;
|
||||
bus_ops->hif_set_bundle_mode = hif_dummy_set_bundle_mode;
|
||||
bus_ops->hif_bus_reset_resume = hif_dummy_bus_reset_resume;
|
||||
bus_ops->hif_set_bundle_mode = &hif_dummy_set_bundle_mode;
|
||||
bus_ops->hif_bus_reset_resume = &hif_dummy_bus_reset_resume;
|
||||
bus_ops->hif_bus_suspend_noirq = &hif_dummy_bus_suspend_noirq;
|
||||
bus_ops->hif_bus_resume_noirq = &hif_dummy_bus_resume_noirq;
|
||||
}
|
||||
|
||||
#define NUM_OPS (sizeof(struct hif_bus_ops) / sizeof(void *))
|
||||
|
|
@ -195,6 +197,18 @@ int hif_bus_resume(struct hif_opaque_softc *hif_ctx)
|
|||
return hif_sc->bus_ops.hif_bus_resume(hif_sc);
|
||||
}
|
||||
|
||||
int hif_bus_suspend_noirq(struct hif_opaque_softc *hif_ctx)
|
||||
{
|
||||
struct hif_softc *hif_sc = HIF_GET_SOFTC(hif_ctx);
|
||||
return hif_sc->bus_ops.hif_bus_suspend_noirq(hif_sc);
|
||||
}
|
||||
|
||||
int hif_bus_resume_noirq(struct hif_opaque_softc *hif_ctx)
|
||||
{
|
||||
struct hif_softc *hif_sc = HIF_GET_SOFTC(hif_ctx);
|
||||
return hif_sc->bus_ops.hif_bus_resume_noirq(hif_sc);
|
||||
}
|
||||
|
||||
int hif_target_sleep_state_adjust(struct hif_softc *hif_sc,
|
||||
bool sleep_ok, bool wait_for_it)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ struct hif_bus_ops {
|
|||
void (*hif_reset_soc)(struct hif_softc *hif_sc);
|
||||
int (*hif_bus_suspend)(struct hif_softc *hif_ctx);
|
||||
int (*hif_bus_resume)(struct hif_softc *hif_ctx);
|
||||
int (*hif_bus_suspend_noirq)(struct hif_softc *hif_ctx);
|
||||
int (*hif_bus_resume_noirq)(struct hif_softc *hif_ctx);
|
||||
int (*hif_target_sleep_state_adjust)(struct hif_softc *scn,
|
||||
bool sleep_ok, bool wait_for_it);
|
||||
void (*hif_disable_isr)(struct hif_softc *hif_sc);
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ QDF_STATUS hif_initialize_snoc_ops(struct hif_bus_ops *bus_ops)
|
|||
bus_ops->hif_reset_soc = &hif_dummy_reset_soc;
|
||||
bus_ops->hif_bus_suspend = &hif_snoc_bus_suspend;
|
||||
bus_ops->hif_bus_resume = &hif_snoc_bus_resume;
|
||||
bus_ops->hif_bus_suspend_noirq = &hif_snoc_bus_suspend_noirq;
|
||||
/* snoc_bus_resume_noirq had no side effects, use dummy resume_noirq */
|
||||
bus_ops->hif_bus_resume_noirq = &hif_dummy_bus_resume_noirq;
|
||||
bus_ops->hif_target_sleep_state_adjust =
|
||||
&hif_dummy_target_sleep_state_adjust;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ QDF_STATUS hif_snoc_open(struct hif_softc *hif_ctx,
|
|||
void hif_snoc_close(struct hif_softc *hif_ctx);
|
||||
int hif_snoc_bus_suspend(struct hif_softc *hif_ctx);
|
||||
int hif_snoc_bus_resume(struct hif_softc *hif_ctx);
|
||||
int hif_snoc_bus_suspend_noirq(struct hif_softc *scn);
|
||||
void hif_snoc_disable_isr(struct hif_softc *hif_ctx);
|
||||
void hif_snoc_nointrs(struct hif_softc *scn);
|
||||
QDF_STATUS hif_snoc_enable_bus(struct hif_softc *ol_sc,
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#define AR6004_VERSION_REV1_3 0x31c8088a
|
||||
#define AR9888_REV2_VERSION 0x4100016c
|
||||
#define AR9887_REV1_VERSION 0x4100016d
|
||||
#define AR6320_REV1_VERSION 0x5000000
|
||||
#define AR6320_REV1_1_VERSION 0x5000001
|
||||
#define AR6320_REV1_3_VERSION 0x5000003
|
||||
|
|
|
|||
|
|
@ -39,7 +39,9 @@
|
|||
* For maximum performance and no power management, set this to 1.
|
||||
* For power management at the cost of performance, set this to 0.
|
||||
*/
|
||||
#ifndef CONFIG_ATH_PCIE_MAX_PERF
|
||||
#define CONFIG_ATH_PCIE_MAX_PERF 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* For keeping the target awake till the driver is
|
||||
|
|
|
|||
|
|
@ -2417,6 +2417,7 @@ void hif_pci_disable_bus(struct hif_softc *scn)
|
|||
struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn);
|
||||
struct pci_dev *pdev;
|
||||
void __iomem *mem;
|
||||
struct hif_target_info *tgt_info = &scn->target_info;
|
||||
|
||||
/* Attach did not succeed, all resources have been
|
||||
* freed in error handler
|
||||
|
|
@ -2431,7 +2432,18 @@ void hif_pci_disable_bus(struct hif_softc *scn)
|
|||
HOST_GROUP0_MASK);
|
||||
}
|
||||
|
||||
#if defined(CPU_WARM_RESET_WAR)
|
||||
/* Currently CPU warm reset sequence is tested only for AR9888_REV2
|
||||
* Need to enable for AR9888_REV1 once CPU warm reset sequence is
|
||||
* verified for AR9888_REV1
|
||||
*/
|
||||
if ((tgt_info->target_version == AR9888_REV2_VERSION) || (tgt_info->target_version == AR9887_REV1_VERSION))
|
||||
hif_pci_device_warm_reset(sc);
|
||||
else
|
||||
hif_pci_device_reset(sc);
|
||||
#else
|
||||
hif_pci_device_reset(sc);
|
||||
#endif
|
||||
mem = (void __iomem *)sc->mem;
|
||||
if (mem) {
|
||||
pci_disable_msi(pdev);
|
||||
|
|
|
|||
|
|
@ -380,75 +380,6 @@ QDF_STATUS hif_snoc_setup_wakeup_sources(struct hif_softc *scn, bool enable)
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* __hif_snoc_irq_state_vote() - enable/disable all the ce interrupts
|
||||
* @scn: hif context pointer
|
||||
* @enble: true to enable the interrupts false to disable
|
||||
*
|
||||
* takes care of unwinding partial successes.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success
|
||||
*/
|
||||
|
||||
static QDF_STATUS __hif_snoc_irq_state_vote(struct hif_softc *scn, bool enable)
|
||||
{
|
||||
int num_ce = scn->ce_count;
|
||||
int ce_id = 0;
|
||||
int irq;
|
||||
|
||||
while (ce_id < num_ce) {
|
||||
irq = icnss_get_irq(ce_id);
|
||||
if (irq < 0)
|
||||
goto error;
|
||||
|
||||
if (enable)
|
||||
enable_irq(irq);
|
||||
else
|
||||
disable_irq(irq);
|
||||
|
||||
ce_id++;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
error:
|
||||
HIF_ERROR("%s: failed to map ce to irq", __func__);
|
||||
|
||||
while (--ce_id >= 0) {
|
||||
irq = icnss_get_irq(ce_id);
|
||||
if (irq < 0)
|
||||
continue;
|
||||
|
||||
if (enable)
|
||||
disable_irq(irq);
|
||||
else
|
||||
enable_irq(irq);
|
||||
}
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_snoc_enable_irqs() - enable the ce irqs
|
||||
* @scn: hif context
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success
|
||||
*/
|
||||
static QDF_STATUS hif_snoc_enable_irqs(struct hif_softc *scn)
|
||||
{
|
||||
return __hif_snoc_irq_state_vote(scn, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_snoc_enable_irqs() - enable the ce irqs
|
||||
* @scn: hif context
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success
|
||||
*/
|
||||
static QDF_STATUS hif_snoc_disable_irqs(struct hif_softc *scn)
|
||||
{
|
||||
return __hif_snoc_irq_state_vote(scn, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_snoc_bus_suspend() - prepare to suspend the bus
|
||||
* @scn: hif context
|
||||
|
|
@ -463,24 +394,8 @@ static QDF_STATUS hif_snoc_disable_irqs(struct hif_softc *scn)
|
|||
int hif_snoc_bus_suspend(struct hif_softc *scn)
|
||||
{
|
||||
if (hif_snoc_setup_wakeup_sources(scn, true) != QDF_STATUS_SUCCESS)
|
||||
goto error;
|
||||
|
||||
if (hif_snoc_disable_irqs(scn) != QDF_STATUS_SUCCESS)
|
||||
goto wakeup_sources;
|
||||
|
||||
if (hif_drain_tasklets(scn) != 0)
|
||||
goto enable_irqs;
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
|
||||
enable_irqs:
|
||||
if (hif_snoc_enable_irqs(scn) != QDF_STATUS_SUCCESS)
|
||||
QDF_BUG(0);
|
||||
wakeup_sources:
|
||||
if (hif_snoc_setup_wakeup_sources(scn, false) != QDF_STATUS_SUCCESS)
|
||||
QDF_BUG(0);
|
||||
error:
|
||||
return -EFAULT;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -497,8 +412,22 @@ int hif_snoc_bus_resume(struct hif_softc *scn)
|
|||
if (hif_snoc_setup_wakeup_sources(scn, false) != QDF_STATUS_SUCCESS)
|
||||
QDF_BUG(0);
|
||||
|
||||
if (hif_snoc_enable_irqs(scn) != QDF_STATUS_SUCCESS)
|
||||
QDF_BUG(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_snoc_bus_suspend_noirq() - ensure there are no pending transactions
|
||||
* @scn: hif context
|
||||
*
|
||||
* Ensure that if we recieved the wakeup message before the irq
|
||||
* was disabled that the message is pocessed before suspending.
|
||||
*
|
||||
* Return: -EBUSY if we fail to flush the tasklets.
|
||||
*/
|
||||
int hif_snoc_bus_suspend_noirq(struct hif_softc *scn)
|
||||
{
|
||||
if (hif_drain_tasklets(scn) != 0)
|
||||
return -EBUSY;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2041,6 +2041,12 @@ static inline void qdf_nbuf_set_priority(qdf_nbuf_t buf, uint32_t p)
|
|||
__qdf_nbuf_set_priority(buf, p);
|
||||
}
|
||||
|
||||
static inline uint16_t
|
||||
qdf_nbuf_get_queue_mapping(qdf_nbuf_t buf)
|
||||
{
|
||||
return __qdf_nbuf_get_queue_mapping(buf);
|
||||
}
|
||||
|
||||
static inline uint8_t *
|
||||
qdf_nbuf_get_priv_ptr(qdf_nbuf_t buf)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -433,5 +433,10 @@ static inline int qdf_device_init_wakeup(qdf_device_t qdf_dev, bool enable)
|
|||
return __qdf_device_init_wakeup(qdf_dev, enable);
|
||||
}
|
||||
|
||||
static inline
|
||||
uint64_t qdf_get_totalramsize(void)
|
||||
{
|
||||
return __qdf_get_totalramsize();
|
||||
}
|
||||
|
||||
#endif /*_QDF_UTIL_H*/
|
||||
|
|
|
|||
|
|
@ -1670,4 +1670,16 @@ __qdf_nbuf_mark_wakeup_frame(__qdf_nbuf_t buf)
|
|||
buf->mark |= QDF_MARK_FIRST_WAKEUP_PACKET;
|
||||
}
|
||||
|
||||
/**
|
||||
* __qdf_nbuf_get_queue_mapping() - get the queue mapping set by linux kernel
|
||||
*
|
||||
* @buf: sk buff
|
||||
*
|
||||
* Return: Queue mapping
|
||||
*/
|
||||
static inline uint16_t
|
||||
__qdf_nbuf_get_queue_mapping(struct sk_buff *skb)
|
||||
{
|
||||
return skb->queue_mapping;
|
||||
}
|
||||
#endif /*_I_QDF_NET_BUF_H */
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include <linux/compiler.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/mm.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <linux/random.h>
|
||||
|
|
@ -195,6 +196,8 @@ static inline bool __qdf_is_macaddr_equal(struct qdf_mac_addr *mac_addr1,
|
|||
#define __qdf_min(_a, _b) ((_a) < (_b) ? _a : _b)
|
||||
#define __qdf_max(_a, _b) ((_a) > (_b) ? _a : _b)
|
||||
|
||||
#define MEMINFO_KB(x) ((x) << (PAGE_SHIFT - 10)) /* In kilobytes */
|
||||
|
||||
/**
|
||||
* @brief Assert
|
||||
*/
|
||||
|
|
@ -276,4 +279,17 @@ static inline int __qdf_device_init_wakeup(__qdf_device_t qdf_dev, bool enable)
|
|||
return device_init_wakeup(qdf_dev->dev, enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* __qdf_get_totalramsize() - Get total ram size in Kb
|
||||
*
|
||||
* Return: Total ram size in Kb
|
||||
*/
|
||||
static inline uint64_t
|
||||
__qdf_get_totalramsize(void)
|
||||
{
|
||||
struct sysinfo meminfo;
|
||||
si_meminfo(&meminfo);
|
||||
return MEMINFO_KB(meminfo.totalram);
|
||||
}
|
||||
|
||||
#endif /*_I_QDF_UTIL_H*/
|
||||
|
|
|
|||
|
|
@ -854,6 +854,9 @@ QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
|
|||
QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
|
||||
uint32_t param);
|
||||
|
||||
QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
|
||||
struct set_bwf_params *param);
|
||||
|
||||
QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
|
||||
struct set_atf_params *param);
|
||||
|
||||
|
|
|
|||
|
|
@ -3725,6 +3725,32 @@ typedef struct {
|
|||
uint32_t percentage_peer;
|
||||
} atf_peer_info;
|
||||
|
||||
/**
|
||||
* struct bwf_peer_info_t - BWF peer info params
|
||||
* @peer_macaddr: peer mac addr
|
||||
* @throughput: Throughput
|
||||
* @max_airtime: Max airtime
|
||||
* @priority: Priority level
|
||||
* @reserved: Reserved array
|
||||
*/
|
||||
typedef struct {
|
||||
struct wmi_macaddr_t peer_macaddr;
|
||||
uint32_t throughput;
|
||||
uint32_t max_airtime;
|
||||
uint32_t priority;
|
||||
uint32_t reserved[4];
|
||||
} bwf_peer_info;
|
||||
|
||||
/**
|
||||
* struct set_bwf_params - BWF params
|
||||
* @num_peers: number of peers
|
||||
* @atf_peer_info: BWF peer info
|
||||
*/
|
||||
struct set_bwf_params {
|
||||
uint32_t num_peers;
|
||||
bwf_peer_info peer_info[1];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct set_atf_params - ATF params
|
||||
* @num_peers: number of peers
|
||||
|
|
|
|||
|
|
@ -708,6 +708,9 @@ QDF_STATUS (*send_get_buf_extscan_hotlist_cmd)(wmi_unified_t wmi_handle,
|
|||
QDF_STATUS (*send_pdev_get_tpc_config_cmd)(wmi_unified_t wmi_handle,
|
||||
uint32_t param);
|
||||
|
||||
QDF_STATUS (*send_set_bwf_cmd)(wmi_unified_t wmi_handle,
|
||||
struct set_bwf_params *param);
|
||||
|
||||
QDF_STATUS (*send_set_atf_cmd)(wmi_unified_t wmi_handle,
|
||||
struct set_atf_params *param);
|
||||
|
||||
|
|
|
|||
|
|
@ -3443,6 +3443,24 @@ QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
|
|||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_unified_set_bwf_cmd_send() - WMI set bwf function
|
||||
* @param wmi_handle : handle to WMI.
|
||||
* @param param : pointer to set bwf param
|
||||
*
|
||||
* @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
|
||||
struct set_bwf_params *param)
|
||||
{
|
||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||
|
||||
if (wmi_handle->ops->send_set_bwf_cmd)
|
||||
return wmi_handle->ops->send_set_bwf_cmd(wmi_handle, param);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_unified_set_atf_cmd_send() - WMI set atf function
|
||||
* @param wmi_handle : handle to WMI.
|
||||
|
|
|
|||
|
|
@ -3140,6 +3140,49 @@ send_pdev_get_tpc_config_cmd_non_tlv(wmi_unified_t wmi_handle,
|
|||
WMI_PDEV_GET_TPC_CONFIG_CMDID);
|
||||
}
|
||||
|
||||
/**
|
||||
* send_set_bwf_cmd_non_tlv() - send set bwf command to fw
|
||||
* @wmi_handle: wmi handle
|
||||
* @param: pointer to set bwf param
|
||||
*
|
||||
* Return: 0 for success or error code
|
||||
*/
|
||||
QDF_STATUS
|
||||
send_set_bwf_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
struct set_bwf_params *param)
|
||||
{
|
||||
struct wmi_bwf_peer_info *peer_info;
|
||||
wmi_peer_bwf_request *cmd;
|
||||
wmi_buf_t buf;
|
||||
int len = sizeof(wmi_peer_bwf_request);
|
||||
int i, retval = 0;
|
||||
|
||||
len += param->num_peers * sizeof(struct wmi_bwf_peer_info);
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf) {
|
||||
qdf_print("%s:wmi_buf_alloc failed\n", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
cmd = (wmi_peer_bwf_request *)wmi_buf_data(buf);
|
||||
qdf_mem_copy((void *)&(cmd->num_peers),
|
||||
(void *)&(param->num_peers),
|
||||
sizeof(u_int32_t));
|
||||
peer_info = (struct wmi_bwf_peer_info *)&(cmd->peer_info[0]);
|
||||
for (i = 0; i < param->num_peers; i++) {
|
||||
qdf_mem_copy((void *)&(peer_info[i]),
|
||||
(void *)&(param->peer_info[i]),
|
||||
sizeof(struct wmi_bwf_peer_info));
|
||||
}
|
||||
|
||||
retval = wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||
WMI_PEER_BWF_REQUEST_CMDID);
|
||||
|
||||
if (retval)
|
||||
wmi_buf_free(buf);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_set_atf_cmd_non_tlv() - send set atf command to fw
|
||||
* @wmi_handle: wmi handle
|
||||
|
|
@ -4428,7 +4471,7 @@ send_rtt_meas_req_test_cmd_non_tlv(wmi_unified_t wmi_handle,
|
|||
}
|
||||
|
||||
p = (u_int8_t *) wmi_buf_data(buf);
|
||||
qdf_mem_set(p, 0, len);
|
||||
qdf_mem_set(p, len, 0);
|
||||
|
||||
head = (wmi_rtt_measreq_head *) p;
|
||||
WMI_RTT_REQ_ID_SET(head->req_id, param->req_id);
|
||||
|
|
@ -4566,7 +4609,7 @@ send_rtt_meas_req_cmd_non_tlv(wmi_unified_t wmi_handle,
|
|||
}
|
||||
|
||||
p = (uint8_t *) wmi_buf_data(buf);
|
||||
qdf_mem_set(p, 0, len);
|
||||
qdf_mem_set(p, len, 0);
|
||||
|
||||
/* encode header */
|
||||
head = (wmi_rtt_measreq_head *) p;
|
||||
|
|
@ -4636,7 +4679,7 @@ send_rtt_meas_req_cmd_non_tlv(wmi_unified_t wmi_handle,
|
|||
WMI_SET_CHANNEL_FLAG(w_chan, WMI_CHAN_FLAG_DFS);
|
||||
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(((uint8_t *)peer), &body->dest_mac);
|
||||
qdf_mem_set(spoof, 0 , 6);
|
||||
qdf_mem_set(spoof, IEEE80211_ADDR_LEN, 0);
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(((uint8_t *)param->spoof_mac_addr),
|
||||
&body->spoof_bssid);
|
||||
|
||||
|
|
@ -4734,7 +4777,7 @@ send_lci_set_cmd_non_tlv(wmi_unified_t wmi_handle,
|
|||
}
|
||||
|
||||
p = (uint8_t *) wmi_buf_data(buf);
|
||||
qdf_mem_set(p, 0, len);
|
||||
qdf_mem_set(p, len, 0);
|
||||
|
||||
head = (wmi_oem_measreq_head *)p;
|
||||
head->sub_type = TARGET_OEM_CONFIGURE_LCI;
|
||||
|
|
@ -4804,7 +4847,7 @@ send_lcr_set_cmd_non_tlv(wmi_unified_t wmi_handle,
|
|||
}
|
||||
|
||||
p = (uint8_t *) wmi_buf_data(buf);
|
||||
qdf_mem_set(p, 0, len);
|
||||
qdf_mem_set(p, len, 0);
|
||||
|
||||
head = (wmi_oem_measreq_head *)p;
|
||||
head->sub_type = TARGET_OEM_CONFIGURE_LCR;
|
||||
|
|
@ -7207,6 +7250,7 @@ struct wmi_ops non_tlv_ops = {
|
|||
.send_scan_chan_list_cmd = send_scan_chan_list_cmd_non_tlv,
|
||||
.send_pdev_get_tpc_config_cmd = send_pdev_get_tpc_config_cmd_non_tlv,
|
||||
.send_set_atf_cmd = send_set_atf_cmd_non_tlv,
|
||||
.send_set_bwf_cmd = send_set_bwf_cmd_non_tlv,
|
||||
.send_pdev_fips_cmd = send_pdev_fips_cmd_non_tlv,
|
||||
.send_wlan_profile_enable_cmd = send_wlan_profile_enable_cmd_non_tlv,
|
||||
.send_wlan_profile_trigger_cmd = send_wlan_profile_trigger_cmd_non_tlv,
|
||||
|
|
|
|||
|
|
@ -6372,6 +6372,7 @@ QDF_STATUS send_lphb_config_tcp_params_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
WMI_LOGE("wmi_unified_cmd_send WMI_HB_SET_TCP_PARAMS returned Error %d",
|
||||
status);
|
||||
wmi_buf_free(buf);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
|
@ -6421,6 +6422,7 @@ QDF_STATUS send_lphb_config_tcp_pkt_filter_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
WMI_LOGE("wmi_unified_cmd_send WMI_HB_SET_TCP_PKT_FILTER returned Error %d",
|
||||
status);
|
||||
wmi_buf_free(buf);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
|
@ -6470,9 +6472,11 @@ QDF_STATUS send_lphb_config_udp_params_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
|
||||
status = wmi_unified_cmd_send(wmi_handle, buf,
|
||||
len, WMI_HB_SET_UDP_PARAMS_CMDID);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
WMI_LOGE("wmi_unified_cmd_send WMI_HB_SET_UDP_PARAMS returned Error %d",
|
||||
status);
|
||||
wmi_buf_free(buf);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
@ -6518,9 +6522,11 @@ QDF_STATUS send_lphb_config_udp_pkt_filter_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
|
||||
status = wmi_unified_cmd_send(wmi_handle, buf,
|
||||
len, WMI_HB_SET_UDP_PKT_FILTER_CMDID);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
WMI_LOGE("wmi_unified_cmd_send WMI_HB_SET_UDP_PKT_FILTER returned Error %d",
|
||||
status);
|
||||
wmi_buf_free(buf);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
@ -6566,9 +6572,11 @@ QDF_STATUS send_process_dhcp_ind_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
|
||||
status = wmi_unified_cmd_send(wmi_handle, buf,
|
||||
len, WMI_PEER_SET_PARAM_CMDID);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
WMI_LOGE("%s: wmi_unified_cmd_send WMI_PEER_SET_PARAM_CMD"
|
||||
" returned Error %d", __func__, status);
|
||||
wmi_buf_free(buf);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue