|
@@ -27,11 +27,10 @@
|
|
|
#include "cdp_txrx_handle.h"
|
|
|
/**
|
|
|
* cdp_tx_non_std() - Allow the control-path SW to send data frames
|
|
|
- *
|
|
|
- * @soc - data path soc handle
|
|
|
- * @data_vdev - which vdev should transmit the tx data frames
|
|
|
- * @tx_spec - what non-standard handling to apply to the tx data frames
|
|
|
- * @msdu_list - NULL-terminated list of tx MSDUs
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @vdev_id: id of vdev
|
|
|
+ * @tx_spec: what non-standard handling to apply to the tx data frames
|
|
|
+ * @msdu_list: NULL-terminated list of tx MSDUs
|
|
|
*
|
|
|
* Generally, all tx data frames come from the OS shim into the txrx layer.
|
|
|
* However, there are rare cases such as TDLS messaging where the UMAC
|
|
@@ -49,8 +48,8 @@
|
|
|
* Return: null - success, skb - failure
|
|
|
*/
|
|
|
static inline qdf_nbuf_t
|
|
|
-cdp_tx_non_std(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
|
|
- enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list)
|
|
|
+cdp_tx_non_std(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
|
|
+ enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
|
@@ -59,23 +58,23 @@ cdp_tx_non_std(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->tx_non_std)
|
|
|
- return soc->ops->misc_ops->tx_non_std(
|
|
|
- vdev, tx_spec, msdu_list);
|
|
|
+ return soc->ops->misc_ops->tx_non_std(soc, vdev_id, tx_spec,
|
|
|
+ msdu_list);
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_set_ibss_vdev_heart_beat_timer() - Update ibss vdev heart
|
|
|
* beat timer
|
|
|
- * @soc - data path soc handle
|
|
|
- * @vdev - vdev handle
|
|
|
- * @timer_value_sec - new heart beat timer value
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @vdev_id: id of vdev
|
|
|
+ * @timer_value_sec: new heart beat timer value
|
|
|
*
|
|
|
* Return: Old timer value set in vdev.
|
|
|
*/
|
|
|
static inline uint16_t
|
|
|
cdp_set_ibss_vdev_heart_beat_timer(ol_txrx_soc_handle soc,
|
|
|
- struct cdp_vdev *vdev, uint16_t timer_value_sec)
|
|
|
+ uint8_t vdev_id, uint16_t timer_value_sec)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -85,21 +84,21 @@ cdp_set_ibss_vdev_heart_beat_timer(ol_txrx_soc_handle soc,
|
|
|
|
|
|
if (soc->ops->misc_ops->set_ibss_vdev_heart_beat_timer)
|
|
|
return soc->ops->misc_ops->set_ibss_vdev_heart_beat_timer(
|
|
|
- vdev, timer_value_sec);
|
|
|
+ soc, vdev_id, timer_value_sec);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_set_wisa_mode() - set wisa mode
|
|
|
- * @soc - data path soc handle
|
|
|
- * @vdev - vdev handle
|
|
|
- * @enable - enable or disable
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @vdev_id: vdev_id
|
|
|
+ * @enable: enable or disable
|
|
|
*
|
|
|
* Return: QDF_STATUS_SUCCESS mode enable success
|
|
|
*/
|
|
|
static inline QDF_STATUS
|
|
|
-cdp_set_wisa_mode(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, bool enable)
|
|
|
+cdp_set_wisa_mode(ol_txrx_soc_handle soc, uint8_t vdev_id, bool enable)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -108,18 +107,20 @@ cdp_set_wisa_mode(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, bool enable)
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->set_wisa_mode)
|
|
|
- return soc->ops->misc_ops->set_wisa_mode(vdev, enable);
|
|
|
+ return soc->ops->misc_ops->set_wisa_mode(soc, vdev_id, enable);
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_data_stall_cb_register() - register data stall callback
|
|
|
- * @soc - data path soc handle
|
|
|
- * @cb - callback function
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: id of data path pdev handle
|
|
|
+ * @cb: callback function
|
|
|
*
|
|
|
* Return: QDF_STATUS_SUCCESS register success
|
|
|
*/
|
|
|
static inline QDF_STATUS cdp_data_stall_cb_register(ol_txrx_soc_handle soc,
|
|
|
+ uint8_t pdev_id,
|
|
|
data_stall_detect_cb cb)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
@@ -129,18 +130,21 @@ static inline QDF_STATUS cdp_data_stall_cb_register(ol_txrx_soc_handle soc,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->txrx_data_stall_cb_register)
|
|
|
- return soc->ops->misc_ops->txrx_data_stall_cb_register(cb);
|
|
|
+ return soc->ops->misc_ops->txrx_data_stall_cb_register(
|
|
|
+ soc, pdev_id, cb);
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_data_stall_cb_deregister() - de-register data stall callback
|
|
|
- * @soc - data path soc handle
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: id of data path pdev handle
|
|
|
* @cb - callback function
|
|
|
*
|
|
|
* Return: QDF_STATUS_SUCCESS de-register success
|
|
|
*/
|
|
|
static inline QDF_STATUS cdp_data_stall_cb_deregister(ol_txrx_soc_handle soc,
|
|
|
+ uint8_t pdev_id,
|
|
|
data_stall_detect_cb cb)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
@@ -150,13 +154,14 @@ static inline QDF_STATUS cdp_data_stall_cb_deregister(ol_txrx_soc_handle soc,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->txrx_data_stall_cb_deregister)
|
|
|
- return soc->ops->misc_ops->txrx_data_stall_cb_deregister(cb);
|
|
|
+ return soc->ops->misc_ops->txrx_data_stall_cb_deregister(
|
|
|
+ soc, pdev_id, cb);
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_post_data_stall_event() - post data stall event
|
|
|
- * @soc - data path soc handle
|
|
|
+ * @soc: data path soc handle
|
|
|
* @indicator: Module triggering data stall
|
|
|
* @data_stall_type: data stall event type
|
|
|
* @pdev_id: pdev id
|
|
@@ -184,21 +189,21 @@ cdp_post_data_stall_event(ol_txrx_soc_handle soc,
|
|
|
return;
|
|
|
|
|
|
soc->ops->misc_ops->txrx_post_data_stall_event(
|
|
|
- indicator, data_stall_type, pdev_id,
|
|
|
+ soc, indicator, data_stall_type, pdev_id,
|
|
|
vdev_id_bitmap, recovery_type);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_set_wmm_param() - set wmm parameter
|
|
|
- * @soc - data path soc handle
|
|
|
- * @pdev - device instance pointer
|
|
|
- * @wmm_param - wmm parameter
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: id of data path pdev handle
|
|
|
+ * @wmm_param: wmm parameter
|
|
|
*
|
|
|
* Return: none
|
|
|
*/
|
|
|
static inline void
|
|
|
-cdp_set_wmm_param(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|
|
- struct ol_tx_wmm_param_t wmm_param)
|
|
|
+cdp_set_wmm_param(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
|
|
+ struct ol_tx_wmm_param_t wmm_param)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -207,21 +212,21 @@ cdp_set_wmm_param(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->set_wmm_param)
|
|
|
- return soc->ops->misc_ops->set_wmm_param(
|
|
|
- pdev, wmm_param);
|
|
|
+ return soc->ops->misc_ops->set_wmm_param(soc, pdev_id,
|
|
|
+ wmm_param);
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_runtime_suspend() - suspend
|
|
|
- * @soc - data path soc handle
|
|
|
- * @pdev - device instance pointer
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: id of data path pdev handle
|
|
|
*
|
|
|
* Return: QDF_STATUS_SUCCESS suspend success
|
|
|
*/
|
|
|
static inline QDF_STATUS cdp_runtime_suspend(ol_txrx_soc_handle soc,
|
|
|
- struct cdp_pdev *pdev)
|
|
|
+ uint8_t pdev_id)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -230,20 +235,20 @@ static inline QDF_STATUS cdp_runtime_suspend(ol_txrx_soc_handle soc,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->runtime_suspend)
|
|
|
- return soc->ops->misc_ops->runtime_suspend(pdev);
|
|
|
+ return soc->ops->misc_ops->runtime_suspend(soc, pdev_id);
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_runtime_resume() - resume
|
|
|
- * @soc - data path soc handle
|
|
|
- * @pdev - device instance pointer
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: id of data path pdev handle
|
|
|
*
|
|
|
* Return: QDF_STATUS_SUCCESS suspend success
|
|
|
*/
|
|
|
static inline QDF_STATUS cdp_runtime_resume(ol_txrx_soc_handle soc,
|
|
|
- struct cdp_pdev *pdev)
|
|
|
+ uint8_t pdev_id)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -252,21 +257,21 @@ static inline QDF_STATUS cdp_runtime_resume(ol_txrx_soc_handle soc,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->runtime_resume)
|
|
|
- return soc->ops->misc_ops->runtime_resume(pdev);
|
|
|
+ return soc->ops->misc_ops->runtime_resume(soc, pdev_id);
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_hl_tdls_flag_reset() - tdls flag reset
|
|
|
- * @soc - data path soc handle
|
|
|
- * @vdev - virtual interface handle pointer
|
|
|
- * @flag
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @vdev_id: id of vdev
|
|
|
+ * @flag: flag indicating to set/reset tdls
|
|
|
*
|
|
|
* Return: none
|
|
|
*/
|
|
|
static inline void
|
|
|
-cdp_hl_tdls_flag_reset(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, bool flag)
|
|
|
+cdp_hl_tdls_flag_reset(ol_txrx_soc_handle soc, uint8_t vdev_id, bool flag)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -275,15 +280,16 @@ cdp_hl_tdls_flag_reset(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, bool flag)
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->hl_tdls_flag_reset)
|
|
|
- return soc->ops->misc_ops->hl_tdls_flag_reset(vdev, flag);
|
|
|
+ return soc->ops->misc_ops->hl_tdls_flag_reset(soc, vdev_id,
|
|
|
+ flag);
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_get_opmode() - get vdev operation mode
|
|
|
- * @soc - data path soc handle
|
|
|
- * @vdev - virtual interface instance
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @vdev_id: id of vdev
|
|
|
*
|
|
|
* Return virtual device operational mode
|
|
|
* op_mode_ap,
|
|
@@ -296,7 +302,7 @@ cdp_hl_tdls_flag_reset(ol_txrx_soc_handle soc, struct cdp_vdev *vdev, bool flag)
|
|
|
* 0 unknown interface
|
|
|
*/
|
|
|
static inline int
|
|
|
-cdp_get_opmode(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
|
|
+cdp_get_opmode(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -305,7 +311,8 @@ cdp_get_opmode(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->get_opmode)
|
|
|
- return soc->ops->misc_ops->get_opmode(vdev);
|
|
|
+ return soc->ops->misc_ops->get_opmode(soc, vdev_id);
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -336,15 +343,13 @@ cdp_get_vdev_id(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
|
|
/**
|
|
|
* cdp_get_tx_ack_stats() - get tx ack count for vdev
|
|
|
* @soc - data path soc handle
|
|
|
- * @pdev - data path device instance
|
|
|
* @vdev_id - vdev id
|
|
|
*
|
|
|
* return tx ack count
|
|
|
* 0 invalid count
|
|
|
*/
|
|
|
static inline uint32_t
|
|
|
-cdp_get_tx_ack_stats(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|
|
- uint8_t vdev_id)
|
|
|
+cdp_get_tx_ack_stats(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -353,26 +358,24 @@ cdp_get_tx_ack_stats(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->get_tx_ack_stats)
|
|
|
- return soc->ops->misc_ops->get_tx_ack_stats(pdev, vdev_id);
|
|
|
+ return soc->ops->misc_ops->get_tx_ack_stats(soc, vdev_id);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * cdp_bad_peer_txctl_set_setting() - TBD
|
|
|
- * @soc - data path soc handle
|
|
|
- * @pdev - data path device instance
|
|
|
- * @enable -
|
|
|
- * @period -
|
|
|
- * @txq_limit -
|
|
|
- *
|
|
|
- * TBD
|
|
|
+ * cdp_bad_peer_txctl_set_setting() - Set peer timer balance parameters
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: id of datapath pdev handle
|
|
|
+ * @enable: enable/disable peer balance state
|
|
|
+ * @period: balance timer period for peer
|
|
|
+ * @txq_limit: txp limit for peer
|
|
|
*
|
|
|
* Return: none
|
|
|
*/
|
|
|
static inline void
|
|
|
-cdp_bad_peer_txctl_set_setting(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|
|
- int enable, int period, int txq_limit)
|
|
|
+cdp_bad_peer_txctl_set_setting(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
|
|
+ int enable, int period, int txq_limit)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -381,18 +384,19 @@ cdp_bad_peer_txctl_set_setting(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->bad_peer_txctl_set_setting)
|
|
|
- return soc->ops->misc_ops->bad_peer_txctl_set_setting(pdev,
|
|
|
- enable, period, txq_limit);
|
|
|
+ return soc->ops->misc_ops->bad_peer_txctl_set_setting(
|
|
|
+ soc, pdev_id, enable, period,
|
|
|
+ txq_limit);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_bad_peer_txctl_update_threshold() - TBD
|
|
|
- * @soc - data path soc handle
|
|
|
- * @pdev - data path device instance
|
|
|
- * @level -
|
|
|
- * @tput_thresh -
|
|
|
- * @tx_limit -
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: id of data path pdev handle
|
|
|
+ * @level: index of the threshold configuration
|
|
|
+ * @tput_thresh: peer balance throughput threshold
|
|
|
+ * @tx_limit: peer balance tx limit threshold
|
|
|
*
|
|
|
* TBD
|
|
|
*
|
|
@@ -400,8 +404,8 @@ cdp_bad_peer_txctl_set_setting(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
|
|
*/
|
|
|
static inline void
|
|
|
cdp_bad_peer_txctl_update_threshold(ol_txrx_soc_handle soc,
|
|
|
- struct cdp_pdev *pdev,
|
|
|
- int level, int tput_thresh, int tx_limit)
|
|
|
+ uint8_t pdev_id, int level,
|
|
|
+ int tput_thresh, int tx_limit)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -411,20 +415,21 @@ cdp_bad_peer_txctl_update_threshold(ol_txrx_soc_handle soc,
|
|
|
|
|
|
if (soc->ops->misc_ops->bad_peer_txctl_update_threshold)
|
|
|
return soc->ops->misc_ops->bad_peer_txctl_update_threshold(
|
|
|
- pdev, level, tput_thresh, tx_limit);
|
|
|
+ soc, pdev_id, level, tput_thresh, tx_limit);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_mark_first_wakeup_packet() - set flag to indicate that
|
|
|
* fw is compatible for marking first packet after wow wakeup
|
|
|
- * @soc - data path soc handle
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: id of data path pdev handle
|
|
|
* @value: 1 for enabled/ 0 for disabled
|
|
|
*
|
|
|
* Return: None
|
|
|
*/
|
|
|
static inline void cdp_mark_first_wakeup_packet(ol_txrx_soc_handle soc,
|
|
|
- uint8_t value)
|
|
|
+ uint8_t pdev_id, uint8_t value)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -433,21 +438,22 @@ static inline void cdp_mark_first_wakeup_packet(ol_txrx_soc_handle soc,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->mark_first_wakeup_packet)
|
|
|
- return soc->ops->misc_ops->mark_first_wakeup_packet(value);
|
|
|
+ return soc->ops->misc_ops->mark_first_wakeup_packet(
|
|
|
+ soc, pdev_id, value);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* cds_update_mac_id() - update mac_id for vdev
|
|
|
- * @soc - data path soc handle
|
|
|
+ * @psoc: data path soc handle
|
|
|
* @vdev_id: vdev id
|
|
|
* @mac_id: mac id
|
|
|
*
|
|
|
* Return: none
|
|
|
*/
|
|
|
static inline void cdp_update_mac_id(void *psoc, uint8_t vdev_id,
|
|
|
- uint8_t mac_id)
|
|
|
+ uint8_t mac_id)
|
|
|
{
|
|
|
ol_txrx_soc_handle soc = psoc;
|
|
|
|
|
@@ -458,20 +464,21 @@ static inline void cdp_update_mac_id(void *psoc, uint8_t vdev_id,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->update_mac_id)
|
|
|
- return soc->ops->misc_ops->update_mac_id(vdev_id, mac_id);
|
|
|
+ return soc->ops->misc_ops->update_mac_id(soc, vdev_id, mac_id);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_flush_rx_frames() - flush cached rx frames
|
|
|
- * @soc - data path soc handle
|
|
|
- * @peer: peer
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: datapath pdev identifier
|
|
|
+ * @peer_mac: peer mac address
|
|
|
* @drop: set flag to drop frames
|
|
|
*
|
|
|
* Return: None
|
|
|
*/
|
|
|
-static inline void cdp_flush_rx_frames(ol_txrx_soc_handle soc, void *peer,
|
|
|
- bool drop)
|
|
|
+static inline void cdp_flush_rx_frames(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
|
|
+ uint8_t *peer_mac, bool drop)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -480,13 +487,15 @@ static inline void cdp_flush_rx_frames(ol_txrx_soc_handle soc, void *peer,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->flush_rx_frames)
|
|
|
- return soc->ops->misc_ops->flush_rx_frames(peer, drop);
|
|
|
+ return soc->ops->misc_ops->flush_rx_frames(soc, pdev_id,
|
|
|
+ peer_mac, drop);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
* cdp_get_intra_bss_fwd_pkts_count() - to get the total tx and rx packets
|
|
|
* that has been forwarded from txrx layer without going to upper layers.
|
|
|
+ * @soc: Datapath soc handle
|
|
|
* @vdev_id: vdev id
|
|
|
* @fwd_tx_packets: pointer to forwarded tx packets count parameter
|
|
|
* @fwd_rx_packets: pointer to forwarded rx packets count parameter
|
|
@@ -505,20 +514,21 @@ static inline A_STATUS cdp_get_intra_bss_fwd_pkts_count(
|
|
|
|
|
|
if (soc->ops->misc_ops->get_intra_bss_fwd_pkts_count)
|
|
|
return soc->ops->misc_ops->get_intra_bss_fwd_pkts_count(
|
|
|
- vdev_id, fwd_tx_packets, fwd_rx_packets);
|
|
|
+ soc, vdev_id, fwd_tx_packets, fwd_rx_packets);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_pkt_log_init() - API to initialize packet log
|
|
|
- * @handle: pdev handle
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: id of data path pdev handle
|
|
|
* @scn: HIF context
|
|
|
*
|
|
|
* Return: void
|
|
|
*/
|
|
|
static inline void cdp_pkt_log_init(ol_txrx_soc_handle soc,
|
|
|
- struct cdp_pdev *pdev, void *scn)
|
|
|
+ uint8_t pdev_id, void *scn)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -527,20 +537,21 @@ static inline void cdp_pkt_log_init(ol_txrx_soc_handle soc,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->pkt_log_init)
|
|
|
- return soc->ops->misc_ops->pkt_log_init(pdev, scn);
|
|
|
+ return soc->ops->misc_ops->pkt_log_init(soc, pdev_id, scn);
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* cdp_pkt_log_con_service() - API to connect packet log service
|
|
|
- * @handle: pdev handle
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: id of data path pdev handle
|
|
|
* @scn: HIF context
|
|
|
*
|
|
|
* Return: void
|
|
|
*/
|
|
|
static inline void cdp_pkt_log_con_service(ol_txrx_soc_handle soc,
|
|
|
- struct cdp_pdev *pdev, void *scn)
|
|
|
+ uint8_t pdev_id, void *scn)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -549,7 +560,8 @@ static inline void cdp_pkt_log_con_service(ol_txrx_soc_handle soc,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->pkt_log_con_service)
|
|
|
- return soc->ops->misc_ops->pkt_log_con_service(pdev, scn);
|
|
|
+ return soc->ops->misc_ops->pkt_log_con_service(
|
|
|
+ soc, pdev_id, scn);
|
|
|
|
|
|
return;
|
|
|
}
|
|
@@ -581,12 +593,14 @@ static inline int cdp_get_num_rx_contexts(ol_txrx_soc_handle soc)
|
|
|
* stats will be passed to user-space by @tx_cb/@rx_cb.
|
|
|
*
|
|
|
* @soc: soc handle
|
|
|
+ * @pdev_id: id of data path pdev handle
|
|
|
* @tx_cb: tx packet callback
|
|
|
* @rx_cb: rx packet callback
|
|
|
*
|
|
|
* Return: void
|
|
|
*/
|
|
|
static inline void cdp_register_packetdump_cb(ol_txrx_soc_handle soc,
|
|
|
+ uint8_t pdev_id,
|
|
|
ol_txrx_pktdump_cb tx_cb,
|
|
|
ol_txrx_pktdump_cb rx_cb)
|
|
|
{
|
|
@@ -597,7 +611,8 @@ static inline void cdp_register_packetdump_cb(ol_txrx_soc_handle soc,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->register_pktdump_cb)
|
|
|
- return soc->ops->misc_ops->register_pktdump_cb(tx_cb, rx_cb);
|
|
|
+ return soc->ops->misc_ops->register_pktdump_cb(
|
|
|
+ soc, pdev_id, tx_cb, rx_cb);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -606,10 +621,12 @@ static inline void cdp_register_packetdump_cb(ol_txrx_soc_handle soc,
|
|
|
* Deregister callback for TX/RX data packets.
|
|
|
*
|
|
|
* @soc: soc handle
|
|
|
+ * @pdev_id: id of data path pdev handle
|
|
|
*
|
|
|
* Return: void
|
|
|
*/
|
|
|
-static inline void cdp_deregister_packetdump_cb(ol_txrx_soc_handle soc)
|
|
|
+static inline void cdp_deregister_packetdump_cb(ol_txrx_soc_handle soc,
|
|
|
+ uint8_t pdev_id)
|
|
|
{
|
|
|
if (!soc || !soc->ops || !soc->ops->misc_ops) {
|
|
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
|
@@ -618,7 +635,7 @@ static inline void cdp_deregister_packetdump_cb(ol_txrx_soc_handle soc)
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->unregister_pktdump_cb)
|
|
|
- return soc->ops->misc_ops->unregister_pktdump_cb();
|
|
|
+ return soc->ops->misc_ops->unregister_pktdump_cb(soc, pdev_id);
|
|
|
}
|
|
|
|
|
|
typedef void (*rx_mic_error_callback)(void *scn_handle,
|
|
@@ -648,13 +665,13 @@ cdp_register_rx_mic_error_ind_handler(ol_txrx_soc_handle soc,
|
|
|
|
|
|
/**
|
|
|
* cdp_pdev_reset_driver_del_ack() - reset driver TCP delayed ack flag
|
|
|
- * @soc - data path soc handle
|
|
|
- * @pdev - data path device instance
|
|
|
+ * @soc: data path soc handle
|
|
|
+ * @pdev_id: pdev id
|
|
|
*
|
|
|
* Return: none
|
|
|
*/
|
|
|
static inline void cdp_pdev_reset_driver_del_ack(void *psoc,
|
|
|
- struct cdp_pdev *pdev)
|
|
|
+ uint8_t pdev_id)
|
|
|
{
|
|
|
ol_txrx_soc_handle soc = psoc;
|
|
|
|
|
@@ -665,12 +682,13 @@ static inline void cdp_pdev_reset_driver_del_ack(void *psoc,
|
|
|
}
|
|
|
|
|
|
if (soc->ops->misc_ops->pdev_reset_driver_del_ack)
|
|
|
- return soc->ops->misc_ops->pdev_reset_driver_del_ack(pdev);
|
|
|
+ return soc->ops->misc_ops->pdev_reset_driver_del_ack(soc,
|
|
|
+ pdev_id);
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
* cdp_vdev_set_driver_del_ack_enable() - set driver delayed ack enabled flag
|
|
|
- * @soc - data path soc handle
|
|
|
+ * @soc: data path soc handle
|
|
|
* @vdev_id: vdev id
|
|
|
* @rx_packets: number of rx packets
|
|
|
* @time_in_ms: time in ms
|
|
@@ -694,6 +712,6 @@ static inline void cdp_vdev_set_driver_del_ack_enable(ol_txrx_soc_handle soc,
|
|
|
|
|
|
if (soc->ops->misc_ops->vdev_set_driver_del_ack_enable)
|
|
|
return soc->ops->misc_ops->vdev_set_driver_del_ack_enable(
|
|
|
- vdev_id, rx_packets, time_in_ms, high_th, low_th);
|
|
|
+ soc, vdev_id, rx_packets, time_in_ms, high_th, low_th);
|
|
|
}
|
|
|
#endif /* _CDP_TXRX_MISC_H_ */
|