qcacmn: cdp: Converge cdp_ctrl_ops

Currently cdp ops are given pdev/vdev 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_id/vdev_id which will be used to get the
respective handles, and hence avoiding unwanted
access of the handles if it has been deleted.
Also deleting few ops which stores and retrieves
such handles and adding ops to set/get pdev params.

- txrx_get_psoc_param
- wdi_event_sub
- wdi_event_unsub

Change-Id: Id089d9b6b4737d700d2436e2081291a3741affb5
CRs-Fixed: 2541658
This commit is contained in:
Vevek Venkatesan
2019-09-16 23:50:10 +05:30
committed by nshrivas
parent 13aabf095c
commit 4a07e3949d
8 changed files with 140 additions and 111 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2014, 2016-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2014, 2016-2018, 2020 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
@@ -54,6 +55,7 @@ struct pktlog_dev_t;
void pktlog_sethandle(struct pktlog_dev_t **pl_handle,
hif_opaque_softc_handle scn);
void pktlog_set_pdev_id(struct pktlog_dev_t *pl_dev, uint8_t pdev_id);
void *get_txrx_context(void);
@@ -129,6 +131,12 @@ struct ath_pktlog_info {
#endif /* _PKTLOG_INFO */
#else /* REMOVE_PKT_LOG */
typedef void *pktlog_dev_handle;
#define pktlog_set_pdev_id(pl_dev, pdev_id) \
do { \
(void)pl_dev; \
(void)pdev_id; \
} while (0)
#define pktlog_sethandle(pl_handle, scn) \
do { \
(void)pl_handle; \