qcacld-3.0: Argument mismatch in sta_ap work queue

From the caller, the args comes as pm_ctx but in definition
it's assigned as work_info which causes crash.

Change-Id: I9928a2c3862407b02cb34356ad54895e1d3069c7
CRs-Fixed: 3035090
This commit is contained in:
Vinod Kumar Myadam 2021-09-09 21:42:09 +05:30 • committed by Madan Koyyalamudi
commit bec024af28

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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
@ -1974,53 +1975,39 @@ end:
pm_ctx->do_sap_unsafe_ch_check = false;
}
static void __policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
static void __policy_mgr_check_sta_ap_concurrent_ch_intf(
struct policy_mgr_psoc_priv_obj *pm_ctx)
{
struct wlan_objmgr_psoc *psoc;
struct policy_mgr_psoc_priv_obj *pm_ctx = NULL;
struct sta_ap_intf_check_work_ctx *work_info = NULL;
uint32_t mcc_to_scc_switch, cc_count = 0, i;
QDF_STATUS status;
uint32_t ch_freq;
uint32_t op_ch_freq_list[MAX_NUMBER_OF_CONC_CONNECTIONS];
uint8_t vdev_id[MAX_NUMBER_OF_CONC_CONNECTIONS];
work_info = data;
if (!work_info) {
policy_mgr_err("Invalid work_info");
return;
}
psoc = work_info->psoc;
if (!psoc) {
policy_mgr_err("Invalid psoc");
return;
}
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid context");
return;
}
mcc_to_scc_switch =
policy_mgr_get_mcc_to_scc_switch_mode(psoc);
policy_mgr_get_mcc_to_scc_switch_mode(pm_ctx->psoc);
policy_mgr_debug("Concurrent open sessions running: %d",
policy_mgr_concurrent_open_sessions_running(psoc));
policy_mgr_concurrent_open_sessions_running(
pm_ctx->psoc));
if (!policy_mgr_is_sap_go_existed(psoc))
if (!policy_mgr_is_sap_go_existed(pm_ctx->psoc))
goto end;
cc_count = policy_mgr_get_mode_specific_conn_info(
psoc, &op_ch_freq_list[cc_count],
pm_ctx->psoc, &op_ch_freq_list[cc_count],
&vdev_id[cc_count], PM_SAP_MODE);
policy_mgr_debug("Number of concurrent SAP: %d", cc_count);
if (cc_count < MAX_NUMBER_OF_CONC_CONNECTIONS)
cc_count = cc_count +
policy_mgr_get_mode_specific_conn_info(
psoc, &op_ch_freq_list[cc_count],
&vdev_id[cc_count], PM_P2P_GO_MODE);
policy_mgr_get_mode_specific_conn_info(
pm_ctx->psoc, &op_ch_freq_list[cc_count],
&vdev_id[cc_count], PM_P2P_GO_MODE);
policy_mgr_debug("Number of beaconing entities (SAP + GO):%d",
cc_count);
if (!cc_count) {
@ -2046,7 +2033,7 @@ static void __policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
for (i = 0; i < cc_count; i++) {
status = pm_ctx->hdd_cbacks.
wlan_hdd_get_channel_for_sap_restart
(psoc, vdev_id[i], &ch_freq);
(pm_ctx->psoc, vdev_id[i], &ch_freq);
if (status == QDF_STATUS_SUCCESS) {
policy_mgr_debug("SAP vdev id %d restarts due to MCC->SCC switch, old ch freq :%d new ch freq: %d",
vdev_id[i],