qcacld-3.0: Request fw stats for monitor mode

Periodically request pdev stats from FW to receive channel noise floor
information after monitor vdev has been brought up, based on the band
currently being sniffed. Use the band information as a secondary parameter
when sending periodic request to fw so a single noise floor value is sent
to host. Pass this noise floor information to dp_pdev to be populated in
radiotap header.

Change-Id: I488e4985392cb646ffdee914359fa995dbeb025e
CRs-Fixed: 2833458
Bu işleme şunda yer alıyor:
Saket Jha
2020-12-10 21:27:11 -08:00
işlemeyi yapan: snandini
ebeveyn 281ed411b4
işleme 6599516554
4 değiştirilmiş dosya ile 83 ekleme ve 1 silme

Dosyayı Görüntüle

@@ -38,6 +38,7 @@
#include <cdp_txrx_ops.h>
#include <cdp_txrx_stats_struct.h>
#include <cdp_txrx_host_stats.h>
#include <cdp_txrx_ctrl.h>
#include <cds_api.h>
#ifdef WLAN_SUPPORT_TWT
@@ -365,6 +366,8 @@ static QDF_STATUS target_if_cp_stats_extract_pdev_stats(
uint32_t i;
QDF_STATUS status;
wmi_host_pdev_stats pdev_stats;
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
cdp_config_param_type val;
ev->num_pdev_stats = stats_param->num_pdev_stats;
if (!ev->num_pdev_stats)
@@ -386,8 +389,12 @@ static QDF_STATUS target_if_cp_stats_extract_pdev_stats(
return status;
}
ev->pdev_stats[i].max_pwr = pdev_stats.chan_tx_pwr;
target_if_cp_stats_extract_congestion(&ev->pdev_stats[i],
&pdev_stats);
val.cdp_pdev_param_chn_noise_flr = pdev_stats.chan_nf;
cdp_txrx_set_pdev_param(soc, 0, CDP_CHAN_NOISE_FLOOR, val);
}
return QDF_STATUS_SUCCESS;
@@ -817,6 +824,18 @@ static QDF_STATUS target_if_cp_stats_extract_event(struct wmi_unified *wmi_hdl,
return status;
}
uint8_t target_if_mc_cp_get_mac_id(struct vdev_mlme_obj *vdev_mlme)
{
uint8_t mac_id = 0;
if (wlan_reg_is_24ghz_ch_freq(vdev_mlme->vdev->vdev_mlme.des_chan->ch_freq))
mac_id = TGT_MAC_ID_24G;
else
mac_id = TGT_MAC_ID_5G;
return mac_id;
}
/**
* target_if_mc_cp_stats_stats_event_handler() - function to handle stats event
* from firmware.