diff options
| author | Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org> | 2016-09-08 18:21:50 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-10-17 21:57:27 -0700 |
| commit | 043f4834a70ce0f98ae786fdffdeca690cff8de9 (patch) | |
| tree | 6a91efaf1886a969d6da92fd88cb980f558c3cb7 | |
| parent | 864ccdaaf727e112d9c2b14e4388bb18cd1d2ef7 (diff) | |
qcacld-3.0: Don't Invoke cfg80211_scan_done during unload/SSR
qcacld-2.0 to qcacld-3.0 propagation
While netdev interface is closing the __cfg80211_scan_done() shall already
be invoked, so in hdd_cfg80211_scan_done_callback() check for the
interface flag before invoking the cfg80211_scan_done().
Change-Id: If88447acd4d13a4ba0ef84378f21e75669af6c71
CRs-Fixed: 908656
| -rw-r--r-- | core/hdd/src/wlan_hdd_scan.c | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 5feed800683e..7dbe6ecc1182 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -1103,6 +1103,43 @@ nla_put_failure: return; } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) +/** + * hdd_cfg80211_scan_done() - Scan completed callback to cfg80211 + * @adapter: Pointer to the adapter + * @req : Scan request + * @aborted : true scan aborted false scan success + * + * This function notifies scan done to cfg80211 + * + * Return: none + */ +static void hdd_cfg80211_scan_done(hdd_adapter_t *adapter, + struct cfg80211_scan_request *req, + bool aborted) +{ + if (adapter->dev->flags & IFF_UP) + cfg80211_scan_done(req, aborted); +} +#else +/** + * hdd_cfg80211_scan_done() - Scan completed callback to cfg80211 + * @adapter: Pointer to the adapter + * @req : Scan request + * @aborted : true scan aborted false scan success + * + * This function notifies scan done to cfg80211 + * + * Return: none + */ +static void hdd_cfg80211_scan_done(hdd_adapter_t *adapter, + struct cfg80211_scan_request *req, + bool aborted) +{ + cfg80211_scan_done(req, aborted); +} +#endif + /** * hdd_cfg80211_scan_done_callback() - scan done callback function called after * scan is finished @@ -1200,7 +1237,7 @@ static QDF_STATUS hdd_cfg80211_scan_done_callback(tHalHandle halHandle, * scan done event will be posted */ if (NL_SCAN == source) - cfg80211_scan_done(req, aborted); + hdd_cfg80211_scan_done(pAdapter, req, aborted); else hdd_vendor_scan_callback(pAdapter, req, aborted); |
