qcacmn: Add support for radio-based packet steering
packets received on a particular radio are queued to a user configured reo destination ring. Change-Id: I080090f22b80fd8d8868df4145b82888e1111cea CRs-Fixed: 2017081
This commit is contained in:

committed by
Sandeep Puligilla

parent
61824944ab
commit
fd1edcc084
@@ -151,6 +151,15 @@ enum htt_cmn_pkt_type {
|
||||
htt_cmn_pkt_num_types
|
||||
};
|
||||
|
||||
|
||||
enum cdp_host_reo_dest_ring {
|
||||
cdp_host_reo_dest_ring_unknown = 0,
|
||||
cdp_host_reo_dest_ring_1 = 1,
|
||||
cdp_host_reo_dest_ring_2 = 2,
|
||||
cdp_host_reo_dest_ring_3 = 3,
|
||||
cdp_host_reo_dest_ring_4 = 4,
|
||||
};
|
||||
|
||||
enum htt_cmn_t2h_en_stats_type {
|
||||
/* keep this alwyas first */
|
||||
HTT_CMN_T2H_EN_STATS_TYPE_START = 0,
|
||||
|
@@ -154,6 +154,41 @@ cdp_get_vdev_rx_decap_type(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief set the Reo Destination ring for the pdev
|
||||
* @details
|
||||
* This will be used to configure the Reo Destination ring for this pdev.
|
||||
*
|
||||
* @param soc - pointer to the soc
|
||||
* @param pdev - the data physical device object
|
||||
* @param val - the Reo destination ring index (1 to 4)
|
||||
* @return - void
|
||||
*/
|
||||
static inline void
|
||||
cdp_set_pdev_reo_dest(ol_txrx_soc_handle soc,
|
||||
struct cdp_pdev *pdev, enum cdp_host_reo_dest_ring val)
|
||||
{
|
||||
if (soc->ops->ctrl_ops->txrx_set_pdev_reo_dest)
|
||||
return soc->ops->ctrl_ops->txrx_set_pdev_reo_dest
|
||||
(pdev, val);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get the Reo Destination ring for the pdev
|
||||
*
|
||||
* @param soc - pointer to the soc
|
||||
* @param pdev - the data physical device object
|
||||
* @return - the Reo destination ring index (1 to 4), 0 if not supported.
|
||||
*/
|
||||
static inline enum cdp_host_reo_dest_ring
|
||||
cdp_get_pdev_reo_dest(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
|
||||
{
|
||||
if (soc->ops->ctrl_ops->txrx_get_pdev_reo_dest)
|
||||
return soc->ops->ctrl_ops->txrx_get_pdev_reo_dest(pdev);
|
||||
return cdp_host_reo_dest_ring_unknown;
|
||||
}
|
||||
|
||||
/* Is this similar to ol_txrx_peer_state_update() in MCL */
|
||||
/**
|
||||
* @brief Update the authorize peer object at association time
|
||||
|
@@ -365,6 +365,30 @@ struct cdp_ctrl_ops {
|
||||
enum cdp_vdev_param_type param, uint32_t val);
|
||||
|
||||
void (*txrx_peer_set_nawds)(void *peer, uint8_t value);
|
||||
/**
|
||||
* @brief Set the reo dest ring num of the radio
|
||||
* @details
|
||||
* Set the reo destination ring no on which we will receive
|
||||
* pkts for this radio.
|
||||
*
|
||||
* @param pdev - the data physical device object
|
||||
* @param reo_dest_ring_num - value ranges between 1 - 4
|
||||
*/
|
||||
void (*txrx_set_pdev_reo_dest)(
|
||||
struct cdp_pdev *pdev,
|
||||
enum cdp_host_reo_dest_ring reo_dest_ring_num);
|
||||
|
||||
/**
|
||||
* @brief Get the reo dest ring num of the radio
|
||||
* @details
|
||||
* Get the reo destination ring no on which we will receive
|
||||
* pkts for this radio.
|
||||
*
|
||||
* @param pdev - the data physical device object
|
||||
* @return the reo destination ring number
|
||||
*/
|
||||
enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)(
|
||||
struct cdp_pdev *pdev);
|
||||
};
|
||||
|
||||
struct cdp_me_ops {
|
||||
|
@@ -474,6 +474,7 @@ typedef enum _ol_ath_param_t {
|
||||
OL_ATH_PARAM_PRECAC_TIMEOUT = 346,
|
||||
OL_ATH_COEX_VER_CFG = 347,
|
||||
OL_ATH_PARAM_DUMP_TARGET = 348,
|
||||
OL_ATH_PARAM_PDEV_TO_REO_DEST = 349,
|
||||
} ol_ath_param_t;
|
||||
|
||||
/*
|
||||
|
@@ -1245,6 +1245,8 @@ static struct cdp_pdev *dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc,
|
||||
goto fail0;
|
||||
}
|
||||
|
||||
/* set the reo destination to 1 during initialization */
|
||||
pdev->reo_dest = 1;
|
||||
return (struct cdp_pdev *)pdev;
|
||||
|
||||
fail1:
|
||||
@@ -1815,6 +1817,7 @@ static void dp_peer_setup_wifi3(struct cdp_vdev *vdev_hdl, void *peer_hdl)
|
||||
struct dp_pdev *pdev;
|
||||
struct dp_soc *soc;
|
||||
bool hash_based = 0;
|
||||
enum cdp_host_reo_dest_ring reo_dest;
|
||||
|
||||
/* preconditions */
|
||||
qdf_assert(vdev);
|
||||
@@ -1833,11 +1836,16 @@ static void dp_peer_setup_wifi3(struct cdp_vdev *vdev_hdl, void *peer_hdl)
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("hash based steering %d\n"), hash_based);
|
||||
|
||||
if (!hash_based)
|
||||
reo_dest = pdev->reo_dest;
|
||||
else
|
||||
reo_dest = 1;
|
||||
|
||||
if (soc->cdp_soc.ol_ops->peer_set_default_routing) {
|
||||
/* TODO: Check the destination ring number to be passed to FW */
|
||||
soc->cdp_soc.ol_ops->peer_set_default_routing(
|
||||
pdev->osif_pdev, peer->mac_addr.raw,
|
||||
peer->vdev->vdev_id, hash_based, 1);
|
||||
peer->vdev->vdev_id, hash_based, reo_dest);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1870,6 +1878,39 @@ static void dp_set_vdev_rx_decap_type(struct cdp_vdev *vdev_handle,
|
||||
vdev->rx_decap_type = val;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_set_pdev_reo_dest() - set the reo destination ring for this pdev
|
||||
* @pdev_handle: physical device object
|
||||
* @val: reo destination ring index (1 - 4)
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void dp_set_pdev_reo_dest(struct cdp_pdev *pdev_handle,
|
||||
enum cdp_host_reo_dest_ring val)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
|
||||
if (pdev)
|
||||
pdev->reo_dest = val;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_get_pdev_reo_dest() - get the reo destination for this pdev
|
||||
* @pdev_handle: physical device object
|
||||
*
|
||||
* Return: reo destination ring index
|
||||
*/
|
||||
static enum cdp_host_reo_dest_ring
|
||||
dp_get_pdev_reo_dest(struct cdp_pdev *pdev_handle)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
|
||||
if (pdev)
|
||||
return pdev->reo_dest;
|
||||
else
|
||||
return cdp_host_reo_dest_ring_unknown;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_peer_authorize() - authorize txrx peer
|
||||
* @peer_handle: Datapath peer handle
|
||||
@@ -3308,6 +3349,8 @@ static struct cdp_ctrl_ops dp_ops_ctrl = {
|
||||
#endif
|
||||
.txrx_set_vdev_param = dp_set_vdev_param,
|
||||
.txrx_peer_set_nawds = dp_peer_set_nawds,
|
||||
.txrx_set_pdev_reo_dest = dp_set_pdev_reo_dest,
|
||||
.txrx_get_pdev_reo_dest = dp_get_pdev_reo_dest,
|
||||
/* TODO: Add other functions */
|
||||
};
|
||||
|
||||
|
@@ -783,6 +783,9 @@ struct dp_pdev {
|
||||
struct cdp_mon_status rx_mon_recv_status;
|
||||
|
||||
/* TBD */
|
||||
|
||||
/* map this pdev to a particular Reo Destination ring */
|
||||
enum cdp_host_reo_dest_ring reo_dest;
|
||||
};
|
||||
|
||||
struct dp_peer;
|
||||
|
Reference in New Issue
Block a user