qcacmn: Add APIs to set and get acs_mode in vdev mlme obj

To support fixed channel SAP in unsafe channels, driver needs
to cache and retrieve SAP start mode i.e. ACS or fixed.
Add a new param is_acs_mode to vdev_mlme_mgmt_ap and APIs to
set and get the same through vdev.

Change-Id: Ib274b95be66e774b15f4687a02ed7fef6bf21056
CRs-Fixed: 3381401
This commit is contained in:
Srinivas Dasari
2023-01-06 01:24:59 +05:30
committed by Madan Koyyalamudi
parent f9c3074fea
commit 539d3bfb53
5 changed files with 67 additions and 3 deletions

View File

@@ -435,6 +435,7 @@ struct wlan_vdev_aid_mgr {
* @max_chan_switch_time: Max channel switch time in milliseconds.
* @last_bcn_ts_ms: Timestamp (in milliseconds) of the last beacon sent on the
* CSA triggered channel.
* @is_acs_mode: True if SAP is started in ACS mode
*/
struct vdev_mlme_mgmt_ap {
bool hidden_ssid;
@@ -442,6 +443,7 @@ struct vdev_mlme_mgmt_ap {
struct wlan_vdev_aid_mgr *aid_mgr;
uint32_t max_chan_switch_time;
unsigned long last_bcn_ts_ms;
bool is_acs_mode;
};
/**

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2021, 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
@@ -243,4 +243,15 @@ QDF_STATUS ucfg_vdev_mgr_cdp_vdev_attach(struct wlan_objmgr_vdev *vdev);
*/
QDF_STATUS ucfg_vdev_mgr_cdp_vdev_detach(struct wlan_objmgr_vdev *vdev);
#endif
/**
* ucfg_util_vdev_mgr_set_acs_mode_for_vdev() - ucfg API to set SAP start mode
* @vdev: pointer to vdev object
* @is_acs_mode: Carries true if SAP is started in ACS
*
* Return: None
*/
void
ucfg_util_vdev_mgr_set_acs_mode_for_vdev(struct wlan_objmgr_vdev *vdev,
bool is_acs_mode);
#endif /* __WLAN_VDEV_MLME_UCFG_H__ */

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2019 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
@@ -171,6 +171,23 @@ void wlan_util_vdev_mgr_set_cac_timeout_for_vdev(struct wlan_objmgr_vdev *vdev,
uint32_t new_chan_cac_ms);
#endif /* MOBILE_DFS_SUPPORT */
/**
* wlan_util_vdev_mgr_set_acs_mode_for_vdev() - set if the SAP is started in ACS
* @vdev: Pointer to vdev object.
* @is_acs_mode: Indicates true if the SAP is started in ACS
*
* Return: void
*/
void wlan_util_vdev_mgr_set_acs_mode_for_vdev(struct wlan_objmgr_vdev *vdev,
bool is_acs_mode);
/**
* wlan_util_vdev_mgr_get_acs_mode_for_vdev() - Get the SAP start mode
* @vdev: Pointer to vdev object.
*
* Return: true if the SAP is started in ACS
*/
bool wlan_util_vdev_mgr_get_acs_mode_for_vdev(struct wlan_objmgr_vdev *vdev);
#ifdef WLAN_FEATURE_11BE_MLO
/**
* wlan_util_vdev_mgr_quiet_offload() - set quiet status for given link

View File

@@ -206,3 +206,10 @@ QDF_STATUS ucfg_vdev_mgr_cdp_vdev_detach(struct wlan_objmgr_vdev *vdev)
qdf_export_symbol(ucfg_vdev_mgr_cdp_vdev_detach);
#endif
void
ucfg_util_vdev_mgr_set_acs_mode_for_vdev(struct wlan_objmgr_vdev *vdev,
bool is_acs_mode)
{
wlan_util_vdev_mgr_set_acs_mode_for_vdev(vdev, is_acs_mode);
}

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2021, 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
@@ -761,6 +761,33 @@ void wlan_util_vdev_mgr_set_cac_timeout_for_vdev(struct wlan_objmgr_vdev *vdev,
}
#endif /* MOBILE_DFS_SUPPORT */
void wlan_util_vdev_mgr_set_acs_mode_for_vdev(struct wlan_objmgr_vdev *vdev,
bool is_acs_mode)
{
struct vdev_mlme_obj *vdev_mlme;
vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
if (!vdev_mlme) {
mlme_err("vdev_mlme is null");
return;
}
vdev_mlme->mgmt.ap.is_acs_mode = is_acs_mode;
}
bool wlan_util_vdev_mgr_get_acs_mode_for_vdev(struct wlan_objmgr_vdev *vdev)
{
struct vdev_mlme_obj *vdev_mlme;
vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
if (!vdev_mlme) {
mlme_err("vdev_mlme is null");
return false;
}
return vdev_mlme->mgmt.ap.is_acs_mode;
}
QDF_STATUS wlan_util_vdev_mgr_get_csa_channel_switch_time(
struct wlan_objmgr_vdev *vdev,
uint32_t *chan_switch_time)