qcacmn: Pass psoc/pdev object as ctrl objects to DP

pass psoc/pdev object as ctrl pointers to instead of legacy objects.
It introduces new APIs to get feature pointers of psoc/pdev.

DP attach API param modified to pass ctrl psoc (psoc object)

Change-Id: I3d83f28c3e72e5ee984a4220b9d5cf3c4522b501
CRs-Fixed: 2177109
This commit is contained in:
Sathyanarayanan Esakkiappan 2017-12-05 12:00:31 +05:30 • committed by snandini
commit 38c6f988d5
8 changed files with 120 additions and 38 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -33,31 +33,30 @@
ol_txrx_soc_handle ol_txrx_soc_attach(void *scn_handle, struct ol_if_ops *dp_ol_if_ops);
#ifdef QCA_WIFI_QCA8074
void *dp_soc_attach_wifi3(void *osif_soc, void *hif_handle,
void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
struct ol_if_ops *ol_ops, struct wlan_objmgr_psoc *psoc);
struct ol_if_ops *ol_ops);
#else
/*
* dp_soc_attach_wifi3() - Attach txrx SOC
* @osif_soc: Opaque SOC handle from OSIF/HDD
* @ctrl_psoc: Opaque SOC handle from Ctrl plane
* @htc_handle: Opaque HTC handle
* @hif_handle: Opaque HIF handle
* @qdf_osdev: QDF device
*
* Return: DP SOC handle on success, NULL on failure
*/
static inline void *dp_soc_attach_wifi3(void *osif_soc, void *hif_handle,
static inline void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle,
HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
struct ol_if_ops *ol_ops, struct wlan_objmgr_psoc *psoc)
struct ol_if_ops *ol_ops)
{
return NULL;
}
#endif /* QCA_WIFI_QCA8074 */
static inline ol_txrx_soc_handle cdp_soc_attach(u_int16_t devid,
void *hif_handle, void *scn, void *htc_handle,
qdf_device_t qdf_dev, struct ol_if_ops *dp_ol_if_ops,
struct wlan_objmgr_psoc *psoc)
void *hif_handle, void *psoc, void *htc_handle,
qdf_device_t qdf_dev, struct ol_if_ops *dp_ol_if_ops)
{
switch (devid) {
case LITHIUM_DP: /*FIXME Add lithium devide IDs */
@ -66,11 +65,11 @@ static inline ol_txrx_soc_handle cdp_soc_attach(u_int16_t devid,
case RUMIM2M_DEVICE_ID_NODE1: /*lithium emulation */
case RUMIM2M_DEVICE_ID_NODE2: /*lithium emulation */
case RUMIM2M_DEVICE_ID_NODE3: /*lithium emulation */
return dp_soc_attach_wifi3(scn, hif_handle, htc_handle,
qdf_dev, dp_ol_if_ops, psoc);
return dp_soc_attach_wifi3(psoc, hif_handle, htc_handle,
qdf_dev, dp_ol_if_ops);
break;
default:
return ol_txrx_soc_attach(scn, dp_ol_if_ops);
return ol_txrx_soc_attach(psoc, dp_ol_if_ops);
}
return NULL;
}