qcacmn: set pdev id to 0xFF when set country code

From firmware perspective, host only sets 5 GHz regdomain hence 2 GHz
uses default setting and firmware does not update channel list event
for all phys according to the new country code.
Therefore sets pdev_id to 0xFF in function reg_set_country and it is
mapping to WMI_PDEV_ID_SOC when issue wmi command
WMI_SET_CURRENT_COUNTRY_CMDID as firmware required.

Change-Id: I0eb84db9f6d77c0473161cc4ffc0dcebd31c3d45
CRs-Fixed: 3239644
This commit is contained in:
Paul Zhang 2023-05-19 13:54:35 +08:00 • committed by Rahul Choudhary
commit a360e37d02

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-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
@ -38,6 +38,7 @@
#include "reg_services_common.h"
#include "reg_build_chan_list.h"
#include "wlan_cm_bss_score_param.h"
#include "wmi_unified_param.h"
#define DEFAULT_WORLD_REGDMN 0x60
@ -228,7 +229,11 @@ QDF_STATUS reg_set_country(struct wlan_objmgr_pdev *pdev,
reg_debug("programming new country: %s to firmware", country);
qdf_mem_copy(cc.country, country, REG_ALPHA2_LEN + 1);
cc.pdev_id = pdev_id;
/*
* Need firmware to send channel list event
* for all phys. Therefore set pdev_id to 0xFF.
*/
cc.pdev_id = WMI_HOST_PDEV_ID_SOC;
if (!psoc_reg->offload_enabled && !reg_is_world_alpha2(country)) {
QDF_STATUS status;
@ -1084,9 +1089,9 @@ QDF_STATUS reg_set_curr_country(struct wlan_regulatory_psoc_priv_obj *soc_reg,
/*
* Need firmware to send channel list event
* for all phys. Therefore set pdev_id to 0xFF
* for all phys. Therefore set pdev_id to 0xFF.
*/
pdev_id = 0xFF;
pdev_id = WMI_HOST_PDEV_ID_SOC;
for (phy_num = 0; phy_num < regulat_info->num_phy; phy_num++) {
if (soc_reg->cc_src == SOURCE_USERSPACE)
soc_reg->new_user_ctry_pending[phy_num] = true;