mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
Merge "qcacmn: Decoupling changes for stats, wds, raw and pflow ops"
This commit is contained in:
commit
c75fdb7ba2
25 changed files with 762 additions and 587 deletions
|
|
@ -24,15 +24,17 @@
|
|||
#ifndef _CDP_TXRX_HOST_STATS_H_
|
||||
#define _CDP_TXRX_HOST_STATS_H_
|
||||
#include "cdp_txrx_handle.h"
|
||||
#include <wmi_unified_api.h>
|
||||
/**
|
||||
* cdp_host_stats_get: cdp call to get host stats
|
||||
* @soc: SOC handle
|
||||
* @vdev_id: vdev id of vdev
|
||||
* @req: Requirement type
|
||||
*
|
||||
* return: 0 for Success, Failure returns error message
|
||||
*/
|
||||
static inline int cdp_host_stats_get(ol_txrx_soc_handle soc,
|
||||
struct cdp_vdev *vdev,
|
||||
uint8_t vdev_id,
|
||||
struct ol_txrx_stats_req *req)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
|
|
@ -46,7 +48,7 @@ static inline int cdp_host_stats_get(ol_txrx_soc_handle soc,
|
|||
!soc->ops->host_stats_ops->txrx_host_stats_get)
|
||||
return 0;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_host_stats_get(vdev, req);
|
||||
return soc->ops->host_stats_ops->txrx_host_stats_get(soc, vdev_id, req);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -81,46 +83,47 @@ static inline int cdp_host_stats_get_ratekbps(ol_txrx_soc_handle soc,
|
|||
|
||||
/**
|
||||
* cdp_host_stats_clr: cdp call to clear host stats
|
||||
* @vdev: vdev handle
|
||||
* @soc: soc handle
|
||||
* @vdev_id: vdev handle id
|
||||
*
|
||||
* return: void
|
||||
* return: QDF_STATUS
|
||||
*/
|
||||
static inline void
|
||||
cdp_host_stats_clr(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||
static inline QDF_STATUS
|
||||
cdp_host_stats_clr(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_host_stats_clr)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->txrx_host_stats_clr(vdev);
|
||||
return soc->ops->host_stats_ops->txrx_host_stats_clr(soc, vdev_id);
|
||||
}
|
||||
|
||||
static inline void
|
||||
cdp_host_ce_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||
static inline QDF_STATUS
|
||||
cdp_host_ce_stats(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_host_ce_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->txrx_host_ce_stats(vdev);
|
||||
return soc->ops->host_stats_ops->txrx_host_ce_stats(soc, vdev_id);
|
||||
}
|
||||
|
||||
static inline int cdp_stats_publish
|
||||
(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
||||
(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
||||
struct cdp_stats_extd *buf)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
|
|
@ -134,204 +137,176 @@ static inline int cdp_stats_publish
|
|||
!soc->ops->host_stats_ops->txrx_stats_publish)
|
||||
return 0;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_stats_publish(pdev, buf);
|
||||
return soc->ops->host_stats_ops->txrx_stats_publish(soc, pdev_id, buf);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable enhanced stats functionality.
|
||||
*
|
||||
* @param pdev - the physical device object
|
||||
* @return - void
|
||||
* @param soc - the soc object
|
||||
* @param pdev_id - id of the physical device object
|
||||
* @return - QDF_STATUS
|
||||
*/
|
||||
static inline void
|
||||
cdp_enable_enhanced_stats(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
|
||||
static inline QDF_STATUS
|
||||
cdp_enable_enhanced_stats(ol_txrx_soc_handle soc, uint8_t pdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_enable_enhanced_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->txrx_enable_enhanced_stats
|
||||
(pdev);
|
||||
return soc->ops->host_stats_ops->txrx_enable_enhanced_stats
|
||||
(soc, pdev_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Disable enhanced stats functionality.
|
||||
*
|
||||
* @param pdev - the physical device object
|
||||
* @return - void
|
||||
* @param soc - the soc object
|
||||
* @param pdev_id - id of the physical device object
|
||||
* @return - QDF_STATUS
|
||||
*/
|
||||
static inline void
|
||||
cdp_disable_enhanced_stats(ol_txrx_soc_handle soc, struct cdp_pdev *pdev)
|
||||
static inline QDF_STATUS
|
||||
cdp_disable_enhanced_stats(ol_txrx_soc_handle soc, uint8_t pdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_disable_enhanced_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->txrx_disable_enhanced_stats
|
||||
(pdev);
|
||||
return soc->ops->host_stats_ops->txrx_disable_enhanced_stats
|
||||
(soc, pdev_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the desired stats from the message.
|
||||
*
|
||||
* @param pdev - the physical device object
|
||||
* @param stats_base - stats buffer received from FW
|
||||
* @param type - stats type.
|
||||
* @return - pointer to requested stat identified by type
|
||||
*/
|
||||
static inline uint32_t *cdp_get_stats_base
|
||||
(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
||||
uint32_t *stats_base, uint32_t msg_len, uint8_t type)
|
||||
static inline QDF_STATUS
|
||||
cdp_tx_print_tso_stats(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||
{
|
||||
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->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_get_stats_base)
|
||||
return 0;
|
||||
|
||||
return (uint32_t *)soc->ops->host_stats_ops->txrx_get_stats_base
|
||||
(pdev, stats_base, msg_len, type);
|
||||
}
|
||||
|
||||
static inline void
|
||||
cdp_tx_print_tso_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_vdev *vdev)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->tx_print_tso_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->tx_print_tso_stats(vdev);
|
||||
return soc->ops->host_stats_ops->tx_print_tso_stats(soc, vdev_id);
|
||||
}
|
||||
|
||||
static inline void
|
||||
cdp_tx_rst_tso_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||
static inline QDF_STATUS
|
||||
cdp_tx_rst_tso_stats(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->tx_rst_tso_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->tx_rst_tso_stats(vdev);
|
||||
return soc->ops->host_stats_ops->tx_rst_tso_stats(soc, vdev_id);
|
||||
}
|
||||
|
||||
static inline void
|
||||
cdp_tx_print_sg_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_vdev *vdev)
|
||||
static inline QDF_STATUS
|
||||
cdp_tx_print_sg_stats(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->tx_print_sg_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->tx_print_sg_stats(vdev);
|
||||
return soc->ops->host_stats_ops->tx_print_sg_stats(soc, vdev_id);
|
||||
}
|
||||
|
||||
static inline void
|
||||
cdp_tx_rst_sg_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||
static inline QDF_STATUS
|
||||
cdp_tx_rst_sg_stats(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->tx_rst_sg_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->tx_rst_sg_stats(vdev);
|
||||
return soc->ops->host_stats_ops->tx_rst_sg_stats(soc, vdev_id);
|
||||
}
|
||||
|
||||
static inline void
|
||||
cdp_print_rx_cksum_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_vdev *vdev)
|
||||
static inline QDF_STATUS
|
||||
cdp_print_rx_cksum_stats(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->print_rx_cksum_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->print_rx_cksum_stats(vdev);
|
||||
return soc->ops->host_stats_ops->print_rx_cksum_stats(soc, vdev_id);
|
||||
}
|
||||
|
||||
static inline void
|
||||
cdp_rst_rx_cksum_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||
static inline QDF_STATUS
|
||||
cdp_rst_rx_cksum_stats(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->rst_rx_cksum_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->rst_rx_cksum_stats(vdev);
|
||||
return soc->ops->host_stats_ops->rst_rx_cksum_stats(soc, vdev_id);
|
||||
}
|
||||
|
||||
static inline A_STATUS
|
||||
cdp_host_me_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||
static inline QDF_STATUS
|
||||
cdp_host_me_stats(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return 0;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_host_me_stats)
|
||||
return 0;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_host_me_stats(vdev);
|
||||
return soc->ops->host_stats_ops->txrx_host_me_stats(soc, vdev_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -342,25 +317,25 @@ cdp_host_me_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
|||
*
|
||||
* return: status
|
||||
*/
|
||||
static inline void cdp_per_peer_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_pdev *pdev, char *addr)
|
||||
static inline QDF_STATUS cdp_per_peer_stats(ol_txrx_soc_handle soc,
|
||||
uint8_t *addr)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_per_peer_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->txrx_per_peer_stats(pdev, addr);
|
||||
return soc->ops->host_stats_ops->txrx_per_peer_stats(soc, addr);
|
||||
}
|
||||
|
||||
static inline int cdp_host_msdu_ttl_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_vdev *vdev,
|
||||
uint8_t vdev_id,
|
||||
struct ol_txrx_stats_req *req)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
|
|
@ -375,106 +350,113 @@ static inline int cdp_host_msdu_ttl_stats(ol_txrx_soc_handle soc,
|
|||
return 0;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_host_msdu_ttl_stats
|
||||
(vdev, req);
|
||||
(soc, vdev_id, req);
|
||||
}
|
||||
|
||||
static inline void
|
||||
cdp_print_lro_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||
static inline QDF_STATUS cdp_update_peer_stats(ol_txrx_soc_handle soc,
|
||||
uint8_t vdev_id, uint8_t *mac,
|
||||
void *stats,
|
||||
uint32_t last_tx_rate_mcs,
|
||||
uint32_t stats_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->print_lro_stats)
|
||||
return;
|
||||
!soc->ops->host_stats_ops->txrx_update_peer_stats)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->print_lro_stats(vdev);
|
||||
return soc->ops->host_stats_ops->txrx_update_peer_stats
|
||||
(soc, vdev_id, mac, stats, last_tx_rate_mcs, stats_id);
|
||||
}
|
||||
|
||||
static inline void
|
||||
cdp_reset_lro_stats(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||
static inline QDF_STATUS cdp_get_dp_fw_peer_stats(ol_txrx_soc_handle soc,
|
||||
uint8_t pdev_id,
|
||||
uint8_t *mac, uint32_t caps,
|
||||
uint32_t copy_stats)
|
||||
{
|
||||
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->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->reset_lro_stats)
|
||||
return;
|
||||
|
||||
soc->ops->host_stats_ops->reset_lro_stats(vdev);
|
||||
}
|
||||
|
||||
static inline void cdp_get_dp_fw_peer_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_pdev *pdev, uint8_t *mac, uint32_t caps,
|
||||
uint32_t copy_stats)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->get_fw_peer_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->host_stats_ops->get_fw_peer_stats
|
||||
(pdev, mac, caps, copy_stats);
|
||||
return soc->ops->host_stats_ops->get_fw_peer_stats
|
||||
(soc, pdev_id, mac, caps, copy_stats);
|
||||
}
|
||||
|
||||
static inline void cdp_get_dp_htt_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_pdev *pdev,
|
||||
void *data, uint32_t data_len)
|
||||
static inline QDF_STATUS cdp_get_dp_htt_stats(ol_txrx_soc_handle soc,
|
||||
uint8_t pdev_id,
|
||||
void *data, uint32_t data_len)
|
||||
{
|
||||
if (soc && soc->ops && soc->ops->host_stats_ops &&
|
||||
soc->ops->host_stats_ops->get_htt_stats)
|
||||
return soc->ops->host_stats_ops->get_htt_stats
|
||||
(pdev, data, data_len);
|
||||
return;
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->get_htt_stats)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->host_stats_ops->get_htt_stats(soc, pdev_id, data,
|
||||
data_len);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Update pdev host stats received from firmware
|
||||
* (wmi_host_pdev_stats and wmi_host_pdev_ext_stats) into dp
|
||||
*
|
||||
* @param pdev - the physical device object
|
||||
* @param soc - soc handle
|
||||
* @param pdev_id - id of the physical device object
|
||||
* @param data - pdev stats
|
||||
* @return - void
|
||||
* @return - QDF_STATUS
|
||||
*/
|
||||
static inline void
|
||||
static inline QDF_STATUS
|
||||
cdp_update_pdev_host_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_pdev *pdev,
|
||||
uint8_t pdev_id,
|
||||
void *data,
|
||||
uint16_t stats_id)
|
||||
{
|
||||
if (soc && soc->ops && soc->ops->host_stats_ops &&
|
||||
soc->ops->host_stats_ops->txrx_update_pdev_stats)
|
||||
return soc->ops->host_stats_ops->txrx_update_pdev_stats
|
||||
(pdev, data, stats_id);
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_update_pdev_stats)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_update_pdev_stats(soc, pdev_id,
|
||||
data,
|
||||
stats_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Update vdev host stats
|
||||
*
|
||||
* @param soc - soc handle
|
||||
* @param vdev - the physical device object
|
||||
* @param vdev_id - id of the virtual device object
|
||||
* @param data - pdev stats
|
||||
* @param stats_id - type of stats
|
||||
*
|
||||
* @return - void
|
||||
* @return - QDF_STATUS
|
||||
*/
|
||||
static inline void
|
||||
static inline QDF_STATUS
|
||||
cdp_update_vdev_host_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_vdev *vdev,
|
||||
uint8_t vdev_id,
|
||||
void *data,
|
||||
uint16_t stats_id)
|
||||
{
|
||||
|
|
@ -482,98 +464,114 @@ cdp_update_vdev_host_stats(ol_txrx_soc_handle soc,
|
|||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_update_vdev_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_update_vdev_stats(vdev, data,
|
||||
return soc->ops->host_stats_ops->txrx_update_vdev_stats(soc, vdev_id,
|
||||
data,
|
||||
stats_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Call to get peer stats
|
||||
*
|
||||
* @param peer - dp peer object
|
||||
* @param soc - soc handle
|
||||
* @param vdev_id - vdev_id of vdev object
|
||||
* @param peer_mac - mac address of the peer
|
||||
* @return - struct cdp_peer_stats
|
||||
*/
|
||||
static inline struct cdp_peer_stats *
|
||||
cdp_host_get_peer_stats(ol_txrx_soc_handle soc, struct cdp_peer *peer)
|
||||
static inline QDF_STATUS
|
||||
cdp_host_get_peer_stats(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
||||
uint8_t *peer_mac,
|
||||
struct cdp_peer_stats *peer_stats)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return NULL;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_get_peer_stats)
|
||||
return NULL;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_get_peer_stats(peer);
|
||||
return soc->ops->host_stats_ops->txrx_get_peer_stats(soc, vdev_id,
|
||||
peer_mac,
|
||||
peer_stats);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Call to reset ald stats
|
||||
*
|
||||
* @param peer - dp peer object
|
||||
* @param soc - soc handle
|
||||
* @param vdev_id - vdev_id of vdev object
|
||||
* @param peer_mac - mac address of the peer
|
||||
* @return - void
|
||||
*/
|
||||
static inline void
|
||||
cdp_host_reset_peer_ald_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_peer *peer)
|
||||
static inline QDF_STATUS
|
||||
cdp_host_reset_peer_ald_stats(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
||||
uint8_t *peer_mac)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_reset_peer_ald_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_reset_peer_ald_stats(peer);
|
||||
return soc->ops->host_stats_ops->txrx_reset_peer_ald_stats(soc,
|
||||
vdev_id,
|
||||
peer_mac);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Call to reset peer stats
|
||||
*
|
||||
* @param peer - dp peer object
|
||||
* @return - void
|
||||
* @param soc - soc handle
|
||||
* @param vdev_id - vdev_id of vdev object
|
||||
* @param peer_mac - mac address of the peer
|
||||
* @return - QDF_STATUS
|
||||
*/
|
||||
static inline void
|
||||
static inline QDF_STATUS
|
||||
cdp_host_reset_peer_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_peer *peer)
|
||||
uint8_t vdev_id, uint8_t *peer_mac)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->txrx_reset_peer_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_reset_peer_stats(peer);
|
||||
return soc->ops->host_stats_ops->txrx_reset_peer_stats(soc,
|
||||
vdev_id,
|
||||
peer_mac);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Call to get vdev stats
|
||||
*
|
||||
* @param vdev - dp vdev object
|
||||
* @param soc - dp soc object
|
||||
* @param vdev_id - id of dp vdev object
|
||||
* @param buf - buffer
|
||||
* @return - int
|
||||
*/
|
||||
static inline int
|
||||
cdp_host_get_vdev_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_vdev *vdev,
|
||||
uint8_t vdev_id,
|
||||
struct cdp_vdev_stats *buf,
|
||||
bool is_aggregate)
|
||||
{
|
||||
|
|
@ -588,7 +586,7 @@ cdp_host_get_vdev_stats(ol_txrx_soc_handle soc,
|
|||
!soc->ops->host_stats_ops->txrx_get_vdev_stats)
|
||||
return 0;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_get_vdev_stats(vdev,
|
||||
return soc->ops->host_stats_ops->txrx_get_vdev_stats(soc, vdev_id,
|
||||
buf,
|
||||
is_aggregate);
|
||||
}
|
||||
|
|
@ -629,14 +627,15 @@ cdp_update_host_vdev_stats(ol_txrx_soc_handle soc,
|
|||
/**
|
||||
* @brief Call to get vdev extd stats
|
||||
*
|
||||
* @param vdev - dp vdev object
|
||||
* @param soc - soc handle
|
||||
* @param vdev_id - id of dp vdev object
|
||||
* @param buf - buffer
|
||||
* @return - int
|
||||
*/
|
||||
static inline int
|
||||
cdp_get_vdev_extd_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_vdev *vdev,
|
||||
void *buf)
|
||||
uint8_t vdev_id,
|
||||
wmi_host_vdev_extd_stats *buf)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
|
|
@ -649,18 +648,21 @@ cdp_get_vdev_extd_stats(ol_txrx_soc_handle soc,
|
|||
!soc->ops->host_stats_ops->txrx_get_vdev_extd_stats)
|
||||
return 0;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_get_vdev_extd_stats(vdev, buf);
|
||||
return soc->ops->host_stats_ops->txrx_get_vdev_extd_stats(soc, vdev_id,
|
||||
buf);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Call to get cdp_pdev_stats
|
||||
*
|
||||
* @param pdev - dp pdev object
|
||||
* @return - cdp_pdev_stats
|
||||
* @param soc - soc handle
|
||||
* @param pdev_id - id of dp pdev object
|
||||
* @param buf - buffer to hold cdp_pdev_stats
|
||||
* @return - success/failure
|
||||
*/
|
||||
static inline struct cdp_pdev_stats*
|
||||
static inline int
|
||||
cdp_host_get_pdev_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_pdev *pdev)
|
||||
uint8_t pdev_id, struct cdp_pdev_stats *buf)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
|
|
@ -673,19 +675,20 @@ cdp_host_get_pdev_stats(ol_txrx_soc_handle soc,
|
|||
!soc->ops->host_stats_ops->txrx_get_pdev_stats)
|
||||
return 0;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_get_pdev_stats(pdev);
|
||||
return soc->ops->host_stats_ops->txrx_get_pdev_stats(soc, pdev_id, buf);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Call to get radio stats
|
||||
*
|
||||
* @param pdev - dp pdev object
|
||||
* @param soc - soc handle
|
||||
* @param pdev_id - id of dp pdev object
|
||||
* @param scn_stats_user - stats buffer
|
||||
* @return - int
|
||||
*/
|
||||
static inline int
|
||||
cdp_host_get_radio_stats(ol_txrx_soc_handle soc,
|
||||
struct cdp_pdev *pdev,
|
||||
uint8_t pdev_id,
|
||||
void *buf)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
|
|
@ -699,7 +702,7 @@ cdp_host_get_radio_stats(ol_txrx_soc_handle soc,
|
|||
!soc->ops->host_stats_ops->txrx_get_radio_stats)
|
||||
return 0;
|
||||
|
||||
return soc->ops->host_stats_ops->txrx_get_radio_stats(pdev,
|
||||
return soc->ops->host_stats_ops->txrx_get_radio_stats(soc, pdev_id,
|
||||
buf);
|
||||
}
|
||||
|
||||
|
|
@ -707,39 +710,24 @@ cdp_host_get_radio_stats(ol_txrx_soc_handle soc,
|
|||
* @brief confgure rate stats at soc
|
||||
*
|
||||
* @param soc - opaque soc handle
|
||||
* @param vap - capabilities
|
||||
* @return - void
|
||||
* @param val - capabilities
|
||||
* @return - QDF_STATUS
|
||||
*/
|
||||
static inline void
|
||||
static inline QDF_STATUS
|
||||
cdp_soc_configure_rate_stats(ol_txrx_soc_handle soc, uint8_t val)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->host_stats_ops ||
|
||||
!soc->ops->host_stats_ops->configure_rate_stats)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->host_stats_ops->configure_rate_stats(soc, val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parse the stats header and get the payload from the message.
|
||||
*
|
||||
* @param pdev - the physical device object
|
||||
* @param msg_word - stats buffer received from FW
|
||||
* @param msg_len - length of the message
|
||||
* @param type - place holder for parsed message type
|
||||
* @param status - place holder for parsed message status
|
||||
* @return - pointer to received stat payload
|
||||
*/
|
||||
|
||||
#if defined(QCA_SUPPORT_SON) || defined(ENHANCED_STATS)
|
||||
uint32_t *ol_txrx_get_en_stats_base(struct cdp_pdev *pdev, uint32_t *msg_word,
|
||||
uint32_t msg_len, enum htt_cmn_t2h_en_stats_type *type, enum htt_cmn_t2h_en_stats_status *status);
|
||||
#endif
|
||||
#endif /* _CDP_TXRX_HOST_STATS_H_ */
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
#include "cdp_txrx_handle.h"
|
||||
#include <cdp_txrx_mon_struct.h>
|
||||
#include "wlan_objmgr_psoc_obj.h"
|
||||
#include <wmi_unified_api.h>
|
||||
#include <wdi_event_api.h>
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
#ifdef CONFIG_IPA_WDI_UNIFIED_API
|
||||
|
|
@ -791,137 +793,155 @@ struct cdp_pktcapture_ops {
|
|||
#endif /* #ifdef WLAN_FEATURE_PKT_CAPTURE */
|
||||
|
||||
struct cdp_host_stats_ops {
|
||||
int (*txrx_host_stats_get)(struct cdp_vdev *vdev,
|
||||
struct ol_txrx_stats_req *req);
|
||||
int (*txrx_host_stats_get)(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
struct ol_txrx_stats_req *req);
|
||||
|
||||
void (*txrx_host_stats_clr)(struct cdp_vdev *vdev);
|
||||
QDF_STATUS (*txrx_host_stats_clr)(struct cdp_soc_t *soc,
|
||||
uint8_t vdev_id);
|
||||
|
||||
void (*txrx_host_ce_stats)(struct cdp_vdev *vdev);
|
||||
QDF_STATUS
|
||||
(*txrx_host_ce_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
|
||||
|
||||
int (*txrx_stats_publish)(struct cdp_pdev *pdev,
|
||||
struct cdp_stats_extd *buf);
|
||||
int (*txrx_stats_publish)(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||
struct cdp_stats_extd *buf);
|
||||
/**
|
||||
* @brief Enable enhanced stats functionality.
|
||||
*
|
||||
* @param pdev - the physical device object
|
||||
* @return - void
|
||||
* @param soc - the soc handle
|
||||
* @param pdev_id - pdev_id of pdev
|
||||
* @return - QDF_STATUS
|
||||
*/
|
||||
void (*txrx_enable_enhanced_stats)(struct cdp_pdev *pdev);
|
||||
QDF_STATUS (*txrx_enable_enhanced_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t pdev_id);
|
||||
|
||||
/**
|
||||
* @brief Disable enhanced stats functionality.
|
||||
*
|
||||
* @param pdev - the physical device object
|
||||
* @return - void
|
||||
* @param soc - the soc handle
|
||||
* @param pdev_id - pdev_id of pdev
|
||||
* @return - QDF_STATUS
|
||||
*/
|
||||
void (*txrx_disable_enhanced_stats)(struct cdp_pdev *pdev);
|
||||
QDF_STATUS (*txrx_disable_enhanced_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t pdev_id);
|
||||
|
||||
/**
|
||||
* @brief Get the desired stats from the message.
|
||||
*
|
||||
* @param pdev - the physical device object
|
||||
* @param stats_base - stats buffer received from FW
|
||||
* @param type - stats type.
|
||||
* @return - pointer to requested stat identified by type
|
||||
*/
|
||||
uint32_t * (*txrx_get_stats_base)(struct cdp_pdev *pdev,
|
||||
uint32_t *stats_base, uint32_t msg_len, uint8_t type);
|
||||
void
|
||||
(*tx_print_tso_stats)(struct cdp_vdev *vdev);
|
||||
QDF_STATUS
|
||||
(*tx_print_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
|
||||
|
||||
void
|
||||
(*tx_rst_tso_stats)(struct cdp_vdev *vdev);
|
||||
QDF_STATUS
|
||||
(*tx_rst_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
|
||||
|
||||
void
|
||||
(*tx_print_sg_stats)(struct cdp_vdev *vdev);
|
||||
QDF_STATUS
|
||||
(*tx_print_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
|
||||
|
||||
void
|
||||
(*tx_rst_sg_stats)(struct cdp_vdev *vdev);
|
||||
QDF_STATUS
|
||||
(*tx_rst_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
|
||||
|
||||
void
|
||||
(*print_rx_cksum_stats)(struct cdp_vdev *vdev);
|
||||
QDF_STATUS
|
||||
(*print_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
|
||||
|
||||
void
|
||||
(*rst_rx_cksum_stats)(struct cdp_vdev *vdev);
|
||||
QDF_STATUS
|
||||
(*rst_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
|
||||
|
||||
A_STATUS
|
||||
(*txrx_host_me_stats)(struct cdp_vdev *vdev);
|
||||
QDF_STATUS
|
||||
(*txrx_host_me_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
|
||||
|
||||
void
|
||||
(*txrx_per_peer_stats)(struct cdp_pdev *pdev, char *addr);
|
||||
QDF_STATUS
|
||||
(*txrx_per_peer_stats)(struct cdp_soc_t *soc, uint8_t *addr);
|
||||
|
||||
int (*txrx_host_msdu_ttl_stats)(struct cdp_vdev *vdev,
|
||||
struct ol_txrx_stats_req *req);
|
||||
int (*txrx_host_msdu_ttl_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
struct ol_txrx_stats_req *req);
|
||||
|
||||
void
|
||||
(*print_lro_stats)(struct cdp_vdev *vdev);
|
||||
int (*ol_txrx_update_peer_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t pdev_id,
|
||||
uint8_t *addr, void *stats,
|
||||
uint32_t last_tx_rate_mcs,
|
||||
uint32_t stats_id);
|
||||
|
||||
void
|
||||
(*reset_lro_stats)(struct cdp_vdev *vdev);
|
||||
QDF_STATUS
|
||||
(*get_fw_peer_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||
uint8_t *addr,
|
||||
uint32_t cap, uint32_t copy_stats);
|
||||
|
||||
void
|
||||
(*get_fw_peer_stats)(struct cdp_pdev *pdev, uint8_t *addr,
|
||||
uint32_t cap, uint32_t copy_stats);
|
||||
void
|
||||
(*get_htt_stats)(struct cdp_pdev *pdev, void *data,
|
||||
uint32_t data_len);
|
||||
void
|
||||
(*txrx_update_pdev_stats)(struct cdp_pdev *pdev, void *data,
|
||||
QDF_STATUS
|
||||
(*get_htt_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||
void *data,
|
||||
uint32_t data_len);
|
||||
QDF_STATUS
|
||||
(*txrx_update_pdev_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t pdev_id, void *data,
|
||||
uint16_t stats_id);
|
||||
struct cdp_peer_stats*
|
||||
(*txrx_get_peer_stats)(struct cdp_peer *peer);
|
||||
void
|
||||
(*txrx_reset_peer_ald_stats)(struct cdp_peer *peer);
|
||||
void
|
||||
(*txrx_reset_peer_stats)(struct cdp_peer *peer);
|
||||
QDF_STATUS
|
||||
(*txrx_get_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
uint8_t *peer_mac,
|
||||
struct cdp_peer_stats *peer_stats);
|
||||
QDF_STATUS
|
||||
(*txrx_reset_peer_ald_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t vdev_id,
|
||||
uint8_t *peer_mac);
|
||||
QDF_STATUS
|
||||
(*txrx_reset_peer_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t vdev_id, uint8_t *peer_mac);
|
||||
int
|
||||
(*txrx_get_vdev_stats)(struct cdp_vdev *vdev, void *buf,
|
||||
bool is_aggregate);
|
||||
(*txrx_get_vdev_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
void *buf, bool is_aggregate);
|
||||
int
|
||||
(*txrx_process_wmi_host_vdev_stats)(ol_txrx_soc_handle soc,
|
||||
void *data, uint32_t len,
|
||||
uint32_t stats_id);
|
||||
int
|
||||
(*txrx_get_vdev_extd_stats)(struct cdp_vdev *vdev_handle,
|
||||
void *buffer);
|
||||
void
|
||||
(*txrx_update_vdev_stats)(struct cdp_vdev *vdev, void *buf,
|
||||
(*txrx_get_vdev_extd_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t vdev_id,
|
||||
wmi_host_vdev_extd_stats *buffer);
|
||||
QDF_STATUS
|
||||
(*txrx_update_vdev_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t vdev_id, void *buf,
|
||||
uint16_t stats_id);
|
||||
int
|
||||
(*txrx_get_radio_stats)(struct cdp_pdev *pdev,
|
||||
(*txrx_get_radio_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||
void *buf);
|
||||
struct cdp_pdev_stats*
|
||||
(*txrx_get_pdev_stats)(struct cdp_pdev *pdev);
|
||||
QDF_STATUS
|
||||
(*txrx_get_pdev_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||
struct cdp_pdev_stats *buf);
|
||||
int
|
||||
(*txrx_get_ratekbps)(int preamb, int mcs,
|
||||
int htflag, int gintval);
|
||||
void
|
||||
(*configure_rate_stats)(struct cdp_soc_t *soc,
|
||||
uint8_t val);
|
||||
|
||||
QDF_STATUS
|
||||
(*configure_rate_stats)(struct cdp_soc_t *soc, uint8_t val);
|
||||
|
||||
QDF_STATUS
|
||||
(*txrx_update_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
uint8_t *peer_mac, void *stats,
|
||||
uint32_t last_tx_rate_mcs,
|
||||
uint32_t stats_id);
|
||||
};
|
||||
|
||||
struct cdp_wds_ops {
|
||||
void
|
||||
(*txrx_set_wds_rx_policy)(struct cdp_vdev *vdev,
|
||||
u_int32_t val);
|
||||
void
|
||||
(*txrx_wds_peer_tx_policy_update)(struct cdp_peer *peer,
|
||||
int wds_tx_ucast, int wds_tx_mcast);
|
||||
int (*vdev_set_wds)(void *vdev, uint32_t val);
|
||||
QDF_STATUS
|
||||
(*txrx_set_wds_rx_policy)(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
u_int32_t val);
|
||||
QDF_STATUS
|
||||
(*txrx_wds_peer_tx_policy_update)(struct cdp_soc_t *soc,
|
||||
uint8_t vdev_id, uint8_t *peer_mac,
|
||||
int wds_tx_ucast, int wds_tx_mcast);
|
||||
int (*vdev_set_wds)(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
uint32_t val);
|
||||
};
|
||||
|
||||
struct cdp_raw_ops {
|
||||
int (*txrx_get_nwifi_mode)(struct cdp_vdev *vdev);
|
||||
int (*txrx_get_nwifi_mode)(struct cdp_soc_t *soc, uint8_t vdev_id);
|
||||
|
||||
void (*rsim_get_astentry)(struct cdp_vdev *vdev,
|
||||
qdf_nbuf_t *pnbuf,
|
||||
struct cdp_raw_ast *raw_ast);
|
||||
QDF_STATUS
|
||||
(*rsim_get_astentry)(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
qdf_nbuf_t *pnbuf, struct cdp_raw_ast *raw_ast);
|
||||
};
|
||||
|
||||
#ifdef PEER_FLOW_CONTROL
|
||||
struct cdp_pflow_ops {
|
||||
uint32_t(*pflow_update_pdev_params)(void *,
|
||||
enum _ol_ath_param_t, uint32_t, void *);
|
||||
uint32_t (*pflow_update_pdev_params)(struct cdp_soc_t *soc,
|
||||
uint8_t pdev_id,
|
||||
enum _ol_ath_param_t,
|
||||
uint32_t, void *);
|
||||
};
|
||||
#endif /* PEER_FLOW_CONTROL */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2017, 2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
#include "cdp_txrx_handle.h"
|
||||
|
||||
static inline uint32_t cdp_pflow_update_pdev_params
|
||||
(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
|
||||
(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
||||
enum _ol_ath_param_t param, uint32_t val, void *ctx)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
|
|
@ -44,6 +44,6 @@ static inline uint32_t cdp_pflow_update_pdev_params
|
|||
return 0;
|
||||
|
||||
return soc->ops->pflow_ops->pflow_update_pdev_params
|
||||
(pdev, param, val, ctx);
|
||||
(soc, pdev_id, param, val, ctx);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2017, 2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
#include "cdp_txrx_ops.h"
|
||||
/* TODO: adf need to be replaced with qdf */
|
||||
static inline int cdp_get_nwifi_mode(ol_txrx_soc_handle soc,
|
||||
struct cdp_vdev *vdev)
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
|
|
@ -41,7 +41,7 @@ static inline int cdp_get_nwifi_mode(ol_txrx_soc_handle soc,
|
|||
!soc->ops->raw_ops->txrx_get_nwifi_mode)
|
||||
return 0;
|
||||
|
||||
return soc->ops->raw_ops->txrx_get_nwifi_mode(vdev);
|
||||
return soc->ops->raw_ops->txrx_get_nwifi_mode(soc, vdev_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -49,15 +49,16 @@ static inline int cdp_get_nwifi_mode(ol_txrx_soc_handle soc,
|
|||
* @details: Finds the ast entry i.e 4th address for the packet based on the
|
||||
* details in the netbuf.
|
||||
*
|
||||
* @param vdev - the data virtual device object
|
||||
* @param soc - soc handle
|
||||
* @param vdev_id - id of the data virtual device object
|
||||
* @param pnbuf - pointer to nbuf
|
||||
* @param raw_ast - pointer to fill ast information
|
||||
*
|
||||
* @return - 0 on success, -1 on error, 1 if more nbufs need to be consumed.
|
||||
*/
|
||||
|
||||
static inline void
|
||||
cdp_rawsim_get_astentry (ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||
static inline QDF_STATUS
|
||||
cdp_rawsim_get_astentry(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
||||
qdf_nbuf_t *pnbuf, struct cdp_raw_ast *raw_ast)
|
||||
{
|
||||
|
||||
|
|
@ -65,14 +66,15 @@ cdp_rawsim_get_astentry (ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
|||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->raw_ops ||
|
||||
!soc->ops->raw_ops->rsim_get_astentry)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
soc->ops->raw_ops->rsim_get_astentry(vdev, pnbuf, raw_ast);
|
||||
return soc->ops->raw_ops->rsim_get_astentry(soc, vdev_id,
|
||||
pnbuf, raw_ast);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2017, 2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -30,24 +30,24 @@
|
|||
* This flag sets the wds rx policy on the vdev. Rx frames not compliant
|
||||
* with the policy will be dropped.
|
||||
*
|
||||
* @param vdev - the data virtual device object
|
||||
* @param vdev_id - id of the data virtual device object
|
||||
* @param val - the wds rx policy bitmask
|
||||
* @return - void
|
||||
* @return - QDF_STATUS
|
||||
*/
|
||||
static inline void
|
||||
static inline QDF_STATUS
|
||||
cdp_set_wds_rx_policy(ol_txrx_soc_handle soc,
|
||||
struct cdp_vdev *vdev,
|
||||
uint8_t vdev_id,
|
||||
u_int32_t val)
|
||||
{
|
||||
if (!soc || !soc->ops || !soc->ops->wds_ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
||||
"%s invalid instance", __func__);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (soc->ops->wds_ops->txrx_set_wds_rx_policy)
|
||||
return soc->ops->wds_ops->txrx_set_wds_rx_policy(vdev, val);
|
||||
return;
|
||||
soc->ops->wds_ops->txrx_set_wds_rx_policy(soc, vdev_id, val);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -56,31 +56,34 @@ cdp_set_wds_rx_policy(ol_txrx_soc_handle soc,
|
|||
* This flag sets the wds rx policy on the vdev. Rx frames not compliant
|
||||
* with the policy will be dropped.
|
||||
*
|
||||
* @param vdev - the data virtual device object
|
||||
* @param psoc - psoc object
|
||||
* @param vdev_id - id of the data virtual device object
|
||||
* @param peer_mac - peer mac address
|
||||
* @param val - the wds rx policy bitmask
|
||||
* @return - void
|
||||
* @return - QDF_STATUS
|
||||
*/
|
||||
static inline void
|
||||
static inline QDF_STATUS
|
||||
cdp_set_wds_tx_policy_update(ol_txrx_soc_handle soc,
|
||||
struct cdp_peer *peer,
|
||||
uint8_t vdev_id, uint8_t *peer_mac,
|
||||
int wds_tx_ucast, int wds_tx_mcast)
|
||||
{
|
||||
if (!soc || !soc->ops || !soc->ops->wds_ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
||||
"%s invalid instance", __func__);
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (soc->ops->wds_ops->txrx_wds_peer_tx_policy_update)
|
||||
return soc->ops->wds_ops->txrx_wds_peer_tx_policy_update(
|
||||
peer, wds_tx_ucast, wds_tx_mcast);
|
||||
return;
|
||||
soc->ops->wds_ops->txrx_wds_peer_tx_policy_update(
|
||||
soc, vdev_id, peer_mac, wds_tx_ucast,
|
||||
wds_tx_mcast);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_vdev_set_wds() - Set/unset wds_enable flag in vdev
|
||||
* @soc - data path soc handle
|
||||
* @vdev - data path vap handle
|
||||
* @vdev_id - id of data path vap handle
|
||||
* @val - value to be set in wds_en flag
|
||||
*
|
||||
* This flag enables WDS source port learning feature on a vdev
|
||||
|
|
@ -88,10 +91,10 @@ cdp_set_wds_tx_policy_update(ol_txrx_soc_handle soc,
|
|||
* return 1 on success
|
||||
*/
|
||||
static inline int
|
||||
cdp_vdev_set_wds(ol_txrx_soc_handle soc, void *vdev, uint32_t val)
|
||||
cdp_vdev_set_wds(ol_txrx_soc_handle soc, uint8_t vdev_id, uint32_t val)
|
||||
{
|
||||
if (soc->ops->wds_ops->vdev_set_wds)
|
||||
return soc->ops->wds_ops->vdev_set_wds(vdev, val);
|
||||
return soc->ops->wds_ops->vdev_set_wds(soc, vdev_id, val);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3673,7 +3673,7 @@ static void dp_htt_bkp_event_alert(u_int32_t *msg_word, struct htt_soc *soc)
|
|||
if (!time_allow_print(radio_tt->umac_ttt, ring_id))
|
||||
return;
|
||||
dp_htt_alert_print(msg_type, pdev_id, ring_id, hp_idx, tp_idx,
|
||||
bkp_time, "HTT_SW_RING_TYPE_LMAC");
|
||||
bkp_time, "HTT_SW_RING_TYPE_UMAC");
|
||||
break;
|
||||
case HTT_SW_RING_TYPE_LMAC:
|
||||
if (!time_allow_print(radio_tt->lmac_ttt, ring_id))
|
||||
|
|
|
|||
|
|
@ -6144,17 +6144,23 @@ static uint8 *dp_get_vdev_mac_addr_wifi3(struct cdp_vdev *pvdev)
|
|||
|
||||
/*
|
||||
* dp_vdev_set_wds() - Enable per packet stats
|
||||
* @vdev_handle: DP VDEV handle
|
||||
* @soc: DP soc handle
|
||||
* @vdev_id: id of DP VDEV handle
|
||||
* @val: value
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static int dp_vdev_set_wds(void *vdev_handle, uint32_t val)
|
||||
static int dp_vdev_set_wds(struct cdp_soc_t *soc, uint8_t vdev_id, uint32_t val)
|
||||
{
|
||||
struct dp_vdev *vdev = (struct dp_vdev *)vdev_handle;
|
||||
struct dp_vdev *vdev =
|
||||
dp_get_vdev_from_soc_vdev_id_wifi3((struct dp_soc *)soc,
|
||||
vdev_id);
|
||||
|
||||
if (!vdev)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
vdev->wds_enabled = val;
|
||||
return 0;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -6992,8 +6998,8 @@ void dp_aggregate_pdev_stats(struct dp_pdev *pdev)
|
|||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void dp_vdev_getstats(void *vdev_handle,
|
||||
struct cdp_dev_stats *stats)
|
||||
static void dp_vdev_getstats(struct cdp_vdev *vdev_handle,
|
||||
struct cdp_dev_stats *stats)
|
||||
{
|
||||
struct dp_vdev *vdev = (struct dp_vdev *)vdev_handle;
|
||||
struct dp_pdev *pdev;
|
||||
|
|
@ -7047,8 +7053,8 @@ static void dp_vdev_getstats(void *vdev_handle,
|
|||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void dp_pdev_getstats(void *pdev_handle,
|
||||
struct cdp_dev_stats *stats)
|
||||
static void dp_pdev_getstats(struct cdp_pdev *pdev_handle,
|
||||
struct cdp_dev_stats *stats)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
|
||||
|
|
@ -7163,15 +7169,15 @@ void dp_print_napi_stats(struct dp_soc *soc)
|
|||
* dp_txrx_host_stats_clr(): Reinitialize the txrx stats
|
||||
* @vdev: DP_VDEV handle
|
||||
*
|
||||
* Return:void
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static inline void
|
||||
static inline QDF_STATUS
|
||||
dp_txrx_host_stats_clr(struct dp_vdev *vdev)
|
||||
{
|
||||
struct dp_peer *peer = NULL;
|
||||
|
||||
if (!vdev || !vdev->pdev)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
DP_STATS_CLR(vdev->pdev);
|
||||
DP_STATS_CLR(vdev->pdev->soc);
|
||||
|
|
@ -7181,7 +7187,7 @@ dp_txrx_host_stats_clr(struct dp_vdev *vdev)
|
|||
|
||||
TAILQ_FOREACH(peer, &vdev->peer_list, peer_list_elem) {
|
||||
if (!peer)
|
||||
return;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
DP_STATS_CLR(peer);
|
||||
|
||||
#if defined(FEATURE_PERPKT_INFO) && WDI_EVENT_ENABLE
|
||||
|
|
@ -7196,43 +7202,37 @@ dp_txrx_host_stats_clr(struct dp_vdev *vdev)
|
|||
&vdev->stats, vdev->vdev_id,
|
||||
UPDATE_VDEV_STATS, vdev->pdev->pdev_id);
|
||||
#endif
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_get_host_peer_stats()- function to print peer stats
|
||||
* @pdev_handle: DP_PDEV handle
|
||||
* @soc: dp_soc handle
|
||||
* @mac_addr: mac address of the peer
|
||||
*
|
||||
* Return: void
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static void
|
||||
dp_get_host_peer_stats(struct cdp_pdev *pdev_handle, char *mac_addr)
|
||||
static QDF_STATUS
|
||||
dp_get_host_peer_stats(struct cdp_soc_t *soc, uint8_t *mac_addr)
|
||||
{
|
||||
struct dp_peer *peer;
|
||||
|
||||
if (!mac_addr) {
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||
"Invalid MAC address\n");
|
||||
return;
|
||||
}
|
||||
|
||||
peer = (struct dp_peer *)dp_find_peer_by_addr(pdev_handle, mac_addr);
|
||||
|
||||
if (!peer) {
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
struct dp_peer *peer = dp_peer_find_hash_find((struct dp_soc *)soc,
|
||||
mac_addr, 0,
|
||||
DP_VDEV_ALL);
|
||||
if (!peer || peer->delete_in_progress) {
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid peer\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Making sure the peer is for the specific pdev */
|
||||
if ((struct dp_pdev *)pdev_handle != peer->vdev->pdev) {
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Peer is not for this pdev\n", __func__);
|
||||
return;
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
dp_print_peer_stats(peer);
|
||||
dp_peer_rxtid_stats(peer, dp_rx_tid_stats_cb, NULL);
|
||||
fail:
|
||||
if (peer)
|
||||
dp_peer_unref_delete(peer);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -7283,10 +7283,9 @@ static void dp_txrx_stats_help(void)
|
|||
* Return: 0 on success, print error message in case of failure
|
||||
*/
|
||||
static int
|
||||
dp_print_host_stats(struct cdp_vdev *vdev_handle,
|
||||
dp_print_host_stats(struct dp_vdev *vdev,
|
||||
struct cdp_txrx_stats_req *req)
|
||||
{
|
||||
struct dp_vdev *vdev = (struct dp_vdev *)vdev_handle;
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)vdev->pdev;
|
||||
enum cdp_host_txrx_stats type =
|
||||
dp_stats_mapping_table[req->stats][STATS_HOST];
|
||||
|
|
@ -7322,7 +7321,8 @@ dp_print_host_stats(struct cdp_vdev *vdev_handle,
|
|||
dp_print_pdev_rx_mon_stats(pdev);
|
||||
break;
|
||||
case TXRX_REO_QUEUE_STATS:
|
||||
dp_get_host_peer_stats((struct cdp_pdev *)pdev, req->peer_addr);
|
||||
dp_get_host_peer_stats((struct cdp_soc_t *)pdev->soc,
|
||||
req->peer_addr);
|
||||
break;
|
||||
case TXRX_SOC_CFG_PARAMS:
|
||||
dp_print_soc_cfg_params(pdev->soc);
|
||||
|
|
@ -7499,11 +7499,9 @@ dp_set_bpr_enable(struct cdp_pdev *pdev_handle, int val)
|
|||
* Return: void
|
||||
*/
|
||||
static void
|
||||
dp_pdev_tid_stats_ingress_inc(struct cdp_pdev *pdev, uint32_t val)
|
||||
dp_pdev_tid_stats_ingress_inc(struct dp_pdev *pdev, uint32_t val)
|
||||
{
|
||||
struct dp_pdev *dp_pdev = (struct dp_pdev *)pdev;
|
||||
|
||||
dp_pdev->stats.tid_stats.ingress_stack += val;
|
||||
pdev->stats.tid_stats.ingress_stack += val;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -7514,11 +7512,9 @@ dp_pdev_tid_stats_ingress_inc(struct cdp_pdev *pdev, uint32_t val)
|
|||
* Return: void
|
||||
*/
|
||||
static void
|
||||
dp_pdev_tid_stats_osif_drop(struct cdp_pdev *pdev, uint32_t val)
|
||||
dp_pdev_tid_stats_osif_drop(struct dp_pdev *pdev, uint32_t val)
|
||||
{
|
||||
struct dp_pdev *dp_pdev = (struct dp_pdev *)pdev;
|
||||
|
||||
dp_pdev->stats.tid_stats.osif_drop += val;
|
||||
pdev->stats.tid_stats.osif_drop += val;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -7596,14 +7592,20 @@ dp_config_debug_sniffer(struct cdp_pdev *pdev_handle, int val)
|
|||
|
||||
/*
|
||||
* dp_enable_enhanced_stats()- API to enable enhanced statistcs
|
||||
* @pdev_handle: DP_PDEV handle
|
||||
* @soc_handle: DP_SOC handle
|
||||
* @pdev_id: id of DP_PDEV handle
|
||||
*
|
||||
* Return: void
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static void
|
||||
dp_enable_enhanced_stats(struct cdp_pdev *pdev_handle)
|
||||
static QDF_STATUS
|
||||
dp_enable_enhanced_stats(struct cdp_soc_t *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 *)soc,
|
||||
pdev_id);
|
||||
|
||||
if (!pdev)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (pdev->enhanced_stats_en == 0)
|
||||
dp_cal_client_timer_start(pdev->cal_client_ctx);
|
||||
|
|
@ -7621,18 +7623,26 @@ dp_enable_enhanced_stats(struct cdp_pdev *pdev_handle)
|
|||
DP_PPDU_STATS_CFG_BPR_ENH,
|
||||
pdev->pdev_id);
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_disable_enhanced_stats()- API to disable enhanced statistcs
|
||||
* @pdev_handle: DP_PDEV handle
|
||||
*
|
||||
* Return: void
|
||||
* @param soc - the soc handle
|
||||
* @param pdev_id - pdev_id of pdev
|
||||
* @return - QDF_STATUS
|
||||
*/
|
||||
static void
|
||||
dp_disable_enhanced_stats(struct cdp_pdev *pdev_handle)
|
||||
static QDF_STATUS
|
||||
dp_disable_enhanced_stats(struct cdp_soc_t *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 *)soc,
|
||||
pdev_id);
|
||||
|
||||
if (!pdev)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (pdev->enhanced_stats_en == 1)
|
||||
dp_cal_client_timer_stop(pdev->cal_client_ctx);
|
||||
|
|
@ -7650,11 +7660,14 @@ dp_disable_enhanced_stats(struct cdp_pdev *pdev_handle)
|
|||
if (!pdev->mcopy_mode && !pdev->neighbour_peers_added &&
|
||||
!pdev->monitor_vdev)
|
||||
dp_ppdu_ring_reset(pdev);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_get_fw_peer_stats()- function to print peer stats
|
||||
* @pdev_handle: DP_PDEV handle
|
||||
* @soc: soc handle
|
||||
* @pdev_id : id of the pdev handle
|
||||
* @mac_addr: mac address of the peer
|
||||
* @cap: Type of htt stats requested
|
||||
* @is_wait: if set, wait on completion from firmware response
|
||||
|
|
@ -7664,18 +7677,24 @@ dp_disable_enhanced_stats(struct cdp_pdev *pdev_handle)
|
|||
* 2: HTT_PEER_STATS_REQ_MODE_QUERY_TQM
|
||||
* 3: HTT_PEER_STATS_REQ_MODE_FLUSH_TQM
|
||||
*
|
||||
* Return: void
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static void
|
||||
dp_get_fw_peer_stats(struct cdp_pdev *pdev_handle, uint8_t *mac_addr,
|
||||
uint32_t cap, uint32_t is_wait)
|
||||
static QDF_STATUS
|
||||
dp_get_fw_peer_stats(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||
uint8_t *mac_addr,
|
||||
uint32_t cap, uint32_t is_wait)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
int i;
|
||||
uint32_t config_param0 = 0;
|
||||
uint32_t config_param1 = 0;
|
||||
uint32_t config_param2 = 0;
|
||||
uint32_t config_param3 = 0;
|
||||
struct dp_pdev *pdev =
|
||||
dp_get_pdev_from_soc_pdev_id_wifi3((struct dp_soc *)soc,
|
||||
pdev_id);
|
||||
|
||||
if (!pdev)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
HTT_DBG_EXT_STATS_PEER_INFO_IS_MAC_ADDR_SET(config_param0, 1);
|
||||
config_param0 |= (1 << (cap + 1));
|
||||
|
|
@ -7707,6 +7726,8 @@ dp_get_fw_peer_stats(struct cdp_pdev *pdev_handle, uint8_t *mac_addr,
|
|||
0, 0, 0);
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
/* This struct definition will be removed from here
|
||||
|
|
@ -7722,23 +7743,32 @@ struct httstats_cmd_req {
|
|||
|
||||
/*
|
||||
* dp_get_htt_stats: function to process the httstas request
|
||||
* @pdev_handle: DP pdev handle
|
||||
* @soc: DP soc handle
|
||||
* @pdev_id: id of pdev handle
|
||||
* @data: pointer to request data
|
||||
* @data_len: length for request data
|
||||
*
|
||||
* return: void
|
||||
* return: QDF_STATUS
|
||||
*/
|
||||
static void
|
||||
dp_get_htt_stats(struct cdp_pdev *pdev_handle, void *data, uint32_t data_len)
|
||||
static QDF_STATUS
|
||||
dp_get_htt_stats(struct cdp_soc_t *soc, uint8_t pdev_id, void *data,
|
||||
uint32_t data_len)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
struct httstats_cmd_req *req = (struct httstats_cmd_req *)data;
|
||||
struct dp_pdev *pdev =
|
||||
dp_get_pdev_from_soc_pdev_id_wifi3((struct dp_soc *)soc,
|
||||
pdev_id);
|
||||
|
||||
if (!pdev)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
QDF_ASSERT(data_len == sizeof(struct httstats_cmd_req));
|
||||
dp_h2t_ext_stats_msg_send(pdev, req->stats_id,
|
||||
req->config_param0, req->config_param1,
|
||||
req->config_param2, req->config_param3,
|
||||
req->cookie, 0, 0);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -7769,10 +7799,10 @@ static QDF_STATUS dp_set_pdev_param(struct cdp_pdev *pdev_handle,
|
|||
pdev->latency_capture_enable = false;
|
||||
break;
|
||||
case CDP_INGRESS_STATS:
|
||||
dp_pdev_tid_stats_ingress_inc(pdev_handle, val);
|
||||
dp_pdev_tid_stats_ingress_inc(pdev, val);
|
||||
break;
|
||||
case CDP_OSIF_DROP:
|
||||
dp_pdev_tid_stats_osif_drop(pdev_handle, val);
|
||||
dp_pdev_tid_stats_osif_drop(pdev, val);
|
||||
break;
|
||||
case CDP_CONFIG_ENH_RX_CAPTURE:
|
||||
return dp_config_enh_rx_capture(pdev_handle, val);
|
||||
|
|
@ -8015,18 +8045,26 @@ static int dp_txrx_get_ratekbps(int preamb, int mcs,
|
|||
#endif
|
||||
|
||||
/* dp_txrx_get_pdev_stats - Returns cdp_pdev_stats
|
||||
* @peer_handle: DP pdev handle
|
||||
* @soc: DP soc handle
|
||||
* @pdev_id: id of DP pdev handle
|
||||
* @pdev_stats: buffer to copy to
|
||||
*
|
||||
* return : cdp_pdev_stats pointer
|
||||
* return : status success/failure
|
||||
*/
|
||||
static struct cdp_pdev_stats*
|
||||
dp_txrx_get_pdev_stats(struct cdp_pdev *pdev_handle)
|
||||
static QDF_STATUS
|
||||
dp_txrx_get_pdev_stats(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||
struct cdp_pdev_stats *pdev_stats)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
struct dp_pdev *pdev =
|
||||
dp_get_pdev_from_soc_pdev_id_wifi3((struct dp_soc *)soc,
|
||||
pdev_id);
|
||||
if (!pdev)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
dp_aggregate_pdev_stats(pdev);
|
||||
|
||||
return &pdev->stats;
|
||||
qdf_mem_copy(pdev_stats, &pdev->stats, sizeof(struct cdp_pdev_stats));
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* dp_txrx_update_vdev_me_stats(): Update vdev ME stats sent from CDP
|
||||
|
|
@ -8035,19 +8073,11 @@ dp_txrx_get_pdev_stats(struct cdp_pdev *pdev_handle)
|
|||
*
|
||||
* Returns: void
|
||||
*/
|
||||
static void dp_txrx_update_vdev_me_stats(struct cdp_vdev *vdev_handle,
|
||||
static void dp_txrx_update_vdev_me_stats(struct dp_vdev *vdev,
|
||||
void *buf)
|
||||
{
|
||||
struct dp_vdev *vdev = NULL;
|
||||
struct cdp_tx_ingress_stats *host_stats = NULL;
|
||||
|
||||
if (!vdev_handle) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||
"Invalid vdev handle");
|
||||
return;
|
||||
}
|
||||
vdev = (struct dp_vdev *)vdev_handle;
|
||||
|
||||
if (!buf) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||
"Invalid host stats buf");
|
||||
|
|
@ -8073,55 +8103,96 @@ static void dp_txrx_update_vdev_me_stats(struct cdp_vdev *vdev_handle,
|
|||
}
|
||||
|
||||
/* dp_txrx_update_vdev_host_stats(): Update stats sent through CDP
|
||||
* @vdev_handle: DP vdev handle
|
||||
* @soc: DP soc handle
|
||||
* @vdev_id: id of DP vdev handle
|
||||
* @buf: buffer containing specific stats structure
|
||||
* @stats_id: stats type
|
||||
*
|
||||
* Returns: void
|
||||
* Returns: QDF_STATUS
|
||||
*/
|
||||
static void dp_txrx_update_vdev_host_stats(struct cdp_vdev *vdev_handle,
|
||||
void *buf,
|
||||
uint16_t stats_id)
|
||||
static QDF_STATUS dp_txrx_update_vdev_host_stats(struct cdp_soc_t *soc,
|
||||
uint8_t vdev_id,
|
||||
void *buf,
|
||||
uint16_t stats_id)
|
||||
{
|
||||
struct dp_vdev *vdev =
|
||||
dp_get_vdev_from_soc_vdev_id_wifi3((struct dp_soc *)soc,
|
||||
vdev_id);
|
||||
if (!vdev) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||
"Invalid vdev handle");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
switch (stats_id) {
|
||||
case DP_VDEV_STATS_PKT_CNT_ONLY:
|
||||
break;
|
||||
case DP_VDEV_STATS_TX_ME:
|
||||
dp_txrx_update_vdev_me_stats(vdev_handle, buf);
|
||||
dp_txrx_update_vdev_me_stats(vdev, buf);
|
||||
break;
|
||||
default:
|
||||
qdf_info("Invalid stats_id %d", stats_id);
|
||||
break;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* dp_txrx_get_peer_stats - will return cdp_peer_stats
|
||||
* @peer_handle: DP_PEER handle
|
||||
*
|
||||
* return : cdp_peer_stats pointer
|
||||
* @soc: soc handle
|
||||
* @vdev_id: id of vdev handle
|
||||
* @peer_mac: mac of DP_PEER handle
|
||||
* @peer_stats: buffer to copy to
|
||||
* return : status success/failure
|
||||
*/
|
||||
static struct cdp_peer_stats*
|
||||
dp_txrx_get_peer_stats(struct cdp_peer *peer_handle)
|
||||
static QDF_STATUS
|
||||
dp_txrx_get_peer_stats(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
uint8_t *peer_mac, struct cdp_peer_stats *peer_stats)
|
||||
{
|
||||
struct dp_peer *peer = (struct dp_peer *)peer_handle;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
struct dp_peer *peer = dp_peer_find_hash_find((struct dp_soc *)soc,
|
||||
peer_mac, 0, vdev_id);
|
||||
|
||||
qdf_assert(peer);
|
||||
if (!peer || peer->delete_in_progress) {
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto fail;
|
||||
} else
|
||||
qdf_mem_copy(peer_stats, &peer->stats,
|
||||
sizeof(struct cdp_peer_stats));
|
||||
|
||||
return &peer->stats;
|
||||
fail:
|
||||
if (peer)
|
||||
dp_peer_unref_delete(peer);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/* dp_txrx_reset_peer_stats - reset cdp_peer_stats for particular peer
|
||||
* @peer_handle: DP_PEER handle
|
||||
* @soc: soc handle
|
||||
* @vdev_id: id of vdev handle
|
||||
* @peer_mac: mac of DP_PEER handle
|
||||
*
|
||||
* return : void
|
||||
* return : QDF_STATUS
|
||||
*/
|
||||
static void dp_txrx_reset_peer_stats(struct cdp_peer *peer_handle)
|
||||
static QDF_STATUS
|
||||
dp_txrx_reset_peer_stats(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
uint8_t *peer_mac)
|
||||
{
|
||||
struct dp_peer *peer = (struct dp_peer *)peer_handle;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
struct dp_peer *peer = dp_peer_find_hash_find((struct dp_soc *)soc,
|
||||
peer_mac, 0, vdev_id);
|
||||
|
||||
qdf_assert(peer);
|
||||
if (!peer || peer->delete_in_progress) {
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
qdf_mem_zero(&peer->stats, sizeof(peer->stats));
|
||||
|
||||
fail:
|
||||
if (peer)
|
||||
dp_peer_unref_delete(peer);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/* dp_txrx_get_vdev_stats - Update buffer with cdp_vdev_stats
|
||||
|
|
@ -8130,13 +8201,14 @@ static void dp_txrx_reset_peer_stats(struct cdp_peer *peer_handle)
|
|||
*
|
||||
* return : int
|
||||
*/
|
||||
static int dp_txrx_get_vdev_stats(struct cdp_vdev *vdev_handle, void *buf,
|
||||
bool is_aggregate)
|
||||
static int dp_txrx_get_vdev_stats(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
void *buf, bool is_aggregate)
|
||||
{
|
||||
struct dp_vdev *vdev = (struct dp_vdev *)vdev_handle;
|
||||
struct dp_vdev *vdev =
|
||||
dp_get_vdev_from_soc_vdev_id_wifi3((struct dp_soc *)soc,
|
||||
vdev_id);
|
||||
struct cdp_vdev_stats *vdev_stats;
|
||||
struct dp_pdev *pdev;
|
||||
struct dp_soc *soc;
|
||||
|
||||
if (!vdev)
|
||||
return 1;
|
||||
|
|
@ -8145,13 +8217,12 @@ static int dp_txrx_get_vdev_stats(struct cdp_vdev *vdev_handle, void *buf,
|
|||
if (!pdev)
|
||||
return 1;
|
||||
|
||||
soc = pdev->soc;
|
||||
vdev_stats = (struct cdp_vdev_stats *)buf;
|
||||
|
||||
if (is_aggregate) {
|
||||
qdf_spin_lock_bh(&soc->peer_ref_mutex);
|
||||
qdf_spin_lock_bh(&((struct dp_soc *)soc)->peer_ref_mutex);
|
||||
dp_aggregate_vdev_stats(vdev, buf);
|
||||
qdf_spin_unlock_bh(&soc->peer_ref_mutex);
|
||||
qdf_spin_unlock_bh(&((struct dp_soc *)soc)->peer_ref_mutex);
|
||||
} else {
|
||||
qdf_mem_copy(vdev_stats, &vdev->stats, sizeof(vdev->stats));
|
||||
}
|
||||
|
|
@ -8178,17 +8249,23 @@ static int dp_get_total_per(struct cdp_pdev *pdev_handle)
|
|||
|
||||
/*
|
||||
* dp_txrx_stats_publish(): publish pdev stats into a buffer
|
||||
* @pdev_handle: DP_PDEV handle
|
||||
* @pdev_handle: DP soc handle
|
||||
* @pdev_id: id of DP_PDEV handle
|
||||
* @buf: to hold pdev_stats
|
||||
*
|
||||
* Return: int
|
||||
*/
|
||||
static int
|
||||
dp_txrx_stats_publish(struct cdp_pdev *pdev_handle, struct cdp_stats_extd *buf)
|
||||
dp_txrx_stats_publish(struct cdp_soc_t *soc, uint8_t pdev_id,
|
||||
struct cdp_stats_extd *buf)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
struct cdp_pdev_stats *buffer = (struct cdp_pdev_stats *) buf;
|
||||
struct cdp_txrx_stats_req req = {0,};
|
||||
struct dp_pdev *pdev =
|
||||
dp_get_pdev_from_soc_pdev_id_wifi3((struct dp_soc *)soc,
|
||||
pdev_id);
|
||||
|
||||
if (!pdev)
|
||||
return TXRX_STATS_LEVEL_OFF;
|
||||
|
||||
dp_aggregate_pdev_stats(pdev);
|
||||
req.stats = (enum cdp_stats)HTT_DBG_EXT_STATS_PDEV_TX;
|
||||
|
|
@ -8206,7 +8283,7 @@ dp_txrx_stats_publish(struct cdp_pdev *pdev_handle, struct cdp_stats_extd *buf)
|
|||
req.cookie_val, 0);
|
||||
|
||||
msleep(DP_MAX_SLEEP_TIME);
|
||||
qdf_mem_copy(buffer, &pdev->stats, sizeof(pdev->stats));
|
||||
qdf_mem_copy(buf, &pdev->stats, sizeof(struct cdp_stats_extd));
|
||||
|
||||
return TXRX_STATS_LEVEL;
|
||||
}
|
||||
|
|
@ -8276,10 +8353,9 @@ static void dp_set_hmmc_tid_val_wifi3(struct cdp_pdev *pdev_handle,
|
|||
*
|
||||
* return: int
|
||||
*/
|
||||
static int dp_fw_stats_process(struct cdp_vdev *vdev_handle,
|
||||
struct cdp_txrx_stats_req *req)
|
||||
static int dp_fw_stats_process(struct dp_vdev *vdev,
|
||||
struct cdp_txrx_stats_req *req)
|
||||
{
|
||||
struct dp_vdev *vdev = (struct dp_vdev *)vdev_handle;
|
||||
struct dp_pdev *pdev = NULL;
|
||||
uint32_t stats = req->stats;
|
||||
uint8_t mac_id = req->mac_id;
|
||||
|
|
@ -8376,12 +8452,12 @@ QDF_STATUS dp_txrx_stats_request(struct cdp_soc_t *soc_handle,
|
|||
if (fw_stats != TXRX_FW_STATS_INVALID) {
|
||||
/* update request with FW stats type */
|
||||
req->stats = fw_stats;
|
||||
return dp_fw_stats_process(vdev, req);
|
||||
return dp_fw_stats_process((struct dp_vdev *)vdev, req);
|
||||
}
|
||||
|
||||
if ((host_stats != TXRX_HOST_STATS_INVALID) &&
|
||||
(host_stats <= TXRX_HOST_STATS_MAX))
|
||||
return dp_print_host_stats(vdev, req);
|
||||
return dp_print_host_stats((struct dp_vdev *)vdev, req);
|
||||
else
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO,
|
||||
"Wrong Input for TxRx Stats");
|
||||
|
|
@ -8883,7 +8959,6 @@ dp_set_rx_flow_tag(struct cdp_pdev *pdev_handle,
|
|||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_dump_rx_flow_tag_stats - dump the number of packets tagged for
|
||||
* given flow 5-tuple
|
||||
|
|
@ -8921,12 +8996,14 @@ static QDF_STATUS dp_peer_map_attach_wifi3(struct cdp_soc_t *soc_hdl,
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void dp_set_rate_stats_cap(struct cdp_soc_t *soc_hdl,
|
||||
uint8_t val)
|
||||
static QDF_STATUS dp_set_rate_stats_cap(struct cdp_soc_t *soc_hdl,
|
||||
uint8_t val)
|
||||
{
|
||||
struct dp_soc *soc = (struct dp_soc *)soc_hdl;
|
||||
|
||||
soc->wlanstats_enabled = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void dp_soc_set_rate_stats_ctx(struct cdp_soc_t *soc_handle,
|
||||
|
|
@ -9043,7 +9120,8 @@ static uint32_t dp_get_cfg(void *soc, enum cdp_dp_cfg cfg)
|
|||
#ifdef PEER_FLOW_CONTROL
|
||||
/**
|
||||
* dp_tx_flow_ctrl_configure_pdev() - Configure flow control params
|
||||
* @pdev_hdl: datapath pdev handle
|
||||
* @soc_handle: datapath soc handle
|
||||
* @pdev_id: id of datapath pdev handle
|
||||
* @param: ol ath params
|
||||
* @value: value of the flag
|
||||
* @buff: Buffer to be passed
|
||||
|
|
@ -9053,12 +9131,15 @@ static uint32_t dp_get_cfg(void *soc, enum cdp_dp_cfg cfg)
|
|||
*
|
||||
* Return: 0 for success. nonzero for failure.
|
||||
*/
|
||||
static uint32_t dp_tx_flow_ctrl_configure_pdev(void *pdev_handle,
|
||||
static uint32_t dp_tx_flow_ctrl_configure_pdev(struct cdp_soc_t *soc_handle,
|
||||
uint8_t pdev_id,
|
||||
enum _ol_ath_param_t param,
|
||||
uint32_t value, void *buff)
|
||||
{
|
||||
struct dp_soc *soc = NULL;
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
struct dp_soc *soc = (struct dp_soc *)soc_handle;
|
||||
struct dp_pdev *pdev =
|
||||
dp_get_pdev_from_soc_pdev_id_wifi3((struct dp_soc *)soc,
|
||||
pdev_id);
|
||||
|
||||
if (qdf_unlikely(!pdev))
|
||||
return 1;
|
||||
|
|
@ -9774,8 +9855,7 @@ dp_peer_get_ref_find_by_addr(struct cdp_pdev *dev, uint8_t *peer_mac_addr,
|
|||
if (!peer)
|
||||
return NULL;
|
||||
|
||||
DP_TRACE(INFO, "%s: peer %pK mac: %pM", __func__, peer,
|
||||
peer->mac_addr.raw);
|
||||
dp_info_rl("peer %pK mac: %pM", peer, peer->mac_addr.raw);
|
||||
|
||||
return peer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2537,7 +2537,6 @@ int dp_addba_resp_tx_completion_wifi3(void *peer_handle,
|
|||
{
|
||||
struct dp_peer *peer = (struct dp_peer *)peer_handle;
|
||||
struct dp_rx_tid *rx_tid = NULL;
|
||||
QDF_STATUS qdf_status;
|
||||
|
||||
if (!peer || peer->delete_in_progress) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||
|
|
@ -2548,10 +2547,9 @@ int dp_addba_resp_tx_completion_wifi3(void *peer_handle,
|
|||
qdf_spin_lock_bh(&rx_tid->tid_lock);
|
||||
if (status) {
|
||||
rx_tid->num_addba_rsp_failed++;
|
||||
qdf_status = dp_rx_tid_update_wifi3(peer, tid, 1,
|
||||
IEEE80211_SEQ_MAX);
|
||||
if (qdf_status == QDF_STATUS_SUCCESS)
|
||||
rx_tid->ba_status = DP_RX_BA_INACTIVE;
|
||||
dp_rx_tid_update_wifi3(peer, tid, 1,
|
||||
IEEE80211_SEQ_MAX);
|
||||
rx_tid->ba_status = DP_RX_BA_INACTIVE;
|
||||
qdf_spin_unlock_bh(&rx_tid->tid_lock);
|
||||
dp_err("RxTid- %d addba rsp tx completion failed", tid);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -126,6 +126,10 @@ static int init_deinit_service_ready_event_handler(ol_scn_t scn_handle,
|
|||
if (wmi_service_enabled(wmi_handle, wmi_service_dynamic_hw_mode))
|
||||
wlan_psoc_nif_fw_ext_cap_set(psoc, WLAN_SOC_CEXT_DYNAMIC_HW_MODE);
|
||||
|
||||
if (wmi_service_enabled(wmi_handle, wmi_service_bw_165mhz_support))
|
||||
wlan_psoc_nif_fw_ext_cap_set(psoc,
|
||||
WLAN_SOC_RESTRICTED_80P80_SUPPORT);
|
||||
|
||||
target_if_debug(" TT support %d, Wide BW Scan %d, SW cal %d",
|
||||
wlan_psoc_nif_fw_ext_cap_get(psoc, WLAN_SOC_CEXT_TT_SUPPORT),
|
||||
wlan_psoc_nif_fw_ext_cap_get(psoc, WLAN_SOC_CEXT_WIDEBAND_SCAN),
|
||||
|
|
|
|||
|
|
@ -2322,7 +2322,6 @@ target_if_calculate_center_freq(struct target_if_spectral *spectral,
|
|||
struct wlan_objmgr_vdev *vdev;
|
||||
enum phy_ch_width ch_width;
|
||||
enum phy_ch_width agile_ch_width;
|
||||
uint16_t chan_num;
|
||||
|
||||
if (!spectral) {
|
||||
spectral_err("spectral target if object is null");
|
||||
|
|
@ -2334,8 +2333,6 @@ target_if_calculate_center_freq(struct target_if_spectral *spectral,
|
|||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
chan_num = wlan_reg_freq_to_chan(spectral->pdev_obj, chan_freq);
|
||||
|
||||
vdev = target_if_spectral_get_vdev(spectral);
|
||||
if (!vdev) {
|
||||
spectral_err("vdev is NULL");
|
||||
|
|
@ -2350,19 +2347,17 @@ target_if_calculate_center_freq(struct target_if_spectral *spectral,
|
|||
} else {
|
||||
uint16_t start_freq;
|
||||
uint16_t end_freq;
|
||||
const struct bonded_channel *bonded_chan_ptr = NULL;
|
||||
const struct bonded_channel_freq *bonded_chan_ptr = NULL;
|
||||
|
||||
wlan_reg_get_5g_bonded_channel_and_state
|
||||
(spectral->pdev_obj, chan_num, agile_ch_width,
|
||||
wlan_reg_get_5g_bonded_channel_and_state_for_freq
|
||||
(spectral->pdev_obj, chan_freq, agile_ch_width,
|
||||
&bonded_chan_ptr);
|
||||
if (!bonded_chan_ptr) {
|
||||
spectral_err("Bonded channel is not found");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
start_freq = wlan_reg_chan_to_freq(spectral->pdev_obj,
|
||||
bonded_chan_ptr->start_ch);
|
||||
end_freq = wlan_reg_chan_to_freq(spectral->pdev_obj,
|
||||
bonded_chan_ptr->end_ch);
|
||||
start_freq = bonded_chan_ptr->start_freq;
|
||||
end_freq = bonded_chan_ptr->end_freq;
|
||||
*center_freq = (start_freq + end_freq) >> 1;
|
||||
}
|
||||
|
||||
|
|
@ -2387,7 +2382,6 @@ target_if_validate_center_freq(struct target_if_spectral *spectral,
|
|||
struct wlan_objmgr_vdev *vdev;
|
||||
enum phy_ch_width ch_width;
|
||||
enum phy_ch_width agile_ch_width;
|
||||
uint16_t chan_num;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
QDF_STATUS status;
|
||||
|
||||
|
|
@ -2419,30 +2413,28 @@ target_if_validate_center_freq(struct target_if_spectral *spectral,
|
|||
} else {
|
||||
uint16_t start_freq;
|
||||
uint16_t end_freq;
|
||||
const struct bonded_channel *bonded_chan_ptr = NULL;
|
||||
const struct bonded_channel_freq *bonded_chan_ptr = NULL;
|
||||
bool is_chan;
|
||||
|
||||
status = target_if_is_center_freq_of_any_chan
|
||||
(pdev, center_freq + 10, &is_chan);
|
||||
(pdev, center_freq + FREQ_OFFSET_10MHZ,
|
||||
&is_chan);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (is_chan) {
|
||||
uint32_t calulated_center_freq;
|
||||
|
||||
chan_num = wlan_reg_freq_to_chan(pdev,
|
||||
center_freq + 10);
|
||||
wlan_reg_get_5g_bonded_channel_and_state
|
||||
(pdev, chan_num, agile_ch_width,
|
||||
wlan_reg_get_5g_bonded_channel_and_state_for_freq
|
||||
(pdev, center_freq + FREQ_OFFSET_10MHZ,
|
||||
agile_ch_width,
|
||||
&bonded_chan_ptr);
|
||||
if (!bonded_chan_ptr) {
|
||||
spectral_err("Bonded channel is not found");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
start_freq = wlan_reg_chan_to_freq
|
||||
(pdev, bonded_chan_ptr->start_ch);
|
||||
end_freq = wlan_reg_chan_to_freq
|
||||
(pdev, bonded_chan_ptr->end_ch);
|
||||
start_freq = bonded_chan_ptr->start_freq;
|
||||
end_freq = bonded_chan_ptr->end_freq;
|
||||
calulated_center_freq = (start_freq + end_freq) >> 1;
|
||||
*is_valid = (center_freq == calulated_center_freq);
|
||||
} else {
|
||||
|
|
@ -2472,10 +2464,9 @@ target_if_is_agile_span_overlap_with_operating_span
|
|||
uint32_t ss_frequency,
|
||||
bool *is_overlapping)
|
||||
{
|
||||
uint32_t chan_num;
|
||||
enum phy_ch_width ch_width;
|
||||
enum phy_ch_width agile_ch_width;
|
||||
const struct bonded_channel *bonded_chan_ptr = NULL;
|
||||
const struct bonded_channel_freq *bonded_chan_ptr = NULL;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
int16_t chan_freq;
|
||||
|
|
@ -2513,24 +2504,18 @@ target_if_is_agile_span_overlap_with_operating_span
|
|||
if (cfreq2 < 0)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
chan_num = wlan_reg_freq_to_chan(pdev, chan_freq);
|
||||
|
||||
if (ch_width == CH_WIDTH_20MHZ) {
|
||||
op_start_freq = chan_freq - 10;
|
||||
op_end_freq = chan_freq + 10;
|
||||
op_start_freq = chan_freq - FREQ_OFFSET_10MHZ;
|
||||
op_end_freq = chan_freq + FREQ_OFFSET_10MHZ;
|
||||
} else {
|
||||
wlan_reg_get_5g_bonded_channel_and_state
|
||||
(pdev, chan_num, ch_width, &bonded_chan_ptr);
|
||||
wlan_reg_get_5g_bonded_channel_and_state_for_freq
|
||||
(pdev, chan_freq, ch_width, &bonded_chan_ptr);
|
||||
if (!bonded_chan_ptr) {
|
||||
spectral_err("Bonded channel is not found");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
op_start_freq =
|
||||
wlan_reg_chan_to_freq(pdev,
|
||||
bonded_chan_ptr->start_ch) - 10;
|
||||
op_end_freq =
|
||||
wlan_reg_chan_to_freq(pdev,
|
||||
bonded_chan_ptr->end_ch) + 10;
|
||||
op_start_freq = bonded_chan_ptr->start_freq - FREQ_OFFSET_10MHZ;
|
||||
op_end_freq = bonded_chan_ptr->end_freq - FREQ_OFFSET_10MHZ;
|
||||
}
|
||||
|
||||
agile_ch_width = target_if_spectral_find_agile_width(ch_width);
|
||||
|
|
@ -3269,29 +3254,27 @@ target_if_is_aspectral_prohibited_by_adfs(struct wlan_objmgr_psoc *psoc,
|
|||
*
|
||||
* API to get current operating band of a given pdev.
|
||||
*
|
||||
* Return: if success enum band_info, BAND_UNKNOWN in case of failure
|
||||
* Return: if success enum reg_wifi_band, REG_BAND_UNKNOWN in case of failure
|
||||
*/
|
||||
static enum band_info
|
||||
static enum reg_wifi_band
|
||||
target_if_get_curr_band(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
int16_t chan_freq;
|
||||
enum band_info cur_band;
|
||||
uint32_t chan_num;
|
||||
enum reg_wifi_band cur_band;
|
||||
|
||||
if (!pdev) {
|
||||
spectral_err("pdev is NULL");
|
||||
return BAND_UNKNOWN;
|
||||
return REG_BAND_UNKNOWN;
|
||||
}
|
||||
|
||||
vdev = wlan_objmgr_pdev_get_first_vdev(pdev, WLAN_SPECTRAL_ID);
|
||||
if (!vdev) {
|
||||
spectral_debug("vdev is NULL");
|
||||
return BAND_UNKNOWN;
|
||||
return REG_BAND_UNKNOWN;
|
||||
}
|
||||
chan_freq = target_if_vdev_get_chan_freq(vdev);
|
||||
chan_num = wlan_reg_freq_to_chan(pdev, chan_freq);
|
||||
cur_band = wlan_reg_chan_to_band(chan_num);
|
||||
cur_band = wlan_reg_freq_to_band(chan_freq);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_SPECTRAL_ID);
|
||||
|
||||
return cur_band;
|
||||
|
|
@ -3311,7 +3294,7 @@ static void
|
|||
target_if_is_agile_scan_active_in_5g(struct wlan_objmgr_psoc *psoc,
|
||||
void *object, void *arg)
|
||||
{
|
||||
enum band_info band;
|
||||
enum reg_wifi_band band;
|
||||
bool *is_agile_scan_inprog_5g_pdev = arg;
|
||||
struct target_if_spectral *spectral;
|
||||
struct wlan_objmgr_pdev *cur_pdev = object;
|
||||
|
|
@ -3328,12 +3311,12 @@ target_if_is_agile_scan_active_in_5g(struct wlan_objmgr_psoc *psoc,
|
|||
p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral);
|
||||
|
||||
band = target_if_get_curr_band(cur_pdev);
|
||||
if (band == BAND_UNKNOWN) {
|
||||
if (band == REG_BAND_UNKNOWN) {
|
||||
spectral_debug("Failed to get current band");
|
||||
return;
|
||||
}
|
||||
|
||||
if (band == BAND_5G &&
|
||||
if (band == REG_BAND_5G &&
|
||||
p_sops->is_spectral_active(spectral, SPECTRAL_SCAN_MODE_AGILE))
|
||||
*is_agile_scan_inprog_5g_pdev = true;
|
||||
}
|
||||
|
|
@ -3474,7 +3457,7 @@ target_if_start_spectral_scan(struct wlan_objmgr_pdev *pdev,
|
|||
struct target_if_spectral_ops *p_sops;
|
||||
struct target_if_spectral *spectral;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
enum band_info band;
|
||||
enum reg_wifi_band band;
|
||||
|
||||
if (!err) {
|
||||
spectral_err("Error code argument is null");
|
||||
|
|
@ -3525,11 +3508,11 @@ target_if_start_spectral_scan(struct wlan_objmgr_pdev *pdev,
|
|||
}
|
||||
|
||||
band = target_if_get_curr_band(spectral->pdev_obj);
|
||||
if (band == BAND_UNKNOWN) {
|
||||
if (band == REG_BAND_UNKNOWN) {
|
||||
spectral_err("Failed to get current band");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
if ((band == BAND_5G) && (smode == SPECTRAL_SCAN_MODE_AGILE)) {
|
||||
if ((band == REG_BAND_5G) && (smode == SPECTRAL_SCAN_MODE_AGILE)) {
|
||||
struct target_psoc_info *tgt_hdl;
|
||||
enum wmi_host_hw_mode_config_type mode;
|
||||
bool is_agile_scan_inprog_5g_pdev;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
#include <spectral_defs_i.h>
|
||||
|
||||
#define FREQ_OFFSET_10MHZ 10
|
||||
#ifndef SPECTRAL_USE_NL_BCAST
|
||||
#define SPECTRAL_USE_NL_BCAST (0)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -136,6 +136,8 @@
|
|||
#define WLAN_SOC_CEXT_RX_FSE_SUPPORT 0x00040000
|
||||
/* Dynamic HW Mode Switch Support */
|
||||
#define WLAN_SOC_CEXT_DYNAMIC_HW_MODE 0x00080000
|
||||
/* Restricted 80+80 MHz support */
|
||||
#define WLAN_SOC_RESTRICTED_80P80_SUPPORT 0x00100000
|
||||
|
||||
/* feature_flags */
|
||||
/* CONF: ATH FF enabled */
|
||||
|
|
|
|||
|
|
@ -711,14 +711,13 @@ struct wlan_objmgr_vdev *wlan_objmgr_get_vdev_by_macaddr_from_pdev(
|
|||
/* Iterate through pdev's vdev list, till vdev macaddr matches with
|
||||
entry of vdev list */
|
||||
while (vdev) {
|
||||
if (WLAN_ADDR_EQ(wlan_vdev_mlme_get_macaddr(vdev), macaddr)
|
||||
== QDF_STATUS_SUCCESS) {
|
||||
if (wlan_objmgr_vdev_try_get_ref(vdev, dbg_id) !=
|
||||
QDF_STATUS_SUCCESS)
|
||||
vdev = NULL;
|
||||
|
||||
wlan_pdev_obj_unlock(pdev);
|
||||
return vdev;
|
||||
if (QDF_IS_STATUS_SUCCESS(
|
||||
WLAN_ADDR_EQ(wlan_vdev_mlme_get_macaddr(vdev), macaddr))) {
|
||||
if (QDF_IS_STATUS_SUCCESS(
|
||||
wlan_objmgr_vdev_try_get_ref(vdev, dbg_id))) {
|
||||
wlan_pdev_obj_unlock(pdev);
|
||||
return vdev;
|
||||
}
|
||||
}
|
||||
/* get next vdev */
|
||||
vdev_next = wlan_vdev_get_next_vdev_of_pdev(vdev_list, vdev);
|
||||
|
|
|
|||
|
|
@ -79,19 +79,6 @@ wlan_serialization_get_pending_list_next_node_using_psoc(
|
|||
struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_serialization_command *prev_cmd,
|
||||
uint8_t is_cmd_for_pending_scan_queue);
|
||||
/**
|
||||
* wlan_serialization_get_active_list_count() - Return Active list count
|
||||
* @psoc: pointer to soc
|
||||
* @is_cmd_from_active_scan_queue: flag to determine whether command needed
|
||||
* from scan or non-scan active queue
|
||||
*
|
||||
* Get the number of nodes present in active list
|
||||
*
|
||||
* Return: count number of active commands in queue
|
||||
*/
|
||||
|
||||
uint32_t wlan_serialization_get_active_list_count(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t is_cmd_from_active_scan_queue);
|
||||
/**
|
||||
* wlan_serialization_get_pending_list_count() - Return pending list count
|
||||
* @psoc: pointer to soc
|
||||
|
|
|
|||
|
|
@ -77,35 +77,6 @@ wlan_serialization_get_pdev_priv_obj_using_psoc(struct wlan_objmgr_psoc *psoc)
|
|||
return ser_pdev_obj;
|
||||
}
|
||||
|
||||
uint32_t wlan_serialization_get_active_list_count(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t is_cmd_from_active_scan_queue)
|
||||
{
|
||||
struct wlan_ser_pdev_obj *ser_pdev_obj;
|
||||
qdf_list_t *queue;
|
||||
struct wlan_serialization_pdev_queue *pdev_queue;
|
||||
uint32_t count;
|
||||
|
||||
ser_pdev_obj = wlan_serialization_get_pdev_priv_obj_using_psoc(psoc);
|
||||
if (!ser_pdev_obj) {
|
||||
ser_err("invalid ser_pdev_obj");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (is_cmd_from_active_scan_queue)
|
||||
pdev_queue = &ser_pdev_obj->pdev_q[SER_PDEV_QUEUE_COMP_SCAN];
|
||||
else
|
||||
pdev_queue =
|
||||
&ser_pdev_obj->pdev_q[SER_PDEV_QUEUE_COMP_NON_SCAN];
|
||||
|
||||
wlan_serialization_acquire_lock(&pdev_queue->pdev_queue_lock);
|
||||
queue = &pdev_queue->active_list;
|
||||
count = qdf_list_size(queue);
|
||||
wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
uint32_t wlan_serialization_get_pending_list_count(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t is_cmd_from_pending_scan_queue)
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ const struct country_code_to_reg_domain g_all_countries[] = {
|
|||
{CTRY_YEMEN, NULL1_WORLD, "YE", 40, 0, 0},
|
||||
{CTRY_ZIMBABWE, ETSI1_WORLD, "ZW", 40, 160, 0},
|
||||
{CTRY_JAPAN, MKK17_MKKC, "JP", 40, 160, 0},
|
||||
{CTRY_JAPAN15, MKK5_MKKC, "JP", 40, 160, 0},
|
||||
{CTRY_JAPAN15, MKK17_MKKC, "JP", 40, 160, 0},
|
||||
};
|
||||
#else
|
||||
#ifdef WLAN_FEATURE_DSRC
|
||||
|
|
|
|||
|
|
@ -2933,7 +2933,7 @@ reg_get_5g_bonded_chan_array_for_freq(struct wlan_objmgr_pdev *pdev,
|
|||
*
|
||||
* Return: Channel State
|
||||
*/
|
||||
static enum channel_state
|
||||
enum channel_state
|
||||
reg_get_5g_bonded_channel_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
enum phy_ch_width ch_width,
|
||||
|
|
|
|||
|
|
@ -917,6 +917,22 @@ uint16_t reg_min_chan_freq(void);
|
|||
*/
|
||||
uint16_t reg_max_chan_freq(void);
|
||||
|
||||
/**
|
||||
* reg_get_5g_bonded_channel_for_freq()- Return the channel state for a
|
||||
* 5G or 6G channel frequency based on the channel width and bonded channel
|
||||
* @pdev: Pointer to pdev.
|
||||
* @freq: Channel center frequency.
|
||||
* @ch_width: Channel Width.
|
||||
* @bonded_chan_ptr_ptr: Pointer to bonded_channel_freq.
|
||||
*
|
||||
* Return: Channel State
|
||||
*/
|
||||
enum channel_state
|
||||
reg_get_5g_bonded_channel_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
enum phy_ch_width ch_width,
|
||||
const struct bonded_channel_freq
|
||||
**bonded_chan_ptr_ptr);
|
||||
#endif /* CONFIG_CHAN_FREQ_API */
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1160,6 +1160,24 @@ void wlan_reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
|||
uint8_t *op_class,
|
||||
uint8_t *chan_num);
|
||||
|
||||
/**
|
||||
* wlan_reg_get_5g_bonded_channel_and_state_for_freq()- Return the channel
|
||||
* state for a 5G or 6G channel frequency based on the channel width and
|
||||
* bonded channel.
|
||||
* @pdev: Pointer to pdev.
|
||||
* @freq: Channel center frequency.
|
||||
* @bw Channel Width.
|
||||
* @bonded_chan_ptr_ptr: Pointer to bonded_channel_freq.
|
||||
*
|
||||
* Return: Channel State
|
||||
*/
|
||||
enum channel_state
|
||||
wlan_reg_get_5g_bonded_channel_and_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
enum phy_ch_width bw,
|
||||
const
|
||||
struct bonded_channel_freq
|
||||
**bonded_chan_ptr_ptr);
|
||||
#endif /*CONFIG_CHAN_FREQ_API */
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -966,6 +966,8 @@ enum reg_wifi_band wlan_reg_freq_to_band(uint16_t freq)
|
|||
return reg_freq_to_band(freq);
|
||||
}
|
||||
|
||||
qdf_export_symbol(wlan_reg_freq_to_band);
|
||||
|
||||
uint16_t wlan_reg_min_chan_freq(void)
|
||||
{
|
||||
return reg_min_chan_freq();
|
||||
|
|
@ -1005,6 +1007,23 @@ void wlan_reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
|||
chan_num);
|
||||
}
|
||||
|
||||
enum channel_state
|
||||
wlan_reg_get_5g_bonded_channel_and_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
enum phy_ch_width bw,
|
||||
const
|
||||
struct bonded_channel_freq
|
||||
**bonded_chan_ptr_ptr)
|
||||
{
|
||||
/*
|
||||
* Get channel frequencies and state from regulatory
|
||||
*/
|
||||
return reg_get_5g_bonded_channel_for_freq(pdev, freq, bw,
|
||||
bonded_chan_ptr_ptr);
|
||||
}
|
||||
|
||||
qdf_export_symbol(wlan_reg_get_5g_bonded_channel_and_state_for_freq);
|
||||
|
||||
#endif /* CONFIG CHAN FREQ API */
|
||||
|
||||
uint16_t wlan_reg_get_op_class_width(struct wlan_objmgr_pdev *pdev,
|
||||
|
|
|
|||
|
|
@ -132,6 +132,9 @@ void pktlog_callback(void *pdev, enum WDI_EVENT event, void *log_data,
|
|||
void pktlog_init(struct hif_opaque_softc *scn);
|
||||
int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
|
||||
bool, uint8_t, uint32_t);
|
||||
int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
|
||||
bool ini_triggered, uint8_t user_triggered,
|
||||
uint32_t is_iwpriv_command);
|
||||
int pktlog_setsize(struct hif_opaque_softc *scn, int32_t log_state);
|
||||
int pktlog_clearbuff(struct hif_opaque_softc *scn, bool clear_buff);
|
||||
int pktlog_disable(struct hif_opaque_softc *scn);
|
||||
|
|
@ -171,6 +174,14 @@ static inline int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
|
||||
bool ini_triggered, uint8_t user_triggered,
|
||||
uint32_t is_iwpriv_command)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int pktlog_setsize(struct hif_opaque_softc *scn,
|
||||
int32_t log_state)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -506,6 +506,12 @@ static void pktlog_detach(struct hif_opaque_softc *scn)
|
|||
}
|
||||
|
||||
pl_info = pl_dev->pl_info;
|
||||
if (!pl_info) {
|
||||
qdf_print("%s: Invalid pktlog handle", __func__);
|
||||
ASSERT(0);
|
||||
return;
|
||||
}
|
||||
mutex_lock(&pl_info->pktlog_mutex);
|
||||
remove_proc_entry(WLANDEV_BASENAME, g_pktlog_pde);
|
||||
pktlog_sysctl_unregister(pl_dev);
|
||||
|
||||
|
|
@ -516,6 +522,7 @@ static void pktlog_detach(struct hif_opaque_softc *scn)
|
|||
pl_dev->tgt_pktlog_alloced = false;
|
||||
}
|
||||
qdf_spin_unlock_bh(&pl_info->log_lock);
|
||||
mutex_unlock(&pl_info->pktlog_mutex);
|
||||
pktlog_cleanup(pl_info);
|
||||
|
||||
if (pl_dev) {
|
||||
|
|
@ -529,25 +536,12 @@ static int __pktlog_open(struct inode *i, struct file *f)
|
|||
struct hif_opaque_softc *scn;
|
||||
struct pktlog_dev_t *pl_dev;
|
||||
struct ath_pktlog_info *pl_info;
|
||||
struct ath_pktlog_info_lnx *pl_info_lnx;
|
||||
int ret = 0;
|
||||
|
||||
PKTLOG_MOD_INC_USE_COUNT;
|
||||
pl_info = PDE_DATA(f->f_path.dentry->d_inode);
|
||||
if (!pl_info) {
|
||||
qdf_nofl_err("%s: pl_info NULL", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (pl_info->curr_pkt_state != PKTLOG_OPR_NOT_IN_PROGRESS) {
|
||||
qdf_nofl_info("%s: plinfo state (%d) != PKTLOG_OPR_NOT_IN_PROGRESS",
|
||||
__func__, pl_info->curr_pkt_state);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
pl_info->curr_pkt_state = PKTLOG_OPR_IN_PROGRESS_READ_START;
|
||||
scn = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
if (!scn) {
|
||||
pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
|
||||
qdf_print("%s: Invalid scn context", __func__);
|
||||
ASSERT(0);
|
||||
return -EINVAL;
|
||||
|
|
@ -556,12 +550,38 @@ static int __pktlog_open(struct inode *i, struct file *f)
|
|||
pl_dev = get_pktlog_handle();
|
||||
|
||||
if (!pl_dev) {
|
||||
pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
|
||||
qdf_print("%s: Invalid pktlog handle", __func__);
|
||||
ASSERT(0);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pl_info = pl_dev->pl_info;
|
||||
|
||||
if (!pl_info) {
|
||||
qdf_nofl_err("%s: pl_info NULL", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&pl_info->pktlog_mutex);
|
||||
pl_info_lnx = (pl_dev) ? PL_INFO_LNX(pl_dev->pl_info) :
|
||||
PL_INFO_LNX(g_pktlog_info);
|
||||
|
||||
if (!pl_info_lnx->sysctl_header) {
|
||||
mutex_unlock(&pl_info->pktlog_mutex);
|
||||
qdf_print("%s: pktlog sysctl is unergistered.", __func__);
|
||||
ASSERT(0);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (pl_info->curr_pkt_state != PKTLOG_OPR_NOT_IN_PROGRESS) {
|
||||
mutex_unlock(&pl_info->pktlog_mutex);
|
||||
qdf_print("%s: plinfo state (%d) != PKTLOG_OPR_NOT_IN_PROGRESS",
|
||||
__func__, pl_info->curr_pkt_state);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
pl_info->curr_pkt_state = PKTLOG_OPR_IN_PROGRESS_READ_START;
|
||||
|
||||
pl_info->init_saved_state = pl_info->log_state;
|
||||
if (!pl_info->log_state) {
|
||||
/* Pktlog is already disabled.
|
||||
|
|
@ -569,6 +589,7 @@ static int __pktlog_open(struct inode *i, struct file *f)
|
|||
*/
|
||||
pl_info->curr_pkt_state =
|
||||
PKTLOG_OPR_IN_PROGRESS_READ_START_PKTLOG_DISABLED;
|
||||
mutex_unlock(&pl_info->pktlog_mutex);
|
||||
return ret;
|
||||
}
|
||||
/* Disbable the pktlog internally. */
|
||||
|
|
@ -576,6 +597,7 @@ static int __pktlog_open(struct inode *i, struct file *f)
|
|||
pl_info->log_state = 0;
|
||||
pl_info->curr_pkt_state =
|
||||
PKTLOG_OPR_IN_PROGRESS_READ_START_PKTLOG_DISABLED;
|
||||
mutex_unlock(&pl_info->pktlog_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -600,17 +622,12 @@ static int __pktlog_release(struct inode *i, struct file *f)
|
|||
struct hif_opaque_softc *scn;
|
||||
struct pktlog_dev_t *pl_dev;
|
||||
struct ath_pktlog_info *pl_info;
|
||||
struct ath_pktlog_info_lnx *pl_info_lnx;
|
||||
int ret = 0;
|
||||
|
||||
PKTLOG_MOD_DEC_USE_COUNT;
|
||||
|
||||
pl_info = PDE_DATA(f->f_path.dentry->d_inode);
|
||||
if (!pl_info)
|
||||
return -EINVAL;
|
||||
|
||||
scn = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
if (!scn) {
|
||||
pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
|
||||
qdf_print("%s: Invalid scn context", __func__);
|
||||
ASSERT(0);
|
||||
return -EINVAL;
|
||||
|
|
@ -619,12 +636,30 @@ static int __pktlog_release(struct inode *i, struct file *f)
|
|||
pl_dev = get_pktlog_handle();
|
||||
|
||||
if (!pl_dev) {
|
||||
pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
|
||||
qdf_print("%s: Invalid pktlog handle", __func__);
|
||||
ASSERT(0);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pl_info = pl_dev->pl_info;
|
||||
|
||||
if (!pl_info) {
|
||||
qdf_print("%s: Invalid pktlog info", __func__);
|
||||
ASSERT(0);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&pl_info->pktlog_mutex);
|
||||
pl_info_lnx = (pl_dev) ? PL_INFO_LNX(pl_dev->pl_info) :
|
||||
PL_INFO_LNX(g_pktlog_info);
|
||||
|
||||
if (!pl_info_lnx->sysctl_header) {
|
||||
pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
|
||||
mutex_unlock(&pl_info->pktlog_mutex);
|
||||
qdf_print("%s: pktlog sysctl is unergistered.", __func__);
|
||||
ASSERT(0);
|
||||
return -EINVAL;
|
||||
}
|
||||
pl_info->curr_pkt_state = PKTLOG_OPR_IN_PROGRESS_READ_COMPLETE;
|
||||
/*clear pktlog buffer.*/
|
||||
pktlog_clearbuff(scn, true);
|
||||
|
|
@ -632,15 +667,16 @@ static int __pktlog_release(struct inode *i, struct file *f)
|
|||
pl_info->init_saved_state = 0;
|
||||
|
||||
/*Enable pktlog again*/
|
||||
ret = pl_dev->pl_funcs->pktlog_enable(
|
||||
ret = __pktlog_enable(
|
||||
(struct hif_opaque_softc *)scn, pl_info->log_state,
|
||||
cds_is_packet_log_enabled(), 0, 1);
|
||||
|
||||
if (ret != 0)
|
||||
qdf_nofl_warn("%s: pktlog cannot be enabled. ret value %d",
|
||||
__func__, ret);
|
||||
|
||||
pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
|
||||
mutex_unlock(&pl_info->pktlog_mutex);
|
||||
if (ret != 0)
|
||||
qdf_print("%s: pktlog cannot be enabled. ret value %d",
|
||||
__func__, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -625,9 +625,9 @@ void pktlog_init(struct hif_opaque_softc *scn)
|
|||
pktlog_callback_registration(pl_dev->callback_type);
|
||||
}
|
||||
|
||||
static int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
|
||||
bool ini_triggered, uint8_t user_triggered,
|
||||
uint32_t is_iwpriv_command)
|
||||
int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
|
||||
bool ini_triggered, uint8_t user_triggered,
|
||||
uint32_t is_iwpriv_command)
|
||||
{
|
||||
struct pktlog_dev_t *pl_dev;
|
||||
struct ath_pktlog_info *pl_info;
|
||||
|
|
|
|||
|
|
@ -755,6 +755,31 @@
|
|||
WLAN_CFG_RXDMA_MONITOR_RX_DROP_THRESH_SIZE, \
|
||||
CFG_VALUE_OR_DEFAULT, "RXDMA monitor rx drop theshold")
|
||||
|
||||
#ifdef WLAN_FEATURE_PKT_CAPTURE
|
||||
#define CFG_PKTCAPTURE_MODE_DEFAULT (0)
|
||||
#define CFG_PKTCAPTURE_MODE_MGMT_PKT BIT(0)
|
||||
#define CFG_PKTCAPTURE_MODE_DATA_PKT BIT(1)
|
||||
#define CFG_PKTCAPTURE_MODE_MAX (CFG_PKTCAPTURE_MODE_MGMT_PKT | \
|
||||
CFG_PKTCAPTURE_MODE_DATA_PKT)
|
||||
|
||||
#define CFG_DP_PKT_CAPTURE_MODE_ENABLE \
|
||||
CFG_INI_BOOL("pktcap_mode_enable", \
|
||||
false, "Ctrl to enable packet capture support")
|
||||
|
||||
#define CFG_DP_PKT_CAPTURE_MODE_VALUE \
|
||||
CFG_INI_UINT("pktcapture_mode", \
|
||||
0, \
|
||||
CFG_PKTCAPTURE_MODE_MAX, \
|
||||
CFG_PKTCAPTURE_MODE_DEFAULT, \
|
||||
CFG_VALUE_OR_DEFAULT, "Value for packet capture mode")
|
||||
|
||||
#define CFG_DP_CONFIG_PKT_CAPTURE_MODE_ALL \
|
||||
CFG(CFG_DP_PKT_CAPTURE_MODE_ENABLE) \
|
||||
CFG(CFG_DP_PKT_CAPTURE_MODE_VALUE)
|
||||
#else
|
||||
#define CFG_DP_CONFIG_PKT_CAPTURE_MODE_ALL
|
||||
#endif /* WLAN_FEATURE_PKT_CAPTURE */
|
||||
|
||||
#define CFG_DP \
|
||||
CFG(CFG_DP_HTT_PACKET_TYPE) \
|
||||
CFG(CFG_DP_INT_BATCH_THRESHOLD_OTHER) \
|
||||
|
|
@ -825,5 +850,7 @@
|
|||
CFG(CFG_DP_RX_FLOW_TAG_ENABLE) \
|
||||
CFG(CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV) \
|
||||
CFG(CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE) \
|
||||
CFG(CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD)
|
||||
CFG(CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD) \
|
||||
CFG_DP_CONFIG_PKT_CAPTURE_MODE_ALL
|
||||
|
||||
#endif /* _CFG_DP_H_ */
|
||||
|
|
|
|||
|
|
@ -2906,7 +2906,17 @@ static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
cmd->n_probes = params->n_probes;
|
||||
cmd->scan_ctrl_flags_ext = params->scan_ctrl_flags_ext;
|
||||
|
||||
WMI_LOGD("scan_ctrl_flags_ext = %x", cmd->scan_ctrl_flags_ext);
|
||||
WMI_LOGD("%s scan_ctrl_flags_ext = %x, n_probe %d burst_dur %d",
|
||||
__func__,
|
||||
cmd->scan_ctrl_flags_ext,
|
||||
cmd->n_probes,
|
||||
cmd->burst_duration);
|
||||
WMI_LOGD("active: %d, passive: %d, active_2g %d, active_6g %d, passive_6g: %d",
|
||||
cmd->dwell_time_active,
|
||||
cmd->dwell_time_passive,
|
||||
cmd->dwell_time_active_2g,
|
||||
cmd->dwell_time_active_6ghz,
|
||||
cmd->dwell_time_passive_6ghz);
|
||||
|
||||
if (params->scan_random.randomize)
|
||||
wmi_copy_scan_random_mac(params->scan_random.mac_addr,
|
||||
|
|
|
|||
Loading…
Reference in a new issue