mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacld-3.0: Implement cfg80211 abort scan API
qcacld-2.0 to qcacld-3.0 propagation There is no support for cfg80211 abort scan API, so implement the cfg80211 abort scan API. Change-Id: I4632c1b4770e6b2f301d67f37005585aef401ab6 CRs-Fixed: 930870
This commit is contained in:
parent
666bf8591b
commit
528789e7ac
3 changed files with 67 additions and 2 deletions
|
|
@ -12361,4 +12361,8 @@ static struct cfg80211_ops wlan_hdd_cfg80211_ops = {
|
|||
.channel_switch = wlan_hdd_cfg80211_channel_switch,
|
||||
#endif
|
||||
.set_monitor_channel = wlan_hdd_cfg80211_set_mon_ch,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || \
|
||||
defined(CFG80211_ABORT_SCAN)
|
||||
.abort_scan = wlan_hdd_cfg80211_abort_scan,
|
||||
#endif
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1923,13 +1923,13 @@ int wlan_hdd_cfg80211_vendor_scan(struct wiphy *wiphy,
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_hdd_scan_abort() - abort ongoing scan
|
||||
* @pAdapter: Pointer to interface adapter
|
||||
*
|
||||
* Return: 0 for success, non zero for failure
|
||||
*/
|
||||
#ifdef FEATURE_WLAN_SCAN_PNO
|
||||
int wlan_hdd_scan_abort(hdd_adapter_t *pAdapter)
|
||||
{
|
||||
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
|
|
@ -1955,6 +1955,7 @@ int wlan_hdd_scan_abort(hdd_adapter_t *pAdapter)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_WLAN_SCAN_PNO
|
||||
/**
|
||||
* hdd_sched_scan_callback - scheduled scan callback
|
||||
* @callbackContext: Callback context
|
||||
|
|
@ -2439,6 +2440,60 @@ int wlan_hdd_cfg80211_sched_scan_stop(struct wiphy *wiphy,
|
|||
}
|
||||
#endif /*FEATURE_WLAN_SCAN_PNO */
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || \
|
||||
defined(CFG80211_ABORT_SCAN)
|
||||
/**
|
||||
* __wlan_hdd_cfg80211_abort_scan() - cfg80211 abort scan api
|
||||
* @wiphy: Pointer to wiphy
|
||||
* @wdev: Pointer to wireless device structure
|
||||
*
|
||||
* This function is used to abort an ongoing scan
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void __wlan_hdd_cfg80211_abort_scan(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev)
|
||||
{
|
||||
struct net_device *dev = wdev->netdev;
|
||||
hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
|
||||
int ret;
|
||||
|
||||
ENTER_DEV(dev);
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return;
|
||||
}
|
||||
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (!ret)
|
||||
return;
|
||||
|
||||
wlan_hdd_scan_abort(adapter);
|
||||
|
||||
EXIT();
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_hdd_cfg80211_abort_scan - cfg80211 abort scan api
|
||||
* @wiphy: Pointer to wiphy
|
||||
* @wdev: Pointer to wireless device structure
|
||||
*
|
||||
* Wrapper to __wlan_hdd_cfg80211_abort_scan() -
|
||||
* function is used to abort an ongoing scan
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wlan_hdd_cfg80211_abort_scan(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev)
|
||||
{
|
||||
cds_ssr_protect(__func__);
|
||||
__wlan_hdd_cfg80211_abort_scan(wiphy, wdev);
|
||||
cds_ssr_unprotect(__func__);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hdd_cleanup_scan_queue() - remove entries in scan queue
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -71,5 +71,11 @@ int wlan_hdd_cfg80211_vendor_scan(struct wiphy *wiphy,
|
|||
int data_len);
|
||||
|
||||
void hdd_cleanup_scan_queue(hdd_context_t *hdd_ctx);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || \
|
||||
defined(CFG80211_ABORT_SCAN)
|
||||
void wlan_hdd_cfg80211_abort_scan(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev);
|
||||
#endif
|
||||
#endif /* end #if !defined(WLAN_HDD_SCAN_H) */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue