diff --git a/components/p2p/core/src/wlan_p2p_main.h b/components/p2p/core/src/wlan_p2p_main.h index 1336cf42d341..019d0b10fa54 100644 --- a/components/p2p/core/src/wlan_p2p_main.h +++ b/components/p2p/core/src/wlan_p2p_main.h @@ -30,6 +30,7 @@ #include #include #include +#include #define MAX_QUEUE_LENGTH 20 #define P2P_NOA_ATTR_IND 0x1090 diff --git a/components/p2p/core/src/wlan_p2p_off_chan_tx.c b/components/p2p/core/src/wlan_p2p_off_chan_tx.c index 4a8e8b09e095..d2230c3e93be 100644 --- a/components/p2p/core/src/wlan_p2p_off_chan_tx.c +++ b/components/p2p/core/src/wlan_p2p_off_chan_tx.c @@ -46,7 +46,7 @@ static inline struct wlan_lmac_if_p2p_tx_ops * p2p_psoc_get_tx_ops(struct wlan_objmgr_psoc *psoc) { - return &psoc->soc_cb.tx_ops.p2p; + return &psoc->soc_cb.tx_ops->p2p; } /** diff --git a/components/p2p/dispatcher/src/wlan_p2p_tgt_api.c b/components/p2p/dispatcher/src/wlan_p2p_tgt_api.c index 3416c87685aa..9ff9f69b102f 100644 --- a/components/p2p/dispatcher/src/wlan_p2p_tgt_api.c +++ b/components/p2p/dispatcher/src/wlan_p2p_tgt_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -40,7 +40,7 @@ static inline struct wlan_lmac_if_p2p_tx_ops * wlan_psoc_get_p2p_tx_ops(struct wlan_objmgr_psoc *psoc) { - return &(psoc->soc_cb.tx_ops.p2p); + return &(psoc->soc_cb.tx_ops->p2p); } #ifdef FEATURE_P2P_LISTEN_OFFLOAD diff --git a/components/p2p/dispatcher/src/wlan_p2p_ucfg_api.c b/components/p2p/dispatcher/src/wlan_p2p_ucfg_api.c index 7209c0c82a25..71734aa8a2d7 100644 --- a/components/p2p/dispatcher/src/wlan_p2p_ucfg_api.c +++ b/components/p2p/dispatcher/src/wlan_p2p_ucfg_api.c @@ -33,7 +33,7 @@ static inline struct wlan_lmac_if_p2p_tx_ops * ucfg_p2p_psoc_get_tx_ops(struct wlan_objmgr_psoc *psoc) { - return &(psoc->soc_cb.tx_ops.p2p); + return &(psoc->soc_cb.tx_ops->p2p); } /** diff --git a/components/target_if/p2p/src/target_if_p2p.c b/components/target_if/p2p/src/target_if_p2p.c index df39148aa095..4a0448cc018b 100644 --- a/components/target_if/p2p/src/target_if_p2p.c +++ b/components/target_if/p2p/src/target_if_p2p.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -29,7 +29,7 @@ static inline struct wlan_lmac_if_p2p_rx_ops * target_if_psoc_get_p2p_rx_ops(struct wlan_objmgr_psoc *psoc) { - return &(psoc->soc_cb.rx_ops.p2p); + return &(psoc->soc_cb.rx_ops->p2p); } #ifdef FEATURE_P2P_LISTEN_OFFLOAD diff --git a/components/target_if/tdls/src/target_if_tdls.c b/components/target_if/tdls/src/target_if_tdls.c index 9ecbdc563276..f9791f93f9d8 100644 --- a/components/target_if/tdls/src/target_if_tdls.c +++ b/components/target_if/tdls/src/target_if_tdls.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -36,7 +36,7 @@ static inline struct wlan_lmac_if_tdls_rx_ops * target_if_tdls_get_rx_ops(struct wlan_objmgr_psoc *psoc) { - return &psoc->soc_cb.rx_ops.tdls_rx_ops; + return &psoc->soc_cb.rx_ops->tdls_rx_ops; } static int diff --git a/components/tdls/dispatcher/src/wlan_tdls_tgt_api.c b/components/tdls/dispatcher/src/wlan_tdls_tgt_api.c index 311e74c5df8a..764dc524960a 100644 --- a/components/tdls/dispatcher/src/wlan_tdls_tgt_api.c +++ b/components/tdls/dispatcher/src/wlan_tdls_tgt_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -31,13 +31,13 @@ static inline struct wlan_lmac_if_tdls_tx_ops * wlan_psoc_get_tdls_txops(struct wlan_objmgr_psoc *psoc) { - return &psoc->soc_cb.tx_ops.tdls_tx_ops; + return &psoc->soc_cb.tx_ops->tdls_tx_ops; } static inline struct wlan_lmac_if_tdls_rx_ops * wlan_psoc_get_tdls_rxops(struct wlan_objmgr_psoc *psoc) { - return &psoc->soc_cb.rx_ops.tdls_rx_ops; + return &psoc->soc_cb.rx_ops->tdls_rx_ops; } QDF_STATUS tgt_tdls_set_fw_state(struct wlan_objmgr_psoc *psoc, diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index c3fb25262742..ab701d73422a 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -186,6 +186,7 @@ #include "wlan_hdd_debugfs_unit_test.h" #include "wlan_hdd_debugfs_mibstat.h" #include +#include "wlan_global_lmac_if_api.h" #ifdef MODULE #define WLAN_MODULE_NAME module_name(THIS_MODULE) @@ -12868,6 +12869,8 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) hdd_err("Failed to destroy pdev; errno:%d", ret); QDF_ASSERT(0); } + /* pdev close and destroy use tx rx ops so call this here */ + wlan_global_lmac_if_close(hdd_ctx->psoc); } /* diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 1d837e5c64b7..3c1c214468e7 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -1963,22 +1963,6 @@ static void wma_target_if_open(tp_wma_handle wma_handle) } -/** - * wma_target_if_close() - Detach UMAC modules' interface with wmi layer - * @wma_handle: wma handle - * - * Return: None - */ -static void wma_target_if_close(tp_wma_handle wma_handle) -{ - struct wlan_objmgr_psoc *psoc = wma_handle->psoc; - - if (!psoc) - return; - - wlan_global_lmac_if_close(psoc); -} - /** * wma_legacy_service_ready_event_handler() - legacy (ext)service ready handler * @event_id: event_id @@ -4519,7 +4503,6 @@ QDF_STATUS wma_close(void) wlan_objmgr_psoc_release_ref(wma_handle->psoc, WLAN_LEGACY_WMA_ID); wma_handle->psoc = NULL; - wma_target_if_close(wma_handle); WMA_LOGD("%s: Exit", __func__); return QDF_STATUS_SUCCESS;