From 060bf3975aa229742e17adb3bf8d3b38d0d16cfa Mon Sep 17 00:00:00 2001 From: Santosh Anbu Date: Thu, 2 Jan 2020 15:12:04 +0530 Subject: [PATCH] qcacmn: Support multivdev restart response handling Add UMAC change to support consolidated multi vdev response handling. Change-Id: I3383c723a96b1c8009665b00e19aa5aa4bf65bfb CRs-Fixed: 2595743 --- .../lmac_if/inc/wlan_lmac_if_def.h | 4 ++++ umac/mlme/include/wlan_mlme_cmn.h | 20 ++++++++++++++++++- .../dispatcher/src/wlan_cmn_mlme_main.c | 14 ++++++++++++- .../inc/wlan_vdev_mgr_tgt_if_rx_defs.h | 15 +++++++++++++- .../src/wlan_vdev_mgr_tgt_if_rx_api.c | 11 +++++++++- 5 files changed, 60 insertions(+), 4 deletions(-) diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h index 5c5945a9bcc4..24cecc950bb5 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h @@ -1580,6 +1580,7 @@ struct wlan_lmac_if_dfs_rx_ops { * @psoc_get_wakelock_info: function to get wakelock info * @psoc_get_vdev_response_timer_info: function to get vdev response timer * structure for a specific vdev id + * @vdev_mgr_multi_vdev_restart_resp: function to handle mvr response */ struct wlan_lmac_if_mlme_rx_ops { QDF_STATUS (*vdev_mgr_start_response)( @@ -1600,6 +1601,9 @@ struct wlan_lmac_if_mlme_rx_ops { QDF_STATUS (*vdev_mgr_peer_delete_all_response)( struct wlan_objmgr_psoc *psoc, struct peer_delete_all_response *rsp); + QDF_STATUS (*vdev_mgr_multi_vdev_restart_resp)( + struct wlan_objmgr_psoc *psoc, + struct multi_vdev_restart_resp *rsp); #ifdef FEATURE_VDEV_RSP_WAKELOCK struct vdev_mlme_wakelock *(*psoc_get_wakelock_info)( struct wlan_objmgr_psoc *psoc); diff --git a/umac/mlme/include/wlan_mlme_cmn.h b/umac/mlme/include/wlan_mlme_cmn.h index 0afbaaf2cb9f..3991f6aee827 100644 --- a/umac/mlme/include/wlan_mlme_cmn.h +++ b/umac/mlme/include/wlan_mlme_cmn.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2019-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 above @@ -47,6 +47,8 @@ * command * @mlme_vdev_enqueue_exp_cmd: callback to enqueue exception command * required by serialization + * @mlme_multi_vdev_restart_resp: callback to process multivdev restart + * response */ struct mlme_ext_ops { QDF_STATUS (*mlme_psoc_ext_hdl_create)( @@ -75,6 +77,9 @@ struct mlme_ext_ops { QDF_STATUS (*mlme_vdev_ext_delete_rsp)( struct wlan_objmgr_psoc *psoc, struct vdev_delete_response *rsp); + QDF_STATUS (*mlme_multi_vdev_restart_resp)( + struct wlan_objmgr_psoc *psoc, + struct multi_vdev_restart_resp *resp); }; /** @@ -216,6 +221,19 @@ QDF_STATUS mlme_vdev_ops_stop_fw_send(struct wlan_objmgr_vdev *vdev); */ QDF_STATUS mlme_vdev_ops_down_fw_send(struct wlan_objmgr_vdev *vdev); +/* + * mlme_vdev_ops_ext_hdl_multivdev_restart_resp() - Handler multivdev restart + * response event + * @psoc: PSOC object manager handle + * @resp: Restart response event + * + * Return: Success on successful handling of the response event, + * Else failure + */ +QDF_STATUS mlme_vdev_ops_ext_hdl_multivdev_restart_resp( + struct wlan_objmgr_psoc *psoc, + struct multi_vdev_restart_resp *resp); + /** * mlme_set_ops_register_cb - Sets ops registration callback * @ops_cb: Function pointer diff --git a/umac/mlme/mlme_objmgr/dispatcher/src/wlan_cmn_mlme_main.c b/umac/mlme/mlme_objmgr/dispatcher/src/wlan_cmn_mlme_main.c index 6fad15698327..0f03758b28f0 100644 --- a/umac/mlme/mlme_objmgr/dispatcher/src/wlan_cmn_mlme_main.c +++ b/umac/mlme/mlme_objmgr/dispatcher/src/wlan_cmn_mlme_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2019-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 above @@ -205,6 +205,18 @@ QDF_STATUS mlme_vdev_ops_ext_hdl_delete_rsp(struct wlan_objmgr_psoc *psoc, return ret; } +QDF_STATUS mlme_vdev_ops_ext_hdl_multivdev_restart_resp( + struct wlan_objmgr_psoc *psoc, + struct multi_vdev_restart_resp *resp) +{ + QDF_STATUS ret = QDF_STATUS_SUCCESS; + + if ((glbl_ops) && glbl_ops->mlme_multi_vdev_restart_resp) + ret = glbl_ops->mlme_multi_vdev_restart_resp(psoc, resp); + + return ret; +} + void mlme_set_ops_register_cb(mlme_get_global_ops_cb ops_cb) { glbl_ops_cb = ops_cb; diff --git a/umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mgr_tgt_if_rx_defs.h b/umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mgr_tgt_if_rx_defs.h index ee16be506dca..7468748ea6b7 100644 --- a/umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mgr_tgt_if_rx_defs.h +++ b/umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mgr_tgt_if_rx_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2019-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 @@ -150,4 +150,17 @@ struct peer_delete_all_response { uint8_t status; }; +#define VDEV_ID_BMAP_SIZE 2 +/** + * struct multi_vdev_restart_resp - multi-vdev restart response structure + * @pdev_id: pdev id + * @status: FW status for multi vdev restart request + * @vdev_id_bmap: Bitmap of vdev_ids + */ +struct multi_vdev_restart_resp { + uint8_t pdev_id; + uint8_t status; + unsigned long vdev_id_bmap[VDEV_ID_BMAP_SIZE]; +}; + #endif /* __WLAN_VDEV_MGR_TGT_IF_RX_DEFS_H__ */ diff --git a/umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mgr_tgt_if_rx_api.c b/umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mgr_tgt_if_rx_api.c index 18609f96cc60..febe2faa994c 100644 --- a/umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mgr_tgt_if_rx_api.c +++ b/umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mgr_tgt_if_rx_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2019-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 @@ -199,6 +199,13 @@ tgt_vdev_mgr_ext_tbttoffset_update_handle(uint32_t num_vdevs, bool is_ext) return status; } +static QDF_STATUS tgt_vdev_mgr_multi_vdev_restart_resp_handler( + struct wlan_objmgr_psoc *psoc, + struct multi_vdev_restart_resp *resp) +{ + return mlme_vdev_ops_ext_hdl_multivdev_restart_resp(psoc, resp); +} + #ifdef FEATURE_VDEV_RSP_WAKELOCK static struct psoc_mlme_wakelock * tgt_psoc_get_wakelock_info(struct wlan_objmgr_psoc *psoc) @@ -247,5 +254,7 @@ void tgt_vdev_mgr_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops) tgt_vdev_mgr_peer_delete_all_response_handler; mlme_rx_ops->psoc_get_vdev_response_timer_info = tgt_vdev_mgr_get_response_timer_info; + mlme_rx_ops->vdev_mgr_multi_vdev_restart_resp = + tgt_vdev_mgr_multi_vdev_restart_resp_handler; tgt_psoc_reg_wakelock_info_rx_op(&rx_ops->mops); }