qcacmn: Get ast_idx from dp peer structure
Get the ast_idx from dp peer structure to set search index in HW tx descriptor Change-Id: Icc7e70d8bb739348403663a1fe647849c57d277a CRs-Fixed: 3346449
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f1acd4d6d6
commit
a2625b18ab
@@ -945,6 +945,40 @@ int dp_ppeds_tx_comp_handler(struct dp_soc_be *be_soc, uint32_t quota)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(QCA_SUPPORT_WDS_EXTENDED)
|
||||||
|
static inline void
|
||||||
|
dp_get_peer_from_tx_exc_meta(struct dp_soc *soc, uint32_t *hal_tx_desc_cached,
|
||||||
|
struct cdp_tx_exception_metadata *tx_exc_metadata,
|
||||||
|
uint16_t *ast_idx, uint16_t *ast_hash)
|
||||||
|
{
|
||||||
|
struct dp_peer *peer = NULL;
|
||||||
|
|
||||||
|
if (tx_exc_metadata->is_wds_extended) {
|
||||||
|
peer = dp_peer_get_ref_by_id(soc, tx_exc_metadata->peer_id,
|
||||||
|
DP_MOD_ID_TX);
|
||||||
|
if (peer) {
|
||||||
|
*ast_idx = peer->ast_idx;
|
||||||
|
*ast_hash = peer->ast_hash;
|
||||||
|
hal_tx_desc_set_index_lookup_override
|
||||||
|
(soc->hal_soc,
|
||||||
|
hal_tx_desc_cached,
|
||||||
|
0x1);
|
||||||
|
dp_peer_unref_delete(peer, DP_MOD_ID_TX);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
static inline void
|
||||||
|
dp_get_peer_from_tx_exc_meta(struct dp_soc *soc, uint32_t *hal_tx_desc_cached,
|
||||||
|
struct cdp_tx_exception_metadata *tx_exc_metadata,
|
||||||
|
uint16_t *ast_idx, uint16_t *ast_hash)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
dp_tx_hw_enqueue_be(struct dp_soc *soc, struct dp_vdev *vdev,
|
dp_tx_hw_enqueue_be(struct dp_soc *soc, struct dp_vdev *vdev,
|
||||||
struct dp_tx_desc_s *tx_desc, uint16_t fw_metadata,
|
struct dp_tx_desc_s *tx_desc, uint16_t fw_metadata,
|
||||||
@@ -963,6 +997,8 @@ dp_tx_hw_enqueue_be(struct dp_soc *soc, struct dp_vdev *vdev,
|
|||||||
hal_ring_handle_t hal_ring_hdl = NULL;
|
hal_ring_handle_t hal_ring_hdl = NULL;
|
||||||
QDF_STATUS status = QDF_STATUS_E_RESOURCES;
|
QDF_STATUS status = QDF_STATUS_E_RESOURCES;
|
||||||
uint8_t num_desc_bytes = HAL_TX_DESC_LEN_BYTES;
|
uint8_t num_desc_bytes = HAL_TX_DESC_LEN_BYTES;
|
||||||
|
uint16_t ast_idx = vdev->bss_ast_idx;
|
||||||
|
uint16_t ast_hash = vdev->bss_ast_hash;
|
||||||
|
|
||||||
be_vdev = dp_get_be_vdev_from_dp_vdev(vdev);
|
be_vdev = dp_get_be_vdev_from_dp_vdev(vdev);
|
||||||
|
|
||||||
@@ -982,6 +1018,9 @@ dp_tx_hw_enqueue_be(struct dp_soc *soc, struct dp_vdev *vdev,
|
|||||||
CDP_INVALID_SEC_TYPE) ||
|
CDP_INVALID_SEC_TYPE) ||
|
||||||
tx_exc_metadata->sec_type ==
|
tx_exc_metadata->sec_type ==
|
||||||
vdev->sec_type);
|
vdev->sec_type);
|
||||||
|
dp_get_peer_from_tx_exc_meta(soc, (void *)cached_desc,
|
||||||
|
tx_exc_metadata,
|
||||||
|
&ast_idx, &ast_hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
hal_tx_desc_cached = (void *)cached_desc;
|
hal_tx_desc_cached = (void *)cached_desc;
|
||||||
@@ -999,14 +1038,14 @@ dp_tx_hw_enqueue_be(struct dp_soc *soc, struct dp_vdev *vdev,
|
|||||||
vdev->lmac_id);
|
vdev->lmac_id);
|
||||||
|
|
||||||
hal_tx_desc_set_search_index_be(soc->hal_soc, hal_tx_desc_cached,
|
hal_tx_desc_set_search_index_be(soc->hal_soc, hal_tx_desc_cached,
|
||||||
vdev->bss_ast_idx);
|
ast_idx);
|
||||||
/*
|
/*
|
||||||
* Bank_ID is used as DSCP_TABLE number in beryllium
|
* Bank_ID is used as DSCP_TABLE number in beryllium
|
||||||
* So there is no explicit field used for DSCP_TID_TABLE_NUM.
|
* So there is no explicit field used for DSCP_TID_TABLE_NUM.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
hal_tx_desc_set_cache_set_num(soc->hal_soc, hal_tx_desc_cached,
|
hal_tx_desc_set_cache_set_num(soc->hal_soc, hal_tx_desc_cached,
|
||||||
(vdev->bss_ast_hash & 0xF));
|
(ast_hash & 0xF));
|
||||||
|
|
||||||
hal_tx_desc_set_fw_metadata(hal_tx_desc_cached, fw_metadata);
|
hal_tx_desc_set_fw_metadata(hal_tx_desc_cached, fw_metadata);
|
||||||
hal_tx_desc_set_buf_length(hal_tx_desc_cached, tx_desc->length);
|
hal_tx_desc_set_buf_length(hal_tx_desc_cached, tx_desc->length);
|
||||||
|
@@ -16924,6 +16924,7 @@ static void dp_soc_cfg_init(struct dp_soc *soc)
|
|||||||
wlan_cfg_set_txmon_hw_support(soc->wlan_cfg_ctx, true);
|
wlan_cfg_set_txmon_hw_support(soc->wlan_cfg_ctx, true);
|
||||||
soc->host_ast_db_enable = cfg_get(soc->ctrl_psoc,
|
soc->host_ast_db_enable = cfg_get(soc->ctrl_psoc,
|
||||||
CFG_DP_HOST_AST_DB_ENABLE);
|
CFG_DP_HOST_AST_DB_ENABLE);
|
||||||
|
soc->features.wds_ext_ast_override_enable = true;
|
||||||
break;
|
break;
|
||||||
case TARGET_TYPE_QCA5332:
|
case TARGET_TYPE_QCA5332:
|
||||||
soc->ast_override_support = 1;
|
soc->ast_override_support = 1;
|
||||||
@@ -16939,6 +16940,7 @@ static void dp_soc_cfg_init(struct dp_soc *soc)
|
|||||||
wlan_cfg_set_txmon_hw_support(soc->wlan_cfg_ctx, true);
|
wlan_cfg_set_txmon_hw_support(soc->wlan_cfg_ctx, true);
|
||||||
soc->host_ast_db_enable = cfg_get(soc->ctrl_psoc,
|
soc->host_ast_db_enable = cfg_get(soc->ctrl_psoc,
|
||||||
CFG_DP_HOST_AST_DB_ENABLE);
|
CFG_DP_HOST_AST_DB_ENABLE);
|
||||||
|
soc->features.wds_ext_ast_override_enable = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qdf_print("%s: Unknown tgt type %d\n", __func__, target_type);
|
qdf_print("%s: Unknown tgt type %d\n", __func__, target_type);
|
||||||
|
@@ -1110,6 +1110,26 @@ dp_tx_send_msdu_single_wrapper(struct dp_vdev *vdev, qdf_nbuf_t nbuf,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(QCA_SUPPORT_WDS_EXTENDED)
|
||||||
|
static bool
|
||||||
|
dp_tx_is_wds_ast_override_en(struct dp_soc *soc,
|
||||||
|
struct cdp_tx_exception_metadata *tx_exc_metadata)
|
||||||
|
{
|
||||||
|
if (soc->features.wds_ext_ast_override_enable &&
|
||||||
|
tx_exc_metadata && tx_exc_metadata->is_wds_extended)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static bool
|
||||||
|
dp_tx_is_wds_ast_override_en(struct dp_soc *soc,
|
||||||
|
struct cdp_tx_exception_metadata *tx_exc_metadata)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_tx_desc_prepare_single - Allocate and prepare Tx descriptor
|
* dp_tx_desc_prepare_single - Allocate and prepare Tx descriptor
|
||||||
* @vdev: DP vdev handle
|
* @vdev: DP vdev handle
|
||||||
@@ -1172,6 +1192,13 @@ struct dp_tx_desc_s *dp_tx_prepare_desc_single(struct dp_vdev *vdev,
|
|||||||
/* Packets marked by upper layer (OS-IF) to be sent to FW */
|
/* Packets marked by upper layer (OS-IF) to be sent to FW */
|
||||||
if (dp_tx_is_nbuf_marked_exception(soc, nbuf))
|
if (dp_tx_is_nbuf_marked_exception(soc, nbuf))
|
||||||
is_exception = 1;
|
is_exception = 1;
|
||||||
|
|
||||||
|
/* for BE chipsets if wds extension was enbled will not mark FW
|
||||||
|
* in desc will mark ast index based search for ast index.
|
||||||
|
*/
|
||||||
|
if (dp_tx_is_wds_ast_override_en(soc, tx_exc_metadata))
|
||||||
|
return tx_desc;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For special modes (vdev_type == ocb or mesh), data frames should be
|
* For special modes (vdev_type == ocb or mesh), data frames should be
|
||||||
* transmitted using varying transmit parameters (tx spec) which include
|
* transmitted using varying transmit parameters (tx spec) which include
|
||||||
|
@@ -2059,6 +2059,7 @@ struct dp_soc_features {
|
|||||||
dmac_cmn_src_rxbuf_ring_enabled:1;
|
dmac_cmn_src_rxbuf_ring_enabled:1;
|
||||||
bool rssi_dbm_conv_support;
|
bool rssi_dbm_conv_support;
|
||||||
bool umac_hw_reset_support;
|
bool umac_hw_reset_support;
|
||||||
|
bool wds_ext_ast_override_enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum sysfs_printing_mode {
|
enum sysfs_printing_mode {
|
||||||
|
@@ -487,6 +487,21 @@ hal_tx_desc_set_cache_set_num(hal_soc_handle_t hal_soc_hdl, void *desc,
|
|||||||
HAL_TX_SM(TCL_DATA_CMD, CACHE_SET_NUM, cache_num);
|
HAL_TX_SM(TCL_DATA_CMD, CACHE_SET_NUM, cache_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_tx_desc_set_lookup_override_num - set lookup override num
|
||||||
|
* to the descriptor to Hardware
|
||||||
|
* @hal_soc_hdl: hal soc handle
|
||||||
|
* @hal_tx_des_cached: Cached descriptor that software maintains
|
||||||
|
* @cache_num: set numbernumber
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
hal_tx_desc_set_index_lookup_override(hal_soc_handle_t hal_soc_hdl,
|
||||||
|
void *desc, uint8_t num)
|
||||||
|
{
|
||||||
|
HAL_SET_FLD(desc, TCL_DATA_CMD, INDEX_LOOKUP_OVERRIDE) |=
|
||||||
|
HAL_TX_SM(TCL_DATA_CMD, INDEX_LOOKUP_OVERRIDE, num);
|
||||||
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
* WBM Descriptor accessor APIs for Tx completions
|
* WBM Descriptor accessor APIs for Tx completions
|
||||||
* ---------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user