Quellcode durchsuchen

qcacld-3.0: Fix compilation error caused by hdd_indicate_mgmt_frame

hdd_indicate_mgmt_frame is defined under CONFIG_CNSS feature flag
which is not defined for MSM8998 SNOC target. Fix this compilation
error by taking out definition of hdd_indicate_mgmt_frame from
CONFIG_CNSS feature flag.

Change-Id: I4b2de5d947ff4fdd21032d6b7e3d5fe4e9eb3eec
CRs-Fixed: 978800
Rajeev Kumar vor 9 Jahren
Ursprung
Commit
d004abc6f3
1 geänderte Dateien mit 53 neuen und 53 gelöschten Zeilen
  1. 53 53
      core/hdd/src/wlan_hdd_main.c

+ 53 - 53
core/hdd/src/wlan_hdd_main.c

@@ -4676,59 +4676,6 @@ static uint8_t hdd_find_prefd_safe_chnl(hdd_context_t *hdd_ctxt,
 	}
 	return 0;
 }
-/**
- * hdd_indicate_mgmt_frame() - Wrapper to indicate management frame to
- * user space
- * @frame_ind: Management frame data to be informed.
- *
- * This function is used to indicate management frame to
- * user space
- *
- * Return: None
- *
- */
-void hdd_indicate_mgmt_frame(tSirSmeMgmtFrameInd *frame_ind)
-{
-	hdd_context_t *hdd_ctx = NULL;
-	hdd_adapter_t *adapter = NULL;
-	void *cds_context = NULL;
-	int i;
-
-	/* Get the global VOSS context.*/
-	cds_context = cds_get_global_context();
-	if (!cds_context) {
-		hddLog(LOGE, FL("Global VOS context is Null"));
-		return;
-	}
-	/* Get the HDD context.*/
-	hdd_ctx =
-	  (hdd_context_t *)cds_get_context(QDF_MODULE_ID_HDD);
-
-	if (0 != wlan_hdd_validate_context(hdd_ctx))
-		return;
-
-	if (SME_SESSION_ID_ANY == frame_ind->sessionId) {
-		for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
-			adapter =
-				hdd_get_adapter_by_sme_session_id(hdd_ctx, i);
-			if (adapter)
-				break;
-		}
-	} else {
-		adapter = hdd_get_adapter_by_sme_session_id(hdd_ctx,
-					frame_ind->sessionId);
-	}
-
-	if ((NULL != adapter) &&
-		(WLAN_HDD_ADAPTER_MAGIC == adapter->magic))
-		__hdd_indicate_mgmt_frame(adapter,
-						frame_ind->frame_len,
-						frame_ind->frameBuf,
-						frame_ind->frameType,
-						frame_ind->rxChan,
-						frame_ind->rxRssi);
-	return;
-}
 
 /**
  * hdd_ch_avoid_cb() - Avoid notified channels from FW handler
@@ -4973,6 +4920,59 @@ static void hdd_set_thermal_level_cb(void *context, u_int8_t level)
 }
 #endif /* defined(FEATURE_WLAN_CH_AVOID) && defined(CONFIG_CNSS) */
 
+/**
+ * hdd_indicate_mgmt_frame() - Wrapper to indicate management frame to
+ * user space
+ * @frame_ind: Management frame data to be informed.
+ *
+ * This function is used to indicate management frame to
+ * user space
+ *
+ * Return: None
+ *
+ */
+void hdd_indicate_mgmt_frame(tSirSmeMgmtFrameInd *frame_ind)
+{
+	hdd_context_t *hdd_ctx = NULL;
+	hdd_adapter_t *adapter = NULL;
+	void *cds_context = NULL;
+	int i;
+
+	/* Get the global VOSS context.*/
+	cds_context = cds_get_global_context();
+	if (!cds_context) {
+		hdd_err("Global CDS context is Null");
+		return;
+	}
+	/* Get the HDD context.*/
+	hdd_ctx = (hdd_context_t *)cds_get_context(QDF_MODULE_ID_HDD);
+
+	if (0 != wlan_hdd_validate_context(hdd_ctx))
+		return;
+
+	if (SME_SESSION_ID_ANY == frame_ind->sessionId) {
+		for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
+			adapter =
+				hdd_get_adapter_by_sme_session_id(hdd_ctx, i);
+			if (adapter)
+				break;
+		}
+	} else {
+		adapter = hdd_get_adapter_by_sme_session_id(hdd_ctx,
+					frame_ind->sessionId);
+	}
+
+	if ((NULL != adapter) &&
+		(WLAN_HDD_ADAPTER_MAGIC == adapter->magic))
+		__hdd_indicate_mgmt_frame(adapter,
+						frame_ind->frame_len,
+						frame_ind->frameBuf,
+						frame_ind->frameType,
+						frame_ind->rxChan,
+						frame_ind->rxRssi);
+	return;
+}
+
 /**
  * wlan_hdd_disable_all_dual_mac_features() - Disable dual mac features
  * @hdd_ctx: HDD context