qcacld-3.0: cdp: Convergence of cdp misc 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 misc_ops - tx_non_std - get_opmode - get_tx_ack_stats - set_ibss_vdev_heart_beat_timer - hl_tdls_flag_reset - set_wisa_mode - txrx_post_data_stall_event - update_mac_id - pkt_log_init - pkt_log_con_service - get_num_rx_contexts - set_wmm_param - flush_rx_frames - bad_peer_txctl_set_setting - bad_peer_txctl_update_threshold - txrx_data_stall_cb_register - txrx_data_stall_cb_deregister - vdev_set_driver_del_ack_enable - get_intra_bss_fwd_pkts_count - mark_first_wakeup_packet - register_pktdump_cb - unregister_pktdump_cb - pdev_reset_driver_del_ack - runtime_suspend - runtime_resume CRs-Fixed: 2539735 Change-Id: I2baad09fde29d439ae2099e01e4e68ed6b94196d
This commit is contained in:
@@ -315,22 +315,22 @@ void pmo_core_psoc_set_hif_handle(struct wlan_objmgr_psoc *psoc,
|
||||
void *pmo_core_psoc_get_hif_handle(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* pmo_core_psoc_set_txrx_handle() - update psoc pdev txrx layer handle
|
||||
* pmo_core_psoc_set_txrx_pdev_id() - update psoc pdev txrx layer handle
|
||||
* @psoc: objmgr psoc handle
|
||||
* @txrx_hdl: pdev txrx context handle
|
||||
* @txrx_pdev_id: txrx pdev identifier
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void pmo_core_psoc_set_txrx_handle(struct wlan_objmgr_psoc *psoc,
|
||||
void *txrx_hdl);
|
||||
void pmo_core_psoc_set_txrx_pdev_id(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t txrx_pdev_id);
|
||||
|
||||
/**
|
||||
* pmo_core_psoc_get_txrx_handle() - Get psoc pdev txrx handle
|
||||
* @psoc: objmgr psoc handle
|
||||
*
|
||||
* Return: pdev txrx handle
|
||||
* Return: txrx pdev identifier
|
||||
*/
|
||||
void *pmo_core_psoc_get_txrx_handle(struct wlan_objmgr_psoc *psoc);
|
||||
uint8_t pmo_core_psoc_get_txrx_handle(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* pmo_intersect_arp_ns_offload() - intersect config and firmware capability for
|
||||
|
@@ -43,7 +43,7 @@
|
||||
* @dp_hdl: psoc data path handle
|
||||
* @htc_hdl: htc layer handle
|
||||
* @hif_hdl: hif layer handle
|
||||
* @txrx_hdl: txrx pdev handle
|
||||
* @txrx_pdev_id: txrx pdev identifier
|
||||
* @pause_bitmap_notifier: registered callback to update pause bitmap value
|
||||
* @pmo_get_pause_bitmap: registered callback to get pause bitmap value
|
||||
* @get_dtim_period: register callback to get dtim period from mlme
|
||||
@@ -58,7 +58,7 @@ struct pmo_psoc_priv_obj {
|
||||
void *dp_hdl;
|
||||
void *htc_hdl;
|
||||
void *hif_hdl;
|
||||
void *txrx_hdl;
|
||||
uint8_t txrx_pdev_id;
|
||||
pmo_notify_pause_bitmap pause_bitmap_notifier;
|
||||
pmo_get_pause_bitmap get_pause_bitmap;
|
||||
pmo_get_vdev_dp_handle get_vdev_dp_handle;
|
||||
|
@@ -385,24 +385,24 @@ void *pmo_core_psoc_get_hif_handle(struct wlan_objmgr_psoc *psoc)
|
||||
return hif_hdl;
|
||||
}
|
||||
|
||||
void pmo_core_psoc_set_txrx_handle(struct wlan_objmgr_psoc *psoc,
|
||||
void *txrx_hdl)
|
||||
void pmo_core_psoc_set_txrx_pdev_id(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t txrx_pdev_id)
|
||||
{
|
||||
struct pmo_psoc_priv_obj *psoc_ctx;
|
||||
|
||||
pmo_psoc_with_ctx(psoc, psoc_ctx) {
|
||||
psoc_ctx->txrx_hdl = txrx_hdl;
|
||||
psoc_ctx->txrx_pdev_id = txrx_pdev_id;
|
||||
}
|
||||
}
|
||||
|
||||
void *pmo_core_psoc_get_txrx_handle(struct wlan_objmgr_psoc *psoc)
|
||||
uint8_t pmo_core_psoc_get_txrx_handle(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
void *txrx_hdl = NULL;
|
||||
uint8_t txrx_pdev_id = OL_TXRX_INVALID_PDEV_ID;
|
||||
struct pmo_psoc_priv_obj *psoc_ctx;
|
||||
|
||||
pmo_psoc_with_ctx(psoc, psoc_ctx) {
|
||||
txrx_hdl = psoc_ctx->txrx_hdl;
|
||||
txrx_pdev_id = psoc_ctx->txrx_pdev_id;
|
||||
}
|
||||
|
||||
return txrx_hdl;
|
||||
return txrx_pdev_id;
|
||||
}
|
||||
|
@@ -950,7 +950,7 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
|
||||
{
|
||||
void *hif_ctx;
|
||||
void *dp_soc;
|
||||
void *txrx_pdev;
|
||||
uint8_t pdev_id;
|
||||
void *htc_ctx;
|
||||
QDF_STATUS status;
|
||||
int ret;
|
||||
@@ -973,11 +973,12 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
hif_ctx = pmo_core_psoc_get_hif_handle(psoc);
|
||||
dp_soc = pmo_core_psoc_get_dp_handle(psoc);
|
||||
txrx_pdev = pmo_core_psoc_get_txrx_handle(psoc);
|
||||
pdev_id = pmo_core_psoc_get_txrx_handle(psoc);
|
||||
htc_ctx = pmo_core_psoc_get_htc_handle(psoc);
|
||||
if (!hif_ctx || !dp_soc || !txrx_pdev || !htc_ctx) {
|
||||
pmo_err("Invalid hif: %pK, dp: %pK, txrx: %pK, htc: %pK",
|
||||
hif_ctx, dp_soc, txrx_pdev, htc_ctx);
|
||||
if (!hif_ctx || !dp_soc || !htc_ctx ||
|
||||
pdev_id == OL_TXRX_INVALID_PDEV_ID) {
|
||||
pmo_err("Invalid hif: %pK, dp: %pK, pdev_id: %d, htc: %pK",
|
||||
hif_ctx, dp_soc, pdev_id, htc_ctx);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
goto dec_psoc_ref;
|
||||
}
|
||||
@@ -991,7 +992,7 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
|
||||
goto runtime_failure;
|
||||
}
|
||||
|
||||
status = cdp_runtime_suspend(dp_soc, txrx_pdev);
|
||||
status = cdp_runtime_suspend(dp_soc, pdev_id);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
goto runtime_failure;
|
||||
|
||||
@@ -1056,7 +1057,7 @@ resume_htc:
|
||||
|
||||
cdp_runtime_resume:
|
||||
QDF_BUG(QDF_STATUS_SUCCESS ==
|
||||
cdp_runtime_resume(dp_soc, txrx_pdev));
|
||||
cdp_runtime_resume(dp_soc, pdev_id));
|
||||
|
||||
runtime_failure:
|
||||
hif_process_runtime_suspend_failure(hif_ctx);
|
||||
@@ -1076,7 +1077,7 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
|
||||
int ret;
|
||||
void *hif_ctx;
|
||||
void *dp_soc;
|
||||
void *txrx_pdev;
|
||||
uint8_t pdev_id;
|
||||
void *htc_ctx;
|
||||
QDF_STATUS status;
|
||||
qdf_time_t begin, end;
|
||||
@@ -1097,11 +1098,12 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
hif_ctx = pmo_core_psoc_get_hif_handle(psoc);
|
||||
dp_soc = pmo_core_psoc_get_dp_handle(psoc);
|
||||
txrx_pdev = pmo_core_psoc_get_txrx_handle(psoc);
|
||||
pdev_id = pmo_core_psoc_get_txrx_handle(psoc);
|
||||
htc_ctx = pmo_core_psoc_get_htc_handle(psoc);
|
||||
if (!hif_ctx || !dp_soc || !txrx_pdev || !htc_ctx) {
|
||||
pmo_err("Invalid hif: %pK, dp: %pK, txrx: %pK, htc: %pK",
|
||||
hif_ctx, dp_soc, txrx_pdev, htc_ctx);
|
||||
if (!hif_ctx || !dp_soc || !htc_ctx ||
|
||||
pdev_id == OL_TXRX_INVALID_PDEV_ID) {
|
||||
pmo_err("Invalid hif: %pK, dp: %pK, pdev_id: %d, htc: %pK",
|
||||
hif_ctx, dp_soc, pdev_id, htc_ctx);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
goto dec_psoc_ref;
|
||||
}
|
||||
@@ -1141,7 +1143,7 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
status = cdp_runtime_resume(dp_soc, txrx_pdev);
|
||||
status = cdp_runtime_resume(dp_soc, pdev_id);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
goto fail;
|
||||
|
||||
|
@@ -767,14 +767,14 @@ void ucfg_pmo_psoc_set_hif_handle(struct wlan_objmgr_psoc *psoc,
|
||||
void *hif_handle);
|
||||
|
||||
/**
|
||||
* ucfg_pmo_psoc_set_txrx_handle() - Set psoc pdev txrx layer handle
|
||||
* ucfg_pmo_psoc_set_txrx_pdev_id() - Set psoc pdev txrx layer handle
|
||||
* @psoc: objmgr psoc handle
|
||||
* @txrx_handle: pdev txrx context handle
|
||||
* @txrx_pdev_id: txrx pdev identifier
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void ucfg_pmo_psoc_set_txrx_handle(struct wlan_objmgr_psoc *psoc,
|
||||
void *txrx_handle);
|
||||
void ucfg_pmo_psoc_set_txrx_pdev_id(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t txrx_pdev_id);
|
||||
|
||||
/**
|
||||
* ucfg_pmo_psoc_user_space_suspend_req() - Handles user space suspend req
|
||||
@@ -1392,9 +1392,9 @@ ucfg_pmo_psoc_set_hif_handle(
|
||||
}
|
||||
|
||||
static inline void
|
||||
ucfg_pmo_psoc_set_txrx_handle(
|
||||
ucfg_pmo_psoc_set_txrx_pdev_id(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
void *txrx_handle)
|
||||
uint8_t txrx_pdev_id)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -356,10 +356,10 @@ void ucfg_pmo_psoc_set_hif_handle(struct wlan_objmgr_psoc *psoc,
|
||||
pmo_core_psoc_set_hif_handle(psoc, hif_handle);
|
||||
}
|
||||
|
||||
void ucfg_pmo_psoc_set_txrx_handle(struct wlan_objmgr_psoc *psoc,
|
||||
void *txrx_handle)
|
||||
void ucfg_pmo_psoc_set_txrx_pdev_id(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t txrx_pdev_id)
|
||||
{
|
||||
pmo_core_psoc_set_txrx_handle(psoc, txrx_handle);
|
||||
pmo_core_psoc_set_txrx_pdev_id(psoc, txrx_pdev_id);
|
||||
}
|
||||
|
||||
void ucfg_pmo_psoc_handle_initial_wake_up(void *cb_ctx)
|
||||
|
Reference in New Issue
Block a user