qcacmn: Handle deprecated interface calls to IPA
As IPA has moved out of the kernel, ipa_uc_reg_rdyCB interface call from WLAN is not needed anymore as ipa_wdi_init_per_inst() initialization call will handle this. This change will add support to retain this call only for legacy devices. Change-Id: Icb479562e091d388e03ef5a38b3e95d4dbf06271 CRs-Fixed: 3459071
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c7eaf5ac98
commit
59a36d8e87
@@ -577,7 +577,7 @@ QDF_STATUS htt_h2t_rx_cce_super_rule_setup(struct htt_soc *soc, void *param)
|
|||||||
|
|
||||||
pkt = htt_htc_pkt_alloc(soc);
|
pkt = htt_htc_pkt_alloc(soc);
|
||||||
if (!pkt) {
|
if (!pkt) {
|
||||||
dp_htt_err("%pK: Fail to allocate dp_htt_htc_pkt buffer");
|
dp_htt_err("Fail to allocate dp_htt_htc_pkt buffer");
|
||||||
qdf_assert(0);
|
qdf_assert(0);
|
||||||
qdf_nbuf_free(msg);
|
qdf_nbuf_free(msg);
|
||||||
return QDF_STATUS_E_NOMEM;
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
@@ -26,6 +26,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* Header files */
|
/* Header files */
|
||||||
#include <qdf_status.h>
|
#include <qdf_status.h>
|
||||||
|
#include "qdf_ipa.h"
|
||||||
#include "qdf_nbuf.h"
|
#include "qdf_nbuf.h"
|
||||||
#include "qdf_lro.h"
|
#include "qdf_lro.h"
|
||||||
#include "ol_if_athvar.h"
|
#include "ol_if_athvar.h"
|
||||||
@@ -1822,7 +1823,7 @@ enum ipa_hw_type hif_get_ipa_hw_type(void)
|
|||||||
static inline
|
static inline
|
||||||
bool hif_get_ipa_present(void)
|
bool hif_get_ipa_present(void)
|
||||||
{
|
{
|
||||||
if (ipa_uc_reg_rdyCB(NULL) != -EPERM)
|
if (qdf_ipa_uc_reg_rdyCB(NULL) != -EPERM)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@@ -2177,7 +2177,7 @@ static QDF_STATUS wlan_ipa_setup_iface(struct wlan_ipa_priv *ipa_ctx,
|
|||||||
qdf_spin_unlock_bh(&iface_context->interface_lock);
|
qdf_spin_unlock_bh(&iface_context->interface_lock);
|
||||||
|
|
||||||
status = cdp_ipa_setup_iface(ipa_ctx->dp_soc, net_dev->name,
|
status = cdp_ipa_setup_iface(ipa_ctx->dp_soc, net_dev->name,
|
||||||
net_dev->dev_addr,
|
(uint8_t *)net_dev->dev_addr,
|
||||||
iface_context->prod_client,
|
iface_context->prod_client,
|
||||||
iface_context->cons_client,
|
iface_context->cons_client,
|
||||||
wlan_ipa_set_session_id(session_id,
|
wlan_ipa_set_session_id(session_id,
|
||||||
@@ -4790,7 +4790,8 @@ void wlan_ipa_uc_cleanup_sta(struct wlan_ipa_priv *ipa_ctx,
|
|||||||
if (iface_ctx && iface_ctx->device_mode == QDF_STA_MODE &&
|
if (iface_ctx && iface_ctx->device_mode == QDF_STA_MODE &&
|
||||||
iface_ctx->dev && iface_ctx->dev == net_dev) {
|
iface_ctx->dev && iface_ctx->dev == net_dev) {
|
||||||
wlan_ipa_uc_send_evt(net_dev, QDF_IPA_STA_DISCONNECT,
|
wlan_ipa_uc_send_evt(net_dev, QDF_IPA_STA_DISCONNECT,
|
||||||
net_dev->dev_addr, ipa_ctx);
|
(uint8_t *)net_dev->dev_addr,
|
||||||
|
ipa_ctx);
|
||||||
wlan_ipa_cleanup_iface(iface_ctx, NULL);
|
wlan_ipa_cleanup_iface(iface_ctx, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4809,7 +4810,8 @@ QDF_STATUS wlan_ipa_uc_disconnect_ap(struct wlan_ipa_priv *ipa_ctx,
|
|||||||
iface_ctx = wlan_ipa_get_iface(ipa_ctx, QDF_SAP_MODE);
|
iface_ctx = wlan_ipa_get_iface(ipa_ctx, QDF_SAP_MODE);
|
||||||
if (iface_ctx)
|
if (iface_ctx)
|
||||||
status = wlan_ipa_uc_send_evt(net_dev, QDF_IPA_AP_DISCONNECT,
|
status = wlan_ipa_uc_send_evt(net_dev, QDF_IPA_AP_DISCONNECT,
|
||||||
net_dev->dev_addr, ipa_ctx);
|
(uint8_t *)net_dev->dev_addr,
|
||||||
|
ipa_ctx);
|
||||||
else
|
else
|
||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
@@ -4846,12 +4848,12 @@ void wlan_ipa_uc_ssr_cleanup(struct wlan_ipa_priv *ipa_ctx)
|
|||||||
if (iface->device_mode == QDF_SAP_MODE)
|
if (iface->device_mode == QDF_SAP_MODE)
|
||||||
wlan_ipa_uc_send_evt(iface->dev,
|
wlan_ipa_uc_send_evt(iface->dev,
|
||||||
QDF_IPA_AP_DISCONNECT,
|
QDF_IPA_AP_DISCONNECT,
|
||||||
iface->dev->dev_addr,
|
(uint8_t *)iface->dev->dev_addr,
|
||||||
ipa_ctx);
|
ipa_ctx);
|
||||||
else if (iface->device_mode == QDF_STA_MODE)
|
else if (iface->device_mode == QDF_STA_MODE)
|
||||||
wlan_ipa_uc_send_evt(iface->dev,
|
wlan_ipa_uc_send_evt(iface->dev,
|
||||||
QDF_IPA_STA_DISCONNECT,
|
QDF_IPA_STA_DISCONNECT,
|
||||||
iface->dev->dev_addr,
|
(uint8_t *)iface->dev->dev_addr,
|
||||||
ipa_ctx);
|
ipa_ctx);
|
||||||
wlan_ipa_cleanup_iface(iface, NULL);
|
wlan_ipa_cleanup_iface(iface, NULL);
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -941,6 +941,11 @@ static inline int __qdf_ipa_get_wdi_stats(struct IpaHwStatsWDIInfoData_t *stats)
|
|||||||
return ipa_get_wdi_stats(stats);
|
return ipa_get_wdi_stats(stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* IPA supports this call only on legacy devices. Starting from
|
||||||
|
* Linux version 6.1.15, IPA has moved out of the kernel and
|
||||||
|
* has deprecated this call.
|
||||||
|
*/
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 15))
|
||||||
static inline int __qdf_ipa_uc_reg_rdyCB(struct ipa_wdi_uc_ready_params *param)
|
static inline int __qdf_ipa_uc_reg_rdyCB(struct ipa_wdi_uc_ready_params *param)
|
||||||
{
|
{
|
||||||
return ipa_uc_reg_rdyCB(param);
|
return ipa_uc_reg_rdyCB(param);
|
||||||
@@ -950,7 +955,23 @@ static inline int __qdf_ipa_uc_dereg_rdyCB(void)
|
|||||||
{
|
{
|
||||||
return ipa_uc_dereg_rdyCB();
|
return ipa_uc_dereg_rdyCB();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/* This call has been removed from IPA since
|
||||||
|
* Commit-ID: b37958da466efc1320b7f97ddf876565762f05b7.
|
||||||
|
* This call returns 0 here as ipa_wdi_init_per_inst()
|
||||||
|
* call to IPA would already handle all the initialization steps
|
||||||
|
* and do not require WLAN to make this IPA call.
|
||||||
|
*/
|
||||||
|
static inline int __qdf_ipa_uc_reg_rdyCB(struct ipa_wdi_uc_ready_params *param)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int __qdf_ipa_uc_dereg_rdyCB(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
static inline int __qdf_ipa_register_ipa_ready_cb(
|
static inline int __qdf_ipa_register_ipa_ready_cb(
|
||||||
void (*ipa_ready_cb)(void *user_data),
|
void (*ipa_ready_cb)(void *user_data),
|
||||||
void *user_data)
|
void *user_data)
|
||||||
|
Reference in New Issue
Block a user