Lines Matching refs:cmd

25 					  struct ath12k_hal_reo_cmd *cmd)  in ath12k_hal_reo_cmd_queue_stats()  argument
35 desc->cmd.info0 &= ~cpu_to_le32(HAL_REO_CMD_HDR_INFO0_STATUS_REQUIRED); in ath12k_hal_reo_cmd_queue_stats()
36 if (cmd->flag & HAL_REO_CMD_FLG_NEED_STATUS) in ath12k_hal_reo_cmd_queue_stats()
37 desc->cmd.info0 |= cpu_to_le32(HAL_REO_CMD_HDR_INFO0_STATUS_REQUIRED); in ath12k_hal_reo_cmd_queue_stats()
39 desc->queue_addr_lo = cpu_to_le32(cmd->addr_lo); in ath12k_hal_reo_cmd_queue_stats()
40 desc->info0 = le32_encode_bits(cmd->addr_hi, in ath12k_hal_reo_cmd_queue_stats()
42 if (cmd->flag & HAL_REO_CMD_FLG_STATS_CLEAR) in ath12k_hal_reo_cmd_queue_stats()
45 return le32_get_bits(desc->cmd.info0, HAL_REO_CMD_HDR_INFO0_CMD_NUMBER); in ath12k_hal_reo_cmd_queue_stats()
50 struct ath12k_hal_reo_cmd *cmd) in ath12k_hal_reo_cmd_flush_cache() argument
55 if (cmd->flag & HAL_REO_CMD_FLG_FLUSH_BLOCK_LATER) { in ath12k_hal_reo_cmd_flush_cache()
68 desc->cmd.info0 &= ~cpu_to_le32(HAL_REO_CMD_HDR_INFO0_STATUS_REQUIRED); in ath12k_hal_reo_cmd_flush_cache()
69 if (cmd->flag & HAL_REO_CMD_FLG_NEED_STATUS) in ath12k_hal_reo_cmd_flush_cache()
70 desc->cmd.info0 |= cpu_to_le32(HAL_REO_CMD_HDR_INFO0_STATUS_REQUIRED); in ath12k_hal_reo_cmd_flush_cache()
72 desc->cache_addr_lo = cpu_to_le32(cmd->addr_lo); in ath12k_hal_reo_cmd_flush_cache()
73 desc->info0 = le32_encode_bits(cmd->addr_hi, in ath12k_hal_reo_cmd_flush_cache()
76 if (cmd->flag & HAL_REO_CMD_FLG_FLUSH_FWD_ALL_MPDUS) in ath12k_hal_reo_cmd_flush_cache()
79 if (cmd->flag & HAL_REO_CMD_FLG_FLUSH_BLOCK_LATER) { in ath12k_hal_reo_cmd_flush_cache()
86 if (cmd->flag & HAL_REO_CMD_FLG_FLUSH_NO_INVAL) in ath12k_hal_reo_cmd_flush_cache()
89 if (cmd->flag & HAL_REO_CMD_FLG_FLUSH_ALL) in ath12k_hal_reo_cmd_flush_cache()
92 return le32_get_bits(desc->cmd.info0, HAL_REO_CMD_HDR_INFO0_CMD_NUMBER); in ath12k_hal_reo_cmd_flush_cache()
96 struct ath12k_hal_reo_cmd *cmd) in ath12k_hal_reo_cmd_update_rx_queue() argument
106 desc->cmd.info0 &= ~cpu_to_le32(HAL_REO_CMD_HDR_INFO0_STATUS_REQUIRED); in ath12k_hal_reo_cmd_update_rx_queue()
107 if (cmd->flag & HAL_REO_CMD_FLG_NEED_STATUS) in ath12k_hal_reo_cmd_update_rx_queue()
108 desc->cmd.info0 |= cpu_to_le32(HAL_REO_CMD_HDR_INFO0_STATUS_REQUIRED); in ath12k_hal_reo_cmd_update_rx_queue()
110 desc->queue_addr_lo = cpu_to_le32(cmd->addr_lo); in ath12k_hal_reo_cmd_update_rx_queue()
112 le32_encode_bits(cmd->addr_hi, in ath12k_hal_reo_cmd_update_rx_queue()
114 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_RX_QUEUE_NUM), in ath12k_hal_reo_cmd_update_rx_queue()
116 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_VLD), in ath12k_hal_reo_cmd_update_rx_queue()
118 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_ALDC), in ath12k_hal_reo_cmd_update_rx_queue()
120 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_DIS_DUP_DETECTION), in ath12k_hal_reo_cmd_update_rx_queue()
122 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_SOFT_REORDER_EN), in ath12k_hal_reo_cmd_update_rx_queue()
124 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_AC), in ath12k_hal_reo_cmd_update_rx_queue()
126 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_BAR), in ath12k_hal_reo_cmd_update_rx_queue()
128 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_RETRY), in ath12k_hal_reo_cmd_update_rx_queue()
130 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_CHECK_2K_MODE), in ath12k_hal_reo_cmd_update_rx_queue()
132 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_OOR_MODE), in ath12k_hal_reo_cmd_update_rx_queue()
134 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_BA_WINDOW_SIZE), in ath12k_hal_reo_cmd_update_rx_queue()
136 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_PN_CHECK), in ath12k_hal_reo_cmd_update_rx_queue()
138 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_EVEN_PN), in ath12k_hal_reo_cmd_update_rx_queue()
140 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_UNEVEN_PN), in ath12k_hal_reo_cmd_update_rx_queue()
142 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_PN_HANDLE_ENABLE), in ath12k_hal_reo_cmd_update_rx_queue()
144 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_PN_SIZE), in ath12k_hal_reo_cmd_update_rx_queue()
146 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_IGNORE_AMPDU_FLG), in ath12k_hal_reo_cmd_update_rx_queue()
148 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_SVLD), in ath12k_hal_reo_cmd_update_rx_queue()
150 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_SSN), in ath12k_hal_reo_cmd_update_rx_queue()
152 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_SEQ_2K_ERR), in ath12k_hal_reo_cmd_update_rx_queue()
154 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_PN_VALID), in ath12k_hal_reo_cmd_update_rx_queue()
156 le32_encode_bits(!!(cmd->upd0 & HAL_REO_CMD_UPD0_PN), in ath12k_hal_reo_cmd_update_rx_queue()
160 le32_encode_bits(cmd->rx_queue_num, in ath12k_hal_reo_cmd_update_rx_queue()
162 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_VLD), in ath12k_hal_reo_cmd_update_rx_queue()
164 le32_encode_bits(u32_get_bits(cmd->upd1, HAL_REO_CMD_UPD1_ALDC), in ath12k_hal_reo_cmd_update_rx_queue()
166 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_DIS_DUP_DETECTION), in ath12k_hal_reo_cmd_update_rx_queue()
168 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_SOFT_REORDER_EN), in ath12k_hal_reo_cmd_update_rx_queue()
170 le32_encode_bits(u32_get_bits(cmd->upd1, HAL_REO_CMD_UPD1_AC), in ath12k_hal_reo_cmd_update_rx_queue()
172 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_BAR), in ath12k_hal_reo_cmd_update_rx_queue()
174 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_CHECK_2K_MODE), in ath12k_hal_reo_cmd_update_rx_queue()
176 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_RETRY), in ath12k_hal_reo_cmd_update_rx_queue()
178 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_OOR_MODE), in ath12k_hal_reo_cmd_update_rx_queue()
180 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_PN_CHECK), in ath12k_hal_reo_cmd_update_rx_queue()
182 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_EVEN_PN), in ath12k_hal_reo_cmd_update_rx_queue()
184 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_UNEVEN_PN), in ath12k_hal_reo_cmd_update_rx_queue()
186 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_PN_HANDLE_ENABLE), in ath12k_hal_reo_cmd_update_rx_queue()
188 le32_encode_bits(!!(cmd->upd1 & HAL_REO_CMD_UPD1_IGNORE_AMPDU_FLG), in ath12k_hal_reo_cmd_update_rx_queue()
191 if (cmd->pn_size == 24) in ath12k_hal_reo_cmd_update_rx_queue()
192 cmd->pn_size = HAL_RX_REO_QUEUE_PN_SIZE_24; in ath12k_hal_reo_cmd_update_rx_queue()
193 else if (cmd->pn_size == 48) in ath12k_hal_reo_cmd_update_rx_queue()
194 cmd->pn_size = HAL_RX_REO_QUEUE_PN_SIZE_48; in ath12k_hal_reo_cmd_update_rx_queue()
195 else if (cmd->pn_size == 128) in ath12k_hal_reo_cmd_update_rx_queue()
196 cmd->pn_size = HAL_RX_REO_QUEUE_PN_SIZE_128; in ath12k_hal_reo_cmd_update_rx_queue()
198 if (cmd->ba_window_size < 1) in ath12k_hal_reo_cmd_update_rx_queue()
199 cmd->ba_window_size = 1; in ath12k_hal_reo_cmd_update_rx_queue()
201 if (cmd->ba_window_size == 1) in ath12k_hal_reo_cmd_update_rx_queue()
202 cmd->ba_window_size++; in ath12k_hal_reo_cmd_update_rx_queue()
205 le32_encode_bits(cmd->ba_window_size - 1, in ath12k_hal_reo_cmd_update_rx_queue()
207 le32_encode_bits(cmd->pn_size, HAL_REO_UPD_RX_QUEUE_INFO2_PN_SIZE) | in ath12k_hal_reo_cmd_update_rx_queue()
208 le32_encode_bits(!!(cmd->upd2 & HAL_REO_CMD_UPD2_SVLD), in ath12k_hal_reo_cmd_update_rx_queue()
210 le32_encode_bits(u32_get_bits(cmd->upd2, HAL_REO_CMD_UPD2_SSN), in ath12k_hal_reo_cmd_update_rx_queue()
212 le32_encode_bits(!!(cmd->upd2 & HAL_REO_CMD_UPD2_SEQ_2K_ERR), in ath12k_hal_reo_cmd_update_rx_queue()
214 le32_encode_bits(!!(cmd->upd2 & HAL_REO_CMD_UPD2_PN_ERR), in ath12k_hal_reo_cmd_update_rx_queue()
217 return le32_get_bits(desc->cmd.info0, HAL_REO_CMD_HDR_INFO0_CMD_NUMBER); in ath12k_hal_reo_cmd_update_rx_queue()
222 struct ath12k_hal_reo_cmd *cmd) in ath12k_hal_reo_cmd_send() argument
238 ret = ath12k_hal_reo_cmd_queue_stats(reo_desc, cmd); in ath12k_hal_reo_cmd_send()
241 ret = ath12k_hal_reo_cmd_flush_cache(&ab->hal, reo_desc, cmd); in ath12k_hal_reo_cmd_send()
244 ret = ath12k_hal_reo_cmd_update_rx_queue(reo_desc, cmd); in ath12k_hal_reo_cmd_send()
810 desc->cmd.info0 = le32_encode_bits(cmd_num++, in ath12k_hal_reo_init_cmd_ring()