qcacmn: Use new APIs to get dp handles

SON and DP modules use new APIs to get dp handles,

Change-Id: I1639b946f1660fcaa21b76688909451dcc0f94cc
CRs-Fixed: 2177109
This commit is contained in:
Srinivas Pitla
2018-01-24 12:30:51 +05:30
committed by snandini
parent cc75651c34
commit f6b4bc8f02
3 changed files with 33 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * Copyright (c) 2011-2016,2018 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -72,8 +72,10 @@ void ol_ll_pdev_tx_unlock(void *);
qdf_spin_unlock_bh(&((_x)->peer_lock[_id])) qdf_spin_unlock_bh(&((_x)->peer_lock[_id]))
#else #else
#define OSIF_VAP_TX_LOCK(_x) ol_ll_pdev_tx_lock((_x)->iv_txrx_handle) #define OSIF_VAP_TX_LOCK(_x) ol_ll_pdev_tx_lock( \
#define OSIF_VAP_TX_UNLOCK(_x) ol_ll_pdev_tx_unlock((_x)->iv_txrx_handle) wlan_vdev_get_dp_handle((_x)->os_if_vdev))
#define OSIF_VAP_TX_UNLOCK(_x) ol_ll_pdev_tx_unlock( \
wlan_vdev_get_dp_handle((_x)->os_if_vdev))
#define OL_TX_FLOW_CTRL_LOCK(_x) #define OL_TX_FLOW_CTRL_LOCK(_x)
#define OL_TX_FLOW_CTRL_UNLOCK(_x) #define OL_TX_FLOW_CTRL_UNLOCK(_x)

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* *
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
@@ -27,15 +27,19 @@
bool son_ol_is_peer_inact(struct wlan_objmgr_peer *peer) bool son_ol_is_peer_inact(struct wlan_objmgr_peer *peer)
{ {
struct wlan_objmgr_pdev *pdev = NULL; struct wlan_objmgr_vdev *vdev;
struct wlan_objmgr_vdev *vdev = NULL; struct wlan_objmgr_psoc *psoc;
vdev = wlan_peer_get_vdev(peer); vdev = wlan_peer_get_vdev(peer);
if (!vdev)
return false;
pdev = wlan_vdev_get_pdev(vdev); psoc = wlan_vdev_get_psoc(vdev);
if (!psoc)
return false;
return cdp_peer_is_inact(ol_if_pdev_get_soc_txhandle(pdev), return cdp_peer_is_inact(wlan_psoc_get_dp_handle(psoc),
(void *)(ol_if_peer_get_txrx_handle(peer))); (void *)(wlan_peer_get_dp_handle(peer)));
} }
u_int32_t son_ol_get_peer_rate(struct wlan_objmgr_peer *peer, u_int8_t type) u_int32_t son_ol_get_peer_rate(struct wlan_objmgr_peer *peer, u_int8_t type)
@@ -46,17 +50,26 @@ u_int32_t son_ol_get_peer_rate(struct wlan_objmgr_peer *peer, u_int8_t type)
bool son_ol_enable(struct wlan_objmgr_pdev *pdev, bool enable) bool son_ol_enable(struct wlan_objmgr_pdev *pdev, bool enable)
{ {
struct wlan_objmgr_psoc *psoc;
return cdp_start_inact_timer(ol_if_pdev_get_soc_txhandle(pdev), psoc = wlan_pdev_get_psoc(pdev);
(void *)(ol_if_pdev_get_soc_pdev_handle(pdev)), if (!psoc)
return false;
return cdp_start_inact_timer(wlan_psoc_get_dp_handle(psoc),
(void *)(wlan_pdev_get_dp_handle(pdev)),
enable); enable);
} }
/* Function pointer to set overload status */ /* Function pointer to set overload status */
void son_ol_set_overload(struct wlan_objmgr_pdev *pdev, bool overload) void son_ol_set_overload(struct wlan_objmgr_pdev *pdev, bool overload)
{ {
return cdp_set_overload(ol_if_pdev_get_soc_txhandle(pdev), struct wlan_objmgr_psoc *psoc;
(void *)(ol_if_pdev_get_soc_pdev_handle(pdev)),
psoc = wlan_pdev_get_psoc(pdev);
return cdp_set_overload(wlan_psoc_get_dp_handle(psoc),
(void *)(wlan_pdev_get_dp_handle(pdev)),
overload); overload);
} }
/* Function pointer to set band steering parameters */ /* Function pointer to set band steering parameters */
@@ -65,9 +78,11 @@ bool son_ol_set_params(struct wlan_objmgr_pdev *pdev,
u_int32_t inactivity_threshold_normal, u_int32_t inactivity_threshold_normal,
u_int32_t inactivity_threshold_overload) u_int32_t inactivity_threshold_overload)
{ {
struct wlan_objmgr_psoc *psoc;
return cdp_set_inact_params(ol_if_pdev_get_soc_txhandle(pdev), psoc = wlan_pdev_get_psoc(pdev);
(void *)ol_if_pdev_get_soc_pdev_handle(pdev), return cdp_set_inact_params(wlan_psoc_get_dp_handle(psoc),
(void *)wlan_pdev_get_dp_handle(pdev),
inactivity_check_period, inactivity_check_period,
inactivity_threshold_normal, inactivity_threshold_normal,
inactivity_threshold_overload); inactivity_threshold_overload);

View File

@@ -110,8 +110,7 @@ int pktlog_alloc_buf(struct hif_opaque_softc *scn)
if (!pl_dev) { if (!pl_dev) {
printk(PKTLOG_TAG printk(PKTLOG_TAG
"%s: Unable to allocate buffer " "%s: Unable to allocate buffer pdev_txrx_handle or pdev_txrx_handle->pl_dev is null\n",
"scn or scn->pdev_txrx_handle->pl_dev is null\n",
__func__); __func__);
return -EINVAL; return -EINVAL;
} }