From 087abae5509fcdece9004f1532333b7cecac33e2 Mon Sep 17 00:00:00 2001 From: Lin Bai Date: Tue, 4 Aug 2020 17:13:57 +0800 Subject: [PATCH] qcacld-3.0: Return proper error code when handling PMKSA Currently only STA and SAP support PMKSA cache, and return EOPNOTSUPP for other modes. Change-Id: Ic8969ffd58815c4f3e2e5e286521421c38eb7f56 CRs-Fixed: 2747485 --- core/hdd/src/wlan_hdd_cfg80211.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 6fe2173d6f00..8640a669e5a9 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -22083,7 +22083,10 @@ static int __wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy, return errno; status = wlan_hdd_flush_pmksa_cache(adapter); - if (QDF_IS_STATUS_ERROR(status)) { + if (status == QDF_STATUS_E_NOSUPPORT) { + errno = -EOPNOTSUPP; + } + else if (QDF_IS_STATUS_ERROR(status)) { hdd_err("Cannot flush PMKIDCache"); errno = -EINVAL; }