1 /* 2 * Copyright (c) 2019 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /** 20 * DOC: wlan_vdev_mgr_tgt_if_rx_defs.h 21 * 22 * This header file provides definitions to data structures for 23 * corresponding vdev mgmt operation 24 */ 25 26 #ifndef __WLAN_VDEV_MGR_TGT_IF_RX_DEFS_H__ 27 #define __WLAN_VDEV_MGR_TGT_IF_RX_DEFS_H__ 28 29 #include <qdf_timer.h> 30 #ifdef FEATURE_RUNTIME_PM 31 #include <wlan_pmo_common_public_struct.h> 32 #endif 33 34 /** 35 * enum wlan_vdev_mgr_tgt_if_rsp_bit - response status bit 36 * START_RESPONSE_BIT: vdev start response bit 37 * RESTART_RESPONSE_BIT: vdev restart response bit 38 * STOP_RESPONSE_BIT: vdev stop response bit 39 * DELETE_RESPONSE_BIT: vdev delete response bit 40 * PEER_DELETE_ALL_RESPONSE_BIT: vdev peer delete all response bit 41 */ 42 enum wlan_vdev_mgr_tgt_if_rsp_bit { 43 START_RESPONSE_BIT = 0, 44 RESTART_RESPONSE_BIT = 1, 45 STOP_RESPONSE_BIT = 2, 46 DELETE_RESPONSE_BIT = 3, 47 PEER_DELETE_ALL_RESPONSE_BIT = 4, 48 RESPONSE_BIT_MAX, 49 }; 50 51 /** 52 * string_from_rsp_bit() - Convert response bit to string 53 * @bit - response bit as in wlan_vdev_mgr_tgt_if_rsp_bit 54 * 55 * Please note to add new string in the array at index equal to 56 * its enum value in wlan_vdev_mgr_tgt_if_rsp_bit. 57 */ 58 static inline char *string_from_rsp_bit(enum wlan_vdev_mgr_tgt_if_rsp_bit bit) 59 { 60 static const char *strings[] = { "START", 61 "RESTART", 62 "STOP", 63 "DELETE", 64 "PEER DELETE ALL", 65 "RESPONE MAX"}; 66 return (char *)strings[bit]; 67 } 68 69 #ifdef FEATURE_RUNTIME_PM 70 /* Add extra PMO_RESUME_TIMEOUT for runtime PM resume timeout */ 71 #define START_RESPONSE_TIMER (6000 + PMO_RESUME_TIMEOUT) 72 #define STOP_RESPONSE_TIMER (4000 + PMO_RESUME_TIMEOUT) 73 #define DELETE_RESPONSE_TIMER (4000 + PMO_RESUME_TIMEOUT) 74 #define PEER_DELETE_ALL_RESPONSE_TIMER (6000 + PMO_RESUME_TIMEOUT) 75 #else 76 #define START_RESPONSE_TIMER 6000 77 #define STOP_RESPONSE_TIMER 4000 78 #define DELETE_RESPONSE_TIMER 4000 79 #define PEER_DELETE_ALL_RESPONSE_TIMER 6000 80 #endif 81 82 /** 83 * struct vdev_response_timer - vdev mgmt response ops timer 84 * @rsp_timer: VDEV MLME mgmt response timer 85 * @rsp_status: variable to check response status 86 * @expire_time: time to expire timer 87 * @timer_status: status of timer 88 */ 89 struct vdev_response_timer { 90 qdf_timer_t rsp_timer; 91 unsigned long rsp_status; 92 uint32_t expire_time; 93 QDF_STATUS timer_status; 94 }; 95 96 /** 97 * struct vdev_start_response - start response structure 98 * @vdev_id: vdev id 99 * @requestor_id: requester id 100 * @status: status of start request 101 * @resp_type: response of event type START/RESTART 102 * @chain_mask: chain mask 103 * @smps_mode: smps mode 104 * @mac_id: mac id 105 * @cfgd_tx_streams: configured tx streams 106 * @cfgd_rx_streams: configured rx streams 107 */ 108 struct vdev_start_response { 109 uint8_t vdev_id; 110 uint32_t requestor_id; 111 uint32_t status; 112 uint32_t resp_type; 113 uint32_t chain_mask; 114 uint32_t smps_mode; 115 uint32_t mac_id; 116 uint32_t cfgd_tx_streams; 117 uint32_t cfgd_rx_streams; 118 }; 119 120 /** 121 * struct vdev_stop_response - stop response structure 122 * @vdev_id: vdev id 123 */ 124 struct vdev_stop_response { 125 uint8_t vdev_id; 126 }; 127 128 /** 129 * struct vdev_delete_response - delete response structure 130 * @vdev_id: vdev id 131 */ 132 struct vdev_delete_response { 133 uint8_t vdev_id; 134 }; 135 136 /** 137 * struct peer_delete_all_response - peer delete all response structure 138 * @vdev_id: vdev id 139 * @status: FW status for vdev delete all peer request 140 */ 141 struct peer_delete_all_response { 142 uint8_t vdev_id; 143 uint8_t status; 144 }; 145 146 #endif /* __WLAN_VDEV_MGR_TGT_IF_RX_DEFS_H__ */ 147