Эх сурвалжийг харах

qcacmn: Return from lmac_if_open appropriately

Add change in wlan_lmac_if_open() to return success
if device type is valid, else return invalid and handle
failure appropriately in caller.

Change-Id: I77a0620d4d64b18e28ce2cef7b5fb3dc7fb844ba
CRs-Fixed: 1096016
Soumya Bhat 8 жил өмнө
parent
commit
ff3cac3135

+ 3 - 3
umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -30,9 +30,9 @@
  * Opens up lmac_if southbound layer. This function calls OL,DA and UMAC
  * modules to register respective tx and rx callbacks.
  *
- * Return: Pointer to global psoc object
+ * Return: QDF_STATUS
  */
-struct wlan_objmgr_psoc *wlan_lmac_if_open(struct wlan_objmgr_psoc *psoc);
+QDF_STATUS wlan_lmac_if_open(struct wlan_objmgr_psoc *psoc);
 
 /**
  * wlan_lmac_if_register_rx_handlers() - UMAC rx handler register

+ 5 - 5
umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -72,9 +72,9 @@ wlan_lmac_if_register_rx_handlers(struct wlan_lmac_if_rx_ops *rx_ops)
  * Opens up lmac_if southbound layer. This function calls OL,DA and UMAC
  * modules to register respective tx and rx callbacks.
  *
- * Return: Pointer to global psoc object
+ * Return: QDF_STATUS
  */
-struct wlan_objmgr_psoc *wlan_lmac_if_open(struct wlan_objmgr_psoc *psoc)
+QDF_STATUS wlan_lmac_if_open(struct wlan_objmgr_psoc *psoc)
 {
 	WLAN_DEV_TYPE dev_type;
 
@@ -89,13 +89,13 @@ struct wlan_objmgr_psoc *wlan_lmac_if_open(struct wlan_objmgr_psoc *psoc)
 	} else {
 		/* Control should ideally not reach here */
 		qdf_print("Invalid device type");
-		return psoc;
+		return QDF_STATUS_E_INVAL;
 	}
 
 	/* Function call into umac to register rx-ops handlers */
 	wlan_lmac_if_register_rx_handlers(&psoc->soc_cb.rx_ops);
 
-	return psoc;
+	return QDF_STATUS_SUCCESS;
 }
 EXPORT_SYMBOL(wlan_lmac_if_open);