Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c02dff2 authored by Kiran Kumar Lokere's avatar Kiran Kumar Lokere Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Config support for STA bss color collision detection

Add INI configuration support to enable/disable BSS color collision
detection offload in STA mode.

Change-Id: I9d8f096813d74242566ccae5f92e872bcaca6295
CRs-Fixed: 2965133
parent eaedbbf7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1238,6 +1238,8 @@ static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc,
		(bool)cfg_default(CFG_OBSS_DETECTION_OFFLOAD);
	obss_ht40->obss_color_collision_offload_enabled =
		(bool)cfg_default(CFG_OBSS_COLOR_COLLISION_OFFLOAD);
	obss_ht40->bss_color_collision_det_sta =
		cfg_get(psoc, CFG_BSS_CLR_COLLISION_DETCN_STA);
}

static void mlme_init_threshold_cfg(struct wlan_objmgr_psoc *psoc,
+23 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 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,6 +244,27 @@
		0, \
		"Enable obss color collision offload")

/*
 * <ini>
 * bss_color_collision_det_sta - Enables BSS color collision detection in STA
 * @Min: 0
 * @Max: 1
 * @Default: 0
 *
 * This ini used to enable or disable the BSS color collision detection in
 * STA mode if obss_color_collision_offload is enabled.
 *
 * Supported Feature: STA
 *
 * Usage: Internal/External
 *
 * </ini>
 */
#define CFG_BSS_CLR_COLLISION_DETCN_STA CFG_INI_BOOL( \
		"bss_color_collision_det_sta", \
		0, \
		"BSS color collision detection in STA")

#define CFG_OBSS_HT40_ALL \
	CFG(CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME) \
	CFG(CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME) \
@@ -253,6 +275,7 @@
	CFG(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY) \
	CFG(CFG_OBSS_HT40_OVERRIDE_HT40_20_24GHZ) \
	CFG(CFG_OBSS_DETECTION_OFFLOAD) \
	CFG(CFG_BSS_CLR_COLLISION_DETCN_STA) \
	CFG(CFG_OBSS_COLOR_COLLISION_OFFLOAD)

#endif /* CFG_MLME_OBSS_HT40_H__ */
+2 −0
Original line number Diff line number Diff line
@@ -1336,6 +1336,7 @@ struct wlan_mlme_cfg_twt {
 * @is_override_ht20_40_24g: use channel bonding in 2.4 GHz
 * @obss_detection_offload_enabled:       Enable OBSS detection offload
 * @obss_color_collision_offload_enabled: Enable obss color collision
 * @bss_color_collision_det_sta: STA BSS color collision detection offload
 */
struct wlan_mlme_obss_ht40 {
	uint32_t active_dwelltime;
@@ -1348,6 +1349,7 @@ struct wlan_mlme_obss_ht40 {
	bool is_override_ht20_40_24g;
	bool obss_detection_offload_enabled;
	bool obss_color_collision_offload_enabled;
	bool bss_color_collision_det_sta;
};

/**
+13 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 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
@@ -3980,6 +3981,18 @@ QDF_STATUS
ucfg_mlme_set_obss_color_collision_offload_enabled(
		struct wlan_objmgr_psoc *psoc, uint8_t value);

/**
 * ucfg_mlme_set_bss_color_collision_det_sta() - Enable bss color
 * collision detection offload for STA mode
 * @psoc:   pointer to psoc object
 * @value:  enable or disable
 *
 * Return: QDF Status
 */
QDF_STATUS
ucfg_mlme_set_bss_color_collision_det_sta(struct wlan_objmgr_psoc *psoc,
					  uint8_t value);

/**
 * ucfg_mlme_set_restricted_80p80_bw_supp() - Set the restricted 80p80 support
 * @psoc: pointer to psoc object
+16 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 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
@@ -1783,6 +1784,21 @@ ucfg_mlme_set_obss_detection_offload_enabled(struct wlan_objmgr_psoc *psoc,
	return QDF_STATUS_SUCCESS;
}

QDF_STATUS
ucfg_mlme_set_bss_color_collision_det_sta(struct wlan_objmgr_psoc *psoc,
					  uint8_t value)
{
	struct wlan_mlme_psoc_ext_obj *mlme_obj;

	mlme_obj = mlme_get_psoc_ext_obj(psoc);
	if (!mlme_obj)
		return QDF_STATUS_E_INVAL;

	mlme_obj->cfg.obss_ht40.bss_color_collision_det_sta = value;

	return QDF_STATUS_SUCCESS;
}

QDF_STATUS
ucfg_mlme_set_obss_color_collision_offload_enabled(
		struct wlan_objmgr_psoc *psoc, uint8_t value)
Loading