wlan: Add SNR monitoring support
Add support to retrieve SNR from the received frame
and return it to the user space.
CRs-Fixed: 529156
Change-Id: Ic63c41e6bc2d9402dc42554e96637dd829a59a53
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index b868e32..fd7e923 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -5577,6 +5577,21 @@
pHddCtx->cfg_ini->nBandCapability = 1;
}
}
+
+ /* If SNR Monitoring is enabled, FW has to parse all beacons
+ * for calcaluting and storing the average SNR, so set Nth beacon
+ * filter to 1 to enable FW to parse all the beaocons
+ */
+ if (1 == pHddCtx->cfg_ini->fEnableSNRMonitoring)
+ {
+ /* The log level is deliberately set to WARN as overriding
+ * nthBeaconFilter to 1 will increase power cosumption and this
+ * might just prove helpful to detect the power issue.
+ */
+ hddLog(VOS_TRACE_LEVEL_WARN,
+ "%s: Setting pHddCtx->cfg_ini->nthBeaconFilter = 1", __func__);
+ pHddCtx->cfg_ini->nthBeaconFilter = 1;
+ }
/*
* cfg80211: Initialization and registration ...
*/