Loading Kbuild +1 −1 Original line number Diff line number Diff line Loading @@ -3226,7 +3226,7 @@ ccflags-y += -DWLAN_PDEV_MAX_VDEVS=$(CONFIG_WLAN_PDEV_MAX_VDEVS) CONFIG_WLAN_PSOC_MAX_VDEVS ?= $(CONFIG_WLAN_MAX_VDEVS) ccflags-y += -DWLAN_PSOC_MAX_VDEVS=$(CONFIG_WLAN_PSOC_MAX_VDEVS) CONFIG_MAX_SCAN_CACHE_SIZE ?= 300 CONFIG_MAX_SCAN_CACHE_SIZE ?= 500 ccflags-y += -DMAX_SCAN_CACHE_SIZE=$(CONFIG_MAX_SCAN_CACHE_SIZE) CONFIG_SCAN_MAX_REST_TIME ?= 0 ccflags-y += -DSCAN_MAX_REST_TIME=$(CONFIG_SCAN_MAX_REST_TIME) Loading components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h +27 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-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 Loading Loading @@ -2750,6 +2750,22 @@ QDF_STATUS policy_mgr_get_updated_scan_and_fw_mode_config( uint32_t *fw_mode_config, uint32_t dual_mac_disable_ini, uint32_t channel_select_logic_conc); /** * policy_mgr_is_sta_present_on_dfs_channel() - to find whether any DFS STA is * present * @psoc: PSOC object information * @vdev_id: pointer to vdev_id. It will be filled with the vdev_id of DFS STA * @ch_freq: pointer to channel frequency on which DFS STA is present * @ch_width: pointer channel width on which DFS STA is connected * If any STA is connected on DFS channel then this function will return true * * Return: true if session is on DFS or false if session is on non-dfs channel */ bool policy_mgr_is_sta_present_on_dfs_channel(struct wlan_objmgr_psoc *psoc, uint8_t *vdev_id, qdf_freq_t *ch_freq, enum hw_mode_bandwidth *ch_width); /** * policy_mgr_is_safe_channel - Check if the channel is in LTE * coex channel avoidance list Loading Loading @@ -2959,6 +2975,16 @@ bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan( */ bool policy_mgr_is_sta_connected_2g(struct wlan_objmgr_psoc *psoc); /** * policy_mgr_is_connected_sta_5g() - check if sta connected in 5 GHz * @psoc: pointer to soc * @freq: Pointer to the frequency on which sta is connected * * Return: true if sta is connected in 5 GHz else false */ bool policy_mgr_is_connected_sta_5g(struct wlan_objmgr_psoc *psoc, qdf_freq_t *freq); /** * policy_mgr_scan_trim_5g_chnls_for_dfs_ap() - check if sta scan should skip * 5g channel when dfs ap is present. Loading components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c +6 −2 Original line number Diff line number Diff line /* * Copyright (c) 2012-2020 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 Loading Loading @@ -332,8 +333,9 @@ QDF_STATUS policy_mgr_update_connection_info(struct wlan_objmgr_psoc *psoc, } conn_index++; } qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); if (!found) { qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); /* err msg */ policy_mgr_err("can't find vdev_id %d in pm_conc_connection_list", vdev_id); Loading @@ -343,11 +345,13 @@ QDF_STATUS policy_mgr_update_connection_info(struct wlan_objmgr_psoc *psoc, status = pm_ctx->wma_cbacks.wma_get_connection_info( vdev_id, &conn_table_entry); if (QDF_STATUS_SUCCESS != status) { qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); policy_mgr_err("can't find vdev_id %d in connection table", vdev_id); return status; } } else { qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); policy_mgr_err("wma_get_connection_info is NULL"); return QDF_STATUS_E_FAILURE; } Loading Loading @@ -375,7 +379,7 @@ QDF_STATUS policy_mgr_update_connection_info(struct wlan_objmgr_psoc *psoc, policy_mgr_get_bw(conn_table_entry.chan_width), conn_table_entry.mac_id, chain_mask, nss, vdev_id, true, true, conn_table_entry.ch_flagext); qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); /* do we need to change the HW mode */ policy_mgr_check_n_start_opportunistic_timer(psoc); Loading components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +67 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-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 Loading Loading @@ -3150,6 +3150,43 @@ bool policy_mgr_is_multiple_active_sta_sessions(struct wlan_objmgr_psoc *psoc) psoc, PM_STA_MODE, NULL) > 1; } bool policy_mgr_is_sta_present_on_dfs_channel(struct wlan_objmgr_psoc *psoc, uint8_t *vdev_id, qdf_freq_t *ch_freq, enum hw_mode_bandwidth *ch_width) { struct policy_mgr_conc_connection_info *conn_info; bool status = false; uint32_t conn_index = 0; struct policy_mgr_psoc_priv_obj *pm_ctx; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { policy_mgr_err("Invalid Context"); return false; } qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock); for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS; conn_index++) { conn_info = &pm_conc_connection_list[conn_index]; if (conn_info->in_use && (conn_info->mode == PM_STA_MODE || conn_info->mode == PM_P2P_CLIENT_MODE) && (wlan_reg_is_dfs_for_freq(pm_ctx->pdev, conn_info->freq) || (wlan_reg_is_5ghz_ch_freq(conn_info->freq) && conn_info->bw == HW_MODE_160_MHZ))) { *vdev_id = conn_info->vdev_id; *ch_freq = pm_conc_connection_list[conn_index].freq; *ch_width = conn_info->bw; status = true; break; } } qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); return status; } /** * policy_mgr_is_sta_active_connection_exists() - Check if a STA * connection is active Loading Loading @@ -3861,6 +3898,35 @@ bool policy_mgr_is_sta_connected_2g(struct wlan_objmgr_psoc *psoc) return ret; } bool policy_mgr_is_connected_sta_5g(struct wlan_objmgr_psoc *psoc, qdf_freq_t *freq) { struct policy_mgr_psoc_priv_obj *pm_ctx; uint32_t conn_index; bool ret = false; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { policy_mgr_err("Invalid Context"); return ret; } qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock); for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS; conn_index++) { *freq = pm_conc_connection_list[conn_index].freq; if (pm_conc_connection_list[conn_index].mode == PM_STA_MODE && WLAN_REG_IS_5GHZ_CH_FREQ(*freq) && pm_conc_connection_list[conn_index].in_use) { ret = true; break; } } qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); return ret; } uint32_t policy_mgr_get_connection_info(struct wlan_objmgr_psoc *psoc, struct connection_info *info) { Loading components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c +34 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2020 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 Loading Loading @@ -2255,6 +2256,11 @@ QDF_STATUS policy_mgr_modify_sap_pcl_based_on_mandatory_channel( uint32_t i, j, pcl_len = 0; bool found; struct policy_mgr_psoc_priv_obj *pm_ctx; qdf_freq_t dfs_sta_freq = 0; qdf_freq_t sta_5GHz_freq = 0; enum hw_mode_bandwidth sta_ch_width; uint8_t sta_vdev_id = 0, scc_on_dfs_channel = 0; bool sta_sap_scc_on_5ghz_channel; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { Loading @@ -2275,12 +2281,37 @@ QDF_STATUS policy_mgr_modify_sap_pcl_based_on_mandatory_channel( policy_mgr_debug("fav chan:%d", pm_ctx->sap_mandatory_channels[i]); policy_mgr_get_sta_sap_scc_on_dfs_chnl(psoc, &scc_on_dfs_channel); if (scc_on_dfs_channel) policy_mgr_is_sta_present_on_dfs_channel(psoc, &sta_vdev_id, &dfs_sta_freq, &sta_ch_width); sta_sap_scc_on_5ghz_channel = policy_mgr_is_connected_sta_5g(psoc, &sta_5GHz_freq); for (i = 0; i < *pcl_len_org; i++) { found = false; if (i >= NUM_CHANNELS) { policy_mgr_debug("index is exceeding NUM_CHANNELS"); break; } if (scc_on_dfs_channel && policy_mgr_is_force_scc(psoc) && pcl_list_org[i] == dfs_sta_freq) { policy_mgr_debug("dfs chan:%d", pcl_list_org[i]); found = true; goto update_pcl; } if (sta_sap_scc_on_5ghz_channel && policy_mgr_is_force_scc(psoc) && pcl_list_org[i] == sta_5GHz_freq) { policy_mgr_debug("scc chan:%d", pcl_list_org[i]); found = true; goto update_pcl; } for (j = 0; j < pm_ctx->sap_mandatory_channels_len; j++) { if (pcl_list_org[i] == pm_ctx->sap_mandatory_channels[j]) { Loading @@ -2288,6 +2319,8 @@ QDF_STATUS policy_mgr_modify_sap_pcl_based_on_mandatory_channel( break; } } update_pcl: if (found && (pcl_len < NUM_CHANNELS)) { pcl_list_org[pcl_len] = pcl_list_org[i]; weight_list_org[pcl_len++] = weight_list_org[i]; Loading Loading
Kbuild +1 −1 Original line number Diff line number Diff line Loading @@ -3226,7 +3226,7 @@ ccflags-y += -DWLAN_PDEV_MAX_VDEVS=$(CONFIG_WLAN_PDEV_MAX_VDEVS) CONFIG_WLAN_PSOC_MAX_VDEVS ?= $(CONFIG_WLAN_MAX_VDEVS) ccflags-y += -DWLAN_PSOC_MAX_VDEVS=$(CONFIG_WLAN_PSOC_MAX_VDEVS) CONFIG_MAX_SCAN_CACHE_SIZE ?= 300 CONFIG_MAX_SCAN_CACHE_SIZE ?= 500 ccflags-y += -DMAX_SCAN_CACHE_SIZE=$(CONFIG_MAX_SCAN_CACHE_SIZE) CONFIG_SCAN_MAX_REST_TIME ?= 0 ccflags-y += -DSCAN_MAX_REST_TIME=$(CONFIG_SCAN_MAX_REST_TIME) Loading
components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h +27 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-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 Loading Loading @@ -2750,6 +2750,22 @@ QDF_STATUS policy_mgr_get_updated_scan_and_fw_mode_config( uint32_t *fw_mode_config, uint32_t dual_mac_disable_ini, uint32_t channel_select_logic_conc); /** * policy_mgr_is_sta_present_on_dfs_channel() - to find whether any DFS STA is * present * @psoc: PSOC object information * @vdev_id: pointer to vdev_id. It will be filled with the vdev_id of DFS STA * @ch_freq: pointer to channel frequency on which DFS STA is present * @ch_width: pointer channel width on which DFS STA is connected * If any STA is connected on DFS channel then this function will return true * * Return: true if session is on DFS or false if session is on non-dfs channel */ bool policy_mgr_is_sta_present_on_dfs_channel(struct wlan_objmgr_psoc *psoc, uint8_t *vdev_id, qdf_freq_t *ch_freq, enum hw_mode_bandwidth *ch_width); /** * policy_mgr_is_safe_channel - Check if the channel is in LTE * coex channel avoidance list Loading Loading @@ -2959,6 +2975,16 @@ bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan( */ bool policy_mgr_is_sta_connected_2g(struct wlan_objmgr_psoc *psoc); /** * policy_mgr_is_connected_sta_5g() - check if sta connected in 5 GHz * @psoc: pointer to soc * @freq: Pointer to the frequency on which sta is connected * * Return: true if sta is connected in 5 GHz else false */ bool policy_mgr_is_connected_sta_5g(struct wlan_objmgr_psoc *psoc, qdf_freq_t *freq); /** * policy_mgr_scan_trim_5g_chnls_for_dfs_ap() - check if sta scan should skip * 5g channel when dfs ap is present. Loading
components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c +6 −2 Original line number Diff line number Diff line /* * Copyright (c) 2012-2020 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 Loading Loading @@ -332,8 +333,9 @@ QDF_STATUS policy_mgr_update_connection_info(struct wlan_objmgr_psoc *psoc, } conn_index++; } qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); if (!found) { qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); /* err msg */ policy_mgr_err("can't find vdev_id %d in pm_conc_connection_list", vdev_id); Loading @@ -343,11 +345,13 @@ QDF_STATUS policy_mgr_update_connection_info(struct wlan_objmgr_psoc *psoc, status = pm_ctx->wma_cbacks.wma_get_connection_info( vdev_id, &conn_table_entry); if (QDF_STATUS_SUCCESS != status) { qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); policy_mgr_err("can't find vdev_id %d in connection table", vdev_id); return status; } } else { qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); policy_mgr_err("wma_get_connection_info is NULL"); return QDF_STATUS_E_FAILURE; } Loading Loading @@ -375,7 +379,7 @@ QDF_STATUS policy_mgr_update_connection_info(struct wlan_objmgr_psoc *psoc, policy_mgr_get_bw(conn_table_entry.chan_width), conn_table_entry.mac_id, chain_mask, nss, vdev_id, true, true, conn_table_entry.ch_flagext); qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); /* do we need to change the HW mode */ policy_mgr_check_n_start_opportunistic_timer(psoc); Loading
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +67 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-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 Loading Loading @@ -3150,6 +3150,43 @@ bool policy_mgr_is_multiple_active_sta_sessions(struct wlan_objmgr_psoc *psoc) psoc, PM_STA_MODE, NULL) > 1; } bool policy_mgr_is_sta_present_on_dfs_channel(struct wlan_objmgr_psoc *psoc, uint8_t *vdev_id, qdf_freq_t *ch_freq, enum hw_mode_bandwidth *ch_width) { struct policy_mgr_conc_connection_info *conn_info; bool status = false; uint32_t conn_index = 0; struct policy_mgr_psoc_priv_obj *pm_ctx; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { policy_mgr_err("Invalid Context"); return false; } qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock); for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS; conn_index++) { conn_info = &pm_conc_connection_list[conn_index]; if (conn_info->in_use && (conn_info->mode == PM_STA_MODE || conn_info->mode == PM_P2P_CLIENT_MODE) && (wlan_reg_is_dfs_for_freq(pm_ctx->pdev, conn_info->freq) || (wlan_reg_is_5ghz_ch_freq(conn_info->freq) && conn_info->bw == HW_MODE_160_MHZ))) { *vdev_id = conn_info->vdev_id; *ch_freq = pm_conc_connection_list[conn_index].freq; *ch_width = conn_info->bw; status = true; break; } } qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); return status; } /** * policy_mgr_is_sta_active_connection_exists() - Check if a STA * connection is active Loading Loading @@ -3861,6 +3898,35 @@ bool policy_mgr_is_sta_connected_2g(struct wlan_objmgr_psoc *psoc) return ret; } bool policy_mgr_is_connected_sta_5g(struct wlan_objmgr_psoc *psoc, qdf_freq_t *freq) { struct policy_mgr_psoc_priv_obj *pm_ctx; uint32_t conn_index; bool ret = false; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { policy_mgr_err("Invalid Context"); return ret; } qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock); for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS; conn_index++) { *freq = pm_conc_connection_list[conn_index].freq; if (pm_conc_connection_list[conn_index].mode == PM_STA_MODE && WLAN_REG_IS_5GHZ_CH_FREQ(*freq) && pm_conc_connection_list[conn_index].in_use) { ret = true; break; } } qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); return ret; } uint32_t policy_mgr_get_connection_info(struct wlan_objmgr_psoc *psoc, struct connection_info *info) { Loading
components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c +34 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2020 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 Loading Loading @@ -2255,6 +2256,11 @@ QDF_STATUS policy_mgr_modify_sap_pcl_based_on_mandatory_channel( uint32_t i, j, pcl_len = 0; bool found; struct policy_mgr_psoc_priv_obj *pm_ctx; qdf_freq_t dfs_sta_freq = 0; qdf_freq_t sta_5GHz_freq = 0; enum hw_mode_bandwidth sta_ch_width; uint8_t sta_vdev_id = 0, scc_on_dfs_channel = 0; bool sta_sap_scc_on_5ghz_channel; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { Loading @@ -2275,12 +2281,37 @@ QDF_STATUS policy_mgr_modify_sap_pcl_based_on_mandatory_channel( policy_mgr_debug("fav chan:%d", pm_ctx->sap_mandatory_channels[i]); policy_mgr_get_sta_sap_scc_on_dfs_chnl(psoc, &scc_on_dfs_channel); if (scc_on_dfs_channel) policy_mgr_is_sta_present_on_dfs_channel(psoc, &sta_vdev_id, &dfs_sta_freq, &sta_ch_width); sta_sap_scc_on_5ghz_channel = policy_mgr_is_connected_sta_5g(psoc, &sta_5GHz_freq); for (i = 0; i < *pcl_len_org; i++) { found = false; if (i >= NUM_CHANNELS) { policy_mgr_debug("index is exceeding NUM_CHANNELS"); break; } if (scc_on_dfs_channel && policy_mgr_is_force_scc(psoc) && pcl_list_org[i] == dfs_sta_freq) { policy_mgr_debug("dfs chan:%d", pcl_list_org[i]); found = true; goto update_pcl; } if (sta_sap_scc_on_5ghz_channel && policy_mgr_is_force_scc(psoc) && pcl_list_org[i] == sta_5GHz_freq) { policy_mgr_debug("scc chan:%d", pcl_list_org[i]); found = true; goto update_pcl; } for (j = 0; j < pm_ctx->sap_mandatory_channels_len; j++) { if (pcl_list_org[i] == pm_ctx->sap_mandatory_channels[j]) { Loading @@ -2288,6 +2319,8 @@ QDF_STATUS policy_mgr_modify_sap_pcl_based_on_mandatory_channel( break; } } update_pcl: if (found && (pcl_len < NUM_CHANNELS)) { pcl_list_org[pcl_len] = pcl_list_org[i]; weight_list_org[pcl_len++] = weight_list_org[i]; Loading