qcacld-3.0: Fix filling of the SBS range
Fix filling of the SBS range, in current freq range. And Add is current mode SBS in required APIs. Change-Id: Ief334aa236ad18512ac5d8cf80b3a2d13d77529a CRs-Fixed: 3093159
This commit is contained in:

committed by
Madan Koyyalamudi

parent
117ba7016e
commit
3da6181e11
@@ -37,6 +37,7 @@
|
|||||||
#include "wlan_reg_ucfg_api.h"
|
#include "wlan_reg_ucfg_api.h"
|
||||||
|
|
||||||
#define POLICY_MGR_MAX_CON_STRING_LEN 100
|
#define POLICY_MGR_MAX_CON_STRING_LEN 100
|
||||||
|
#define LOWER_END_FREQ_5GHZ 4900
|
||||||
|
|
||||||
static const uint16_t sap_mand_5g_freq_list[] = {5745, 5765, 5785, 5805};
|
static const uint16_t sap_mand_5g_freq_list[] = {5745, 5765, 5785, 5805};
|
||||||
|
|
||||||
@@ -859,10 +860,12 @@ void policy_mgr_restore_deleted_conn_info(struct wlan_objmgr_psoc *psoc,
|
|||||||
static bool
|
static bool
|
||||||
policy_mgr_is_freq_range_5_6ghz(qdf_freq_t start_freq, qdf_freq_t end_freq)
|
policy_mgr_is_freq_range_5_6ghz(qdf_freq_t start_freq, qdf_freq_t end_freq)
|
||||||
{
|
{
|
||||||
if ((wlan_reg_is_5ghz_ch_freq(start_freq) ||
|
/*
|
||||||
wlan_reg_is_6ghz_chan_freq(start_freq)) &&
|
* As Fw is sending the whole hardware range which include 4.9Ghz as
|
||||||
(wlan_reg_is_5ghz_ch_freq(end_freq) ||
|
* well. Use LOWER_END_FREQ_5GHZ to differentiate 2.4Ghz and 5Ghz
|
||||||
wlan_reg_is_6ghz_chan_freq(end_freq)))
|
*/
|
||||||
|
if (start_freq >= LOWER_END_FREQ_5GHZ &&
|
||||||
|
end_freq >= LOWER_END_FREQ_5GHZ)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -871,8 +874,11 @@ policy_mgr_is_freq_range_5_6ghz(qdf_freq_t start_freq, qdf_freq_t end_freq)
|
|||||||
static bool
|
static bool
|
||||||
policy_mgr_is_freq_range_2ghz(qdf_freq_t start_freq, qdf_freq_t end_freq)
|
policy_mgr_is_freq_range_2ghz(qdf_freq_t start_freq, qdf_freq_t end_freq)
|
||||||
{
|
{
|
||||||
if (wlan_reg_is_24ghz_ch_freq(start_freq) &&
|
/*
|
||||||
wlan_reg_is_24ghz_ch_freq(end_freq))
|
* As Fw is sending the whole hardware range which include 4.9Ghz as
|
||||||
|
* well. Use LOWER_END_FREQ_5GHZ to differentiate 2.4Ghz and 5Ghz
|
||||||
|
*/
|
||||||
|
if (start_freq < LOWER_END_FREQ_5GHZ && end_freq < LOWER_END_FREQ_5GHZ)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -884,9 +890,11 @@ policy_mgr_fill_curr_mac_2ghz_freq(uint32_t mac_id,
|
|||||||
struct policy_mgr_psoc_priv_obj *pm_ctx)
|
struct policy_mgr_psoc_priv_obj *pm_ctx)
|
||||||
{
|
{
|
||||||
pm_ctx->hw_mode.cur_mac_freq_range[mac_id].low_2ghz_freq =
|
pm_ctx->hw_mode.cur_mac_freq_range[mac_id].low_2ghz_freq =
|
||||||
freq->start_freq;
|
QDF_MAX(freq->start_freq,
|
||||||
|
wlan_reg_min_24ghz_chan_freq());
|
||||||
pm_ctx->hw_mode.cur_mac_freq_range[mac_id].high_2ghz_freq =
|
pm_ctx->hw_mode.cur_mac_freq_range[mac_id].high_2ghz_freq =
|
||||||
freq->end_freq;
|
QDF_MIN(freq->end_freq,
|
||||||
|
wlan_reg_max_24ghz_chan_freq());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -894,10 +902,17 @@ policy_mgr_fill_curr_mac_5ghz_freq(uint32_t mac_id,
|
|||||||
struct policy_mgr_pdev_mac_freq_map *freq,
|
struct policy_mgr_pdev_mac_freq_map *freq,
|
||||||
struct policy_mgr_psoc_priv_obj *pm_ctx)
|
struct policy_mgr_psoc_priv_obj *pm_ctx)
|
||||||
{
|
{
|
||||||
|
qdf_freq_t max_5g_freq;
|
||||||
|
|
||||||
|
max_5g_freq = wlan_reg_max_6ghz_chan_freq() ?
|
||||||
|
wlan_reg_max_6ghz_chan_freq() :
|
||||||
|
wlan_reg_max_5ghz_chan_freq();
|
||||||
|
|
||||||
pm_ctx->hw_mode.cur_mac_freq_range[mac_id].low_5ghz_freq =
|
pm_ctx->hw_mode.cur_mac_freq_range[mac_id].low_5ghz_freq =
|
||||||
freq->start_freq;
|
QDF_MAX(freq->start_freq,
|
||||||
|
wlan_reg_min_5ghz_chan_freq());
|
||||||
pm_ctx->hw_mode.cur_mac_freq_range[mac_id].high_5ghz_freq =
|
pm_ctx->hw_mode.cur_mac_freq_range[mac_id].high_5ghz_freq =
|
||||||
freq->end_freq;
|
QDF_MIN(freq->end_freq, max_5g_freq);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -928,7 +943,7 @@ policy_mgr_fill_legacy_freq_range(struct policy_mgr_psoc_priv_obj *pm_ctx,
|
|||||||
policy_mgr_fill_curr_mac_freq_by_hwmode(pm_ctx, mode);
|
policy_mgr_fill_curr_mac_freq_by_hwmode(pm_ctx, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static QDF_STATUS
|
||||||
policy_mgr_fill_curr_freq_by_pdev_freq(int32_t num_mac_freq,
|
policy_mgr_fill_curr_freq_by_pdev_freq(int32_t num_mac_freq,
|
||||||
struct policy_mgr_pdev_mac_freq_map *freq,
|
struct policy_mgr_pdev_mac_freq_map *freq,
|
||||||
struct policy_mgr_psoc_priv_obj *pm_ctx,
|
struct policy_mgr_psoc_priv_obj *pm_ctx,
|
||||||
@@ -944,25 +959,31 @@ policy_mgr_fill_curr_freq_by_pdev_freq(int32_t num_mac_freq,
|
|||||||
|
|
||||||
if (mac_id >= MAX_MAC) {
|
if (mac_id >= MAX_MAC) {
|
||||||
policy_mgr_debug("Invalid pdev id %d", mac_id);
|
policy_mgr_debug("Invalid pdev id %d", mac_id);
|
||||||
return;
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
policy_mgr_debug("pdev_id %d start freq %d end_freq %d",
|
policy_mgr_debug("mac_id %d start freq %d end_freq %d",
|
||||||
mac_id, freq[i].start_freq,
|
mac_id, freq[i].start_freq,
|
||||||
freq[i].end_freq);
|
freq[i].end_freq);
|
||||||
|
|
||||||
if (policy_mgr_is_freq_range_2ghz(freq[i].start_freq,
|
if (policy_mgr_is_freq_range_2ghz(freq[i].start_freq,
|
||||||
freq[i].end_freq))
|
freq[i].end_freq)) {
|
||||||
policy_mgr_fill_curr_mac_2ghz_freq(mac_id,
|
policy_mgr_fill_curr_mac_2ghz_freq(mac_id,
|
||||||
&freq[i],
|
&freq[i],
|
||||||
pm_ctx);
|
pm_ctx);
|
||||||
else if (policy_mgr_is_freq_range_5_6ghz(freq[i].start_freq,
|
} else if (policy_mgr_is_freq_range_5_6ghz(freq[i].start_freq,
|
||||||
freq[i].end_freq))
|
freq[i].end_freq)) {
|
||||||
policy_mgr_fill_curr_mac_5ghz_freq(mac_id, &freq[i],
|
policy_mgr_fill_curr_mac_5ghz_freq(mac_id, &freq[i],
|
||||||
pm_ctx);
|
pm_ctx);
|
||||||
else
|
} else {
|
||||||
policy_mgr_fill_legacy_freq_range(pm_ctx, hw_mode);
|
policy_mgr_err("Invalid different band freq range: mac_id %d start freq %d end_freq %d",
|
||||||
|
mac_id, freq[i].start_freq,
|
||||||
|
freq[i].end_freq);
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -971,10 +992,14 @@ policy_mgr_update_curr_mac_freq(uint32_t num_mac_freq,
|
|||||||
struct policy_mgr_psoc_priv_obj *pm_ctx,
|
struct policy_mgr_psoc_priv_obj *pm_ctx,
|
||||||
struct policy_mgr_hw_mode_params hw_mode)
|
struct policy_mgr_hw_mode_params hw_mode)
|
||||||
{
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
if (num_mac_freq && freq) {
|
if (num_mac_freq && freq) {
|
||||||
policy_mgr_fill_curr_freq_by_pdev_freq(num_mac_freq, freq,
|
status = policy_mgr_fill_curr_freq_by_pdev_freq(num_mac_freq,
|
||||||
pm_ctx, hw_mode);
|
freq, pm_ctx,
|
||||||
return;
|
hw_mode);
|
||||||
|
if (QDF_IS_STATUS_SUCCESS(status))
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
policy_mgr_fill_legacy_freq_range(pm_ctx, hw_mode);
|
policy_mgr_fill_legacy_freq_range(pm_ctx, hw_mode);
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2011-2021, The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -49,8 +50,9 @@ static ssize_t hdd_pm_cinfo_show(struct hdd_context *hdd_ctx)
|
|||||||
conn_info++;
|
conn_info++;
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_info("|\t|current state dbs - %-10d|\n",
|
pr_info("|\t|current state dbs - %-10d, sbs - %-10d|\n",
|
||||||
policy_mgr_is_current_hwmode_dbs(hdd_ctx->psoc));
|
policy_mgr_is_current_hwmode_dbs(hdd_ctx->psoc),
|
||||||
|
policy_mgr_is_current_hwmode_sbs(hdd_ctx->psoc));
|
||||||
|
|
||||||
hdd_exit();
|
hdd_exit();
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -7180,8 +7180,9 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
|
|||||||
conn_info++;
|
conn_info++;
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_info("|\t|current state dbs - %-10d|\n",
|
pr_info("|\t|current state dbs - %-10d, sbs - %-10d|\n",
|
||||||
policy_mgr_is_current_hwmode_dbs(hdd_ctx->psoc));
|
policy_mgr_is_current_hwmode_dbs(hdd_ctx->psoc),
|
||||||
|
policy_mgr_is_current_hwmode_sbs(hdd_ctx->psoc));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -573,10 +573,10 @@ wlansap_roam_process_dfs_chansw_update(mac_handle_t mac_handle,
|
|||||||
* Fetch the number of SAP interfaces. If the number of sap Interface
|
* Fetch the number of SAP interfaces. If the number of sap Interface
|
||||||
* more than one then we will make is_sap_ready_for_chnl_chng to true
|
* more than one then we will make is_sap_ready_for_chnl_chng to true
|
||||||
* for that sapctx. If there is only one SAP interface then process
|
* for that sapctx. If there is only one SAP interface then process
|
||||||
* immediately. If Dual BAND SAP is enabled then also process
|
* immediately. If Dual BAND SAP OR SBS in different mac, is enabled
|
||||||
* immediately, as in this case the both SAP will be in different band
|
* then also process immediately, as in this case the both SAP will be
|
||||||
* and channel change on one SAP doesn't mean channel change on
|
* in different band and channel change on one SAP doesn't mean channel
|
||||||
* other interface.
|
* change on other interface.
|
||||||
*
|
*
|
||||||
* For example,
|
* For example,
|
||||||
* Let's say SAP(2G) + SAP(5G-DFS) is initial connection which triggered
|
* Let's say SAP(2G) + SAP(5G-DFS) is initial connection which triggered
|
||||||
@@ -594,6 +594,7 @@ wlansap_roam_process_dfs_chansw_update(mac_handle_t mac_handle,
|
|||||||
sap_scc_dfs = sap_is_conc_sap_doing_scc_dfs(mac_handle, sap_ctx);
|
sap_scc_dfs = sap_is_conc_sap_doing_scc_dfs(mac_handle, sap_ctx);
|
||||||
if (sap_get_total_number_sap_intf(mac_handle) <= 1 ||
|
if (sap_get_total_number_sap_intf(mac_handle) <= 1 ||
|
||||||
policy_mgr_is_current_hwmode_dbs(mac_ctx->psoc) ||
|
policy_mgr_is_current_hwmode_dbs(mac_ctx->psoc) ||
|
||||||
|
policy_mgr_is_current_hwmode_sbs(mac_ctx->psoc) ||
|
||||||
sap_ctx->csa_reason == CSA_REASON_DCS ||
|
sap_ctx->csa_reason == CSA_REASON_DCS ||
|
||||||
!sap_scc_dfs) {
|
!sap_scc_dfs) {
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user