qcacmn: Ignore default country update during wlan restart
After driver load and interface up, if user changes the country code and performs the interface down, now if interface change timer expires, stop modules is invoked. When user again tries to do interface up, as a part of start modules, update channel list indication comes from FW with default country info from BDF file which overwrites user specified country information. To resolve this issue, if current country is set by user and if driver gets notification to update channel list from FW with different country code during restart of wlan modules then ignore master channel list and send the current user country to FW. Change-Id: I0a0c57eda03827dc3fef59928569bf2f0bc32634 CRs-Fixed: 2340798
This commit is contained in:

committed by
nshrivas

parent
40d7624678
commit
cc123bcab3
@@ -9908,10 +9908,13 @@ static QDF_STATUS extract_reg_chan_list_update_event_tlv(
|
||||
reg_info->min_bw_5g = chan_list_event_hdr->min_bw_5g;
|
||||
reg_info->max_bw_5g = chan_list_event_hdr->max_bw_5g;
|
||||
|
||||
WMI_LOGD("%s:cc %s dsf %d BW: min_2g %d max_2g %d min_5g %d max_5g %d",
|
||||
__func__, reg_info->alpha2, reg_info->dfs_region,
|
||||
reg_info->min_bw_2g, reg_info->max_bw_2g,
|
||||
reg_info->min_bw_5g, reg_info->max_bw_5g);
|
||||
WMI_LOGD(FL("num_phys = %u and phy_id = %u"),
|
||||
reg_info->num_phy, reg_info->phy_id);
|
||||
|
||||
WMI_LOGD("%s:cc %s dfs %d BW: min_2g %d max_2g %d min_5g %d max_5g %d",
|
||||
__func__, reg_info->alpha2, reg_info->dfs_region,
|
||||
reg_info->min_bw_2g, reg_info->max_bw_2g,
|
||||
reg_info->min_bw_5g, reg_info->max_bw_5g);
|
||||
|
||||
WMI_LOGD("%s: num_2g_reg_rules %d num_5g_reg_rules %d", __func__,
|
||||
num_2g_reg_rules, num_5g_reg_rules);
|
||||
@@ -10323,6 +10326,7 @@ static QDF_STATUS send_set_country_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
QDF_STATUS qdf_status;
|
||||
wmi_set_current_country_cmd_fixed_param *cmd;
|
||||
uint16_t len = sizeof(*cmd);
|
||||
uint8_t pdev_id = params->pdev_id;
|
||||
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf) {
|
||||
@@ -10337,12 +10341,12 @@ static QDF_STATUS send_set_country_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
WMITLV_GET_STRUCT_TLVLEN
|
||||
(wmi_set_current_country_cmd_fixed_param));
|
||||
|
||||
WMI_LOGD("setting cuurnet country to %s", params->country);
|
||||
cmd->pdev_id = wmi_handle->ops->convert_host_pdev_id_to_target(pdev_id);
|
||||
WMI_LOGD("setting current country to %s and target pdev_id = %u",
|
||||
params->country, cmd->pdev_id);
|
||||
|
||||
qdf_mem_copy((uint8_t *)&cmd->new_alpha2, params->country, 3);
|
||||
|
||||
cmd->pdev_id = params->pdev_id;
|
||||
|
||||
wmi_mtrace(WMI_SET_CURRENT_COUNTRY_CMDID, NO_SESSION, 0);
|
||||
qdf_status = wmi_unified_cmd_send(wmi_handle,
|
||||
buf, len, WMI_SET_CURRENT_COUNTRY_CMDID);
|
||||
@@ -11391,6 +11395,11 @@ struct wmi_ops tlv_ops = {
|
||||
.convert_pdev_id_target_to_host =
|
||||
convert_target_pdev_id_to_host_pdev_id_legacy,
|
||||
|
||||
.convert_host_pdev_id_to_target =
|
||||
convert_host_pdev_id_to_target_pdev_id,
|
||||
.convert_target_pdev_id_to_host =
|
||||
convert_target_pdev_id_to_host_pdev_id,
|
||||
|
||||
.send_start_11d_scan_cmd = send_start_11d_scan_cmd_tlv,
|
||||
.send_stop_11d_scan_cmd = send_stop_11d_scan_cmd_tlv,
|
||||
.extract_reg_11d_new_country_event =
|
||||
|
Reference in New Issue
Block a user