From ff3cac3135013aa1bfcb1480e5e49db89f13b535 Mon Sep 17 00:00:00 2001 From: Soumya Bhat Date: Fri, 6 Jan 2017 12:33:19 +0530 Subject: [PATCH] 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 --- .../lmac_if/inc/wlan_lmac_if_api.h | 6 +++--- umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h index 08708d7c665f..e8a8ff0c111d 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h +++ b/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 diff --git a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c index 1d0754cc8145..22cf8afdfbd2 100644 --- a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c +++ b/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);