From 105318b8b0cecb0789f0a52cf123ad2b4d6a9eb5 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Sirasanagandla Date: Fri, 3 May 2019 20:30:29 +0530 Subject: [PATCH] qcacld-3.0: Avoid OBSS scan fail during SSR When SSR is in progress, OBSS vendor scan request is rejected with reason code -EAGAIN, but hostapd doesn't consider this reason code and resulting in the failure of hotspot start. To fix this, return error code -EBUSY which makes hostapd to reissue OBSS scan. Change-Id: I71119f542011aebece5692347ceb99f4a65decef CRs-Fixed: 2443341 --- core/hdd/src/wlan_hdd_scan.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 857f45411a4e..9dea285047ba 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -959,8 +959,16 @@ static int __wlan_hdd_cfg80211_vendor_scan(struct wiphy *wiphy, hdd_enter_dev(wdev->netdev); ret = wlan_hdd_validate_context(hdd_ctx); - if (0 != ret) + if (ret) { + /* + * During SSR, if -EBUSY is returned then OBSS vendor scan is + * not issued immediately. + */ + if (ret == -EAGAIN) + return -EBUSY; + return ret; + } if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SCAN_MAX, data, data_len, scan_policy)) {