qcacld-3.0: cleanup legacy scan code
-Remove legacy scan code related to wext interface.
-Remove code under NAPIER_SCAN macro
-Remove legacy abort scan code
Change-Id: I38900a4c786b5ba5f31006e6e29332c081a565cf
CRs-Fixed: 2101188
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index a1b9445..9540d77 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1705,10 +1705,6 @@
struct delayed_work roc_req_work;
qdf_spinlock_t hdd_roc_req_q_lock;
qdf_list_t hdd_roc_req_q;
-#ifndef NAPIER_SCAN
- qdf_spinlock_t hdd_scan_req_q_lock;
- qdf_list_t hdd_scan_req_q;
-#endif
uint8_t miracast_value;
#ifdef WLAN_NS_OFFLOAD
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 471c4f8..086ca4c 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -11792,8 +11792,6 @@
return 0;
}
-#ifdef NAPIER_SCAN
-
#ifdef FEATURE_WLAN_SCAN_PNO
static inline void hdd_update_pno_config(struct pno_user_cfg *pno_cfg,
struct hdd_config *cfg)
@@ -11878,12 +11876,6 @@
return 0;
}
-#else
-static int hdd_update_scan_config(hdd_context_t *hdd_ctx)
-{
- return 0;
-}
-#endif
#ifdef CONVERGED_TDLS_ENABLE
static int hdd_update_tdls_config(hdd_context_t *hdd_ctx)
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index 0aa29cb..702300d 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -72,215 +72,6 @@
eBCAST_HIDDEN = 2,
};
-#ifndef NAPIER_SCAN
-/**
- * wlan_hdd_is_scan_pending() - Utility function to check pending scans
- * @adapter: Pointer to the adapter
- *
- * Utility function to check pending scans on a particular adapter
- *
- * Return: true if scans are pending, false otherwise
- */
-static bool wlan_hdd_is_scan_pending(hdd_adapter_t *adapter)
-{
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
- qdf_list_node_t *pnode = NULL, *ppnode = NULL;
- struct hdd_scan_req *hdd_scan_req;
-
- qdf_spin_lock(&hdd_ctx->hdd_scan_req_q_lock);
-
- if (qdf_list_empty(&hdd_ctx->hdd_scan_req_q)) {
- qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- return false;
- }
-
- if (QDF_STATUS_SUCCESS != qdf_list_peek_front(&hdd_ctx->hdd_scan_req_q,
- &ppnode)) {
- qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- hdd_err("Failed to remove Scan Req from queue");
- return false;
- }
-
- do {
- pnode = ppnode;
- hdd_scan_req = (struct hdd_scan_req *)pnode;
- /* Any scan pending on the adapter */
- if (adapter == hdd_scan_req->adapter) {
- qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- hdd_debug("pending scan id %d", hdd_scan_req->scan_id);
- return true;
- }
- } while (QDF_STATUS_SUCCESS ==
- qdf_list_peek_next(&hdd_ctx->hdd_scan_req_q, pnode, &ppnode));
-
- qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- return false;
-}
-
-/**
- * hdd_scan_inactivity_timer_handler() - Function invoked when hdd inactivity
- * timer expires
- * @scan_req: void pointer to scan request
- *
- * This function is invoked when the scan request enqueued by hdd expires the
- * given timeout, it shall BUG_ON to provide further details for debugging.
- *
- * Return: void
- */
-static void hdd_scan_inactivity_timer_handler(void *scan_req)
-{
- struct hdd_scan_req *hdd_scan_req = scan_req;
-
- hdd_debug("scan_id %d, enqueue timestamp %u, flags 0x%X",
- hdd_scan_req->scan_id, hdd_scan_req->timestamp,
- hdd_scan_req->scan_req_flags);
-
- if (cds_is_load_or_unload_in_progress())
- hdd_err("%s: Module (un)loading; Ignore hdd scan req timeout",
- __func__);
- else if (cds_is_driver_recovering())
- hdd_err("%s: Module recovering; Ignore hdd scan req timeout",
- __func__);
- else if (cds_is_driver_in_bad_state())
- hdd_err("%s: Module in bad state; Ignore hdd scan req timeout",
- __func__);
- else
- cds_trigger_recovery();
-}
-
-/**
- * wlan_hdd_scan_request_enqueue() - enqueue Scan Request
- * @adapter: Pointer to the adapter
- * @scan_req: Pointer to the scan request
- *
- * Enqueue scan request in the global HDD scan list.This list
- * stores the active scan request information.
- *
- * Return: 0 on success, error number otherwise
- */
-static int wlan_hdd_scan_request_enqueue(hdd_adapter_t *adapter,
- struct cfg80211_scan_request *scan_req,
- uint8_t source, uint32_t scan_id,
- uint32_t timestamp)
-{
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
- struct hdd_scan_req *hdd_scan_req;
- QDF_STATUS status;
-
- ENTER();
- hdd_scan_req = qdf_mem_malloc(sizeof(*hdd_scan_req));
- if (NULL == hdd_scan_req) {
- hdd_err("malloc failed for Scan req");
- return -ENOMEM;
- }
-
- hdd_scan_req->adapter = adapter;
- hdd_scan_req->scan_request = scan_req;
- hdd_scan_req->source = source;
- hdd_scan_req->scan_id = scan_id;
- hdd_scan_req->timestamp = timestamp;
- if (scan_req != NULL)
- hdd_scan_req->scan_req_flags = scan_req->flags;
- else
- hdd_scan_req->scan_req_flags = 0;
-
- qdf_spin_lock(&hdd_ctx->hdd_scan_req_q_lock);
- status = qdf_list_insert_back(&hdd_ctx->hdd_scan_req_q,
- &hdd_scan_req->node);
- qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
-
- if (QDF_STATUS_SUCCESS != status) {
- hdd_err("Failed to enqueue Scan Req");
- qdf_mem_free(hdd_scan_req);
- return -EINVAL;
- }
-
- qdf_timer_init(NULL, &hdd_scan_req->hdd_scan_inactivity_timer,
- hdd_scan_inactivity_timer_handler, hdd_scan_req,
- QDF_TIMER_TYPE_SW);
- qdf_timer_start(&hdd_scan_req->hdd_scan_inactivity_timer,
- HDD_SCAN_INACTIVITY_TIMEOUT);
-
- EXIT();
- return 0;
-}
-
-/**
- * wlan_hdd_scan_request_dequeue() - dequeue scan request
- * @hdd_ctx: Global HDD context
- * @scan_id: scan id
- * @req: scan request
- * @source : returns source of the scan request
- * @timestamp: scan request timestamp
- *
- * Return: QDF_STATUS
- */
-static QDF_STATUS wlan_hdd_scan_request_dequeue(struct hdd_context *hdd_ctx,
- uint32_t scan_id, struct cfg80211_scan_request **req, uint8_t *source,
- uint32_t *timestamp)
-{
- QDF_STATUS status = QDF_STATUS_E_FAILURE;
- struct hdd_scan_req *hdd_scan_req;
- qdf_list_node_t *pNode = NULL, *ppNode = NULL;
-
- hdd_debug("Dequeue Scan id: %d", scan_id);
-
- if ((source == NULL) || (timestamp == NULL) || (req == NULL))
- return QDF_STATUS_E_NULL_VALUE;
-
- qdf_spin_lock(&hdd_ctx->hdd_scan_req_q_lock);
-
- if (list_empty(&hdd_ctx->hdd_scan_req_q.anchor)) {
- qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- return QDF_STATUS_E_FAILURE;
- }
-
- if (QDF_STATUS_SUCCESS !=
- qdf_list_peek_front(&hdd_ctx->hdd_scan_req_q, &ppNode)) {
- qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- hdd_err("Failed to remove Scan Req from queue");
- return QDF_STATUS_E_FAILURE;
- }
-
- do {
- pNode = ppNode;
- hdd_scan_req = (struct hdd_scan_req *)pNode;
- if (hdd_scan_req->scan_id == scan_id) {
- status = qdf_list_remove_node(&hdd_ctx->hdd_scan_req_q,
- pNode);
- if (status == QDF_STATUS_SUCCESS) {
- qdf_timer_stop(&hdd_scan_req->
- hdd_scan_inactivity_timer);
- qdf_timer_free(&hdd_scan_req->
- hdd_scan_inactivity_timer);
- hdd_debug("Stopping HDD Scan inactivity timer");
-
- *req = hdd_scan_req->scan_request;
- *source = hdd_scan_req->source;
- *timestamp = hdd_scan_req->timestamp;
- qdf_mem_free(hdd_scan_req);
- qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- hdd_debug("removed Scan id: %d, req = %p, pending scans %d",
- scan_id, req,
- qdf_list_size(&hdd_ctx->hdd_scan_req_q));
- return QDF_STATUS_SUCCESS;
- }
-
- qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- hdd_err("Failed to remove node scan id %d, pending scans %d",
- scan_id,
- qdf_list_size(&hdd_ctx->hdd_scan_req_q));
- return status;
- }
- } while (QDF_STATUS_SUCCESS ==
- qdf_list_peek_next(&hdd_ctx->hdd_scan_req_q, pNode, &ppNode));
-
- qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- hdd_err("Failed to find scan id %d", scan_id);
- return status;
-}
-#endif
-
/**
* hdd_vendor_scan_callback() - Scan completed callback event
* @hddctx: HDD context
@@ -1728,7 +1519,6 @@
return ret;
}
-
/**
* wlan_hdd_vendor_abort_scan() - API to process vendor command for
* abort scan