qcacmn: AST entry create and update support for IPA
To support WDS feature in IPA driver, WLAN needs to update the ast entry for any new rx packet, and for end-nodes connected via repeater to root. CRs-Fixed: 3226348 Change-Id: I7383b12f18e7c70ec06499d66130667eca033131
This commit is contained in:

committed by
Madan Koyyalamudi

vanhempi
3035192763
commit
277054124d
@@ -17,6 +17,7 @@
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
|
||||
#include <wlan_ipa_ucfg_api.h>
|
||||
#include <qdf_ipa_wdi3.h>
|
||||
#include <qdf_types.h>
|
||||
#include <qdf_lock.h>
|
||||
@@ -36,6 +37,9 @@
|
||||
#ifdef WIFI_MONITOR_SUPPORT
|
||||
#include "dp_mon.h"
|
||||
#endif
|
||||
#ifdef FEATURE_WDS
|
||||
#include "dp_txrx_wds.h"
|
||||
#endif
|
||||
|
||||
/* Ring index for WBM2SW2 release ring */
|
||||
#define IPA_TX_COMP_RING_IDX HAL_IPA_TX_COMP_RING_IDX
|
||||
@@ -64,6 +68,14 @@ struct dp_ipa_reo_remap_record {
|
||||
uint32_t ix3_reg;
|
||||
};
|
||||
|
||||
#ifdef IPA_WDS_EASYMESH_FEATURE
|
||||
#define WLAN_IPA_META_DATA_MASK htonl(0x000000FF)
|
||||
#define WLAN_IPA_HDR_L2_ETHERNET IPA_HDR_L2_ETHERNET_II_AST
|
||||
#else
|
||||
#define WLAN_IPA_META_DATA_MASK htonl(0x00FF0000)
|
||||
#define WLAN_IPA_HDR_L2_ETHERNET IPA_HDR_L2_ETHERNET_II
|
||||
#endif
|
||||
|
||||
#define REO_REMAP_HISTORY_SIZE 32
|
||||
|
||||
struct dp_ipa_reo_remap_record dp_ipa_reo_remap_history[REO_REMAP_HISTORY_SIZE];
|
||||
@@ -1028,11 +1040,29 @@ static void dp_ipa_set_pipe_db(struct dp_ipa_resources *res,
|
||||
QDF_IPA_WDI_CONN_OUT_PARAMS_RX_UC_DB_PA(out);
|
||||
}
|
||||
|
||||
#ifdef IPA_WDS_EASYMESH_FEATURE
|
||||
/**
|
||||
* dp_ipa_setup_iface_session_id - Pass vdev id to IPA
|
||||
* @in: ipa in params
|
||||
* @session_id: vdev id
|
||||
*
|
||||
* Pass Vdev id to IPA, IPA metadata order is changed and vdev id
|
||||
* is stored at higher nibble so, no shift is required.
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static void dp_ipa_setup_iface_session_id(qdf_ipa_wdi_reg_intf_in_params_t *in,
|
||||
uint8_t session_id)
|
||||
{
|
||||
QDF_IPA_WDI_REG_INTF_IN_PARAMS_META_DATA(in) = htonl(session_id);
|
||||
}
|
||||
#else
|
||||
static void dp_ipa_setup_iface_session_id(qdf_ipa_wdi_reg_intf_in_params_t *in,
|
||||
uint8_t session_id)
|
||||
{
|
||||
QDF_IPA_WDI_REG_INTF_IN_PARAMS_META_DATA(in) = htonl(session_id << 16);
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void dp_ipa_tx_comp_ring_init_hp(struct dp_soc *soc,
|
||||
struct dp_ipa_resources *res)
|
||||
@@ -2040,7 +2070,8 @@ QDF_STATUS dp_ipa_setup(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
|
||||
bool is_rm_enabled, uint32_t *tx_pipe_handle,
|
||||
uint32_t *rx_pipe_handle, bool is_smmu_enabled,
|
||||
qdf_ipa_sys_connect_params_t *sys_in, bool over_gsi,
|
||||
qdf_ipa_wdi_hdl_t hdl, qdf_ipa_wdi_hdl_t id)
|
||||
qdf_ipa_wdi_hdl_t hdl, qdf_ipa_wdi_hdl_t id,
|
||||
void *ipa_ast_notify_cb)
|
||||
{
|
||||
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||
struct dp_pdev *pdev =
|
||||
@@ -2118,7 +2149,11 @@ QDF_STATUS dp_ipa_setup(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
|
||||
}
|
||||
|
||||
QDF_IPA_EP_CFG_NAT_EN(rx_cfg) = IPA_BYPASS_NAT;
|
||||
QDF_IPA_EP_CFG_HDR_LEN(rx_cfg) = DP_IPA_UC_WLAN_RX_HDR_LEN;
|
||||
if (ucfg_ipa_is_wds_enabled())
|
||||
QDF_IPA_EP_CFG_HDR_LEN(rx_cfg) = DP_IPA_UC_WLAN_RX_HDR_LEN_AST;
|
||||
else
|
||||
QDF_IPA_EP_CFG_HDR_LEN(rx_cfg) = DP_IPA_UC_WLAN_RX_HDR_LEN;
|
||||
|
||||
QDF_IPA_EP_CFG_HDR_OFST_PKT_SIZE_VALID(rx_cfg) = 1;
|
||||
QDF_IPA_EP_CFG_HDR_OFST_PKT_SIZE(rx_cfg) = 0;
|
||||
QDF_IPA_EP_CFG_HDR_ADDITIONAL_CONST_LEN(rx_cfg) = 0;
|
||||
@@ -2141,6 +2176,7 @@ QDF_STATUS dp_ipa_setup(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
|
||||
QDF_IPA_WDI_CONN_IN_PARAMS_NOTIFY(pipe_in) = ipa_w2i_cb;
|
||||
QDF_IPA_WDI_CONN_IN_PARAMS_PRIV(pipe_in) = ipa_priv;
|
||||
QDF_IPA_WDI_CONN_IN_PARAMS_HANDLE(pipe_in) = hdl;
|
||||
dp_ipa_ast_notify_cb(pipe_in, ipa_ast_notify_cb);
|
||||
|
||||
/* Connect WDI IPA PIPEs */
|
||||
ret = qdf_ipa_wdi_conn_pipes(pipe_in, &pipe_out);
|
||||
@@ -2208,7 +2244,8 @@ QDF_STATUS dp_ipa_setup_iface(char *ifname, uint8_t *mac_addr,
|
||||
|
||||
QDF_IPA_WDI_HDR_INFO_HDR(&hdr_info) = (uint8_t *)&uc_tx_hdr;
|
||||
QDF_IPA_WDI_HDR_INFO_HDR_LEN(&hdr_info) = DP_IPA_UC_WLAN_TX_HDR_LEN;
|
||||
QDF_IPA_WDI_HDR_INFO_HDR_TYPE(&hdr_info) = IPA_HDR_L2_ETHERNET_II;
|
||||
QDF_IPA_WDI_HDR_INFO_HDR_TYPE(&hdr_info) = WLAN_IPA_HDR_L2_ETHERNET;
|
||||
|
||||
QDF_IPA_WDI_HDR_INFO_DST_MAC_ADDR_OFFSET(&hdr_info) =
|
||||
DP_IPA_UC_WLAN_HDR_DES_MAC_OFFSET;
|
||||
|
||||
@@ -2217,7 +2254,7 @@ QDF_STATUS dp_ipa_setup_iface(char *ifname, uint8_t *mac_addr,
|
||||
&hdr_info, sizeof(qdf_ipa_wdi_hdr_info_t));
|
||||
QDF_IPA_WDI_REG_INTF_IN_PARAMS_ALT_DST_PIPE(&in) = cons_client;
|
||||
QDF_IPA_WDI_REG_INTF_IN_PARAMS_IS_META_DATA_VALID(&in) = 1;
|
||||
QDF_IPA_WDI_REG_INTF_IN_PARAMS_META_DATA_MASK(&in) = htonl(0x00FF0000);
|
||||
QDF_IPA_WDI_REG_INTF_IN_PARAMS_META_DATA_MASK(&in) = WLAN_IPA_META_DATA_MASK;
|
||||
QDF_IPA_WDI_REG_INTF_IN_PARAMS_HANDLE(&in) = hdl;
|
||||
dp_ipa_setup_iface_session_id(&in, session_id);
|
||||
|
||||
@@ -2965,4 +3002,39 @@ QDF_STATUS dp_ipa_tx_buf_smmu_unmapping(
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef IPA_WDS_EASYMESH_FEATURE
|
||||
QDF_STATUS dp_ipa_ast_create(struct cdp_soc_t *soc_hdl,
|
||||
qdf_ipa_ast_info_type_t *data)
|
||||
{
|
||||
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||
uint8_t *rx_tlv_hdr;
|
||||
struct dp_peer *peer;
|
||||
struct hal_rx_msdu_metadata msdu_metadata;
|
||||
qdf_ipa_ast_info_type_t *ast_info;
|
||||
|
||||
if (!data) {
|
||||
dp_err("Data is NULL !!!");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
ast_info = data;
|
||||
|
||||
rx_tlv_hdr = qdf_nbuf_data(ast_info->skb);
|
||||
peer = dp_peer_get_ref_by_id(soc, ast_info->ta_peer_id,
|
||||
DP_MOD_ID_IPA);
|
||||
if (!peer) {
|
||||
dp_err("Peer is NULL !!!!");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
hal_rx_msdu_metadata_get(soc->hal_soc, rx_tlv_hdr, &msdu_metadata);
|
||||
|
||||
dp_rx_ipa_wds_srcport_learn(soc, peer, ast_info->skb, msdu_metadata,
|
||||
ast_info->mac_addr_ad4_valid,
|
||||
ast_info->first_msdu_in_mpdu_flag);
|
||||
|
||||
dp_peer_unref_delete(peer, DP_MOD_ID_IPA);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Viittaa uudesa ongelmassa
Block a user