qcacmn: Add CDP interface for attach/detach of extended DP
Add APIs to be used by extended DP modules to attach/detach their respective handles with Core DP module. Change-Id: I63cf0883f7462a11b49666bda697c7e872d7b925
Цей коміт міститься в:

зафіксовано
snandini

джерело
52c506d034
коміт
d3478efb89
@@ -1240,4 +1240,80 @@ cdp_pdev_set_dp_txrx_handle(ol_txrx_soc_handle soc, void *pdev, void *dp_hdl)
|
||||
|
||||
soc->ops->cmn_drv_ops->set_dp_txrx_handle(pdev, dp_hdl);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_soc_get_dp_txrx_handle() - get extended dp handle from soc
|
||||
* @soc: opaque soc handle
|
||||
*
|
||||
* Return: opaque extended dp handle
|
||||
*/
|
||||
static inline void *
|
||||
cdp_soc_get_dp_txrx_handle(ol_txrx_soc_handle soc)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (soc->ops->cmn_drv_ops->get_soc_dp_txrx_handle)
|
||||
return soc->ops->cmn_drv_ops->get_soc_dp_txrx_handle(
|
||||
(struct cdp_soc *) soc);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_soc_set_dp_txrx_handle() - set advanced dp handle in soc
|
||||
* @soc: opaque soc handle
|
||||
* @dp_hdl: opaque pointer for dp_txrx_handle
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void
|
||||
cdp_soc_set_dp_txrx_handle(ol_txrx_soc_handle soc, void *dp_handle)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->cmn_drv_ops ||
|
||||
!soc->ops->cmn_drv_ops->set_soc_dp_txrx_handle)
|
||||
return;
|
||||
|
||||
soc->ops->cmn_drv_ops->set_soc_dp_txrx_handle((struct cdp_soc *)soc,
|
||||
dp_handle);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_tx_send() - enqueue frame for transmission
|
||||
* @soc: soc opaque handle
|
||||
* @vdev: VAP device
|
||||
* @nbuf: nbuf to be enqueued
|
||||
*
|
||||
* This API is used by Extended Datapath modules to enqueue frame for
|
||||
* transmission
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void
|
||||
cdp_tx_send(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, qdf_nbuf_t nbuf)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance:", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->cmn_drv_ops ||
|
||||
!soc->ops->cmn_drv_ops->tx_send)
|
||||
return;
|
||||
|
||||
soc->ops->cmn_drv_ops->tx_send(vdev, nbuf);
|
||||
}
|
||||
#endif /* _CDP_TXRX_CMN_H_ */
|
||||
|
@@ -257,7 +257,14 @@ struct cdp_cmn_ops {
|
||||
struct cdp_config_params *params);
|
||||
|
||||
void *(*get_dp_txrx_handle)(struct cdp_pdev *pdev_hdl);
|
||||
void (*set_dp_txrx_handle)(struct cdp_pdev *pdev_hdl, void *dp_txrx_hdl);
|
||||
void (*set_dp_txrx_handle)(struct cdp_pdev *pdev_hdl,
|
||||
void *dp_txrx_hdl);
|
||||
|
||||
void *(*get_soc_dp_txrx_handle)(struct cdp_soc *soc_handle);
|
||||
void (*set_soc_dp_txrx_handle)(struct cdp_soc *soc_handle,
|
||||
void *dp_txrx_handle);
|
||||
|
||||
ol_txrx_tx_fp tx_send;
|
||||
};
|
||||
|
||||
struct cdp_ctrl_ops {
|
||||
|
@@ -6255,6 +6255,34 @@ dp_pdev_set_dp_txrx_handle(struct cdp_pdev *pdev_hdl, void *dp_txrx_hdl)
|
||||
pdev->dp_txrx_handle = dp_txrx_hdl;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_soc_get_dp_txrx_handle() - get context for external-dp from dp soc
|
||||
* @soc_handle: datapath soc handle
|
||||
*
|
||||
* Return: opaque pointer to external dp (non-core DP)
|
||||
*/
|
||||
static void *dp_soc_get_dp_txrx_handle(struct cdp_soc *soc_handle)
|
||||
{
|
||||
struct dp_soc *soc = (struct dp_soc *)soc_handle;
|
||||
|
||||
return soc->external_txrx_handle;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_soc_set_dp_txrx_handle() - set external dp handle in soc
|
||||
* @soc_handle: datapath soc handle
|
||||
* @txrx_handle: opaque pointer to external dp (non-core DP)
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void
|
||||
dp_soc_set_dp_txrx_handle(struct cdp_soc *soc_handle, void *txrx_handle)
|
||||
{
|
||||
struct dp_soc *soc = (struct dp_soc *)soc_handle;
|
||||
|
||||
soc->external_txrx_handle = txrx_handle;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WIN
|
||||
static void dp_peer_teardown_wifi3(struct cdp_vdev *vdev_hdl, void *peer_hdl)
|
||||
{
|
||||
@@ -6320,6 +6348,9 @@ static struct cdp_cmn_ops dp_ops_cmn = {
|
||||
.txrx_data_tx_cb_set = dp_txrx_data_tx_cb_set,
|
||||
.get_dp_txrx_handle = dp_pdev_get_dp_txrx_handle,
|
||||
.set_dp_txrx_handle = dp_pdev_set_dp_txrx_handle,
|
||||
.get_soc_dp_txrx_handle = dp_soc_get_dp_txrx_handle,
|
||||
.set_soc_dp_txrx_handle = dp_soc_set_dp_txrx_handle,
|
||||
.tx_send = dp_tx_send,
|
||||
};
|
||||
|
||||
static struct cdp_ctrl_ops dp_ops_ctrl = {
|
||||
|
@@ -132,7 +132,9 @@ static inline bool dp_rx_mcast_echo_check(struct dp_soc *soc,
|
||||
qdf_spin_unlock_bh(&soc->ast_lock);
|
||||
QDF_TRACE(QDF_MODULE_ID_DP,
|
||||
QDF_TRACE_LEVEL_INFO,
|
||||
"Detected DBDC Root AP");
|
||||
"Detected DBDC Root AP %pM, %d %d",
|
||||
&data[DP_MAC_ADDR_LEN], vdev->pdev->pdev_id,
|
||||
ase->pdev_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -553,7 +555,8 @@ dp_rx_null_q_desc_handle(struct dp_soc *soc,
|
||||
}
|
||||
|
||||
/* WDS Source Port Learning */
|
||||
if (qdf_likely(vdev->rx_decap_type == htt_cmn_pkt_type_ethernet))
|
||||
if (qdf_likely(vdev->rx_decap_type == htt_cmn_pkt_type_ethernet &&
|
||||
vdev->wds_enabled))
|
||||
dp_rx_wds_srcport_learn(soc, rx_tlv_hdr, peer, nbuf);
|
||||
|
||||
if (hal_rx_mpdu_start_mpdu_qos_control_valid_get(rx_tlv_hdr)) {
|
||||
|
@@ -2346,6 +2346,9 @@ void dp_tx_mec_handler(struct dp_vdev *vdev, uint8_t *status)
|
||||
struct dp_peer *peer;
|
||||
uint8_t mac_addr[DP_MAC_ADDR_LEN], i;
|
||||
|
||||
if (!vdev->wds_enabled)
|
||||
return;
|
||||
|
||||
soc = vdev->pdev->soc;
|
||||
qdf_spin_lock_bh(&soc->peer_ref_mutex);
|
||||
peer = TAILQ_FIRST(&vdev->peer_list);
|
||||
|
@@ -834,6 +834,7 @@ struct dp_soc {
|
||||
/* htt stats */
|
||||
struct htt_t2h_stats htt_stats;
|
||||
|
||||
void *external_txrx_handle; /* External data path handle */
|
||||
#ifdef IPA_OFFLOAD
|
||||
/* IPA uC datapath offload Wlan Tx resources */
|
||||
struct {
|
||||
|
Посилання в новій задачі
Заблокувати користувача