summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCNSS_WLAN Service <cnssbldsw@qualcomm.com>2018-08-28 01:14:44 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-08-28 01:14:44 -0700
commit95c63cc58f8c7ad93059e3036da3fcce1fc9f43b (patch)
treeb6d395a91d2f7749bc0e5c01a85f7321b84b658d
parent167836a549b93250fdc44b6e298491924b51bf19 (diff)
parenteddc8234cb09ad09e6ccdd2cc6d9131ce0083249 (diff)
Merge "qcacld-2.0: fix compile errors" into wlan-cld2.driver.lnx.1.0
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 88f36dd84e35..c740528144e6 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -26708,6 +26708,7 @@ static int wlan_hdd_get_station_remote(struct wiphy *wiphy,
return status;
}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0))
/*
* wlan_hdd_fill_summary_stats() - populate station_info summary stats
* @stats: summary stats to use as a source
@@ -26736,7 +26737,36 @@ static void wlan_hdd_fill_summary_stats(tCsrSummaryStatsInfo *stats,
STATION_INFO_TX_FAILED |
STATION_INFO_RX_PACKETS;
}
+#else
+/*
+ * wlan_hdd_fill_summary_stats() - populate station_info summary stats
+ * @stats: summary stats to use as a source
+ * @info: kernel station_info struct to use as a destination
+ *
+ * Return: None
+ */
+static void wlan_hdd_fill_summary_stats(tCsrSummaryStatsInfo *stats,
+ struct station_info *info)
+{
+ int i;
+ info->rx_packets = stats->rx_frm_cnt;
+ info->tx_packets = 0;
+ info->tx_retries = 0;
+ info->tx_failed = 0;
+
+ for (i = 0; i < 4; ++i) {
+ info->tx_packets += stats->tx_frm_cnt[i];
+ info->tx_retries += stats->multiple_retry_cnt[i];
+ info->tx_failed += stats->fail_cnt[i];
+ }
+
+ info->filled |= BIT(NL80211_STA_INFO_TX_PACKETS) |
+ BIT(NL80211_STA_INFO_TX_RETRIES) |
+ BIT(NL80211_STA_INFO_TX_FAILED) |
+ BIT(NL80211_STA_INFO_RX_PACKETS);
+}
+#endif
/**
* wlan_hdd_get_sap_stats() - get aggregate SAP stats
* @adapter: sap adapter to get stats for