qcacmn: Init-Deinit changes for WCN7850
Add Init-Deinit changes for WCN7850 support in datapath Change-Id: I7f9850ee41f4638c6a28b5313549c67876c5f810 CRs-Fixed: 2888556
This commit is contained in:

committed by
Manjunathappa Prakash

parent
4e6a7cf1bf
commit
34b6af18a4
@@ -26,9 +26,12 @@
|
|||||||
|
|
||||||
#include "hif_main.h"
|
#include "hif_main.h"
|
||||||
|
|
||||||
#define MOB_DRV_LEGACY_DP 0xdeed/*FIXME Add MCL device IDs */
|
#define MOB_DRV_LEGACY_DP 0xdeed
|
||||||
#define LITHIUM_DP 0xfffd/*FIXME Add Litium device ID */
|
/* Lithium device IDs */
|
||||||
/* Use these device IDs for attach in future */
|
#define LITHIUM_DP 0xfffd
|
||||||
|
/* Beryllium device IDs */
|
||||||
|
#define BERYLLIUM_DP 0xaffe
|
||||||
|
/* Use device IDs for attach in future */
|
||||||
|
|
||||||
#if defined(DP_TXRX_SOC_ATTACH)
|
#if defined(DP_TXRX_SOC_ATTACH)
|
||||||
static inline ol_txrx_soc_handle
|
static inline ol_txrx_soc_handle
|
||||||
@@ -110,6 +113,7 @@ ol_txrx_soc_handle cdp_soc_attach(u_int16_t devid,
|
|||||||
{
|
{
|
||||||
switch (devid) {
|
switch (devid) {
|
||||||
case LITHIUM_DP: /*FIXME Add lithium devide IDs */
|
case LITHIUM_DP: /*FIXME Add lithium devide IDs */
|
||||||
|
case BERYLLIUM_DP:
|
||||||
case QCA8074_DEVICE_ID: /* Hawekeye */
|
case QCA8074_DEVICE_ID: /* Hawekeye */
|
||||||
case QCA8074V2_DEVICE_ID: /* Hawekeye V2*/
|
case QCA8074V2_DEVICE_ID: /* Hawekeye V2*/
|
||||||
case QCA5018_DEVICE_ID:
|
case QCA5018_DEVICE_ID:
|
||||||
|
@@ -7688,8 +7688,8 @@ static QDF_STATUS dp_peer_delete_wifi3(struct cdp_soc_t *soc_hdl,
|
|||||||
* Return: MAC address on success, NULL on failure.
|
* Return: MAC address on success, NULL on failure.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static uint8 *dp_get_vdev_mac_addr_wifi3(struct cdp_soc_t *soc_hdl,
|
static uint8_t *dp_get_vdev_mac_addr_wifi3(struct cdp_soc_t *soc_hdl,
|
||||||
uint8_t vdev_id)
|
uint8_t vdev_id)
|
||||||
{
|
{
|
||||||
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||||
struct dp_vdev *vdev = dp_vdev_get_ref_by_id(soc, vdev_id,
|
struct dp_vdev *vdev = dp_vdev_get_ref_by_id(soc, vdev_id,
|
||||||
@@ -14497,6 +14497,25 @@ static void dp_soc_cfg_init(struct dp_soc *soc)
|
|||||||
soc->wlan_cfg_ctx->int_rxdma2host_ring_mask[int_ctx] = 0;
|
soc->wlan_cfg_ctx->int_rxdma2host_ring_mask[int_ctx] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
soc->wlan_cfg_ctx->rxdma1_enable = 0;
|
||||||
|
break;
|
||||||
|
case TARGET_TYPE_WCN7850:
|
||||||
|
wlan_cfg_set_reo_dst_ring_size(soc->wlan_cfg_ctx,
|
||||||
|
REO_DST_RING_SIZE_QCA6290);
|
||||||
|
soc->ast_override_support = 1;
|
||||||
|
|
||||||
|
if (soc->cdp_soc.ol_ops->get_con_mode &&
|
||||||
|
soc->cdp_soc.ol_ops->get_con_mode() ==
|
||||||
|
QDF_GLOBAL_MONITOR_MODE) {
|
||||||
|
int int_ctx;
|
||||||
|
|
||||||
|
for (int_ctx = 0; int_ctx < WLAN_CFG_INT_NUM_CONTEXTS;
|
||||||
|
int_ctx++) {
|
||||||
|
soc->wlan_cfg_ctx->int_rx_ring_mask[int_ctx] = 0;
|
||||||
|
soc->wlan_cfg_ctx->int_rxdma2host_ring_mask[int_ctx] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
soc->wlan_cfg_ctx->rxdma1_enable = 0;
|
soc->wlan_cfg_ctx->rxdma1_enable = 0;
|
||||||
break;
|
break;
|
||||||
case TARGET_TYPE_QCA8074:
|
case TARGET_TYPE_QCA8074:
|
||||||
@@ -14585,6 +14604,11 @@ static void dp_soc_cfg_attach(struct dp_soc *soc)
|
|||||||
REO_DST_RING_SIZE_QCA6290);
|
REO_DST_RING_SIZE_QCA6290);
|
||||||
soc->wlan_cfg_ctx->rxdma1_enable = 0;
|
soc->wlan_cfg_ctx->rxdma1_enable = 0;
|
||||||
break;
|
break;
|
||||||
|
case TARGET_TYPE_WCN7850:
|
||||||
|
wlan_cfg_set_reo_dst_ring_size(soc->wlan_cfg_ctx,
|
||||||
|
REO_DST_RING_SIZE_QCA6290);
|
||||||
|
soc->wlan_cfg_ctx->rxdma1_enable = 0;
|
||||||
|
break;
|
||||||
case TARGET_TYPE_QCA8074:
|
case TARGET_TYPE_QCA8074:
|
||||||
wlan_cfg_set_tso_desc_attach_defer(soc->wlan_cfg_ctx, 1);
|
wlan_cfg_set_tso_desc_attach_defer(soc->wlan_cfg_ctx, 1);
|
||||||
wlan_cfg_set_reo_dst_ring_size(soc->wlan_cfg_ctx,
|
wlan_cfg_set_reo_dst_ring_size(soc->wlan_cfg_ctx,
|
||||||
|
@@ -998,7 +998,7 @@ free_nbuf:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490) || \
|
#if defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490) || \
|
||||||
defined(QCA_WIFI_QCA6750)
|
defined(QCA_WIFI_QCA6750) || defined(QCA_WIFI_WCN7850)
|
||||||
/**
|
/**
|
||||||
* dp_rx_null_q_handle_invalid_peer_id_exception() - to find exception
|
* dp_rx_null_q_handle_invalid_peer_id_exception() - to find exception
|
||||||
* @soc: pointer to dp_soc struct
|
* @soc: pointer to dp_soc struct
|
||||||
|
@@ -158,7 +158,7 @@ enum m_copy_mode {
|
|||||||
struct msdu_list {
|
struct msdu_list {
|
||||||
qdf_nbuf_t head;
|
qdf_nbuf_t head;
|
||||||
qdf_nbuf_t tail;
|
qdf_nbuf_t tail;
|
||||||
uint32 sum_len;
|
uint32_t sum_len;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dp_soc_cmn;
|
struct dp_soc_cmn;
|
||||||
|
@@ -35,7 +35,8 @@
|
|||||||
#define HAL_IPA_TX_COMP_RING_IDX 2
|
#define HAL_IPA_TX_COMP_RING_IDX 2
|
||||||
|
|
||||||
/* calculate the register address offset from bar0 of shadow register x */
|
/* calculate the register address offset from bar0 of shadow register x */
|
||||||
#if defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490)
|
#if defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490) || \
|
||||||
|
defined(QCA_WIFI_WCN7850)
|
||||||
#define SHADOW_REGISTER_START_ADDRESS_OFFSET 0x000008FC
|
#define SHADOW_REGISTER_START_ADDRESS_OFFSET 0x000008FC
|
||||||
#define SHADOW_REGISTER_END_ADDRESS_OFFSET \
|
#define SHADOW_REGISTER_END_ADDRESS_OFFSET \
|
||||||
((SHADOW_REGISTER_START_ADDRESS_OFFSET) + (4 * (MAX_SHADOW_REGISTERS)))
|
((SHADOW_REGISTER_START_ADDRESS_OFFSET) + (4 * (MAX_SHADOW_REGISTERS)))
|
||||||
@@ -125,7 +126,8 @@ static inline void hal_reg_write_result_check(struct hal_soc *hal_soc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(QCA_WIFI_QCA6390) && !defined(QCA_WIFI_QCA6490)
|
#if !defined(QCA_WIFI_QCA6390) && !defined(QCA_WIFI_QCA6490) && \
|
||||||
|
!defined(QCA_WIFI_WCN7850)
|
||||||
static inline void hal_lock_reg_access(struct hal_soc *soc,
|
static inline void hal_lock_reg_access(struct hal_soc *soc,
|
||||||
unsigned long *flags)
|
unsigned long *flags)
|
||||||
{
|
{
|
||||||
@@ -230,7 +232,7 @@ static inline void hal_tx_init_cmd_credit_ring(hal_soc_handle_t hal_soc_hdl,
|
|||||||
* that window would be a bug
|
* that window would be a bug
|
||||||
*/
|
*/
|
||||||
#if !defined(QCA_WIFI_QCA6390) && !defined(QCA_WIFI_QCA6490) && \
|
#if !defined(QCA_WIFI_QCA6390) && !defined(QCA_WIFI_QCA6490) && \
|
||||||
!defined(QCA_WIFI_QCA6750)
|
!defined(QCA_WIFI_QCA6750) && !defined(QCA_WIFI_WCN7850)
|
||||||
static inline void hal_write32_mb(struct hal_soc *hal_soc, uint32_t offset,
|
static inline void hal_write32_mb(struct hal_soc *hal_soc, uint32_t offset,
|
||||||
uint32_t value)
|
uint32_t value)
|
||||||
{
|
{
|
||||||
@@ -463,7 +465,7 @@ static inline void hal_srng_write_address_32_mb(struct hal_soc *hal_soc,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(QCA_WIFI_QCA6390) && !defined(QCA_WIFI_QCA6490) && \
|
#if !defined(QCA_WIFI_QCA6390) && !defined(QCA_WIFI_QCA6490) && \
|
||||||
!defined(QCA_WIFI_QCA6750)
|
!defined(QCA_WIFI_QCA6750) && !defined(QCA_WIFI_WCN7850)
|
||||||
/**
|
/**
|
||||||
* hal_read32_mb() - Access registers to read configuration
|
* hal_read32_mb() - Access registers to read configuration
|
||||||
* @hal_soc: hal soc handle
|
* @hal_soc: hal soc handle
|
||||||
@@ -861,7 +863,7 @@ extern void hal_detach(void *hal_soc);
|
|||||||
#define HAL_SRNG_MSI_INTR 0x00020000
|
#define HAL_SRNG_MSI_INTR 0x00020000
|
||||||
#define HAL_SRNG_CACHED_DESC 0x00040000
|
#define HAL_SRNG_CACHED_DESC 0x00040000
|
||||||
|
|
||||||
#ifdef QCA_WIFI_QCA6490
|
#if defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_WCN7850)
|
||||||
#define HAL_SRNG_PREFETCH_TIMER 1
|
#define HAL_SRNG_PREFETCH_TIMER 1
|
||||||
#else
|
#else
|
||||||
#define HAL_SRNG_PREFETCH_TIMER 0
|
#define HAL_SRNG_PREFETCH_TIMER 0
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#define MAX_UNWINDOWED_ADDRESS 0x80000
|
#define MAX_UNWINDOWED_ADDRESS 0x80000
|
||||||
#if defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490) || \
|
#if defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490) || \
|
||||||
defined(QCA_WIFI_QCN9000) || defined(QCA_WIFI_QCA6750) || \
|
defined(QCA_WIFI_QCN9000) || defined(QCA_WIFI_QCA6750) || \
|
||||||
defined(QCA_WIFI_QCN9224)
|
defined(QCA_WIFI_QCN9224) || defined(QCA_WIFI_WCN7850)
|
||||||
#define WINDOW_ENABLE_BIT 0x40000000
|
#define WINDOW_ENABLE_BIT 0x40000000
|
||||||
#else
|
#else
|
||||||
#define WINDOW_ENABLE_BIT 0x80000000
|
#define WINDOW_ENABLE_BIT 0x80000000
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
#ifndef _TARGET_IF_CFR_6490_H
|
#ifndef _TARGET_IF_CFR_6490_H
|
||||||
#define _TARGET_IF_CFR_6490_H
|
#define _TARGET_IF_CFR_6490_H
|
||||||
|
|
||||||
#ifdef QCA_WIFI_QCA6490
|
#if defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_WCN7850)
|
||||||
#define CFR_MAC_ID_24G 1
|
#define CFR_MAC_ID_24G 1
|
||||||
#define CFR_MAC_ID_5G 0
|
#define CFR_MAC_ID_5G 0
|
||||||
#endif /* QCA_WIFI_QCA6490 */
|
#endif /* QCA_WIFI_QCA6490 */
|
||||||
|
@@ -480,7 +480,7 @@ target_if_cfr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLAN_ENH_CFR_ENABLE
|
#ifdef WLAN_ENH_CFR_ENABLE
|
||||||
#ifdef QCA_WIFI_QCA6490
|
#if defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_WCN7850)
|
||||||
static uint8_t target_if_cfr_get_mac_id(struct wlan_objmgr_pdev *pdev)
|
static uint8_t target_if_cfr_get_mac_id(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
struct wlan_objmgr_vdev *vdev;
|
struct wlan_objmgr_vdev *vdev;
|
||||||
|
@@ -262,7 +262,7 @@
|
|||||||
#define WLAN_CFG_RX_RELEASE_RING_SIZE 1024
|
#define WLAN_CFG_RX_RELEASE_RING_SIZE 1024
|
||||||
#define WLAN_CFG_RX_RELEASE_RING_SIZE_MIN 8
|
#define WLAN_CFG_RX_RELEASE_RING_SIZE_MIN 8
|
||||||
#if defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490) || \
|
#if defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490) || \
|
||||||
defined(QCA_WIFI_QCA6750)
|
defined(QCA_WIFI_QCA6750) || defined(QCA_WIFI_WCN7850)
|
||||||
#define WLAN_CFG_RX_RELEASE_RING_SIZE_MAX 1024
|
#define WLAN_CFG_RX_RELEASE_RING_SIZE_MAX 1024
|
||||||
#else
|
#else
|
||||||
#define WLAN_CFG_RX_RELEASE_RING_SIZE_MAX 8192
|
#define WLAN_CFG_RX_RELEASE_RING_SIZE_MAX 8192
|
||||||
|
Reference in New Issue
Block a user