Browse Source

qcacmn: scan convergence - add target if changes

Add target if related changes for scan module.

Change-Id: Icaf6a30790106fec30ba9dccc9036be079a8bc0d
CRs-Fixed: 1095299
Abhishek Singh 8 years ago
parent
commit
f94beaad36

+ 11 - 0
target_if/scan/inc/target_if_scan.h

@@ -72,4 +72,15 @@ target_if_scan_start(struct wlan_objmgr_psoc *psoc,
 QDF_STATUS
 target_if_scan_cancel(struct wlan_objmgr_psoc *psoc,
 		struct scan_cancel_param *req);
+
+/**
+ * target_if_register_scan_tx_ops() - lmac handler to register scan tx_ops
+ * callback functions
+ * @scan: wlan_lmac_if_scan_tx_ops object
+ *
+ * Return: QDF_STATUS
+ */
+
+QDF_STATUS
+target_if_register_scan_tx_ops(struct wlan_lmac_if_scan_tx_ops *scan);
 #endif

+ 14 - 12
target_if/scan/src/target_if_scan.c

@@ -28,6 +28,7 @@
 #include <wlan_objmgr_psoc_obj.h>
 #include <wlan_scan_tgt_api.h>
 #include <target_if.h>
+#include <target_if_scan.h>
 
 #ifdef CONFIG_MCL
 inline uint32_t get_scan_event_id(void)
@@ -74,14 +75,6 @@ target_if_scan_event_handler(ol_scn_t scn, uint8_t *data, uint32_t datalen)
 		return -ENOMEM;
 	}
 
-	if (wmi_extract_vdev_scan_ev_param(wmi_handle, data,
-			&(event_info->event))) {
-		target_if_err("%s: Failed to extract wmi scan event\n",
-			__func__);
-		qdf_mem_free(event_info);
-		return -EINVAL;
-	}
-
 	scan_rx_ops = target_if_scan_get_rx_ops(psoc);
 	if (scan_rx_ops->scan_ev_handler) {
 		status = scan_rx_ops->scan_ev_handler(psoc, event_info);
@@ -120,14 +113,23 @@ QDF_STATUS
 target_if_scan_start(struct wlan_objmgr_psoc *psoc,
 		struct scan_start_request *req)
 {
-	return wmi_unified_scan_start_cmd_send(psoc->tgt_if_handle,
-		&req->scan_req);
+	return QDF_STATUS_SUCCESS;
 }
 
-
 QDF_STATUS
 target_if_scan_cancel(struct wlan_objmgr_psoc *psoc,
 		struct scan_cancel_param *req)
 {
-	return wmi_unified_scan_stop_cmd_send(psoc->tgt_if_handle, req);
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+target_if_register_scan_tx_ops(struct wlan_lmac_if_scan_tx_ops *scan)
+{
+	scan->scan_start = target_if_scan_start;
+	scan->scan_cancel = target_if_scan_cancel;
+	scan->scan_reg_ev_handler = target_if_scan_register_event_handler;
+	scan->scan_unreg_ev_handler = target_if_scan_unregister_event_handler;
+
+	return QDF_STATUS_SUCCESS;
 }

+ 4 - 0
umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c

@@ -21,6 +21,7 @@
 #include "wlan_lmac_if_def.h"
 #include "wlan_lmac_if_api.h"
 #include "wlan_mgmt_txrx_tgt_api.h"
+#include "wlan_scan_tgt_api.h"
 
 /* Function pointer for OL/WMA specific UMAC tx_ops
  * registration.
@@ -64,6 +65,9 @@ wlan_lmac_if_umac_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
 			tgt_mgmt_txrx_get_peer_from_desc_id;
 	mgmt_txrx_rx_ops->mgmt_txrx_get_vdev_id_from_desc_id =
 			tgt_mgmt_txrx_get_vdev_id_from_desc_id;
+	/* scan rx ops */
+	rx_ops->scan.scan_ev_handler = tgt_scan_event_handler;
+
 	return QDF_STATUS_SUCCESS;
 }
 

+ 10 - 0
umac/scan/dispatcher/inc/wlan_scan_public_structs.h

@@ -25,6 +25,7 @@
 #include <wlan_cmn.h>
 #include <qdf_time.h>
 #include <qdf_list.h>
+#include <qdf_atomic.h>
 #include <wlan_cmn_ieee80211.h>
 
 typedef uint16_t wlan_scan_requester;
@@ -45,6 +46,11 @@ typedef uint32_t wlan_scan_id;
 #define SCM_BSS_CAP_VALUE_UAPSD 1
 #define SCM_BSS_CAP_VALUE_5GHZ  2
 
+/* forward declaration */
+struct wlan_objmgr_vdev;
+struct wlan_objmgr_pdev;
+struct wlan_objmgr_psoc;
+
 /**
  * struct channel_info - BSS channel information
  * @chan_idx: current operating channel index
@@ -444,6 +450,7 @@ struct scan_extra_params_legacy {
  * @scan_id: scan id
  * @scan_req_id: scan requester id
  * @vdev_id: vdev id where scan was originated
+ * @pdev_id: pdev id of parent pdev
  * @scan_priority: scan priority
  * @scan_ev_started: notify scan started event
  * @scan_ev_completed: notify scan completed event
@@ -513,6 +520,7 @@ struct scan_req_params {
 	uint32_t scan_id;
 	uint32_t scan_req_id;
 	uint32_t vdev_id;
+	uint32_t pdev_id;
 	enum scan_priority scan_priority;
 	union {
 		struct {
@@ -614,12 +622,14 @@ enum scan_cancel_req_type {
  * @scan_id: scan id
  * @req_type: scan request type
  * @vdev_id: vdev id
+ * @pdev_id: pdev id of parent pdev
  */
 struct scan_cancel_param {
 	uint32_t requester;
 	uint32_t scan_id;
 	enum scan_cancel_req_type req_type;
 	uint32_t vdev_id;
+	uint32_t pdev_id;
 };
 
 /**