qcacmn: Properly set WDI version for WIN chipset
Set WDI version based on SOC architecture, set WDI version to IPA_WDI_4 for QCA_WIFI_QCN9224 chipset, else IPA_WDI_3. Change-Id: Ib80435e5098cfbcb9f90d4ac9cfe81ea183f308a CRs-Fixed: 3383949
This commit is contained in:

committed by
Madan Koyyalamudi

parent
d20a5a657c
commit
f230d96802
@@ -940,5 +940,24 @@ cdp_ipa_opt_dp_enable_disable_low_power_mode(struct wlan_objmgr_pdev *pdev,
|
|||||||
}
|
}
|
||||||
#endif /* IPA_OPT_WIFI_DP */
|
#endif /* IPA_OPT_WIFI_DP */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cdp_ipa_get_wdi_version - Get WDI version
|
||||||
|
* @soc: data path soc handle
|
||||||
|
* @wdi_ver: Out param for wdi version
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
cdp_ipa_get_wdi_version(ol_txrx_soc_handle soc, uint8_t *wdi_ver)
|
||||||
|
{
|
||||||
|
if (!soc || !soc->ops || !soc->ops->ipa_ops) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
||||||
|
"%s invalid instance", __func__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (soc->ops->ipa_ops->ipa_get_wdi_version)
|
||||||
|
soc->ops->ipa_ops->ipa_get_wdi_version(soc, wdi_ver);
|
||||||
|
}
|
||||||
#endif /* IPA_OFFLOAD */
|
#endif /* IPA_OFFLOAD */
|
||||||
#endif /* _CDP_TXRX_IPA_H_ */
|
#endif /* _CDP_TXRX_IPA_H_ */
|
||||||
|
@@ -2084,6 +2084,7 @@ struct cdp_throttle_ops {
|
|||||||
* buffers to IPA
|
* buffers to IPA
|
||||||
* @ipa_rx_super_rule_setup: Setup cce super rules based on filter tuple
|
* @ipa_rx_super_rule_setup: Setup cce super rules based on filter tuple
|
||||||
* @ipa_ast_create: Create/Update ast entry
|
* @ipa_ast_create: Create/Update ast entry
|
||||||
|
* @ipa_get_wdi_version: Get WDI version
|
||||||
*/
|
*/
|
||||||
struct cdp_ipa_ops {
|
struct cdp_ipa_ops {
|
||||||
QDF_STATUS (*ipa_get_resource)(struct cdp_soc_t *soc_hdl,
|
QDF_STATUS (*ipa_get_resource)(struct cdp_soc_t *soc_hdl,
|
||||||
@@ -2184,6 +2185,8 @@ struct cdp_ipa_ops {
|
|||||||
QDF_STATUS (*ipa_ast_create)(struct cdp_soc_t *soc_hdl,
|
QDF_STATUS (*ipa_ast_create)(struct cdp_soc_t *soc_hdl,
|
||||||
qdf_ipa_ast_info_type_t *data);
|
qdf_ipa_ast_info_type_t *data);
|
||||||
#endif
|
#endif
|
||||||
|
void (*ipa_get_wdi_version)(struct cdp_soc_t *soc_hdl,
|
||||||
|
uint8_t *wdi_ver);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -2661,9 +2661,21 @@ static int8_t dp_ipa_get_bank_id_be(struct dp_soc *soc)
|
|||||||
return be_soc->ipa_bank_id;
|
return be_soc->ipa_bank_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef QCA_IPA_LL_TX_FLOW_CONTROL
|
||||||
|
static void dp_ipa_get_wdi_version_be(uint8_t *wdi_ver)
|
||||||
|
{
|
||||||
|
*wdi_ver = IPA_WDI_4;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void dp_ipa_get_wdi_version_be(uint8_t *wdi_ver)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void dp_initialize_arch_ops_be_ipa(struct dp_arch_ops *arch_ops)
|
static inline void dp_initialize_arch_ops_be_ipa(struct dp_arch_ops *arch_ops)
|
||||||
{
|
{
|
||||||
arch_ops->ipa_get_bank_id = dp_ipa_get_bank_id_be;
|
arch_ops->ipa_get_bank_id = dp_ipa_get_bank_id_be;
|
||||||
|
arch_ops->ipa_get_wdi_ver = dp_ipa_get_wdi_version_be;
|
||||||
}
|
}
|
||||||
#else /* !IPA_OFFLOAD */
|
#else /* !IPA_OFFLOAD */
|
||||||
static inline void dp_initialize_arch_ops_be_ipa(struct dp_arch_ops *arch_ops)
|
static inline void dp_initialize_arch_ops_be_ipa(struct dp_arch_ops *arch_ops)
|
||||||
|
@@ -4009,4 +4009,23 @@ QDF_STATUS dp_ipa_txrx_get_peer_stats(struct cdp_soc_t *soc, uint8_t vdev_id,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dp_ipa_get_wdi_version() - Get WDI version
|
||||||
|
* @soc_hdl: data path soc handle
|
||||||
|
* @wdi_ver: Out parameter for wdi version
|
||||||
|
*
|
||||||
|
* Get WDI version based on soc arch
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void dp_ipa_get_wdi_version(struct cdp_soc_t *soc_hdl, uint8_t *wdi_ver)
|
||||||
|
{
|
||||||
|
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||||
|
|
||||||
|
if (soc->arch_ops.ipa_get_wdi_ver)
|
||||||
|
soc->arch_ops.ipa_get_wdi_ver(wdi_ver);
|
||||||
|
else
|
||||||
|
*wdi_ver = IPA_WDI_3;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -595,6 +595,16 @@ QDF_STATUS dp_ipa_txrx_get_pdev_stats(struct cdp_soc_t *soc, uint8_t pdev_id,
|
|||||||
QDF_STATUS dp_ipa_update_peer_rx_stats(struct cdp_soc_t *soc, uint8_t vdev_id,
|
QDF_STATUS dp_ipa_update_peer_rx_stats(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||||
uint8_t *peer_mac, qdf_nbuf_t nbuf);
|
uint8_t *peer_mac, qdf_nbuf_t nbuf);
|
||||||
#endif
|
#endif
|
||||||
|
/**
|
||||||
|
* dp_ipa_get_wdi_version() - Get WDI version
|
||||||
|
* @soc_hdl: data path soc handle
|
||||||
|
* @wdi_ver: Out parameter for wdi version
|
||||||
|
*
|
||||||
|
* Get WDI version based on soc arch
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void dp_ipa_get_wdi_version(struct cdp_soc_t *soc_hdl, uint8_t *wdi_ver);
|
||||||
#else
|
#else
|
||||||
static inline int dp_ipa_uc_detach(struct dp_soc *soc, struct dp_pdev *pdev)
|
static inline int dp_ipa_uc_detach(struct dp_soc *soc, struct dp_pdev *pdev)
|
||||||
{
|
{
|
||||||
@@ -673,6 +683,9 @@ static inline QDF_STATUS dp_ipa_ast_create(struct cdp_soc_t *soc_hdl,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
static inline void dp_ipa_get_wdi_version(struct cdp_soc_t *soc_hdl,
|
||||||
|
uint8_t *wdi_ver)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* _DP_IPA_H_ */
|
#endif /* _DP_IPA_H_ */
|
||||||
|
@@ -15299,6 +15299,7 @@ static struct cdp_ipa_ops dp_ops_ipa = {
|
|||||||
#ifdef IPA_WDS_EASYMESH_FEATURE
|
#ifdef IPA_WDS_EASYMESH_FEATURE
|
||||||
.ipa_ast_create = dp_ipa_ast_create,
|
.ipa_ast_create = dp_ipa_ast_create,
|
||||||
#endif
|
#endif
|
||||||
|
.ipa_get_wdi_version = dp_ipa_get_wdi_version,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -2195,6 +2195,7 @@ enum dp_context_type {
|
|||||||
* @dp_partner_chips_map:
|
* @dp_partner_chips_map:
|
||||||
* @dp_partner_chips_unmap:
|
* @dp_partner_chips_unmap:
|
||||||
* @ipa_get_bank_id: Get TCL bank id used by IPA
|
* @ipa_get_bank_id: Get TCL bank id used by IPA
|
||||||
|
* @ipa_get_wdi_ver: Get WDI version
|
||||||
* @dp_txrx_ppeds_rings_status:
|
* @dp_txrx_ppeds_rings_status:
|
||||||
* @dp_tx_ppeds_inuse_desc:
|
* @dp_tx_ppeds_inuse_desc:
|
||||||
* @dp_tx_ppeds_cfg_astidx_cache_mapping:
|
* @dp_tx_ppeds_cfg_astidx_cache_mapping:
|
||||||
@@ -2403,6 +2404,7 @@ struct dp_arch_ops {
|
|||||||
|
|
||||||
#ifdef IPA_OFFLOAD
|
#ifdef IPA_OFFLOAD
|
||||||
int8_t (*ipa_get_bank_id)(struct dp_soc *soc);
|
int8_t (*ipa_get_bank_id)(struct dp_soc *soc);
|
||||||
|
void (*ipa_get_wdi_ver)(uint8_t *wdi_ver);
|
||||||
#endif
|
#endif
|
||||||
#ifdef WLAN_SUPPORT_PPEDS
|
#ifdef WLAN_SUPPORT_PPEDS
|
||||||
void (*dp_txrx_ppeds_rings_status)(struct dp_soc *soc);
|
void (*dp_txrx_ppeds_rings_status)(struct dp_soc *soc);
|
||||||
|
@@ -519,7 +519,7 @@ drop_pkt:
|
|||||||
*/
|
*/
|
||||||
#if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
|
#if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
|
||||||
defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750) || \
|
defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750) || \
|
||||||
defined(QCA_WIFI_WCN7850) || defined(QCA_WIFI_QCN9000)
|
defined(QCA_WIFI_WCN7850)
|
||||||
static inline void wlan_ipa_wdi_get_wdi_version(struct wlan_ipa_priv *ipa_ctx)
|
static inline void wlan_ipa_wdi_get_wdi_version(struct wlan_ipa_priv *ipa_ctx)
|
||||||
{
|
{
|
||||||
ipa_ctx->wdi_version = IPA_WDI_3;
|
ipa_ctx->wdi_version = IPA_WDI_3;
|
||||||
@@ -529,6 +529,14 @@ static inline void wlan_ipa_wdi_get_wdi_version(struct wlan_ipa_priv *ipa_ctx)
|
|||||||
{
|
{
|
||||||
ipa_ctx->wdi_version = IPA_WDI_3_V2;
|
ipa_ctx->wdi_version = IPA_WDI_3_V2;
|
||||||
}
|
}
|
||||||
|
#elif defined(QCA_WIFI_QCN9000) || defined(QCA_WIFI_QCN9224)
|
||||||
|
static inline void wlan_ipa_wdi_get_wdi_version(struct wlan_ipa_priv *ipa_ctx)
|
||||||
|
{
|
||||||
|
uint8_t wdi_ver;
|
||||||
|
|
||||||
|
cdp_ipa_get_wdi_version(ipa_ctx->dp_soc, &wdi_ver);
|
||||||
|
ipa_ctx->wdi_version = wdi_ver;
|
||||||
|
}
|
||||||
#elif defined(QCA_WIFI_3_0)
|
#elif defined(QCA_WIFI_3_0)
|
||||||
static inline void wlan_ipa_wdi_get_wdi_version(struct wlan_ipa_priv *ipa_ctx)
|
static inline void wlan_ipa_wdi_get_wdi_version(struct wlan_ipa_priv *ipa_ctx)
|
||||||
{
|
{
|
||||||
@@ -2181,7 +2189,8 @@ end:
|
|||||||
#if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
|
#if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
|
||||||
defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750) || \
|
defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750) || \
|
||||||
defined(QCA_WIFI_WCN7850) || defined(QCA_WIFI_QCN9000) || \
|
defined(QCA_WIFI_WCN7850) || defined(QCA_WIFI_QCN9000) || \
|
||||||
defined(QCA_WIFI_KIWI) || defined(QCA_WIFI_KIWI_V2)
|
defined(QCA_WIFI_KIWI) || defined(QCA_WIFI_KIWI_V2) || \
|
||||||
|
defined(QCA_WIFI_QCN9224)
|
||||||
|
|
||||||
#ifdef QCA_CONFIG_RPS
|
#ifdef QCA_CONFIG_RPS
|
||||||
void ipa_set_rps(struct wlan_ipa_priv *ipa_ctx, enum QDF_OPMODE mode,
|
void ipa_set_rps(struct wlan_ipa_priv *ipa_ctx, enum QDF_OPMODE mode,
|
||||||
|
Reference in New Issue
Block a user