qcacmn: Modify set 1 of ctrl_ops to acheive umac-dp decoupling
Change set 1 of the ctrl_ops APIs to replace pdev, vdev and peer dp handles with pdev_id, vdev_id and peer mac address along with dp soc handle Change-Id: Iedf6dea2215d3d04b2212c71c8ec8c7328c559e8
This commit is contained in:

committed by
nshrivas

parent
7e8f67cfca
commit
6c83405439
@@ -1778,24 +1778,25 @@ static inline int cdp_set_pn_check(ol_txrx_soc_handle soc,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int cdp_set_key(ol_txrx_soc_handle soc,
|
static inline QDF_STATUS
|
||||||
struct cdp_peer *peer_handle,
|
cdp_set_key(ol_txrx_soc_handle soc,
|
||||||
bool is_unicast, uint32_t *key)
|
uint8_t vdev_id,
|
||||||
|
uint8_t *mac,
|
||||||
|
bool is_unicast, uint32_t *key)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s: Invalid Instance:", __func__);
|
"%s: Invalid Instance:", __func__);
|
||||||
QDF_BUG(0);
|
QDF_BUG(0);
|
||||||
return 0;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!soc->ops->ctrl_ops ||
|
if (!soc->ops->ctrl_ops ||
|
||||||
!soc->ops->ctrl_ops->set_key)
|
!soc->ops->ctrl_ops->set_key)
|
||||||
return 0;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
soc->ops->ctrl_ops->set_key(peer_handle,
|
return soc->ops->ctrl_ops->set_key(soc, vdev_id, mac,
|
||||||
is_unicast, key);
|
is_unicast, key);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -685,11 +685,12 @@ typedef qdf_nbuf_t (*ol_txrx_tx_fp)(struct cdp_soc_t *soc, uint8_t vdev_id,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* ol_txrx_tx_exc_fp - top-level transmit function on exception path
|
* ol_txrx_tx_exc_fp - top-level transmit function on exception path
|
||||||
* @data_vdev - handle to the virtual device object
|
* @soc - dp soc handle
|
||||||
|
* @vdev_id - handle to the virtual device object
|
||||||
* @msdu_list - list of network buffers
|
* @msdu_list - list of network buffers
|
||||||
* @tx_exc_metadata - structure that holds parameters to exception path
|
* @tx_exc_metadata - structure that holds parameters to exception path
|
||||||
*/
|
*/
|
||||||
typedef qdf_nbuf_t (*ol_txrx_tx_exc_fp)(struct cdp_vdev *data_vdev,
|
typedef qdf_nbuf_t (*ol_txrx_tx_exc_fp)(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||||
qdf_nbuf_t msdu_list,
|
qdf_nbuf_t msdu_list,
|
||||||
struct cdp_tx_exception_metadata
|
struct cdp_tx_exception_metadata
|
||||||
*tx_exc_metadata);
|
*tx_exc_metadata);
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include "cdp_txrx_ops.h"
|
#include "cdp_txrx_ops.h"
|
||||||
|
|
||||||
static inline int cdp_is_target_ar900b
|
static inline int cdp_is_target_ar900b
|
||||||
(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
(ol_txrx_soc_handle soc)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
@@ -43,7 +43,7 @@ static inline int cdp_is_target_ar900b
|
|||||||
!soc->ops->ctrl_ops->txrx_is_target_ar900b)
|
!soc->ops->ctrl_ops->txrx_is_target_ar900b)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_is_target_ar900b(vdev);
|
return soc->ops->ctrl_ops->txrx_is_target_ar900b(soc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -101,14 +101,14 @@ cdp_set_filter_neighbour_peers(ol_txrx_soc_handle soc,
|
|||||||
* which needs to be filtered
|
* which needs to be filtered
|
||||||
*
|
*
|
||||||
* @param soc - the pointer to soc object
|
* @param soc - the pointer to soc object
|
||||||
* @param vdev - the pointer to vdev
|
* @param vdev_id - id of the pointer to vdev
|
||||||
* @param cmd - add/del entry into peer table
|
* @param cmd - add/del entry into peer table
|
||||||
* @param macaddr - the address of neighbour peer
|
* @param macaddr - the address of neighbour peer
|
||||||
* @return - int
|
* @return - int
|
||||||
*/
|
*/
|
||||||
static inline int
|
static inline int
|
||||||
cdp_update_filter_neighbour_peers(ol_txrx_soc_handle soc,
|
cdp_update_filter_neighbour_peers(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, uint32_t cmd, uint8_t *macaddr)
|
uint8_t vdev_id, uint32_t cmd, uint8_t *macaddr)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
@@ -122,7 +122,7 @@ cdp_update_filter_neighbour_peers(ol_txrx_soc_handle soc,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_update_filter_neighbour_peers
|
return soc->ops->ctrl_ops->txrx_update_filter_neighbour_peers
|
||||||
(vdev, cmd, macaddr);
|
(soc, vdev_id, cmd, macaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -268,38 +268,38 @@ cdp_get_vdev_rx_decap_type(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
|||||||
* This will be used to configure the Reo Destination ring for this pdev.
|
* This will be used to configure the Reo Destination ring for this pdev.
|
||||||
*
|
*
|
||||||
* @param soc - pointer to the soc
|
* @param soc - pointer to the soc
|
||||||
* @param pdev - the data physical device object
|
* @param pdev_id - id of the data physical device object
|
||||||
* @param val - the Reo destination ring index (1 to 4)
|
* @param val - the Reo destination ring index (1 to 4)
|
||||||
* @return - void
|
* @return - QDF_STATUS
|
||||||
*/
|
*/
|
||||||
static inline void
|
static inline QDF_STATUS
|
||||||
cdp_set_pdev_reo_dest(ol_txrx_soc_handle soc,
|
cdp_set_pdev_reo_dest(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev, enum cdp_host_reo_dest_ring val)
|
uint8_t pdev_id, enum cdp_host_reo_dest_ring val)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s: Invalid Instance:", __func__);
|
"%s: Invalid Instance:", __func__);
|
||||||
QDF_BUG(0);
|
QDF_BUG(0);
|
||||||
return;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!soc->ops->ctrl_ops ||
|
if (!soc->ops->ctrl_ops ||
|
||||||
!soc->ops->ctrl_ops->txrx_set_pdev_reo_dest)
|
!soc->ops->ctrl_ops->txrx_set_pdev_reo_dest)
|
||||||
return;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
soc->ops->ctrl_ops->txrx_set_pdev_reo_dest
|
return soc->ops->ctrl_ops->txrx_set_pdev_reo_dest
|
||||||
(pdev, val);
|
(soc, pdev_id, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the Reo Destination ring for the pdev
|
* @brief get the Reo Destination ring for the pdev
|
||||||
*
|
*
|
||||||
* @param soc - pointer to the soc
|
* @param soc - pointer to the soc
|
||||||
* @param pdev - the data physical device object
|
* @param pdev_id - id of physical device object
|
||||||
* @return - the Reo destination ring index (1 to 4), 0 if not supported.
|
* @return - the Reo destination ring index (1 to 4), 0 if not supported.
|
||||||
*/
|
*/
|
||||||
static inline enum cdp_host_reo_dest_ring
|
static inline enum cdp_host_reo_dest_ring
|
||||||
cdp_get_pdev_reo_dest(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
|
cdp_get_pdev_reo_dest(ol_txrx_soc_handle soc, uint8_t pdev_id)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
@@ -312,7 +312,7 @@ cdp_get_pdev_reo_dest(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
|
|||||||
!soc->ops->ctrl_ops->txrx_get_pdev_reo_dest)
|
!soc->ops->ctrl_ops->txrx_get_pdev_reo_dest)
|
||||||
return cdp_host_reo_dest_ring_unknown;
|
return cdp_host_reo_dest_ring_unknown;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_get_pdev_reo_dest(pdev);
|
return soc->ops->ctrl_ops->txrx_get_pdev_reo_dest(soc, pdev_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is this similar to ol_txrx_peer_state_update() in MCL */
|
/* Is this similar to ol_txrx_peer_state_update() in MCL */
|
||||||
@@ -469,7 +469,7 @@ cdp_peer_set_nawds(ol_txrx_soc_handle soc,
|
|||||||
|
|
||||||
#ifdef QCA_MULTIPASS_SUPPORT
|
#ifdef QCA_MULTIPASS_SUPPORT
|
||||||
static inline void
|
static inline void
|
||||||
cdp_peer_set_vlan_id(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
cdp_peer_set_vlan_id(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
||||||
uint8_t *peer_mac, uint8_t vlan_id)
|
uint8_t *peer_mac, uint8_t vlan_id)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
@@ -483,7 +483,8 @@ cdp_peer_set_vlan_id(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
|||||||
!soc->ops->ctrl_ops->txrx_peer_set_vlan_id)
|
!soc->ops->ctrl_ops->txrx_peer_set_vlan_id)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
soc->ops->ctrl_ops->txrx_peer_set_vlan_id(soc, vdev, peer_mac, vlan_id);
|
soc->ops->ctrl_ops->txrx_peer_set_vlan_id(soc, vdev_id, peer_mac,
|
||||||
|
vlan_id);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -520,7 +521,7 @@ static inline QDF_STATUS cdp_txrx_set_pdev_param(ol_txrx_soc_handle soc,
|
|||||||
* cdp_enable_peer_based_pktlog()- Set flag in peer structure
|
* cdp_enable_peer_based_pktlog()- Set flag in peer structure
|
||||||
*
|
*
|
||||||
* @soc: pointer to the soc
|
* @soc: pointer to the soc
|
||||||
* @pdev: the data physical device object
|
* @pdev_id: id of the data physical device object
|
||||||
* @enable: enable or disable peer based filter based pktlog
|
* @enable: enable or disable peer based filter based pktlog
|
||||||
* @peer_macaddr: Mac address of peer which needs to be
|
* @peer_macaddr: Mac address of peer which needs to be
|
||||||
* filtered
|
* filtered
|
||||||
@@ -531,8 +532,8 @@ static inline QDF_STATUS cdp_txrx_set_pdev_param(ol_txrx_soc_handle soc,
|
|||||||
* Return: int
|
* Return: int
|
||||||
*/
|
*/
|
||||||
static inline int
|
static inline int
|
||||||
cdp_enable_peer_based_pktlog(ol_txrx_soc_handle soc,
|
cdp_enable_peer_based_pktlog(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
||||||
struct cdp_pdev *pdev, char *peer_macaddr,
|
char *peer_macaddr,
|
||||||
uint8_t enable)
|
uint8_t enable)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
@@ -547,37 +548,37 @@ cdp_enable_peer_based_pktlog(ol_txrx_soc_handle soc,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->enable_peer_based_pktlog
|
return soc->ops->ctrl_ops->enable_peer_based_pktlog
|
||||||
(pdev, peer_macaddr, enable);
|
(soc, pdev_id, peer_macaddr, enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cdp_calculate_delay_stats()- get rx delay stats
|
* cdp_calculate_delay_stats()- get rx delay stats
|
||||||
*
|
*
|
||||||
* @soc: pointer to the soc
|
* @soc: pointer to the soc
|
||||||
* @vdev: vdev handle
|
* @vdev_id: id of vdev handle
|
||||||
* @nbuf: nbuf which is passed
|
* @nbuf: nbuf which is passed
|
||||||
*
|
*
|
||||||
* This function will calculate rx delay statistics.
|
* This function will calculate rx delay statistics.
|
||||||
*/
|
*/
|
||||||
static inline void
|
static inline QDF_STATUS
|
||||||
cdp_calculate_delay_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
cdp_calculate_delay_stats(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
||||||
qdf_nbuf_t nbuf)
|
qdf_nbuf_t nbuf)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s: Invalid Instance:", __func__);
|
"%s: Invalid Instance:", __func__);
|
||||||
QDF_BUG(0);
|
QDF_BUG(0);
|
||||||
return;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!soc->ops->ctrl_ops ||
|
if (!soc->ops->ctrl_ops ||
|
||||||
!soc->ops->ctrl_ops->calculate_delay_stats) {
|
!soc->ops->ctrl_ops->calculate_delay_stats) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s: callback not registered:", __func__);
|
"%s: callback not registered:", __func__);
|
||||||
return;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->calculate_delay_stats(vdev, nbuf);
|
return soc->ops->ctrl_ops->calculate_delay_stats(soc, vdev_id, nbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -591,19 +592,19 @@ cdp_calculate_delay_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
|||||||
* invoked is unspecified.
|
* invoked is unspecified.
|
||||||
*
|
*
|
||||||
* @param soc - pointer to the soc
|
* @param soc - pointer to the soc
|
||||||
* @param pdev - the data physical device object
|
* @param pdev_id - id of the data physical device object
|
||||||
* @param event_cb_sub - the callback and context for the event subscriber
|
* @param event_cb_sub - the callback and context for the event subscriber
|
||||||
* @param event - which event's notifications are being subscribed to
|
* @param event - which event's notifications are being subscribed to
|
||||||
* @return - int
|
* @return - int
|
||||||
*/
|
*/
|
||||||
static inline int
|
static inline int
|
||||||
cdp_wdi_event_sub(ol_txrx_soc_handle soc,
|
cdp_wdi_event_sub(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
||||||
struct cdp_pdev *pdev, void *event_cb_sub, uint32_t event)
|
wdi_event_subscribe *event_cb_sub, uint32_t event)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
QDF_BUG(0);
|
QDF_BUG(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -613,7 +614,7 @@ cdp_wdi_event_sub(ol_txrx_soc_handle soc,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_wdi_event_sub
|
return soc->ops->ctrl_ops->txrx_wdi_event_sub
|
||||||
(pdev, event_cb_sub, event);
|
(soc, pdev_id, event_cb_sub, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -625,14 +626,15 @@ cdp_wdi_event_sub(ol_txrx_soc_handle soc,
|
|||||||
* to event_sub() on the same wdi_event_subscribe object.
|
* to event_sub() on the same wdi_event_subscribe object.
|
||||||
*
|
*
|
||||||
* @param soc - pointer to the soc
|
* @param soc - pointer to the soc
|
||||||
* @param pdev - the data physical device object
|
* @param pdev_id - id of the data physical device object
|
||||||
* @param event_cb_sub - the callback and context for the event subscriber
|
* @param event_cb_sub - the callback and context for the event subscriber
|
||||||
* @param event - which event's notifications are being subscribed to
|
* @param event - which event's notifications are being subscribed to
|
||||||
* @return - int
|
* @return - int
|
||||||
*/
|
*/
|
||||||
static inline int
|
static inline int
|
||||||
cdp_wdi_event_unsub(ol_txrx_soc_handle soc,
|
cdp_wdi_event_unsub(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev, void *event_cb_sub, uint32_t event)
|
uint8_t pdev_id, wdi_event_subscribe *event_cb_sub,
|
||||||
|
uint32_t event)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
@@ -647,7 +649,7 @@ cdp_wdi_event_unsub(ol_txrx_soc_handle soc,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_wdi_event_unsub
|
return soc->ops->ctrl_ops->txrx_wdi_event_unsub
|
||||||
(pdev, event_cb_sub, event);
|
(soc, pdev_id, event_cb_sub, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -658,16 +660,18 @@ cdp_wdi_event_unsub(ol_txrx_soc_handle soc,
|
|||||||
* to the peer handler.
|
* to the peer handler.
|
||||||
*
|
*
|
||||||
* @param soc - pointer to the soc
|
* @param soc - pointer to the soc
|
||||||
* @param peer - peer handler
|
* @param vdev_id - id of vdev handle
|
||||||
|
* @param peer mac - peer mac address
|
||||||
* @param sec_idx - mcast or ucast frame type.
|
* @param sec_idx - mcast or ucast frame type.
|
||||||
* @return - int
|
* @return - int
|
||||||
*/
|
*/
|
||||||
static inline int
|
static inline int
|
||||||
cdp_get_sec_type(ol_txrx_soc_handle soc, struct cdp_peer *peer, uint8_t sec_idx)
|
cdp_get_sec_type(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac,
|
||||||
|
uint8_t sec_idx)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s invalid instance", __func__);
|
"%s invalid instance", __func__);
|
||||||
QDF_BUG(0);
|
QDF_BUG(0);
|
||||||
return A_ERROR;
|
return A_ERROR;
|
||||||
}
|
}
|
||||||
@@ -677,33 +681,34 @@ cdp_get_sec_type(ol_txrx_soc_handle soc, struct cdp_peer *peer, uint8_t sec_idx)
|
|||||||
return A_ERROR;
|
return A_ERROR;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_get_sec_type
|
return soc->ops->ctrl_ops->txrx_get_sec_type
|
||||||
(peer, sec_idx);
|
(soc, vdev_id, peer_mac, sec_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cdp_set_mgmt_tx_power(): function to set tx power for mgmt frames
|
* cdp_set_mgmt_tx_power(): function to set tx power for mgmt frames
|
||||||
* @vdev_handle: vdev handle
|
* @param soc - pointer to the soc
|
||||||
|
* @vdev_id : id of vdev handle
|
||||||
* @subtype_index: subtype
|
* @subtype_index: subtype
|
||||||
* @tx_power: Tx power
|
* @tx_power: Tx power
|
||||||
* Return: None
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
static inline int cdp_set_mgmt_tx_power(ol_txrx_soc_handle soc,
|
static inline QDF_STATUS
|
||||||
struct cdp_vdev *vdev, uint8_t subtype, uint8_t tx_power)
|
cdp_set_mgmt_tx_power(ol_txrx_soc_handle soc,
|
||||||
|
uint8_t vdev_id, uint8_t subtype, uint8_t tx_power)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
"%s: Invalid Instance:", __func__);
|
"%s: Invalid Instance:", __func__);
|
||||||
QDF_BUG(0);
|
QDF_BUG(0);
|
||||||
return 0;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!soc->ops->ctrl_ops ||
|
if (!soc->ops->ctrl_ops ||
|
||||||
!soc->ops->ctrl_ops->txrx_update_mgmt_txpow_vdev)
|
!soc->ops->ctrl_ops->txrx_update_mgmt_txpow_vdev)
|
||||||
return 0;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
soc->ops->ctrl_ops->txrx_update_mgmt_txpow_vdev(vdev,
|
return soc->ops->ctrl_ops->txrx_update_mgmt_txpow_vdev(soc, vdev_id,
|
||||||
subtype, tx_power);
|
subtype, tx_power);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *
|
static inline void *
|
||||||
@@ -802,7 +807,7 @@ void cdp_set_cfr_rcc(ol_txrx_soc_handle soc, uint8_t pdev_id, bool enable)
|
|||||||
/**
|
/**
|
||||||
* cdp_update_peer_pkt_capture_params() - Sets Rx & Tx Capture params for a peer
|
* cdp_update_peer_pkt_capture_params() - Sets Rx & Tx Capture params for a peer
|
||||||
* @soc: SOC TXRX handle
|
* @soc: SOC TXRX handle
|
||||||
* @pdev: CDP pdev pointer
|
* @pdev_id: id of CDP pdev pointer
|
||||||
* @is_rx_pkt_cap_enable: enable/disable rx pkt capture for this peer
|
* @is_rx_pkt_cap_enable: enable/disable rx pkt capture for this peer
|
||||||
* @is_tx_pkt_cap_enable: enable/disable tx pkt capture for this peer
|
* @is_tx_pkt_cap_enable: enable/disable tx pkt capture for this peer
|
||||||
* @peer_mac: MAC address of peer for which pkt_cap is to be enabled/disabled
|
* @peer_mac: MAC address of peer for which pkt_cap is to be enabled/disabled
|
||||||
@@ -811,7 +816,7 @@ void cdp_set_cfr_rcc(ol_txrx_soc_handle soc, uint8_t pdev_id, bool enable)
|
|||||||
*/
|
*/
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
cdp_update_peer_pkt_capture_params(ol_txrx_soc_handle soc,
|
cdp_update_peer_pkt_capture_params(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev,
|
uint8_t pdev_id,
|
||||||
bool is_rx_pkt_cap_enable,
|
bool is_rx_pkt_cap_enable,
|
||||||
bool is_tx_pkt_cap_enable,
|
bool is_tx_pkt_cap_enable,
|
||||||
uint8_t *peer_mac)
|
uint8_t *peer_mac)
|
||||||
@@ -827,7 +832,8 @@ cdp_update_peer_pkt_capture_params(ol_txrx_soc_handle soc,
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_update_peer_pkt_capture_params
|
return soc->ops->ctrl_ops->txrx_update_peer_pkt_capture_params
|
||||||
(pdev, is_rx_pkt_cap_enable, is_tx_pkt_cap_enable,
|
(soc, pdev_id, is_rx_pkt_cap_enable,
|
||||||
|
is_tx_pkt_cap_enable,
|
||||||
peer_mac);
|
peer_mac);
|
||||||
}
|
}
|
||||||
#endif /* WLAN_TX_PKT_CAPTURE_ENH || WLAN_RX_PKT_CAPTURE_ENH */
|
#endif /* WLAN_TX_PKT_CAPTURE_ENH || WLAN_RX_PKT_CAPTURE_ENH */
|
||||||
@@ -837,7 +843,7 @@ cdp_update_peer_pkt_capture_params(ol_txrx_soc_handle soc,
|
|||||||
* cdp_update_pdev_rx_protocol_tag() - wrapper function to set the protocol
|
* cdp_update_pdev_rx_protocol_tag() - wrapper function to set the protocol
|
||||||
* tag in CDP layer from cfg layer
|
* tag in CDP layer from cfg layer
|
||||||
* @soc: SOC TXRX handle
|
* @soc: SOC TXRX handle
|
||||||
* @pdev: CDP pdev pointer
|
* @pdev_id: id of CDP pdev pointer
|
||||||
* @protocol_mask: Bitmap for protocol for which tagging is enabled
|
* @protocol_mask: Bitmap for protocol for which tagging is enabled
|
||||||
* @protocol_type: Protocol type for which the tag should be update
|
* @protocol_type: Protocol type for which the tag should be update
|
||||||
* @tag: Actual tag value for the given prototype
|
* @tag: Actual tag value for the given prototype
|
||||||
@@ -845,7 +851,7 @@ cdp_update_peer_pkt_capture_params(ol_txrx_soc_handle soc,
|
|||||||
*/
|
*/
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
cdp_update_pdev_rx_protocol_tag(ol_txrx_soc_handle soc,
|
cdp_update_pdev_rx_protocol_tag(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev, uint32_t protocol_mask,
|
uint8_t pdev_id, uint32_t protocol_mask,
|
||||||
uint16_t protocol_type, uint16_t tag)
|
uint16_t protocol_type, uint16_t tag)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
@@ -859,7 +865,7 @@ cdp_update_pdev_rx_protocol_tag(ol_txrx_soc_handle soc,
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_update_pdev_rx_protocol_tag
|
return soc->ops->ctrl_ops->txrx_update_pdev_rx_protocol_tag
|
||||||
(pdev, protocol_mask, protocol_type, tag);
|
(soc, pdev_id, protocol_mask, protocol_type, tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WLAN_SUPPORT_RX_TAG_STATISTICS
|
#ifdef WLAN_SUPPORT_RX_TAG_STATISTICS
|
||||||
@@ -867,13 +873,13 @@ cdp_update_pdev_rx_protocol_tag(ol_txrx_soc_handle soc,
|
|||||||
* cdp_dump_pdev_rx_protocol_tag_stats() - wrapper function to dump the protocol
|
* cdp_dump_pdev_rx_protocol_tag_stats() - wrapper function to dump the protocol
|
||||||
tag statistics for given or all protocols
|
tag statistics for given or all protocols
|
||||||
* @soc: SOC TXRX handle
|
* @soc: SOC TXRX handle
|
||||||
* @pdev: CDP pdev pointer
|
* @pdev_id: id of CDP pdev pointer
|
||||||
* @protocol_type: Protocol type for which the tag should be update
|
* @protocol_type: Protocol type for which the tag should be update
|
||||||
* Return: Returns QDF_STATUS_SUCCESS/FAILURE
|
* Return: Returns QDF_STATUS_SUCCESS/FAILURE
|
||||||
*/
|
*/
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
cdp_dump_pdev_rx_protocol_tag_stats(ol_txrx_soc_handle soc,
|
cdp_dump_pdev_rx_protocol_tag_stats(ol_txrx_soc_handle soc,
|
||||||
struct cdp_pdev *pdev,
|
uint8_t pdev_id,
|
||||||
uint16_t protocol_type)
|
uint16_t protocol_type)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
@@ -886,7 +892,7 @@ cdp_dump_pdev_rx_protocol_tag_stats(ol_txrx_soc_handle soc,
|
|||||||
!soc->ops->ctrl_ops->txrx_dump_pdev_rx_protocol_tag_stats)
|
!soc->ops->ctrl_ops->txrx_dump_pdev_rx_protocol_tag_stats)
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
soc->ops->ctrl_ops->txrx_dump_pdev_rx_protocol_tag_stats(pdev,
|
soc->ops->ctrl_ops->txrx_dump_pdev_rx_protocol_tag_stats(soc, pdev_id,
|
||||||
protocol_type);
|
protocol_type);
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -897,7 +903,7 @@ cdp_dump_pdev_rx_protocol_tag_stats(ol_txrx_soc_handle soc,
|
|||||||
/**
|
/**
|
||||||
* cdp_vdev_config_for_nac_rssi(): To invoke dp callback for nac rssi config
|
* cdp_vdev_config_for_nac_rssi(): To invoke dp callback for nac rssi config
|
||||||
* @soc: soc pointer
|
* @soc: soc pointer
|
||||||
* @vdev: vdev pointer
|
* @vdev_id: id of vdev
|
||||||
* @nac_cmd: specfies nac_rss config action add, del, list
|
* @nac_cmd: specfies nac_rss config action add, del, list
|
||||||
* @bssid: Neighbour bssid
|
* @bssid: Neighbour bssid
|
||||||
* @client_macaddr: Non-Associated client MAC
|
* @client_macaddr: Non-Associated client MAC
|
||||||
@@ -906,7 +912,7 @@ cdp_dump_pdev_rx_protocol_tag_stats(ol_txrx_soc_handle soc,
|
|||||||
* Return: QDF_STATUS
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
static inline QDF_STATUS cdp_vdev_config_for_nac_rssi(ol_txrx_soc_handle soc,
|
static inline QDF_STATUS cdp_vdev_config_for_nac_rssi(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev, enum cdp_nac_param_cmd nac_cmd,
|
uint8_t vdev_id, enum cdp_nac_param_cmd nac_cmd,
|
||||||
char *bssid, char *client_macaddr, uint8_t chan_num)
|
char *bssid, char *client_macaddr, uint8_t chan_num)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
@@ -920,21 +926,21 @@ static inline QDF_STATUS cdp_vdev_config_for_nac_rssi(ol_txrx_soc_handle soc,
|
|||||||
!soc->ops->ctrl_ops->txrx_vdev_config_for_nac_rssi)
|
!soc->ops->ctrl_ops->txrx_vdev_config_for_nac_rssi)
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_vdev_config_for_nac_rssi(vdev,
|
return soc->ops->ctrl_ops->txrx_vdev_config_for_nac_rssi(soc, vdev_id,
|
||||||
nac_cmd, bssid, client_macaddr, chan_num);
|
nac_cmd, bssid, client_macaddr, chan_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cdp_vdev_get_neighbour_rssi(): To invoke dp callback to get rssi value of nac
|
* cdp_vdev_get_neighbour_rssi(): To invoke dp callback to get rssi value of nac
|
||||||
* @soc: soc pointer
|
* @soc: soc pointer
|
||||||
* @vdev: vdev pointer
|
* @vdev_id: id of vdev
|
||||||
* @macaddr: Non-Associated client MAC
|
* @macaddr: Non-Associated client MAC
|
||||||
* @rssi: rssi
|
* @rssi: rssi
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
static inline QDF_STATUS cdp_vdev_get_neighbour_rssi(ol_txrx_soc_handle soc,
|
static inline QDF_STATUS cdp_vdev_get_neighbour_rssi(ol_txrx_soc_handle soc,
|
||||||
struct cdp_vdev *vdev,
|
uint8_t vdev_id,
|
||||||
char *macaddr,
|
char *macaddr,
|
||||||
uint8_t *rssi)
|
uint8_t *rssi)
|
||||||
{
|
{
|
||||||
@@ -949,7 +955,8 @@ static inline QDF_STATUS cdp_vdev_get_neighbour_rssi(ol_txrx_soc_handle soc,
|
|||||||
!soc->ops->ctrl_ops->txrx_vdev_get_neighbour_rssi)
|
!soc->ops->ctrl_ops->txrx_vdev_get_neighbour_rssi)
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_vdev_get_neighbour_rssi(vdev, macaddr,
|
return soc->ops->ctrl_ops->txrx_vdev_get_neighbour_rssi(soc, vdev_id,
|
||||||
|
macaddr,
|
||||||
rssi);
|
rssi);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -959,13 +966,13 @@ static inline QDF_STATUS cdp_vdev_get_neighbour_rssi(ol_txrx_soc_handle soc,
|
|||||||
* cdp_set_rx_flow_tag() - wrapper function to set the flow
|
* cdp_set_rx_flow_tag() - wrapper function to set the flow
|
||||||
* tag in CDP layer from cfg layer
|
* tag in CDP layer from cfg layer
|
||||||
* @soc: SOC TXRX handle
|
* @soc: SOC TXRX handle
|
||||||
* @pdev: CDP pdev pointer
|
* @pdev_id: id of CDP pdev pointer
|
||||||
* @flow_info: Flow 5-tuple, along with tag, if any, that needs to added/deleted
|
* @flow_info: Flow 5-tuple, along with tag, if any, that needs to added/deleted
|
||||||
*
|
*
|
||||||
* Return: Success when add/del operation is successful, error otherwise
|
* Return: Success when add/del operation is successful, error otherwise
|
||||||
*/
|
*/
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
cdp_set_rx_flow_tag(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
cdp_set_rx_flow_tag(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
||||||
struct cdp_rx_flow_info *flow_info)
|
struct cdp_rx_flow_info *flow_info)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
@@ -978,20 +985,21 @@ cdp_set_rx_flow_tag(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|||||||
!soc->ops->ctrl_ops->txrx_set_rx_flow_tag)
|
!soc->ops->ctrl_ops->txrx_set_rx_flow_tag)
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_set_rx_flow_tag(pdev, flow_info);
|
return soc->ops->ctrl_ops->txrx_set_rx_flow_tag(soc, pdev_id,
|
||||||
|
flow_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cdp_dump_rx_flow_tag_stats() - wrapper function to dump the flow
|
* cdp_dump_rx_flow_tag_stats() - wrapper function to dump the flow
|
||||||
* tag statistics for given flow
|
* tag statistics for given flow
|
||||||
* @soc: SOC TXRX handle
|
* @soc: SOC TXRX handle
|
||||||
* @pdev: CDP pdev pointer
|
* @pdev_id: id of CDP pdev
|
||||||
* @flow_info: Flow tuple for which we want to print the statistics
|
* @flow_info: Flow tuple for which we want to print the statistics
|
||||||
*
|
*
|
||||||
* Return: Success when flow is found and stats are printed, error otherwise
|
* Return: Success when flow is found and stats are printed, error otherwise
|
||||||
*/
|
*/
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
cdp_dump_rx_flow_tag_stats(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
cdp_dump_rx_flow_tag_stats(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
||||||
struct cdp_rx_flow_info *flow_info)
|
struct cdp_rx_flow_info *flow_info)
|
||||||
{
|
{
|
||||||
if (!soc || !soc->ops) {
|
if (!soc || !soc->ops) {
|
||||||
@@ -1004,7 +1012,9 @@ cdp_dump_rx_flow_tag_stats(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|||||||
!soc->ops->ctrl_ops->txrx_dump_rx_flow_tag_stats)
|
!soc->ops->ctrl_ops->txrx_dump_rx_flow_tag_stats)
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
return soc->ops->ctrl_ops->txrx_dump_rx_flow_tag_stats(pdev, flow_info);
|
return soc->ops->ctrl_ops->txrx_dump_rx_flow_tag_stats(soc,
|
||||||
|
pdev_id,
|
||||||
|
flow_info);
|
||||||
}
|
}
|
||||||
#endif /* WLAN_SUPPORT_RX_FLOW_TAG */
|
#endif /* WLAN_SUPPORT_RX_FLOW_TAG */
|
||||||
#endif /* _CDP_TXRX_CTRL_H_ */
|
#endif /* _CDP_TXRX_CTRL_H_ */
|
||||||
|
@@ -539,7 +539,7 @@ struct cdp_ctrl_ops {
|
|||||||
uint32_t val);
|
uint32_t val);
|
||||||
int
|
int
|
||||||
(*txrx_update_filter_neighbour_peers)(
|
(*txrx_update_filter_neighbour_peers)(
|
||||||
struct cdp_vdev *vdev,
|
struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||||
uint32_t cmd, uint8_t *macaddr);
|
uint32_t cmd, uint8_t *macaddr);
|
||||||
/**
|
/**
|
||||||
* @brief set the safemode of the device
|
* @brief set the safemode of the device
|
||||||
@@ -643,7 +643,7 @@ struct cdp_ctrl_ops {
|
|||||||
|
|
||||||
void (*tx_flush_buffers)(struct cdp_vdev *vdev);
|
void (*tx_flush_buffers)(struct cdp_vdev *vdev);
|
||||||
|
|
||||||
int (*txrx_is_target_ar900b)(struct cdp_vdev *vdev);
|
int (*txrx_is_target_ar900b)(struct cdp_soc_t *soc_hdl);
|
||||||
|
|
||||||
void (*txrx_set_vdev_param)(struct cdp_vdev *vdev,
|
void (*txrx_set_vdev_param)(struct cdp_vdev *vdev,
|
||||||
enum cdp_vdev_param_type param, uint32_t val);
|
enum cdp_vdev_param_type param, uint32_t val);
|
||||||
@@ -655,11 +655,14 @@ struct cdp_ctrl_ops {
|
|||||||
* Set the reo destination ring no on which we will receive
|
* Set the reo destination ring no on which we will receive
|
||||||
* pkts for this radio.
|
* pkts for this radio.
|
||||||
*
|
*
|
||||||
* @param pdev - the data physical device object
|
* @txrx_soc - soc handle
|
||||||
|
* @param pdev_id - id of physical device
|
||||||
|
* @return the reo destination ring number
|
||||||
* @param reo_dest_ring_num - value ranges between 1 - 4
|
* @param reo_dest_ring_num - value ranges between 1 - 4
|
||||||
*/
|
*/
|
||||||
void (*txrx_set_pdev_reo_dest)(
|
QDF_STATUS (*txrx_set_pdev_reo_dest)(
|
||||||
struct cdp_pdev *pdev,
|
struct cdp_soc_t *txrx_soc,
|
||||||
|
uint8_t pdev_id,
|
||||||
enum cdp_host_reo_dest_ring reo_dest_ring_num);
|
enum cdp_host_reo_dest_ring reo_dest_ring_num);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -668,21 +671,26 @@ struct cdp_ctrl_ops {
|
|||||||
* Get the reo destination ring no on which we will receive
|
* Get the reo destination ring no on which we will receive
|
||||||
* pkts for this radio.
|
* pkts for this radio.
|
||||||
*
|
*
|
||||||
* @param pdev - the data physical device object
|
* @txrx_soc - soc handle
|
||||||
|
* @param pdev_id - id of physical device
|
||||||
* @return the reo destination ring number
|
* @return the reo destination ring number
|
||||||
*/
|
*/
|
||||||
enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)(
|
enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)(
|
||||||
struct cdp_pdev *pdev);
|
struct cdp_soc_t *txrx_soc,
|
||||||
|
uint8_t pdev_id);
|
||||||
|
|
||||||
int (*txrx_wdi_event_sub)(struct cdp_pdev *pdev, void *event_cb_sub,
|
int (*txrx_wdi_event_sub)(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
uint32_t event);
|
wdi_event_subscribe *event_cb_sub,
|
||||||
|
uint32_t event);
|
||||||
|
|
||||||
int (*txrx_wdi_event_unsub)(struct cdp_pdev *pdev, void *event_cb_sub,
|
int (*txrx_wdi_event_unsub)(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
uint32_t event);
|
wdi_event_subscribe *event_cb_sub,
|
||||||
int (*txrx_get_sec_type)(struct cdp_peer *peer, uint8_t sec_idx);
|
uint32_t event);
|
||||||
|
|
||||||
void (*txrx_update_mgmt_txpow_vdev)(struct cdp_vdev *vdev,
|
QDF_STATUS
|
||||||
uint8_t subtype, uint8_t tx_power);
|
(*txrx_update_mgmt_txpow_vdev)(struct cdp_soc_t *soc,
|
||||||
|
uint8_t vdev_id,
|
||||||
|
uint8_t subtype, uint8_t tx_power);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* txrx_set_pdev_param() - callback to set pdev parameter
|
* txrx_set_pdev_param() - callback to set pdev parameter
|
||||||
@@ -698,49 +706,58 @@ struct cdp_ctrl_ops {
|
|||||||
void * (*txrx_get_pldev)(struct cdp_pdev *pdev);
|
void * (*txrx_get_pldev)(struct cdp_pdev *pdev);
|
||||||
|
|
||||||
#ifdef ATH_SUPPORT_NAC_RSSI
|
#ifdef ATH_SUPPORT_NAC_RSSI
|
||||||
QDF_STATUS (*txrx_vdev_config_for_nac_rssi)(struct cdp_vdev *vdev,
|
QDF_STATUS (*txrx_vdev_config_for_nac_rssi)(struct cdp_soc_t *cdp_soc,
|
||||||
enum cdp_nac_param_cmd cmd, char *bssid, char *client_macaddr,
|
uint8_t vdev_id,
|
||||||
uint8_t chan_num);
|
enum cdp_nac_param_cmd cmd,
|
||||||
QDF_STATUS (*txrx_vdev_get_neighbour_rssi)(struct cdp_vdev *vdev,
|
char *bssid,
|
||||||
|
char *client_macaddr,
|
||||||
|
uint8_t chan_num);
|
||||||
|
|
||||||
|
QDF_STATUS (*txrx_vdev_get_neighbour_rssi)(struct cdp_soc_t *cdp_soc,
|
||||||
|
uint8_t vdev_id,
|
||||||
char *macaddr,
|
char *macaddr,
|
||||||
uint8_t *rssi);
|
uint8_t *rssi);
|
||||||
#endif
|
#endif
|
||||||
void (*set_key)(struct cdp_peer *peer_handle,
|
QDF_STATUS
|
||||||
bool is_unicast, uint32_t *key);
|
(*set_key)(struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *mac,
|
||||||
|
bool is_unicast, uint32_t *key);
|
||||||
|
|
||||||
uint32_t (*txrx_get_vdev_param)(struct cdp_vdev *vdev,
|
uint32_t (*txrx_get_vdev_param)(struct cdp_vdev *vdev,
|
||||||
enum cdp_vdev_param_type param);
|
enum cdp_vdev_param_type param);
|
||||||
int (*enable_peer_based_pktlog)(struct cdp_pdev
|
int (*enable_peer_based_pktlog)(struct cdp_soc_t *cdp_soc,
|
||||||
*txrx_pdev_handle, char *macaddr, uint8_t enb_dsb);
|
uint8_t pdev_id,
|
||||||
|
uint8_t *macaddr, uint8_t enb_dsb);
|
||||||
|
|
||||||
void (*calculate_delay_stats)(struct cdp_vdev *vdev, qdf_nbuf_t nbuf);
|
QDF_STATUS
|
||||||
|
(*calculate_delay_stats)(struct cdp_soc_t *cdp_soc,
|
||||||
|
uint8_t vdev_id, qdf_nbuf_t nbuf);
|
||||||
#ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG
|
#ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG
|
||||||
QDF_STATUS (*txrx_update_pdev_rx_protocol_tag)(
|
QDF_STATUS (*txrx_update_pdev_rx_protocol_tag)(
|
||||||
struct cdp_pdev *txrx_pdev_handle,
|
struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
uint32_t protocol_mask, uint16_t protocol_type,
|
uint32_t protocol_mask, uint16_t protocol_type,
|
||||||
uint16_t tag);
|
uint16_t tag);
|
||||||
#ifdef WLAN_SUPPORT_RX_TAG_STATISTICS
|
#ifdef WLAN_SUPPORT_RX_TAG_STATISTICS
|
||||||
void (*txrx_dump_pdev_rx_protocol_tag_stats)(
|
void (*txrx_dump_pdev_rx_protocol_tag_stats)(
|
||||||
struct cdp_pdev *txrx_pdev_handle,
|
struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
uint16_t protocol_type);
|
uint16_t protocol_type);
|
||||||
#endif /* WLAN_SUPPORT_RX_TAG_STATISTICS */
|
#endif /* WLAN_SUPPORT_RX_TAG_STATISTICS */
|
||||||
#endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
|
#endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
|
||||||
#ifdef WLAN_SUPPORT_RX_FLOW_TAG
|
#ifdef WLAN_SUPPORT_RX_FLOW_TAG
|
||||||
QDF_STATUS (*txrx_set_rx_flow_tag)(
|
QDF_STATUS (*txrx_set_rx_flow_tag)(
|
||||||
struct cdp_pdev *txrx_pdev_handle,
|
struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
|
||||||
struct cdp_rx_flow_info *flow_info);
|
struct cdp_rx_flow_info *flow_info);
|
||||||
QDF_STATUS (*txrx_dump_rx_flow_tag_stats)(
|
QDF_STATUS (*txrx_dump_rx_flow_tag_stats)(
|
||||||
struct cdp_pdev *txrx_pdev_handle,
|
struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
|
||||||
struct cdp_rx_flow_info *flow_info);
|
struct cdp_rx_flow_info *flow_info);
|
||||||
#endif /* WLAN_SUPPORT_RX_FLOW_TAG */
|
#endif /* WLAN_SUPPORT_RX_FLOW_TAG */
|
||||||
#ifdef QCA_MULTIPASS_SUPPORT
|
#ifdef QCA_MULTIPASS_SUPPORT
|
||||||
void (*txrx_peer_set_vlan_id)(ol_txrx_soc_handle soc,
|
void (*txrx_peer_set_vlan_id)(struct cdp_soc_t *cdp_soc,
|
||||||
struct cdp_vdev *vdev, uint8_t *peer_mac,
|
uint8_t vdev_id, uint8_t *peer_mac,
|
||||||
uint16_t vlan_id);
|
uint16_t vlan_id);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WLAN_TX_PKT_CAPTURE_ENH) || defined(WLAN_RX_PKT_CAPTURE_ENH)
|
#if defined(WLAN_TX_PKT_CAPTURE_ENH) || defined(WLAN_RX_PKT_CAPTURE_ENH)
|
||||||
QDF_STATUS (*txrx_update_peer_pkt_capture_params)(
|
QDF_STATUS (*txrx_update_peer_pkt_capture_params)(
|
||||||
struct cdp_pdev *txrx_pdev_handle,
|
ol_txrx_soc_handle soc, uint8_t pdev_id,
|
||||||
bool is_rx_pkt_cap_enable, bool is_tx_pkt_cap_enable,
|
bool is_rx_pkt_cap_enable, bool is_tx_pkt_cap_enable,
|
||||||
uint8_t *peer_mac);
|
uint8_t *peer_mac);
|
||||||
#endif /* WLAN_TX_PKT_CAPTURE_ENH || WLAN_RX_PKT_CAPTURE_ENH */
|
#endif /* WLAN_TX_PKT_CAPTURE_ENH || WLAN_RX_PKT_CAPTURE_ENH */
|
||||||
|
@@ -1028,8 +1028,11 @@ dp_set_pn_check_wifi3(struct cdp_soc_t *soc, uint8_t vdev_id,
|
|||||||
uint32_t *rx_pn);
|
uint32_t *rx_pn);
|
||||||
|
|
||||||
void *dp_get_pdev_for_mac_id(struct dp_soc *soc, uint32_t mac_id);
|
void *dp_get_pdev_for_mac_id(struct dp_soc *soc, uint32_t mac_id);
|
||||||
void dp_set_michael_key(struct cdp_peer *peer_handle,
|
|
||||||
bool is_unicast, uint32_t *key);
|
QDF_STATUS
|
||||||
|
dp_set_michael_key(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||||
|
uint8_t *peer_mac,
|
||||||
|
bool is_unicast, uint32_t *key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_check_pdev_exists() - Validate pdev before use
|
* dp_check_pdev_exists() - Validate pdev before use
|
||||||
@@ -1377,13 +1380,13 @@ QDF_STATUS dp_h2t_cfg_stats_msg_send(struct dp_pdev *pdev,
|
|||||||
uint32_t stats_type_upload_mask,
|
uint32_t stats_type_upload_mask,
|
||||||
uint8_t mac_id);
|
uint8_t mac_id);
|
||||||
|
|
||||||
int dp_wdi_event_unsub(struct cdp_pdev *txrx_pdev_handle,
|
int dp_wdi_event_unsub(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
void *event_cb_sub_handle,
|
wdi_event_subscribe *event_cb_sub_handle,
|
||||||
uint32_t event);
|
uint32_t event);
|
||||||
|
|
||||||
int dp_wdi_event_sub(struct cdp_pdev *txrx_pdev_handle,
|
int dp_wdi_event_sub(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
void *event_cb_sub_handle,
|
wdi_event_subscribe *event_cb_sub_handle,
|
||||||
uint32_t event);
|
uint32_t event);
|
||||||
|
|
||||||
void dp_wdi_event_handler(enum WDI_EVENT event, struct dp_soc *soc,
|
void dp_wdi_event_handler(enum WDI_EVENT event, struct dp_soc *soc,
|
||||||
void *data, u_int16_t peer_id,
|
void *data, u_int16_t peer_id,
|
||||||
@@ -1418,16 +1421,16 @@ dp_hif_update_pipe_callback(struct dp_soc *dp_soc,
|
|||||||
QDF_STATUS dp_peer_stats_notify(struct dp_pdev *pdev, struct dp_peer *peer);
|
QDF_STATUS dp_peer_stats_notify(struct dp_pdev *pdev, struct dp_peer *peer);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static inline int dp_wdi_event_unsub(struct cdp_pdev *txrx_pdev_handle,
|
static inline int dp_wdi_event_unsub(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
void *event_cb_sub_handle,
|
wdi_event_subscribe *event_cb_sub_handle,
|
||||||
uint32_t event)
|
uint32_t event)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int dp_wdi_event_sub(struct cdp_pdev *txrx_pdev_handle,
|
static inline int dp_wdi_event_sub(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
void *event_cb_sub_handle,
|
wdi_event_subscribe *event_cb_sub_handle,
|
||||||
uint32_t event)
|
uint32_t event)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -5943,30 +5943,41 @@ static void dp_get_ba_aging_timeout(struct cdp_soc_t *txrx_soc,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* dp_set_pdev_reo_dest() - set the reo destination ring for this pdev
|
* dp_set_pdev_reo_dest() - set the reo destination ring for this pdev
|
||||||
* @pdev_handle: physical device object
|
* @txrx_soc: cdp soc handle
|
||||||
|
* @pdev_id: id of physical device object
|
||||||
* @val: reo destination ring index (1 - 4)
|
* @val: reo destination ring index (1 - 4)
|
||||||
*
|
*
|
||||||
* Return: void
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
static void dp_set_pdev_reo_dest(struct cdp_pdev *pdev_handle,
|
static QDF_STATUS
|
||||||
enum cdp_host_reo_dest_ring val)
|
dp_set_pdev_reo_dest(struct cdp_soc_t *txrx_soc, uint8_t pdev_id,
|
||||||
|
enum cdp_host_reo_dest_ring val)
|
||||||
{
|
{
|
||||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
struct dp_pdev *pdev =
|
||||||
|
dp_get_pdev_from_soc_pdev_id_wifi3((struct dp_soc *)txrx_soc,
|
||||||
|
pdev_id);
|
||||||
|
|
||||||
if (pdev)
|
if (pdev) {
|
||||||
pdev->reo_dest = val;
|
pdev->reo_dest = val;
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dp_get_pdev_reo_dest() - get the reo destination for this pdev
|
* dp_get_pdev_reo_dest() - get the reo destination for this pdev
|
||||||
* @pdev_handle: physical device object
|
* @txrx_soc: cdp soc handle
|
||||||
|
* @pdev_id: id of physical device object
|
||||||
*
|
*
|
||||||
* Return: reo destination ring index
|
* Return: reo destination ring index
|
||||||
*/
|
*/
|
||||||
static enum cdp_host_reo_dest_ring
|
static enum cdp_host_reo_dest_ring
|
||||||
dp_get_pdev_reo_dest(struct cdp_pdev *pdev_handle)
|
dp_get_pdev_reo_dest(struct cdp_soc_t *txrx_soc, uint8_t pdev_id)
|
||||||
{
|
{
|
||||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
struct dp_pdev *pdev =
|
||||||
|
dp_get_pdev_from_soc_pdev_id_wifi3((struct dp_soc *)txrx_soc,
|
||||||
|
pdev_id);
|
||||||
|
|
||||||
if (pdev)
|
if (pdev)
|
||||||
return pdev->reo_dest;
|
return pdev->reo_dest;
|
||||||
@@ -5996,20 +6007,29 @@ static int dp_set_filter_neighbour_peers(struct cdp_pdev *pdev_handle,
|
|||||||
/*
|
/*
|
||||||
* dp_update_filter_neighbour_peers() - set neighbour peers(nac clients)
|
* dp_update_filter_neighbour_peers() - set neighbour peers(nac clients)
|
||||||
* address for smart mesh filtering
|
* address for smart mesh filtering
|
||||||
* @vdev_handle: virtual device object
|
* @txrx_soc: cdp soc handle
|
||||||
|
* @vdev_id: id of virtual device object
|
||||||
* @cmd: Add/Del command
|
* @cmd: Add/Del command
|
||||||
* @macaddr: nac client mac address
|
* @macaddr: nac client mac address
|
||||||
*
|
*
|
||||||
* Return: void
|
* Return: success/failure
|
||||||
*/
|
*/
|
||||||
static int dp_update_filter_neighbour_peers(struct cdp_vdev *vdev_handle,
|
static int dp_update_filter_neighbour_peers(struct cdp_soc_t *soc,
|
||||||
|
uint8_t vdev_id,
|
||||||
uint32_t cmd, uint8_t *macaddr)
|
uint32_t cmd, uint8_t *macaddr)
|
||||||
{
|
{
|
||||||
struct dp_vdev *vdev = (struct dp_vdev *)vdev_handle;
|
struct dp_pdev *pdev;
|
||||||
struct dp_pdev *pdev = vdev->pdev;
|
|
||||||
struct dp_neighbour_peer *peer = NULL;
|
struct dp_neighbour_peer *peer = NULL;
|
||||||
|
struct dp_vdev *vdev =
|
||||||
|
dp_get_vdev_from_soc_vdev_id_wifi3((struct dp_soc *)soc,
|
||||||
|
vdev_id);
|
||||||
|
|
||||||
if (!macaddr)
|
if (!vdev || !macaddr)
|
||||||
|
goto fail0;
|
||||||
|
|
||||||
|
pdev = vdev->pdev;
|
||||||
|
|
||||||
|
if (!pdev)
|
||||||
goto fail0;
|
goto fail0;
|
||||||
|
|
||||||
/* Store address of NAC (neighbour peer) which will be checked
|
/* Store address of NAC (neighbour peer) which will be checked
|
||||||
@@ -6077,16 +6097,31 @@ fail0:
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* dp_get_sec_type() - Get the security type
|
* dp_get_sec_type() - Get the security type
|
||||||
* @peer: Datapath peer handle
|
* @soc: soc handle
|
||||||
|
* @vdev_id: id of dp handle
|
||||||
|
* @peer_mac: mac of datapath PEER handle
|
||||||
* @sec_idx: Security id (mcast, ucast)
|
* @sec_idx: Security id (mcast, ucast)
|
||||||
*
|
*
|
||||||
* return sec_type: Security type
|
* return sec_type: Security type
|
||||||
*/
|
*/
|
||||||
static int dp_get_sec_type(struct cdp_peer *peer, uint8_t sec_idx)
|
static int dp_get_sec_type(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||||
|
uint8_t *peer_mac, uint8_t sec_idx)
|
||||||
{
|
{
|
||||||
struct dp_peer *dpeer = (struct dp_peer *)peer;
|
int sec_type = 0;
|
||||||
|
struct dp_peer *peer = dp_peer_find_hash_find((struct dp_soc *)soc,
|
||||||
|
peer_mac, 0, vdev_id);
|
||||||
|
|
||||||
return dpeer->security[sec_idx].sec_type;
|
if (!peer || peer->delete_in_progress) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"%s: Peer is NULL!\n", __func__);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
sec_type = peer->security[sec_idx].sec_type;
|
||||||
|
fail:
|
||||||
|
if (peer)
|
||||||
|
dp_peer_unref_delete(peer);
|
||||||
|
return sec_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -9377,27 +9412,36 @@ static QDF_STATUS dp_vdev_get_neighbour_rssi(struct cdp_vdev *vdev_hdl,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDF_STATUS dp_config_for_nac_rssi(struct cdp_vdev *vdev_handle,
|
static QDF_STATUS
|
||||||
enum cdp_nac_param_cmd cmd, char *bssid, char *client_macaddr,
|
dp_config_for_nac_rssi(struct cdp_soc_t *cdp_soc,
|
||||||
uint8_t chan_num)
|
uint8_t vdev_id,
|
||||||
|
enum cdp_nac_param_cmd cmd, char *bssid,
|
||||||
|
char *client_macaddr,
|
||||||
|
uint8_t chan_num)
|
||||||
{
|
{
|
||||||
|
struct dp_soc *soc = (struct dp_soc *)cdp_soc;
|
||||||
|
struct dp_vdev *vdev =
|
||||||
|
dp_get_vdev_from_soc_vdev_id_wifi3(soc,
|
||||||
|
vdev_id);
|
||||||
|
struct dp_pdev *pdev;
|
||||||
|
|
||||||
struct dp_vdev *vdev = (struct dp_vdev *)vdev_handle;
|
if (!vdev)
|
||||||
struct dp_pdev *pdev = (struct dp_pdev *)vdev->pdev;
|
return QDF_STATUS_E_FAILURE;
|
||||||
struct dp_soc *soc = (struct dp_soc *) vdev->pdev->soc;
|
|
||||||
|
|
||||||
|
pdev = (struct dp_pdev *)vdev->pdev;
|
||||||
pdev->nac_rssi_filtering = 1;
|
pdev->nac_rssi_filtering = 1;
|
||||||
/* Store address of NAC (neighbour peer) which will be checked
|
/* Store address of NAC (neighbour peer) which will be checked
|
||||||
* against TA of received packets.
|
* against TA of received packets.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (cmd == CDP_NAC_PARAM_ADD) {
|
if (cmd == CDP_NAC_PARAM_ADD) {
|
||||||
dp_update_filter_neighbour_peers(vdev_handle, DP_NAC_PARAM_ADD,
|
dp_update_filter_neighbour_peers(cdp_soc, vdev->vdev_id,
|
||||||
client_macaddr);
|
DP_NAC_PARAM_ADD,
|
||||||
|
(uint8_t *)client_macaddr);
|
||||||
} else if (cmd == CDP_NAC_PARAM_DEL) {
|
} else if (cmd == CDP_NAC_PARAM_DEL) {
|
||||||
dp_update_filter_neighbour_peers(vdev_handle,
|
dp_update_filter_neighbour_peers(cdp_soc, vdev->vdev_id,
|
||||||
DP_NAC_PARAM_DEL,
|
DP_NAC_PARAM_DEL,
|
||||||
client_macaddr);
|
(uint8_t *)client_macaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soc->cdp_soc.ol_ops->config_bssid_in_fw_for_nac_rssi)
|
if (soc->cdp_soc.ol_ops->config_bssid_in_fw_for_nac_rssi)
|
||||||
@@ -9412,21 +9456,29 @@ static QDF_STATUS dp_config_for_nac_rssi(struct cdp_vdev *vdev_handle,
|
|||||||
/**
|
/**
|
||||||
* dp_enable_peer_based_pktlog() - Set Flag for peer based filtering
|
* dp_enable_peer_based_pktlog() - Set Flag for peer based filtering
|
||||||
* for pktlog
|
* for pktlog
|
||||||
* @txrx_pdev_handle: cdp_pdev handle
|
* @soc: cdp_soc handle
|
||||||
|
* @pdev_id: id of dp pdev handle
|
||||||
|
* @mac_addr: Peer mac address
|
||||||
* @enb_dsb: Enable or disable peer based filtering
|
* @enb_dsb: Enable or disable peer based filtering
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
dp_enable_peer_based_pktlog(
|
dp_enable_peer_based_pktlog(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
struct cdp_pdev *txrx_pdev_handle,
|
uint8_t *mac_addr, uint8_t enb_dsb)
|
||||||
char *mac_addr, uint8_t enb_dsb)
|
|
||||||
{
|
{
|
||||||
struct dp_peer *peer;
|
struct dp_peer *peer;
|
||||||
struct dp_pdev *pdev = (struct dp_pdev *)txrx_pdev_handle;
|
struct dp_pdev *pdev =
|
||||||
|
dp_get_pdev_from_soc_pdev_id_wifi3((struct dp_soc *)soc,
|
||||||
|
pdev_id);
|
||||||
|
|
||||||
peer = (struct dp_peer *)dp_find_peer_by_addr(txrx_pdev_handle,
|
if (!pdev) {
|
||||||
mac_addr);
|
dp_err("Invalid Pdev for pdev_id %d", pdev_id);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
peer = (struct dp_peer *)dp_find_peer_by_addr((struct cdp_pdev *)pdev,
|
||||||
|
mac_addr);
|
||||||
|
|
||||||
if (!peer) {
|
if (!peer) {
|
||||||
dp_err("Invalid Peer");
|
dp_err("Invalid Peer");
|
||||||
@@ -9443,13 +9495,14 @@ dp_enable_peer_based_pktlog(
|
|||||||
/**
|
/**
|
||||||
* dp_dump_pdev_rx_protocol_tag_stats - dump the number of packets tagged for
|
* dp_dump_pdev_rx_protocol_tag_stats - dump the number of packets tagged for
|
||||||
* given protocol type (RX_PROTOCOL_TAG_ALL indicates for all protocol)
|
* given protocol type (RX_PROTOCOL_TAG_ALL indicates for all protocol)
|
||||||
* @pdev_handle: cdp_pdev handle
|
* @soc: cdp_soc handle
|
||||||
|
* @pdev_id: id of cdp_pdev handle
|
||||||
* @protocol_type: protocol type for which stats should be displayed
|
* @protocol_type: protocol type for which stats should be displayed
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
static inline void
|
static inline void
|
||||||
dp_dump_pdev_rx_protocol_tag_stats(struct cdp_pdev *pdev_handle,
|
dp_dump_pdev_rx_protocol_tag_stats(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
uint16_t protocol_type)
|
uint16_t protocol_type)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -9459,7 +9512,8 @@ dp_dump_pdev_rx_protocol_tag_stats(struct cdp_pdev *pdev_handle,
|
|||||||
/**
|
/**
|
||||||
* dp_update_pdev_rx_protocol_tag - Add/remove a protocol tag that should be
|
* dp_update_pdev_rx_protocol_tag - Add/remove a protocol tag that should be
|
||||||
* applied to the desired protocol type packets
|
* applied to the desired protocol type packets
|
||||||
* @txrx_pdev_handle: cdp_pdev handle
|
* @soc: soc handle
|
||||||
|
* @pdev_id: id of cdp_pdev handle
|
||||||
* @enable_rx_protocol_tag - bitmask that indicates what protocol types
|
* @enable_rx_protocol_tag - bitmask that indicates what protocol types
|
||||||
* are enabled for tagging. zero indicates disable feature, non-zero indicates
|
* are enabled for tagging. zero indicates disable feature, non-zero indicates
|
||||||
* enable feature
|
* enable feature
|
||||||
@@ -9469,7 +9523,7 @@ dp_dump_pdev_rx_protocol_tag_stats(struct cdp_pdev *pdev_handle,
|
|||||||
* Return: Success
|
* Return: Success
|
||||||
*/
|
*/
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
dp_update_pdev_rx_protocol_tag(struct cdp_pdev *pdev_handle,
|
dp_update_pdev_rx_protocol_tag(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
uint32_t enable_rx_protocol_tag,
|
uint32_t enable_rx_protocol_tag,
|
||||||
uint16_t protocol_type,
|
uint16_t protocol_type,
|
||||||
uint16_t tag)
|
uint16_t tag)
|
||||||
@@ -9481,13 +9535,14 @@ dp_update_pdev_rx_protocol_tag(struct cdp_pdev *pdev_handle,
|
|||||||
#ifndef WLAN_SUPPORT_RX_FLOW_TAG
|
#ifndef WLAN_SUPPORT_RX_FLOW_TAG
|
||||||
/**
|
/**
|
||||||
* dp_set_rx_flow_tag - add/delete a flow
|
* dp_set_rx_flow_tag - add/delete a flow
|
||||||
* @pdev_handle: cdp_pdev handle
|
* @soc: soc handle
|
||||||
|
* @pdev_id: id of cdp_pdev handle
|
||||||
* @flow_info: flow tuple that is to be added to/deleted from flow search table
|
* @flow_info: flow tuple that is to be added to/deleted from flow search table
|
||||||
*
|
*
|
||||||
* Return: Success
|
* Return: Success
|
||||||
*/
|
*/
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
dp_set_rx_flow_tag(struct cdp_pdev *pdev_handle,
|
dp_set_rx_flow_tag(struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
|
||||||
struct cdp_rx_flow_info *flow_info)
|
struct cdp_rx_flow_info *flow_info)
|
||||||
{
|
{
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
@@ -9495,13 +9550,14 @@ dp_set_rx_flow_tag(struct cdp_pdev *pdev_handle,
|
|||||||
/**
|
/**
|
||||||
* dp_dump_rx_flow_tag_stats - dump the number of packets tagged for
|
* dp_dump_rx_flow_tag_stats - dump the number of packets tagged for
|
||||||
* given flow 5-tuple
|
* given flow 5-tuple
|
||||||
* @pdev_handle: cdp_pdev handle
|
* @cdp_soc: soc handle
|
||||||
|
* @pdev_id: id of cdp_pdev handle
|
||||||
* @flow_info: flow 5-tuple for which stats should be displayed
|
* @flow_info: flow 5-tuple for which stats should be displayed
|
||||||
*
|
*
|
||||||
* Return: Success
|
* Return: Success
|
||||||
*/
|
*/
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
dp_dump_rx_flow_tag_stats(struct cdp_pdev *pdev_handle,
|
dp_dump_rx_flow_tag_stats(struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
|
||||||
struct cdp_rx_flow_info *flow_info)
|
struct cdp_rx_flow_info *flow_info)
|
||||||
{
|
{
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
@@ -3511,20 +3511,32 @@ void dp_peer_rxtid_stats(struct dp_peer *peer, void (*dp_stats_cmd_cb),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void dp_set_michael_key(struct cdp_peer *peer_handle,
|
QDF_STATUS
|
||||||
bool is_unicast, uint32_t *key)
|
dp_set_michael_key(struct cdp_soc_t *soc,
|
||||||
|
uint8_t vdev_id,
|
||||||
|
uint8_t *peer_mac,
|
||||||
|
bool is_unicast, uint32_t *key)
|
||||||
{
|
{
|
||||||
struct dp_peer *peer = (struct dp_peer *)peer_handle;
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
uint8_t sec_index = is_unicast ? 1 : 0;
|
uint8_t sec_index = is_unicast ? 1 : 0;
|
||||||
|
struct dp_peer *peer = dp_peer_find_hash_find((struct dp_soc *)soc,
|
||||||
|
peer_mac, 0, vdev_id);
|
||||||
|
|
||||||
if (!peer) {
|
if (!peer || peer->delete_in_progress) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||||
"peer not found ");
|
"peer not found ");
|
||||||
return;
|
status = QDF_STATUS_E_FAILURE;
|
||||||
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
qdf_mem_copy(&peer->security[sec_index].michael_key[0],
|
qdf_mem_copy(&peer->security[sec_index].michael_key[0],
|
||||||
key, IEEE80211_WEP_MICLEN);
|
key, IEEE80211_WEP_MICLEN);
|
||||||
|
|
||||||
|
fail:
|
||||||
|
if (peer)
|
||||||
|
dp_peer_unref_delete(peer);
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool dp_peer_find_by_id_valid(struct dp_soc *soc, uint16_t peer_id)
|
bool dp_peer_find_by_id_valid(struct dp_soc *soc, uint16_t peer_id)
|
||||||
|
@@ -2075,7 +2075,8 @@ __dp_tx_send_exception(ol_txrx_soc_handle soc, uint8_t vdev_id, qdf_nbuf_t nbuf,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_tx_send_exception() - Transmit a frame on a given VAP in exception path
|
* dp_tx_send_exception() - Transmit a frame on a given VAP in exception path
|
||||||
* @vap_dev: DP vdev handle
|
* @soc: DP soc handle
|
||||||
|
* @vdev_id: id of DP vdev handle
|
||||||
* @nbuf: skb
|
* @nbuf: skb
|
||||||
* @tx_exc_metadata: Handle that holds exception path meta data
|
* @tx_exc_metadata: Handle that holds exception path meta data
|
||||||
*
|
*
|
||||||
@@ -2086,13 +2087,18 @@ __dp_tx_send_exception(ol_txrx_soc_handle soc, uint8_t vdev_id, qdf_nbuf_t nbuf,
|
|||||||
* nbuf when it fails to send
|
* nbuf when it fails to send
|
||||||
*/
|
*/
|
||||||
qdf_nbuf_t
|
qdf_nbuf_t
|
||||||
dp_tx_send_exception(struct cdp_vdev *vap_dev, qdf_nbuf_t nbuf,
|
dp_tx_send_exception(struct cdp_soc_t *soc, uint8_t vdev_id, qdf_nbuf_t nbuf,
|
||||||
struct cdp_tx_exception_metadata *tx_exc_metadata)
|
struct cdp_tx_exception_metadata *tx_exc_metadata)
|
||||||
{
|
{
|
||||||
qdf_ether_header_t *eh = NULL;
|
qdf_ether_header_t *eh = NULL;
|
||||||
struct dp_vdev *vdev = (struct dp_vdev *) vap_dev;
|
struct dp_vdev *vdev =
|
||||||
|
dp_get_vdev_from_soc_vdev_id_wifi3((struct dp_soc *)soc,
|
||||||
|
vdev_id);
|
||||||
struct dp_tx_msdu_info_s msdu_info;
|
struct dp_tx_msdu_info_s msdu_info;
|
||||||
|
|
||||||
|
if (qdf_unlikely(!vdev))
|
||||||
|
goto fail;
|
||||||
|
|
||||||
qdf_mem_zero(&msdu_info, sizeof(msdu_info));
|
qdf_mem_zero(&msdu_info, sizeof(msdu_info));
|
||||||
|
|
||||||
if (!tx_exc_metadata)
|
if (!tx_exc_metadata)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -149,7 +149,8 @@ dp_wdi_event_handler(
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* dp_wdi_event_sub() - Subscribe WDI event
|
* dp_wdi_event_sub() - Subscribe WDI event
|
||||||
* @txrx_pdev_handle: cdp_pdev handle
|
* @soc: soc handle
|
||||||
|
* @pdev_id: id of pdev
|
||||||
* @event_cb_sub_handle: subcribe evnet handle
|
* @event_cb_sub_handle: subcribe evnet handle
|
||||||
* @event: Event to be subscribe
|
* @event: Event to be subscribe
|
||||||
*
|
*
|
||||||
@@ -157,13 +158,15 @@ dp_wdi_event_handler(
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
dp_wdi_event_sub(
|
dp_wdi_event_sub(
|
||||||
struct cdp_pdev *txrx_pdev_handle,
|
struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
void *event_cb_sub_handle,
|
wdi_event_subscribe *event_cb_sub_handle,
|
||||||
uint32_t event)
|
uint32_t event)
|
||||||
{
|
{
|
||||||
uint32_t event_index;
|
uint32_t event_index;
|
||||||
wdi_event_subscribe *wdi_sub;
|
wdi_event_subscribe *wdi_sub;
|
||||||
struct dp_pdev *txrx_pdev = (struct dp_pdev *)txrx_pdev_handle;
|
struct dp_pdev *txrx_pdev =
|
||||||
|
dp_get_pdev_from_soc_pdev_id_wifi3((struct dp_soc *)soc,
|
||||||
|
pdev_id);
|
||||||
wdi_event_subscribe *event_cb_sub =
|
wdi_event_subscribe *event_cb_sub =
|
||||||
(wdi_event_subscribe *) event_cb_sub_handle;
|
(wdi_event_subscribe *) event_cb_sub_handle;
|
||||||
|
|
||||||
@@ -206,7 +209,8 @@ dp_wdi_event_sub(
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* dp_wdi_event_unsub() - WDI event unsubscribe
|
* dp_wdi_event_unsub() - WDI event unsubscribe
|
||||||
* @txrx_pdev_handle: cdp_pdev handle
|
* @soc: soc handle
|
||||||
|
* @pdev_id: id of pdev
|
||||||
* @event_cb_sub_handle: subscribed event handle
|
* @event_cb_sub_handle: subscribed event handle
|
||||||
* @event: Event to be unsubscribe
|
* @event: Event to be unsubscribe
|
||||||
*
|
*
|
||||||
@@ -215,18 +219,20 @@ dp_wdi_event_sub(
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
dp_wdi_event_unsub(
|
dp_wdi_event_unsub(
|
||||||
struct cdp_pdev *txrx_pdev_handle,
|
struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||||
void *event_cb_sub_handle,
|
wdi_event_subscribe *event_cb_sub_handle,
|
||||||
uint32_t event)
|
uint32_t event)
|
||||||
{
|
{
|
||||||
uint32_t event_index = event - WDI_EVENT_BASE;
|
uint32_t event_index = event - WDI_EVENT_BASE;
|
||||||
struct dp_pdev *txrx_pdev = (struct dp_pdev *)txrx_pdev_handle;
|
struct dp_pdev *txrx_pdev =
|
||||||
|
dp_get_pdev_from_soc_pdev_id_wifi3((struct dp_soc *)soc,
|
||||||
|
pdev_id);
|
||||||
wdi_event_subscribe *event_cb_sub =
|
wdi_event_subscribe *event_cb_sub =
|
||||||
(wdi_event_subscribe *) event_cb_sub_handle;
|
(wdi_event_subscribe *) event_cb_sub_handle;
|
||||||
|
|
||||||
if (!event_cb_sub) {
|
if (!txrx_pdev || !event_cb_sub) {
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||||
"Invalid callback in %s", __func__);
|
"Invalid callback or pdev in %s", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user