qcacmn: Add INI param to support max chan switch IE
Add change to support max channel switch IE as a INI config. With this INI enabled, max channel switch IE will be used in scenario, where client disconnection is to be avoided with CSA on CAC channel. Change-Id: I786e7e12e12ebcb3fc7d0720ed02e01bff6c82b8 CRs-Fixed: 2949206
This commit is contained in:

committed by
Madan Koyyalamudi

parent
53df6c1211
commit
08c37be1d9
@@ -28,6 +28,7 @@
|
||||
#include "cfg_dp.h"
|
||||
#include "cfg_hif.h"
|
||||
#include <cfg_extscan.h>
|
||||
#include <include/cfg_cmn_mlme.h>
|
||||
#ifdef WLAN_SUPPORT_GREEN_AP
|
||||
#include "cfg_green_ap_params.h"
|
||||
#else
|
||||
@@ -60,7 +61,8 @@
|
||||
CFG_DCS_ALL \
|
||||
CFG_CFR_ALL \
|
||||
CFG_MLME_SCORE_ALL \
|
||||
CFG_WLAN_CM_UTF_PARAM
|
||||
CFG_WLAN_CM_UTF_PARAM \
|
||||
CFG_CMN_MLME_ALL
|
||||
|
||||
#endif /* __CFG_CONVERGED_H */
|
||||
|
||||
|
50
umac/mlme/include/cfg_cmn_mlme.h
Normal file
50
umac/mlme/include/cfg_cmn_mlme.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. 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 above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: This file contains umac mlme related CFG/INI Items.
|
||||
*/
|
||||
|
||||
#ifndef __CFG_CMN_MLME_H
|
||||
#define __CFG_CMN_MLME_H
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* max_chan_switch_ie_enable - Flag to enable max chan switch IE support
|
||||
* @Min: false
|
||||
* @Max: true
|
||||
* @Default: false
|
||||
*
|
||||
* For non_ap platform, this flag will be enabled at later point and for ap
|
||||
* platform this flag will be disabled
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: Max channel switch IE
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_MLME_MAX_CHAN_SWITCH_IE_ENABLE \
|
||||
CFG_INI_BOOL("max_chan_switch_ie_enable", \
|
||||
PLATFORM_VALUE(false, false), \
|
||||
"To enable max channel switch IE")
|
||||
|
||||
#define CFG_CMN_MLME_ALL \
|
||||
CFG(CFG_MLME_MAX_CHAN_SWITCH_IE_ENABLE)
|
||||
|
||||
#endif /* __CFG_CMN_MLME_H */
|
@@ -743,4 +743,12 @@ typedef struct mlme_cm_ops *(*osif_cm_get_global_ops_cb)(void);
|
||||
*/
|
||||
void mlme_set_osif_cm_cb(osif_cm_get_global_ops_cb cm_osif_ops);
|
||||
|
||||
/**
|
||||
* mlme_max_chan_switch_is_set() - Get if max chan switch IE is enabled
|
||||
* @vdev: Object manager vdev pointer
|
||||
*
|
||||
* Return: True if max chan switch is enabled else false
|
||||
*/
|
||||
bool mlme_max_chan_switch_is_set(struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
#endif
|
||||
|
@@ -54,6 +54,7 @@ struct wlan_6ghz_rnr_global_cache {
|
||||
* @beamformee_cap:If dev is configured as BF capable
|
||||
* @bw_above_20_5ghz: BW greater than 20Mhz supprted for 5Ghz
|
||||
* @bw_above_20_24ghz: BW greater than 20Mhz supprted for 2.4Ghz
|
||||
* @max_chan_switch_ie: If max channel switch IE is supported
|
||||
*/
|
||||
struct psoc_phy_config {
|
||||
uint8_t vdev_nss_24g;
|
||||
@@ -65,7 +66,8 @@ struct psoc_phy_config {
|
||||
vht_24G_cap:1,
|
||||
beamformee_cap:1,
|
||||
bw_above_20_5ghz:1,
|
||||
bw_above_20_24ghz:1;
|
||||
bw_above_20_24ghz:1,
|
||||
max_chan_switch_ie:1;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include <wlan_psoc_mlme_main.h>
|
||||
#include <wlan_pdev_mlme_main.h>
|
||||
#include <wlan_vdev_mlme_main.h>
|
||||
#include <wlan_psoc_mlme_api.h>
|
||||
|
||||
struct mlme_ext_ops *glbl_ops;
|
||||
mlme_get_global_ops_cb glbl_ops_cb;
|
||||
@@ -554,3 +555,21 @@ void mlme_set_ops_register_cb(mlme_get_global_ops_cb ops_cb)
|
||||
{
|
||||
glbl_ops_cb = ops_cb;
|
||||
}
|
||||
|
||||
bool mlme_max_chan_switch_is_set(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = wlan_vdev_get_psoc(vdev);
|
||||
struct psoc_mlme_obj *mlme_psoc_obj;
|
||||
struct psoc_phy_config *phy_config;
|
||||
|
||||
if (!psoc)
|
||||
return false;
|
||||
|
||||
mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc);
|
||||
if (!mlme_psoc_obj)
|
||||
return false;
|
||||
|
||||
phy_config = &mlme_psoc_obj->psoc_cfg.phy_config;
|
||||
|
||||
return phy_config->max_chan_switch_ie;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2021 The Linux Foundation. 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 above
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <include/wlan_psoc_mlme.h>
|
||||
#include <wlan_psoc_mlme_api.h>
|
||||
#include <qdf_module.h>
|
||||
#include "cfg_ucfg_api.h"
|
||||
|
||||
struct psoc_mlme_obj *wlan_psoc_mlme_get_cmpt_obj(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
@@ -88,6 +89,8 @@ static void mlme_init_cfg(struct wlan_objmgr_psoc *psoc)
|
||||
return;
|
||||
|
||||
wlan_cm_init_score_config(psoc, &mlme_psoc_obj->psoc_cfg.score_config);
|
||||
mlme_psoc_obj->psoc_cfg.phy_config.max_chan_switch_ie =
|
||||
cfg_get(psoc, CFG_MLME_MAX_CHAN_SWITCH_IE_ENABLE);
|
||||
}
|
||||
|
||||
QDF_STATUS mlme_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include "include/wlan_vdev_mlme.h"
|
||||
#include "vdev_mlme_sm.h"
|
||||
#include <wlan_utility.h>
|
||||
#include <include/wlan_mlme_cmn.h>
|
||||
|
||||
/**
|
||||
* mlme_vdev_set_state() - set mlme state
|
||||
@@ -1357,8 +1358,9 @@ static bool mlme_vdev_subst_suspend_csa_restart_event(void *ctx,
|
||||
status = true;
|
||||
break;
|
||||
case WLAN_VDEV_SM_EV_CSA_COMPLETE:
|
||||
if (mlme_vdev_is_newchan_no_cac(vdev_mlme) ==
|
||||
QDF_STATUS_SUCCESS) {
|
||||
if ((mlme_vdev_is_newchan_no_cac(vdev_mlme) ==
|
||||
QDF_STATUS_SUCCESS) ||
|
||||
mlme_max_chan_switch_is_set(vdev_mlme->vdev)) {
|
||||
mlme_vdev_sm_transition_to(vdev_mlme,
|
||||
WLAN_VDEV_S_START);
|
||||
mlme_vdev_sm_deliver_event(vdev_mlme,
|
||||
|
Reference in New Issue
Block a user