hal_wcn6450_tx.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. #ifndef _HAL_6450_TX_H_
  20. #define _HAL_6450_TX_H_
  21. #include "tcl_data_cmd.h"
  22. #include "phyrx_rssi_legacy.h"
  23. #include "hal_internal.h"
  24. #include "cdp_txrx_mon_struct.h"
  25. #include "qdf_trace.h"
  26. #include "hal_rx.h"
  27. #include "hal_tx.h"
  28. #include "dp_types.h"
  29. #include "hal_api_mon.h"
  30. /**
  31. * hal_tx_desc_set_lmac_id_6450 - Set the lmac_id value
  32. * @desc: Handle to Tx Descriptor
  33. * @lmac_id: mac Id to ast matching
  34. * b00 – mac 0
  35. * b01 – mac 1
  36. * b10 – mac 2
  37. * b11 – all macs (legacy HK way)
  38. *
  39. * Return: void
  40. */
  41. static void hal_tx_desc_set_lmac_id_6450(void *desc, uint8_t lmac_id)
  42. {
  43. HAL_SET_FLD(desc, TCL_DATA_CMD_4, LMAC_ID) |=
  44. HAL_TX_SM(TCL_DATA_CMD_4, LMAC_ID, lmac_id);
  45. }
  46. /**
  47. * hal_tx_desc_set_mesh_en_6450 - Set mesh_enable flag in Tx descriptor
  48. * @desc: Handle to Tx Descriptor
  49. * @en: For raw WiFi frames, this indicates transmission to a mesh STA,
  50. * enabling the interpretation of the 'Mesh Control Present' bit
  51. * (bit 8) of QoS Control (otherwise this bit is ignored),
  52. * For native WiFi frames, this indicates that a 'Mesh Control' field
  53. * is present between the header and the LLC.
  54. *
  55. * Return: void
  56. */
  57. static inline
  58. void hal_tx_desc_set_mesh_en_6450(void *desc, uint8_t en)
  59. {
  60. HAL_SET_FLD(desc, TCL_DATA_CMD_5, MESH_ENABLE) |=
  61. HAL_TX_SM(TCL_DATA_CMD_5, MESH_ENABLE, en);
  62. }
  63. #endif