qcacmn: cdp: Convergence of cdp_ocb_ops
Currently the cdp apis are given pdev/vdev/peer handle as its arguments, which is directly accessed in those APIs. This can cause a race-condition in access of the respective handles if it has been deleted in parallel. Hence as a part of cdp convergence, pass only the pdev/vdev id or peer mac address, which will be used to get the respective handles, and hence avoiding the unwanted access of the handles if it has been deleted. Converged ocb_ops - set_ocb_chan_info - get_ocb_chan_info CRs-Fixed: 2539820 Change-Id: I5be5270c9a3ea6e295a63681cf20cef4465b2101
This commit is contained in:

zatwierdzone przez
nshrivas

rodzic
20e302a62f
commit
5396b88e32
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2017, 2019 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
|
||||
@@ -23,14 +23,14 @@
|
||||
/**
|
||||
* cdp_set_ocb_chan_info() - set OCB channel info to vdev.
|
||||
* @soc - data path soc handle
|
||||
* @vdev: vdev handle
|
||||
* @vdev_id: vdev_id corresponding to vdev start
|
||||
* @ocb_set_chan: OCB channel information to be set in vdev.
|
||||
*
|
||||
* Return: NONE
|
||||
*/
|
||||
static inline void
|
||||
cdp_set_ocb_chan_info(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||
struct ol_txrx_ocb_set_chan ocb_set_chan)
|
||||
cdp_set_ocb_chan_info(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
||||
struct ol_txrx_ocb_set_chan ocb_set_chan)
|
||||
{
|
||||
if (!soc || !soc->ops || !soc->ops->ocb_ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
||||
@@ -39,19 +39,19 @@ cdp_set_ocb_chan_info(ol_txrx_soc_handle soc, struct cdp_vdev *vdev,
|
||||
}
|
||||
|
||||
if (soc->ops->ocb_ops->set_ocb_chan_info)
|
||||
soc->ops->ocb_ops->set_ocb_chan_info(vdev,
|
||||
soc->ops->ocb_ops->set_ocb_chan_info(soc, vdev_id,
|
||||
ocb_set_chan);
|
||||
|
||||
}
|
||||
/**
|
||||
* cdp_get_ocb_chan_info() - return handle to vdev ocb_channel_info
|
||||
* @soc - data path soc handle
|
||||
* @vdev: vdev handle
|
||||
* @vdev_id: vdev_id corresponding to vdev start
|
||||
*
|
||||
* Return: handle to struct ol_txrx_ocb_chan_info
|
||||
*/
|
||||
static inline struct ol_txrx_ocb_chan_info *
|
||||
cdp_get_ocb_chan_info(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||
cdp_get_ocb_chan_info(ol_txrx_soc_handle soc, uint8_t vdev_id)
|
||||
{
|
||||
if (!soc || !soc->ops || !soc->ops->ocb_ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
|
||||
@@ -60,7 +60,7 @@ cdp_get_ocb_chan_info(ol_txrx_soc_handle soc, struct cdp_vdev *vdev)
|
||||
}
|
||||
|
||||
if (soc->ops->ocb_ops->get_ocb_chan_info)
|
||||
return soc->ops->ocb_ops->get_ocb_chan_info(vdev);
|
||||
return soc->ops->ocb_ops->get_ocb_chan_info(soc, vdev_id);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user