qcacld-3.0: Add implementation of get_tx_power
Add changes to support get tx power from within stats component. Change-Id: Ifafee77033b8db75e6c9ad201a26ba8bbe72efd4 CRs-Fixed: 2210333
This commit is contained in:

committed by
nshrivas

orang tua
3ff5cff23e
melakukan
e8b1b82e17
@@ -114,7 +114,7 @@
|
||||
#include "wifi_pos_api.h"
|
||||
#include "wlan_hdd_spectralscan.h"
|
||||
#include "wlan_ipa_ucfg_api.h"
|
||||
#include "wlan_cfg80211_mc_cp_stats.h"
|
||||
#include <wlan_cfg80211_mc_cp_stats.h>
|
||||
|
||||
#define g_mode_rates_size (12)
|
||||
#define a_mode_rates_size (8)
|
||||
|
@@ -84,6 +84,7 @@
|
||||
#include "wlan_hdd_packet_filter_api.h"
|
||||
#include "wlan_cfg80211_scan.h"
|
||||
#include "wlan_ipa_ucfg_api.h"
|
||||
#include <wlan_cfg80211_mc_cp_stats.h>
|
||||
|
||||
/* Preprocessor definitions and constants */
|
||||
#ifdef QCA_WIFI_NAPIER_EMULATION
|
||||
@@ -2068,6 +2069,18 @@ int wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef QCA_SUPPORT_CP_STATS
|
||||
static void wlan_hdd_get_tx_power(struct hdd_adapter *adapter, int *dbm)
|
||||
{
|
||||
wlan_cfg80211_mc_cp_stats_get_tx_power(adapter->hdd_vdev, dbm);
|
||||
}
|
||||
#else
|
||||
static void wlan_hdd_get_tx_power(struct hdd_adapter *adapter, int *dbm)
|
||||
{
|
||||
wlan_hdd_get_class_astats(adapter);
|
||||
*dbm = adapter->hdd_stats.class_a_stat.max_pwr;
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* __wlan_hdd_cfg80211_get_txpower() - get TX power
|
||||
* @wiphy: Pointer to wiphy
|
||||
@@ -2126,10 +2139,10 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
|
||||
MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
|
||||
TRACE_CODE_HDD_CFG80211_GET_TXPOWER,
|
||||
adapter->session_id, adapter->device_mode));
|
||||
wlan_hdd_get_class_astats(adapter);
|
||||
*dbm = adapter->hdd_stats.class_a_stat.max_pwr;
|
||||
|
||||
hdd_exit();
|
||||
wlan_hdd_get_tx_power(adapter, dbm);
|
||||
hdd_debug("power: %d", *dbm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -5534,6 +5534,7 @@ int wlan_hdd_get_peer_info(struct hdd_adapter *adapter,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
struct class_a_stats {
|
||||
tCsrGlobalClassAStatsInfo class_a_stats;
|
||||
};
|
||||
@@ -5635,6 +5636,7 @@ return_cached_results:
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct station_stats {
|
||||
tCsrSummaryStatsInfo summary_stats;
|
||||
|
@@ -398,6 +398,7 @@ int wlan_hdd_get_peer_info(struct hdd_adapter *adapter,
|
||||
struct qdf_mac_addr macaddress,
|
||||
struct sir_peer_info_ext *peer_info_ext);
|
||||
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
/**
|
||||
* wlan_hdd_get_class_astats() - Get Class A statistics
|
||||
* @adapter: adapter for which statistics are desired
|
||||
@@ -405,6 +406,7 @@ int wlan_hdd_get_peer_info(struct hdd_adapter *adapter,
|
||||
* Return: QDF_STATUS_SUCCESS if adapter's Class A statistics were updated
|
||||
*/
|
||||
QDF_STATUS wlan_hdd_get_class_astats(struct hdd_adapter *adapter);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_hdd_get_station_stats() - Get station statistics
|
||||
|
Reference in New Issue
Block a user