1 /*
2 * Copyright (c) 2020 The Linux Foundation. All rights reserved.
3 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for
6 * any purpose with or without fee is hereby granted, provided that the
7 * above copyright notice and this permission notice appear in all
8 * copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 * PERFORMANCE OF THIS SOFTWARE.
18 */
19
20 #ifndef _HAL_6450_TX_H_
21 #define _HAL_6450_TX_H_
22 #include "tcl_data_cmd.h"
23 #include "phyrx_rssi_legacy.h"
24 #include "hal_internal.h"
25 #include "cdp_txrx_mon_struct.h"
26 #include "qdf_trace.h"
27 #include "hal_rx.h"
28 #include "hal_tx.h"
29 #include "dp_types.h"
30 #include "hal_api_mon.h"
31
32 /**
33 * hal_tx_desc_set_lmac_id_6450 - Set the lmac_id value
34 * @desc: Handle to Tx Descriptor
35 * @lmac_id: mac Id to ast matching
36 * b00 – mac 0
37 * b01 – mac 1
38 * b10 – mac 2
39 * b11 – all macs (legacy HK way)
40 *
41 * Return: void
42 */
hal_tx_desc_set_lmac_id_6450(void * desc,uint8_t lmac_id)43 static void hal_tx_desc_set_lmac_id_6450(void *desc, uint8_t lmac_id)
44 {
45 HAL_SET_FLD(desc, TCL_DATA_CMD_4, LMAC_ID) |=
46 HAL_TX_SM(TCL_DATA_CMD_4, LMAC_ID, lmac_id);
47 }
48
49 /**
50 * hal_tx_desc_set_mesh_en_6450 - Set mesh_enable flag in Tx descriptor
51 * @desc: Handle to Tx Descriptor
52 * @en: For raw WiFi frames, this indicates transmission to a mesh STA,
53 * enabling the interpretation of the 'Mesh Control Present' bit
54 * (bit 8) of QoS Control (otherwise this bit is ignored),
55 * For native WiFi frames, this indicates that a 'Mesh Control' field
56 * is present between the header and the LLC.
57 *
58 * Return: void
59 */
60 static inline
hal_tx_desc_set_mesh_en_6450(void * desc,uint8_t en)61 void hal_tx_desc_set_mesh_en_6450(void *desc, uint8_t en)
62 {
63 HAL_SET_FLD(desc, TCL_DATA_CMD_5, MESH_ENABLE) |=
64 HAL_TX_SM(TCL_DATA_CMD_5, MESH_ENABLE, en);
65 }
66 #endif
67