From 9fb2bd53ab45ecbd93341e7a0e2a0178794ca520 Mon Sep 17 00:00:00 2001 From: Anurag Chouhan Date: Thu, 4 Jan 2018 12:25:48 +0530 Subject: [PATCH] qcacld-3.0: Validate NUD stats commands for FTM mode Do Not allow __wlan_hdd_cfg80211_get_nud_stats and __wlan_hdd_cfg80211_set_nud_stats commands for FTM mode. CRs-fixed: 2161387 Change-Id: I135cead506c741425845d9e000d9a868e4a7779a --- core/hdd/src/wlan_hdd_cfg80211.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index b961582560b4..9089b2844776 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -11622,6 +11622,11 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy, ENTER(); + if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { + hdd_err("Command not allowed in FTM mode"); + return -EINVAL; + } + err = wlan_hdd_validate_context(hdd_ctx); if (0 != err) return err; @@ -11773,6 +11778,11 @@ static int __wlan_hdd_cfg80211_get_nud_stats(struct wiphy *wiphy, ENTER(); + if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { + hdd_err("Command not allowed in FTM mode"); + return -EINVAL; + } + err = wlan_hdd_validate_context(hdd_ctx); if (0 != err) return err;