cdp_txrx_cmn_reg.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright (c) 2011-2017 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 0xfffe/*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. #ifdef QCA_WIFI_QCA8074
  31. void *dp_soc_attach_wifi3(void *osif_soc, void *hif_handle,
  32. HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
  33. struct ol_if_ops *ol_ops);
  34. #else
  35. /*
  36. * dp_soc_attach_wifi3() - Attach txrx SOC
  37. * @osif_soc: Opaque SOC handle from OSIF/HDD
  38. * @htc_handle: Opaque HTC handle
  39. * @hif_handle: Opaque HIF handle
  40. * @qdf_osdev: QDF device
  41. *
  42. * Return: DP SOC handle on success, NULL on failure
  43. */
  44. static inline void *dp_soc_attach_wifi3(void *osif_soc, void *hif_handle,
  45. HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
  46. struct ol_if_ops *ol_ops)
  47. {
  48. return NULL;
  49. }
  50. #endif /* QCA_WIFI_QCA8074 */
  51. static inline ol_txrx_soc_handle cdp_soc_attach(u_int16_t devid,
  52. void *hif_handle, void *scn, void *htc_handle,
  53. qdf_device_t qdf_dev, struct ol_if_ops *dp_ol_if_ops)
  54. {
  55. switch (devid) {
  56. case LITHIUM_DP: /*FIXME Add lithium devide IDs */
  57. case QCA8074_DEVICE_ID: /* Hawekeye */
  58. case RUMIM2M_DEVICE_ID_NODE0: /*lithium emulation */
  59. case RUMIM2M_DEVICE_ID_NODE1: /*lithium emulation */
  60. return dp_soc_attach_wifi3(scn, hif_handle, htc_handle,
  61. qdf_dev, dp_ol_if_ops);
  62. break;
  63. default:
  64. return ol_txrx_soc_attach(scn, dp_ol_if_ops);
  65. }
  66. return NULL;
  67. }
  68. #endif /*_CDP_TXRX_CMN_REG_H_ */