From df07667dc8ee5a5f14590fa41a2b3f20c869cd72 Mon Sep 17 00:00:00 2001 From: "Poddar, Siddarth" Date: Mon, 26 Feb 2018 14:21:45 +0530 Subject: [PATCH] qcacld-3.0: Support WLAN TX/RX Stats in STA mode only WLAN TX/RX connectivity stats are supported only for STA mode. Host driver does not honour set/get connectivity stat command for mode other than STA mode. Change-Id: I0a96562478ede38321a1e323fb798b7e414b5f59 CRs-Fixed: 2195563 --- core/hdd/src/wlan_hdd_cfg80211.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index ce324deb7e12..e13272a646f7 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -12876,6 +12876,12 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy, return -EINVAL; } + if (adapter->device_mode != QDF_STA_MODE) { + QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, + "%s STATS supported in only STA mode !!", __func__); + return -EINVAL; + } + if (tb[STATS_SET_START]) { /* tracking is enabled for stats other than arp. */ if (tb[STATS_SET_DATA_PKT_INFO]) { @@ -13375,6 +13381,12 @@ static int __wlan_hdd_cfg80211_get_nud_stats(struct wiphy *wiphy, if (err) return err; + if (adapter->device_mode != QDF_STA_MODE) { + QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, + "%s STATS supported in only STA mode !!", __func__); + return -EINVAL; + } + arp_stats_params.pkt_type = WLAN_NUD_STATS_ARP_PKT_TYPE; arp_stats_params.vdev_id = adapter->session_id;