Merge 72a0d6f663 on remote branch

Change-Id: Ida6c1908bdfcfb2ab09d68a87cc035d92c5f261b
This commit is contained in:
Linux Build Service Account
2025-07-20 22:41:04 -07:00
27 changed files with 412 additions and 69 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -744,9 +744,10 @@ try_desc_alloc:
if (dp_reo_desc_addr_chk(rx_tid->hw_qdesc_paddr) !=
QDF_STATUS_SUCCESS || ret) {
qdf_mem_free(rx_tid->hw_qdesc_vaddr_unaligned);
rx_tid->hw_qdesc_vaddr_unaligned = NULL;
if (alloc_tries++ < 10) {
qdf_mem_free(rx_tid->hw_qdesc_vaddr_unaligned);
rx_tid->hw_qdesc_vaddr_unaligned = NULL;
goto try_desc_alloc;
} else {
dp_peer_err("%pK: Rx tid %d desc alloc fail (lowmem)",

View File

@@ -192,8 +192,13 @@ dp_tx_page_pool_handle_nbuf_single(struct dp_vdev *vdev, qdf_nbuf_t nbuf,
size_t size;
if (!dp_tx_is_page_pool_enabled(soc) || !tx_pp ||
!tx_pp->page_pool_init ||
(tx_desc->flags & DP_TX_DESC_FLAG_TDLS_FRAME))
!tx_pp->page_pool_init)
return nbuf;
if (qdf_nbuf_get_dev_scratch(nbuf) != QDF_NBUF_SW_TSO_DEV_SCRATCH_VAL)
QDF_NBUF_CB_PADDR(nbuf) = 0;
if (tx_desc->flags & DP_TX_DESC_FLAG_TDLS_FRAME)
return nbuf;
/* Non linear SKBs are not expected in this path */

View File

@@ -3813,14 +3813,17 @@ QDF_COMPILE_TIME_ASSERT(num_cpu_check,
#define LINK_DESC_PAGE_ID_MASK 0x007FE0
#define LINK_DESC_ID_SHIFT 5
#define LINK_DESC_ID_START_21_BITS_COOKIE 0x8000
#define LINK_DESC_ID_START_20_BITS_COOKIE 0x4000
#elif PAGE_SIZE == 16384
#define LINK_DESC_PAGE_ID_MASK 0x007F80
#define LINK_DESC_ID_SHIFT 7
#define LINK_DESC_ID_START_21_BITS_COOKIE 0x8000
#define LINK_DESC_ID_START_21_BITS_COOKIE 0x2000
#define LINK_DESC_ID_START_20_BITS_COOKIE 0x1000
#elif PAGE_SIZE == 65536
#define LINK_DESC_PAGE_ID_MASK 0x007E00
#define LINK_DESC_ID_SHIFT 9
#define LINK_DESC_ID_START_21_BITS_COOKIE 0x800
#define LINK_DESC_ID_START_20_BITS_COOKIE 0x400
#else
#error "Unsupported kernel PAGE_SIZE"
#endif
@@ -3836,8 +3839,8 @@ QDF_COMPILE_TIME_ASSERT(num_cpu_check,
#define LINK_DESC_COOKIE_PAGE_ID(_cookie) \
((_cookie) & LINK_DESC_PAGE_ID_MASK)
#define LINK_DESC_ID_START_21_BITS_COOKIE 0x8000
#endif
#define LINK_DESC_ID_START_20_BITS_COOKIE 0x4000
#endif
/* same as ieee80211_nac_param */
enum dp_nac_param_cmd {

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -357,7 +357,11 @@ struct qca_napi_stat {
* instances.
*/
struct qca_napi_info {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
struct net_device *netdev; /* dummy net_dev ptr */
#else
struct net_device netdev; /* dummy net_dev */
#endif
void *hif_ctx;
struct napi_struct napi;
uint8_t scale; /* currently same on all instances */
@@ -370,7 +374,11 @@ struct qca_napi_info {
/* will only be present for data rx CE's */
void (*offld_flush_cb)(void *);
struct napi_struct rx_thread_napi;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
struct net_device *rx_thread_netdev;
#else
struct net_device rx_thread_netdev;
#endif
#endif /* RECEIVE_OFFLOAD */
qdf_lro_ctx_t lro_ctx;
#ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -902,6 +902,26 @@ static void hif_exec_napi_schedule(struct hif_exec_context *ctx)
napi_schedule(&n_ctx->napi);
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
/**
* qdf_napi_get_dummy_nd_ptr() - Get dummy netdev pointer
* @ctx: hif_napi_exec_context pointer
*
* Return: dummy netdev pointer
*/
static inline struct net_device *
qdf_napi_get_dummy_nd_ptr(struct hif_napi_exec_context *ctx)
{
return ctx->netdev;
}
#else
static inline struct net_device *
qdf_napi_get_dummy_nd_ptr(struct hif_napi_exec_context *ctx)
{
return &ctx->netdev;
}
#endif
/**
* hif_exec_napi_kill() - stop a napi exec context from being rescheduled
* @ctx: a hif_exec_context known to be of napi type
@@ -910,6 +930,7 @@ static void hif_exec_napi_kill(struct hif_exec_context *ctx)
{
struct hif_napi_exec_context *n_ctx = hif_exec_get_napi(ctx);
int irq_ind;
struct net_device *dummy_nd = qdf_napi_get_dummy_nd_ptr(n_ctx);
if (ctx->inited) {
qdf_napi_disable(&n_ctx->napi);
@@ -921,6 +942,7 @@ static void hif_exec_napi_kill(struct hif_exec_context *ctx)
hif_core_ctl_set_boost(false);
qdf_netif_napi_del(&(n_ctx->napi));
qdf_net_if_destroy_dummy_if((struct qdf_net_if *)dummy_nd);
}
struct hif_execution_ops napi_sched_ops = {
@@ -936,6 +958,7 @@ struct hif_execution_ops napi_sched_ops = {
static struct hif_exec_context *hif_exec_napi_create(uint32_t scale)
{
struct hif_napi_exec_context *ctx;
struct net_device *dummy_nd;
ctx = qdf_mem_malloc(sizeof(struct hif_napi_exec_context));
if (!ctx)
@@ -944,9 +967,10 @@ static struct hif_exec_context *hif_exec_napi_create(uint32_t scale)
ctx->exec_ctx.sched_ops = &napi_sched_ops;
ctx->exec_ctx.inited = true;
ctx->exec_ctx.scale_bin_shift = scale;
qdf_net_if_create_dummy_if((struct qdf_net_if *)&ctx->netdev);
qdf_netif_napi_add(&(ctx->netdev), &(ctx->napi), hif_exec_poll,
QCA_NAPI_BUDGET);
dummy_nd = qdf_napi_get_dummy_nd_ptr(ctx);
qdf_net_if_create_dummy_if((struct qdf_net_if **)&dummy_nd);
qdf_netif_napi_add(dummy_nd, &ctx->napi,
hif_exec_poll, QCA_NAPI_BUDGET);
qdf_napi_enable(&ctx->napi);
return &ctx->exec_ctx;

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -156,8 +156,12 @@ struct hif_tasklet_exec_context {
*/
struct hif_napi_exec_context {
struct hif_exec_context exec_ctx;
struct net_device netdev; /* dummy net_dev */
struct napi_struct napi;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
struct net_device *netdev; /* dummy net_dev ptr */
#else
struct net_device netdev; /* dummy net_dev */
#endif
struct napi_struct napi;
};
static inline struct hif_napi_exec_context*

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2015-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -72,6 +72,26 @@ static int hif_rxthread_napi_poll(struct napi_struct *napi, int budget)
return 0;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
/**
* hif_rx_thread_napi_get_netdev_ptr() - Get dummy netdev pointer
* @napii: qca_napi_info pointer
*
* Return: dummy netdev pointer
*/
static inline struct net_device *
hif_rx_thread_napi_get_netdev_ptr(struct qca_napi_info *napii)
{
return napii->rx_thread_netdev;
}
#else
static inline struct net_device *
hif_rx_thread_napi_get_netdev_ptr(struct qca_napi_info *napii)
{
return &napii->rx_thread_netdev;
}
#endif
/**
* hif_init_rx_thread_napi() - Initialize dummy Rx_thread NAPI
* @napii: Handle to napi_info holding rx_thread napi
@@ -80,10 +100,10 @@ static int hif_rxthread_napi_poll(struct napi_struct *napi, int budget)
*/
static void hif_init_rx_thread_napi(struct qca_napi_info *napii)
{
struct qdf_net_if *nd = (struct qdf_net_if *)&napii->rx_thread_netdev;
struct net_device *nd = hif_rx_thread_napi_get_netdev_ptr(napii);
qdf_net_if_create_dummy_if(nd);
qdf_netif_napi_add(&napii->rx_thread_netdev, &napii->rx_thread_napi,
qdf_net_if_create_dummy_if((struct qdf_net_if **)&nd);
qdf_netif_napi_add(nd, &napii->rx_thread_napi,
hif_rxthread_napi_poll, 64);
qdf_napi_enable(&napii->rx_thread_napi);
}
@@ -96,6 +116,9 @@ static void hif_init_rx_thread_napi(struct qca_napi_info *napii)
*/
static void hif_deinit_rx_thread_napi(struct qca_napi_info *napii)
{
struct net_device *nd = hif_rx_thread_napi_get_netdev_ptr(napii);
qdf_net_if_destroy_dummy_if((struct qdf_net_if *)nd);
qdf_netif_napi_del(&napii->rx_thread_napi);
}
#else /* RECEIVE_OFFLOAD */
@@ -108,6 +131,26 @@ static void hif_deinit_rx_thread_napi(struct qca_napi_info *napii)
}
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
/**
* hif_napi_get_dummy_netdev_ptr() - Get dummy netdev pointer
* @napii: qca_napi_info pointer
*
* Return: dummy netdev pointer
*/
static inline struct net_device *
hif_napi_get_dummy_netdev_ptr(struct qca_napi_info *napii)
{
return napii->netdev;
}
#else
static inline struct net_device *
hif_napi_get_dummy_netdev_ptr(struct qca_napi_info *napii)
{
return &napii->netdev;
}
#endif
/**
* hif_napi_create() - creates the NAPI structures for a given CE
* @hif_ctx: pointer to hif context
@@ -140,6 +183,7 @@ int hif_napi_create(struct hif_opaque_softc *hif_ctx,
struct CE_state *ce_state;
struct hif_softc *hif = HIF_GET_SOFTC(hif_ctx);
int rc = 0;
struct net_device *dummy_netdev;
NAPI_DEBUG("-->(budget=%d, scale=%d)",
budget, scale);
@@ -202,22 +246,23 @@ int hif_napi_create(struct hif_opaque_softc *hif_ctx,
if (napii->irq < 0)
hif_warn("bad IRQ value for CE %d: %d", i, napii->irq);
qdf_net_if_create_dummy_if((struct qdf_net_if *)&napii->netdev);
dummy_netdev = hif_napi_get_dummy_netdev_ptr(napii);
qdf_net_if_create_dummy_if((struct qdf_net_if **)&dummy_netdev);
NAPI_DEBUG("adding napi=%pK to netdev=%pK (poll=%pK, bdgt=%d)",
&(napii->napi), &(napii->netdev), poll, budget);
qdf_netif_napi_add(&(napii->netdev), &(napii->napi),
&napii->napi, dummy_netdev, poll, budget);
qdf_netif_napi_add(dummy_netdev, &napii->napi,
poll, budget);
NAPI_DEBUG("after napi_add");
NAPI_DEBUG("napi=0x%pK, netdev=0x%pK",
&(napii->napi), &(napii->netdev));
&napii->napi, dummy_netdev);
NAPI_DEBUG("napi.dev_list.prev=0x%pK, next=0x%pK",
napii->napi.dev_list.prev,
napii->napi.dev_list.next);
NAPI_DEBUG("dev.napi_list.prev=0x%pK, next=0x%pK",
napii->netdev.napi_list.prev,
napii->netdev.napi_list.next);
dummy_netdev->napi_list.prev,
dummy_netdev->napi_list.next);
hif_init_rx_thread_napi(napii);
napii->lro_ctx = qdf_lro_init();
@@ -337,6 +382,7 @@ int hif_napi_destroy(struct hif_opaque_softc *hif_ctx,
uint8_t ce = NAPI_ID2PIPE(id);
int rc = 0;
struct hif_softc *hif = HIF_GET_SOFTC(hif_ctx);
struct net_device *dummy_nd;
NAPI_DEBUG("-->(id=%d, force=%d)", id, force);
@@ -373,17 +419,19 @@ int hif_napi_destroy(struct hif_opaque_softc *hif_ctx,
}
}
if (0 == rc) {
dummy_nd = hif_napi_get_dummy_netdev_ptr(napii);
NAPI_DEBUG("before napi_del");
NAPI_DEBUG("napi.dlist.prv=0x%pK, next=0x%pK",
napii->napi.dev_list.prev,
napii->napi.dev_list.next);
NAPI_DEBUG("dev.napi_l.prv=0x%pK, next=0x%pK",
napii->netdev.napi_list.prev,
napii->netdev.napi_list.next);
dummy_nd->napi_list.prev,
dummy_nd->napi_list.next);
qdf_lro_deinit(napii->lro_ctx);
qdf_netif_napi_del(&(napii->napi));
hif_deinit_rx_thread_napi(napii);
qdf_net_if_destroy_dummy_if((struct qdf_net_if *)dummy_nd);
napid->ce_map &= ~(0x01 << ce);
napid->napis[ce] = NULL;

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -447,6 +447,11 @@ void hif_rtpm_start(struct hif_softc *scn)
return;
}
if (pld_is_one_msi(scn->qdf_dev->dev)) {
hif_info_high("RUNTIME PM is disabled for single MSI mode");
return;
}
if (mode == QDF_GLOBAL_FTM_MODE || QDF_IS_EPPING_ENABLED(mode) ||
mode == QDF_GLOBAL_MONITOR_MODE) {
hif_info("RUNTIME PM is disabled for FTM/EPPING/MONITOR mode");

View File

@@ -1351,7 +1351,7 @@ qdf_skip_dma_map_unmap(qdf_device_t osdev, qdf_nbuf_t nbuf, qdf_dma_dir_t dir)
{
return ((dir == QDF_DMA_TO_DEVICE && osdev->no_dma_map) ||
dir == QDF_DMA_FROM_DEVICE || dir == QDF_DMA_BIDIRECTIONAL) &&
__qdf_is_pp_nbuf(nbuf);
__qdf_is_pp_nbuf(nbuf) && QDF_NBUF_CB_PADDR(nbuf);
}
/**

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -41,7 +41,18 @@ struct qdf_net_if;
* Return: QDF_STATUS_SUCCESS on success
*/
QDF_STATUS
qdf_net_if_create_dummy_if(struct qdf_net_if *nif);
qdf_net_if_create_dummy_if(struct qdf_net_if **nif);
/**
* qdf_net_if_destroy_dummy_if() - destroy dummy interface
* @nif: interface handle
*
* This function will destroy a dummy network interface
*
* Return: None
*/
void
qdf_net_if_destroy_dummy_if(struct qdf_net_if *nif);
/**
* qdf_net_if_get_dev_by_name() - Find a network device by its name
@@ -141,11 +152,17 @@ qdf_net_update_net_device_dev_addr(struct net_device *ndev,
size_t len);
#else /* ENHANCED_OS_ABSTRACTION */
static inline QDF_STATUS
qdf_net_if_create_dummy_if(struct qdf_net_if *nif)
qdf_net_if_create_dummy_if(struct qdf_net_if **nif)
{
return __qdf_net_if_create_dummy_if(nif);
}
static inline void
qdf_net_if_destroy_dummy_if(struct qdf_net_if *nif)
{
__qdf_net_if_destroy_dummy_if(nif);
}
static inline struct qdf_net_if *
qdf_net_if_get_dev_by_name(char *nif_name)
{

View File

@@ -742,7 +742,7 @@ static inline QDF_STATUS __qdf_nbuf_map_nbytes_single(
if (((dir == QDF_DMA_TO_DEVICE && osdev->no_dma_map) ||
dir == QDF_DMA_FROM_DEVICE || dir == QDF_DMA_BIDIRECTIONAL) &&
__qdf_is_pp_nbuf(buf)) {
__qdf_is_pp_nbuf(buf) && QDF_NBUF_CB_PADDR(buf)) {
dma_sync_single_for_device(osdev->dev, QDF_NBUF_CB_PADDR(buf),
nbytes, __qdf_dma_dir_to_os(dir));
return QDF_STATUS_SUCCESS;
@@ -788,7 +788,7 @@ __qdf_nbuf_unmap_nbytes_single(qdf_device_t osdev, struct sk_buff *buf,
*/
if (((dir == QDF_DMA_TO_DEVICE && osdev->no_dma_map) ||
dir == QDF_DMA_FROM_DEVICE || dir == QDF_DMA_BIDIRECTIONAL) &&
__qdf_is_pp_nbuf(buf))
__qdf_is_pp_nbuf(buf) && QDF_NBUF_CB_PADDR(buf))
return dma_sync_single_for_cpu(osdev->dev, paddr, nbytes,
__qdf_dma_dir_to_os(dir));

View File

@@ -33,6 +33,7 @@
struct qdf_net_if;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
/**
* __qdf_net_if_create_dummy_if() - create dummy interface
* @nif: interface handle
@@ -41,24 +42,43 @@ struct qdf_net_if;
*
* Return: QDF_STATUS_SUCCESS on success
*/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
static inline QDF_STATUS
__qdf_net_if_create_dummy_if(struct qdf_net_if *nif)
__qdf_net_if_create_dummy_if(struct qdf_net_if **nif)
{
nif = (struct qdf_net_if *)alloc_netdev_dummy(0);
*nif = (struct qdf_net_if *)alloc_netdev_dummy(0);
if (!nif)
if (!(*nif))
return QDF_STATUS_E_NOMEM;
return QDF_STATUS_SUCCESS;
}
/**
* __qdf_net_if_destroy_dummy_if() - destroy dummy interface
* @nif: interface handle
*
* This function will destroy a dummy network interface
*
* Return: None
*/
static inline void
__qdf_net_if_destroy_dummy_if(struct qdf_net_if *nif)
{
if (nif)
free_netdev((struct net_device *)nif);
}
#else
static inline QDF_STATUS
__qdf_net_if_create_dummy_if(struct qdf_net_if *nif)
__qdf_net_if_create_dummy_if(struct qdf_net_if **nif)
{
init_dummy_netdev((struct net_device *)nif);
init_dummy_netdev((struct net_device *)*nif);
return qdf_status_from_os_return(0);
}
static inline void
__qdf_net_if_destroy_dummy_if(struct qdf_net_if *nif)
{
}
#endif
/**

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2018,2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -27,21 +27,48 @@
#include "qdf_util.h"
#include <linux/netdevice.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
QDF_STATUS
qdf_net_if_create_dummy_if(struct qdf_net_if *nif)
qdf_net_if_create_dummy_if(struct qdf_net_if **nif)
{
*nif = (struct qdf_net_if *)alloc_netdev_dummy(0);
if (!(*nif))
return QDF_STATUS_E_NOMEM;
return QDF_STATUS_SUCCESS;
}
#else
QDF_STATUS
qdf_net_if_create_dummy_if(struct qdf_net_if **nif)
{
int ret;
if (!nif)
if (!(*nif))
return QDF_STATUS_E_INVAL;
ret = init_dummy_netdev((struct net_device *)nif);
ret = init_dummy_netdev((struct net_device *)*nif);
return qdf_status_from_os_return(ret);
}
#endif
qdf_export_symbol(qdf_net_if_create_dummy_if);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
void
qdf_net_if_destroy_dummy_if(struct qdf_net_if *nif)
{
if (nif)
free_netdev((struct net_device *)nif);
}
#else
void
qdf_net_if_destroy_dummy_if(struct qdf_net_if *nif)
{
}
#endif
/**
* qdf_net_if_get_devname() - Retrieve netdevice name
* @nif: Abstraction of netdevice

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -39,6 +39,7 @@
#include <cdp_txrx_ctrl.h>
#include <target_if_psoc_timer_tx_ops.h>
#include <target_if_psoc_wake_lock.h>
#include <wlan_psoc_mlme_api.h>
static QDF_STATUS target_if_vdev_mgr_register_event_handler(
struct wlan_objmgr_psoc *psoc)
@@ -52,10 +53,19 @@ static QDF_STATUS target_if_vdev_mgr_unregister_event_handler(
return target_if_vdev_mgr_wmi_event_unregister(psoc);
}
QDF_STATUS
target_if_vdev_mgr_rsp_timer_stop(struct wlan_objmgr_psoc *psoc,
struct vdev_response_timer *vdev_rsp,
enum wlan_vdev_mgr_tgt_if_rsp_bit clear_bit)
/**
* _target_if_vdev_mgr_rsp_timer_stop() - API to stop response timer for
* vdev manager operations
* @psoc: pointer to psoc object
* @vdev_rsp: vdev response timer
* @clear_bit: enum of wlan_vdev_mgr_tgt_if_rsp_bit
*
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
*/
static QDF_STATUS
_target_if_vdev_mgr_rsp_timer_stop(struct wlan_objmgr_psoc *psoc,
struct vdev_response_timer *vdev_rsp,
enum wlan_vdev_mgr_tgt_if_rsp_bit clear_bit)
{
struct wlan_lmac_if_mlme_tx_ops *txops;
@@ -102,10 +112,19 @@ target_if_vdev_mgr_rsp_timer_stop(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
}
QDF_STATUS
target_if_vdev_mgr_rsp_timer_start(struct wlan_objmgr_psoc *psoc,
struct vdev_response_timer *vdev_rsp,
enum wlan_vdev_mgr_tgt_if_rsp_bit set_bit)
/**
* _target_if_vdev_mgr_rsp_timer_start() - API to start response timer for
* vdev manager operations
* @psoc: pointer to psoc object
* @vdev_rsp: vdev response timer
* @set_bit: enum of wlan_vdev_mgr_tgt_if_rsp_bit
*
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
*/
static QDF_STATUS
_target_if_vdev_mgr_rsp_timer_start(struct wlan_objmgr_psoc *psoc,
struct vdev_response_timer *vdev_rsp,
enum wlan_vdev_mgr_tgt_if_rsp_bit set_bit)
{
uint8_t rsp_pos;
uint8_t vdev_id;
@@ -149,6 +168,59 @@ target_if_vdev_mgr_rsp_timer_start(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS
target_if_vdev_mgr_rsp_tmr_mutex_acquire(struct wlan_objmgr_psoc *psoc)
{
struct psoc_mlme_obj *mlme_psoc_obj;
mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc);
if (!mlme_psoc_obj)
return QDF_STATUS_E_INVAL;
return qdf_mutex_acquire(&mlme_psoc_obj->vdev_rsp_timer_mutex);
}
static QDF_STATUS
target_if_vdev_mgr_rsp_tmr_mutex_release(struct wlan_objmgr_psoc *psoc)
{
struct psoc_mlme_obj *mlme_psoc_obj;
mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc);
if (!mlme_psoc_obj)
return QDF_STATUS_E_INVAL;
return qdf_mutex_release(&mlme_psoc_obj->vdev_rsp_timer_mutex);
}
QDF_STATUS
target_if_vdev_mgr_rsp_timer_stop(struct wlan_objmgr_psoc *psoc,
struct vdev_response_timer *vdev_rsp,
enum wlan_vdev_mgr_tgt_if_rsp_bit clear_bit)
{
QDF_STATUS status;
target_if_vdev_mgr_rsp_tmr_mutex_acquire(psoc);
status = _target_if_vdev_mgr_rsp_timer_stop(psoc, vdev_rsp, clear_bit);
target_if_vdev_mgr_rsp_tmr_mutex_release(psoc);
return status;
}
QDF_STATUS
target_if_vdev_mgr_rsp_timer_start(struct wlan_objmgr_psoc *psoc,
struct vdev_response_timer *vdev_rsp,
enum wlan_vdev_mgr_tgt_if_rsp_bit set_bit)
{
QDF_STATUS status;
target_if_vdev_mgr_rsp_tmr_mutex_acquire(psoc);
status = _target_if_vdev_mgr_rsp_timer_start(psoc, vdev_rsp, set_bit);
target_if_vdev_mgr_rsp_tmr_mutex_release(psoc);
return status;
}
struct wmi_unified
*target_if_vdev_mgr_wmi_handle_get(struct wlan_objmgr_vdev *vdev)

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -106,6 +106,16 @@ if_mgr_ap_csa_complete(struct wlan_objmgr_vdev *vdev,
QDF_STATUS if_mgr_ap_csa_start(struct wlan_objmgr_vdev *vdev,
struct if_mgr_event_data *event_data);
/**
* if_mgr_ap_channel_selected() - Handler to process channel selection
* completion of SAP/GO
* @vdev: Pointer to vdev object
* @event_data: Interface manager event data
*
* Return: QDF_STATUS
*/
QDF_STATUS if_mgr_ap_channel_selected(struct wlan_objmgr_vdev *vdev,
struct if_mgr_event_data *event_data);
#if defined WLAN_MBSS
/**
* if_mgr_ap_start_acs() - ACS start event handler

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -55,6 +55,7 @@
* @WLAN_IF_MGR_EV_NAN_PRE_ENABLE: nan pre enable
* @WLAN_IF_MGR_EV_NAN_POST_ENABLE: nan post enable
* @WLAN_IF_MGR_EV_NAN_POST_DISABLE: nan post disable
* @WLAN_IF_MGR_EV_AP_CHANNEL_SELECTED: AP channel has been selected
* @WLAN_IF_MGR_EV_MAX: Max event
*/
enum wlan_if_mgr_evt {
@@ -82,6 +83,7 @@ enum wlan_if_mgr_evt {
WLAN_IF_MGR_EV_NAN_PRE_ENABLE = 21,
WLAN_IF_MGR_EV_NAN_POST_ENABLE = 22,
WLAN_IF_MGR_EV_NAN_POST_DISABLE = 23,
WLAN_IF_MGR_EV_AP_CHANNEL_SELECTED = 24,
WLAN_IF_MGR_EV_MAX,
};
@@ -103,16 +105,26 @@ struct validate_bss_data {
#endif
};
/**
* struct if_mgr_ap_info- AP related interface manager data
* @ap_freq: SAP frequency
*/
struct if_mgr_ap_info {
qdf_freq_t ap_freq;
};
/**
* struct if_mgr_event_data - interface manager event data
* @status: qdf status used to indicate if connect,disconnect,
* start bss,stop bss event is success/failure.
* @validate_bss_info: struct to hold the validate candidate information
* @ap_info: struct to hold AP related if_mgr information
* @data: event data
*/
struct if_mgr_event_data {
QDF_STATUS status;
struct validate_bss_data validate_bss_info;
struct if_mgr_ap_info ap_info;
void *data;
};

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021, 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -58,6 +58,7 @@ const char *if_mgr_get_event_str(enum wlan_if_mgr_evt event)
CASE_RETURN_STRING(WLAN_IF_MGR_EV_NAN_PRE_ENABLE);
CASE_RETURN_STRING(WLAN_IF_MGR_EV_NAN_POST_ENABLE);
CASE_RETURN_STRING(WLAN_IF_MGR_EV_NAN_POST_DISABLE);
CASE_RETURN_STRING(WLAN_IF_MGR_EV_AP_CHANNEL_SELECTED);
default:
return "Unknown";
}
@@ -183,6 +184,9 @@ QDF_STATUS if_mgr_deliver_event(struct wlan_objmgr_vdev *vdev,
case WLAN_IF_MGR_EV_NAN_POST_DISABLE:
status = if_mgr_nan_post_disable(vdev, event_data);
break;
case WLAN_IF_MGR_EV_AP_CHANNEL_SELECTED:
status = if_mgr_ap_channel_selected(vdev, event_data);
break;
default:
status = if_mgr_deliver_mbss_event(vdev, event, event_data);
}

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2015, 2020-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -592,7 +592,7 @@ QDF_STATUS wlan_cm_sta_update_bw_puncture(struct wlan_objmgr_vdev *vdev,
if (des_chan->puncture_bitmap == ch_param.reg_punc_bitmap &&
des_chan->ch_width == ch_param.ch_width)
return status;
return QDF_STATUS_E_INVAL;
des_chan->ch_freq_seg1 = ch_param.center_freq_seg0;
des_chan->ch_freq_seg2 = ch_param.center_freq_seg1;

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -151,6 +151,7 @@ struct wlan_peer_tbl_trans_entry {
* @psoc: PSoC object
* @ext_psoc_ptr: PSoC legacy pointer
* @psoc_vdev_rt: PSoC Vdev response timer
* @vdev_rsp_timer_mutex: vdev rsp timer mutex to avoid race condition issue
* @psoc_mlme_wakelock: Wakelock to prevent system going to suspend
* @rnr_6ghz_cache: Cache of 6Ghz vap in RNR ie format
* @rnr_6ghz_cache_legacy: Legacy (13TBTT) cache of 6Ghz vap in RNR ie format
@@ -161,6 +162,7 @@ struct psoc_mlme_obj {
struct wlan_objmgr_psoc *psoc;
mlme_psoc_ext_t *ext_psoc_ptr;
struct vdev_response_timer psoc_vdev_rt[WLAN_UMAC_PSOC_MAX_VDEVS];
qdf_mutex_t vdev_rsp_timer_mutex;
#ifdef FEATURE_VDEV_OPS_WAKELOCK
struct psoc_mlme_wakelock psoc_mlme_wakelock;
#endif

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -196,17 +196,44 @@ static void mlme_init_cfg(struct wlan_objmgr_psoc *psoc)
WLAN_MD_OBJMGR_PSOC_MLME, "psoc_mlme");
}
static void mlme_vdev_rsp_timer_mutex_create(struct wlan_objmgr_psoc *psoc)
{
struct psoc_mlme_obj *mlme_psoc_obj;
mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc);
if (!mlme_psoc_obj)
return;
qdf_mutex_create(&mlme_psoc_obj->vdev_rsp_timer_mutex);
}
static void mlme_vdev_rsp_timer_mutex_destroy(struct wlan_objmgr_psoc *psoc)
{
struct psoc_mlme_obj *mlme_psoc_obj;
mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc);
if (!mlme_psoc_obj)
return;
qdf_mutex_destroy(&mlme_psoc_obj->vdev_rsp_timer_mutex);
}
QDF_STATUS mlme_psoc_open(struct wlan_objmgr_psoc *psoc)
{
mlme_init_cfg(psoc);
mlme_vdev_rsp_timer_mutex_create(psoc);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS mlme_psoc_close(struct wlan_objmgr_psoc *psoc)
{
mlme_vdev_rsp_timer_mutex_destroy(psoc);
if (qdf_is_recovering())
tgt_vdev_mgr_reset_response_timer_info(psoc);
return QDF_STATUS_SUCCESS;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2025 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -1749,6 +1749,7 @@ static void mlo_mgr_update_link_state(struct wlan_objmgr_psoc *psoc,
{
uint8_t i, vdev_id, num_links = 0;
struct mlo_link_info *link_info;
struct wlan_objmgr_vdev *vdev;
struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
num_links = mlo_get_sta_num_links(mld_ctx);
@@ -1779,9 +1780,22 @@ static void mlo_mgr_update_link_state(struct wlan_objmgr_psoc *psoc,
mlo_ctx->mlme_ops->mlo_mlme_ext_teardown_tdls(psoc,
vdev_id);
mlo_mgr_update_policy_mgr_disabled_links_info(
psoc, vdev_id, link_info->link_id,
link_info->is_link_active);
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
WLAN_MLO_MGR_ID);
if (!vdev)
continue;
/*
* If VDEV is not in connected state don't update the policy
* manager table, this can happen if disconnect is ongoing when
* host receives event from FW.
*/
if (wlan_cm_is_vdev_connected(vdev))
mlo_mgr_update_policy_mgr_disabled_links_info(psoc,
vdev_id,
link_info->link_id,
link_info->is_link_active);
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLO_MGR_ID);
}
}

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -208,6 +209,13 @@ bool wifi_pos_is_delete_all_peer_in_progress(struct wlan_objmgr_vdev *vdev);
*/
void wifi_pos_set_delete_all_peer_in_progress(struct wlan_objmgr_vdev *vdev,
bool flag);
static inline uint8_t
wifi_pos_get_pasn_peer_max_num_per_vdev(void)
{
return WLAN_MAX_11AZ_PEERS;
}
#else
static inline
QDF_STATUS wifi_pos_handle_ranging_peer_create(struct wlan_objmgr_psoc *psoc,
@@ -288,5 +296,11 @@ static inline
void wifi_pos_set_delete_all_peer_in_progress(struct wlan_objmgr_vdev *vdev,
bool flag)
{}
static inline uint8_t
wifi_pos_get_pasn_peer_max_num_per_vdev(void)
{
return 0;
}
#endif /* WIFI_POS_CONVERGED && WLAN_FEATURE_RTT_11AZ_SUPPORT */
#endif /* _WIFI_POS_PASN_API_H_ */

View File

@@ -149,6 +149,9 @@
#define WLAN_CFG_INT_TIMER_THRESHOLD_TX 8
#define WLAN_CFG_INT_TIMER_THRESHOLD_OTHER 8
#define WLAN_CFG_INT_BATCH_THRESHOLD_RX_ERR 1
#define WLAN_CFG_INT_TIMER_THRESHOLD_RX_ERR 512
#ifdef WLAN_DP_PER_RING_TYPE_CONFIG
#define WLAN_CFG_INT_BATCH_THRESHOLD_RX \
WLAN_CFG_INT_BATCH_THRESHOLD_REO_RING

View File

@@ -3396,6 +3396,13 @@ struct wlan_srng_cfg wlan_srng_tx_monitor_buf_cfg = {
.low_threshold = WLAN_CFG_TX_MONITOR_BUF_RING_SIZE_MAX >> 3,
};
/* RX Exception ring configuration */
struct wlan_srng_cfg wlan_srng_rx_err_cfg = {
.timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX_ERR,
.batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_RX_ERR,
.low_threshold = 0,
};
/* DEFAULT_CONFIG ring configuration */
struct wlan_srng_cfg wlan_srng_default_cfg = {
.timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_OTHER,
@@ -3432,7 +3439,7 @@ void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
{
g_wlan_srng_cfg[REO_DST] = wlan_srng_reo_cfg;
g_wlan_srng_cfg[WBM2SW_RELEASE] = wlan_srng_wbm_release_cfg;
g_wlan_srng_cfg[REO_EXCEPTION] = wlan_srng_default_cfg;
g_wlan_srng_cfg[REO_EXCEPTION] = wlan_srng_rx_err_cfg;
g_wlan_srng_cfg[REO_REINJECT] = wlan_src_srng_default_cfg;
g_wlan_srng_cfg[REO_CMD] = wlan_src_srng_default_cfg;
g_wlan_srng_cfg[REO_STATUS] = wlan_srng_default_cfg;

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -5400,6 +5400,17 @@ QDF_STATUS
wmi_unified_send_sta_vdev_report_ap_oper_bw_cmd(
wmi_unified_t wmi_handle,
struct wmi_sta_vdev_report_ap_oper_bw_params *param);
/**
* is_both_psd_eirp_support_present_for_sp() - FW can handle
* PSD and EIRP together or not
*
* @wmi_handle: wmi handle
* @param: reg tpc power
*
* Return: true if FW can handle PSD and EIRP together or not
*/
bool is_both_psd_eirp_support_present_for_sp(wmi_unified_t wmi_handle,
struct reg_tpc_power_info *param);
#ifdef FEATURE_WLAN_ZERO_POWER_SCAN
/**

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -131,6 +131,9 @@ extract_nan_event_rsp_tlv(wmi_unified_t wmi_handle, void *evt_buf,
evt_params->is_nan_enable_success = (nan_evt_info->status == 0);
evt_params->vdev_id = nan_evt_info->vdev_id;
break;
case NAN_MSG_ID_DISABLE_RSP:
evt_params->evt_type = nan_event_id_disable_rsp;
break;
case NAN_MSG_ID_DISABLE_IND:
evt_params->evt_type = nan_event_id_disable_ind;
break;
@@ -188,6 +191,9 @@ extract_nan_event_rsp_tlv(wmi_unified_t wmi_handle, void *evt_buf,
break;
}
wmi_debug("msg_id %d, evt_type %d", nan_msg_hdr->msg_id,
evt_params->evt_type);
return QDF_STATUS_SUCCESS;
}

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -21966,7 +21966,6 @@ send_both_eirp_psd_for_set_tpc_tlv(wmi_unified_t wmi_handle,
return ret;
}
static inline
bool is_both_psd_eirp_support_present_for_sp(wmi_unified_t wmi_handle,
struct reg_tpc_power_info *param)
{