qcacmn: Componentize extender AP

Remove dependency of extender ap on VAP layer and radio(ic) layer data
structure

Change-Id: Ib336f518847abd1b29f5ea3cfd1a508dc2cd14e8
CRs-Fixed: 2148247
This commit is contained in:
Santosh Anbu
2018-01-03 22:25:53 +05:30
committed by snandini
parent 6a5c6a4c2f
commit 2280e86440
4 changed files with 85 additions and 1 deletions

View File

@@ -1060,4 +1060,52 @@ QDF_STATUS cdp_update_config_parameters(ol_txrx_soc_handle soc,
return soc->ops->cmn_drv_ops->update_config_parameters(psoc,
cfg);
}
/**
* cdp_pdev_get_dp_txrx_handle() - get advanced dp handle from pdev
* @soc: opaque soc handle
* @pdev: data path pdev handle
*
* Return: opaque dp handle
*/
static inline void *
cdp_pdev_get_dp_txrx_handle(ol_txrx_soc_handle soc, void *pdev)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
"%s: Invalid Instance:", __func__);
QDF_BUG(0);
return 0;
}
if (soc->ops->cmn_drv_ops->get_dp_txrx_handle)
return soc->ops->cmn_drv_ops->get_dp_txrx_handle(pdev);
return 0;
}
/**
* cdp_pdev_set_dp_txrx_handle() - set advanced dp handle in pdev
* @soc: opaque soc handle
* @pdev: data path pdev handle
* @dp_hdl: opaque pointer for dp_txrx_handle
*
* Return: void
*/
static inline void
cdp_pdev_set_dp_txrx_handle(ol_txrx_soc_handle soc, void *pdev, void *dp_hdl)
{
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_dp_txrx_handle)
return;
soc->ops->cmn_drv_ops->set_dp_txrx_handle(pdev, dp_hdl);
}
#endif /* _CDP_TXRX_CMN_H_ */

View File

@@ -228,6 +228,9 @@ struct cdp_cmn_ops {
uint32_t *rx_pn);
QDF_STATUS (*update_config_parameters)(struct cdp_soc *psoc,
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);
};
struct cdp_ctrl_ops {

View File

@@ -2541,6 +2541,7 @@ static void dp_pdev_detach_wifi3(struct cdp_pdev *txrx_pdev, int force)
soc->pdev_list[pdev->pdev_id] = NULL;
soc->pdev_count--;
wlan_cfg_pdev_detach(pdev->wlan_cfg_ctx);
qdf_mem_free(pdev->dp_txrx_handle);
qdf_mem_free(pdev);
}
@@ -5872,6 +5873,34 @@ dp_txrx_data_tx_cb_set(struct cdp_vdev *vdev_handle,
vdev->tx_non_std_data_callback.ctxt = ctxt;
}
/**
* dp_pdev_get_dp_txrx_handle() - get dp handle from pdev
* @pdev_hdl: datapath pdev handle
*
* Return: opaque pointer to dp txrx handle
*/
static void *dp_pdev_get_dp_txrx_handle(struct cdp_pdev *pdev_hdl)
{
struct dp_pdev *pdev = (struct dp_pdev *)pdev_hdl;
return pdev->dp_txrx_handle;
}
/**
* dp_pdev_set_dp_txrx_handle() - set dp handle in pdev
* @pdev_hdl: datapath pdev handle
* @dp_txrx_hdl: opaque pointer for dp_txrx_handle
*
* Return: void
*/
static void
dp_pdev_set_dp_txrx_handle(struct cdp_pdev *pdev_hdl, void *dp_txrx_hdl)
{
struct dp_pdev *pdev = (struct dp_pdev *)pdev_hdl;
pdev->dp_txrx_handle = dp_txrx_hdl;
}
#ifdef CONFIG_WIN
static void dp_peer_teardown_wifi3(struct cdp_vdev *vdev_hdl, void *peer_hdl)
{
@@ -5926,7 +5955,9 @@ static struct cdp_cmn_ops dp_ops_cmn = {
.set_pn_check = dp_set_pn_check_wifi3,
.update_config_parameters = dp_update_config_parameters,
/* TODO: Add other functions */
.txrx_data_tx_cb_set = dp_txrx_data_tx_cb_set
.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,
};
static struct cdp_ctrl_ops dp_ops_ctrl = {

View File

@@ -1103,6 +1103,8 @@ struct dp_pdev {
uint16_t tx_peer_id;
uint16_t rx_ppdu_id;
} am_copy_id;
void *dp_txrx_handle; /* Advanced data path handle */
};
struct dp_peer;