qcacld-3.0: Clear direct link config in stop modules

Currently, as part of wlan_hdd_stop_modules, direct link config
is not being cleared but hif link state vote is cleared, as a
result when hdd_close_adpater() is called, link state is already
cleared, resulting in crash, as config is still enabled.
To fix this, clearing config as part of direct link context
de-initialization.

Change-Id: I1a5de6f427b5bc4dc4fe4346e53354645ad53529
CRs-Fixed: 3495027
This commit is contained in:
Ananya Gupta
2023-05-11 18:41:20 +05:30
committed by Madan Koyyalamudi
parent cade0cdcfe
commit a5d6751209

View File

@@ -1717,12 +1717,20 @@ QDF_STATUS dp_direct_link_init(struct wlan_dp_psoc_context *dp_ctx)
void dp_direct_link_deinit(struct wlan_dp_psoc_context *dp_ctx, bool is_ssr)
{
struct wlan_dp_intf *dp_intf;
if (!pld_is_direct_link_supported(dp_ctx->qdf_dev->dev))
return;
if (!dp_ctx->dp_direct_link_ctx)
return;
for (dp_get_front_intf_no_lock(dp_ctx, &dp_intf); dp_intf;
dp_get_next_intf_no_lock(dp_ctx, dp_intf, &dp_intf)) {
if (dp_intf->device_mode == QDF_SAP_MODE)
dp_config_direct_link(dp_intf, false, false);
}
dp_wfds_deinit(dp_ctx->dp_direct_link_ctx, is_ssr);
dp_direct_link_refill_ring_deinit(dp_ctx->dp_direct_link_ctx);
qdf_mutex_destroy(&dp_ctx->dp_direct_link_lock);