cdp_txrx_cmn_reg.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Copyright (c) 2011-2018 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. * @file cdp_txrx_cmn.h
  20. * @brief Define the host data path converged API functions
  21. * called by the host control SW and the OS interface module
  22. */
  23. #ifndef _CDP_TXRX_CMN_REG_H_
  24. #define _CDP_TXRX_CMN_REG_H_
  25. #include "hif_main.h"
  26. #define MOB_DRV_LEGACY_DP 0xdeed/*FIXME Add MCL device IDs */
  27. #define LITHIUM_DP 0xfffd/*FIXME Add Litium device ID */
  28. /* Use these device IDs for attach in future */
  29. ol_txrx_soc_handle ol_txrx_soc_attach(void *scn_handle, struct ol_if_ops *dp_ol_if_ops);
  30. /**
  31. * dp_soc_attach_wifi3() - Attach txrx SOC
  32. * @ctrl_psoc: Opaque SOC handle from Ctrl plane
  33. * @htc_handle: Opaque HTC handle
  34. * @hif_handle: Opaque HIF handle
  35. * @qdf_osdev: QDF device
  36. * @ol_ops: Offload Operations
  37. * @device_id: Device ID
  38. *
  39. * Return: DP SOC handle on success, NULL on failure
  40. */
  41. #ifdef QCA_WIFI_QCA8074
  42. void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
  43. HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
  44. struct ol_if_ops *ol_ops, uint16_t device_id);
  45. #else
  46. static inline void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
  47. HTC_HANDLE htc_handle,
  48. qdf_device_t qdf_osdev,
  49. struct ol_if_ops *ol_ops,
  50. uint16_t device_id)
  51. {
  52. return NULL;
  53. }
  54. #endif /* QCA_WIFI_QCA8074 */
  55. static inline ol_txrx_soc_handle cdp_soc_attach(u_int16_t devid,
  56. void *hif_handle, void *psoc, void *htc_handle,
  57. qdf_device_t qdf_dev, struct ol_if_ops *dp_ol_if_ops)
  58. {
  59. switch (devid) {
  60. case LITHIUM_DP: /*FIXME Add lithium devide IDs */
  61. case QCA8074_DEVICE_ID: /* Hawekeye */
  62. case QCA8074V2_DEVICE_ID: /* Hawekeye V2*/
  63. case QCA6290_DEVICE_ID:
  64. case QCA6390_DEVICE_ID:
  65. case QCA6390_EMULATION_DEVICE_ID:
  66. case RUMIM2M_DEVICE_ID_NODE0: /*lithium emulation */
  67. case RUMIM2M_DEVICE_ID_NODE1: /*lithium emulation */
  68. case RUMIM2M_DEVICE_ID_NODE2: /*lithium emulation */
  69. case RUMIM2M_DEVICE_ID_NODE3: /*lithium emulation */
  70. return dp_soc_attach_wifi3(psoc, hif_handle, htc_handle,
  71. qdf_dev, dp_ol_if_ops, devid);
  72. break;
  73. default:
  74. return ol_txrx_soc_attach(psoc, dp_ol_if_ops);
  75. }
  76. return NULL;
  77. }
  78. #endif /*_CDP_TXRX_CMN_REG_H_ */