diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2016-10-25 11:27:52 -0700 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-11-04 15:05:46 -0700 |
| commit | e90c0e41090b0322fa2a87d52f03cac6efe218b1 (patch) | |
| tree | 716c70483f0e30c4ec8d99b125360bd2ce0c69ba | |
| parent | 40c428a239384f8e7b9462c904a204038839d632 (diff) | |
qcacld-3.0: Add support for tx time per power level in radio stats
This is a qcacld-2.0 to qcacld-3.0 propagation.
Modify the existing radio_stat structure to add time spent
in each tranmission power level.
Change-Id: Ia5da997aabd5331e736d7367c9d74dfaf3e47906
CRs-Fixed: 992365
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.h | 8 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_stats.c | 7 | ||||
| -rw-r--r-- | core/mac/inc/sir_api.h | 5 |
3 files changed, 20 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index ab226b583d30..014641b09f25 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -1652,6 +1652,14 @@ enum qca_wlan_vendor_attr_ll_stats_results { /* Unsigned 32bit value to indicate ll stats result type */ QCA_WLAN_VENDOR_ATTR_LL_STATS_TYPE, + /* Unsigned 32bit value */ + QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_NUM_TX_LEVELS, + + /* Unsigned 32bit value + * Number of msecs the radio spent in transmitting for each power level + */ + QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_TX_TIME_PER_LEVEL, + /* keep last */ QCA_WLAN_VENDOR_ATTR_LL_STATS_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_LL_STATS_MAX = diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 67f45a364d05..6ceb554bd43b 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -883,6 +883,13 @@ static void hdd_link_layer_process_radio_stats(hdd_adapter_t *pAdapter, QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_HS20, pWifiRadioStat->onTimeHs20) || nla_put_u32(vendor_event, + QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_NUM_TX_LEVELS, + MAX_TPC_LEVELS) || + nla_put(vendor_event, + QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_TX_TIME_PER_LEVEL, + sizeof(u32) * MAX_TPC_LEVELS, + pWifiRadioStat->tx_time_per_tpc) || + nla_put_u32(vendor_event, QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_NUM_CHANNELS, pWifiRadioStat->numChannels)) { hdd_err("QCA_WLAN_VENDOR_ATTR put fail"); diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 362aa55d3b93..e5d11883e850 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -4995,6 +4995,7 @@ typedef struct { uint32_t ccaBusyTime; } tSirWifiChannelStats, *tpSirWifiChannelStats; +#define MAX_TPC_LEVELS 64 /* radio statistics */ typedef struct { /* wifi radio (if multiple radio supported) */ @@ -5035,6 +5036,10 @@ typedef struct { uint32_t onTimeHs20; /* number of channels */ uint32_t numChannels; + + /* tx time (in milliseconds) per TPC level (0.5 dBm) */ + uint32_t tx_time_per_tpc[MAX_TPC_LEVELS]; + /* channel statistics tSirWifiChannelStats */ tSirWifiChannelStats channels[0]; } tSirWifiRadioStat, *tpSirWifiRadioStat; |
