qcacld-3.0: Refine mlme obss ht40 configurations

Refine mlme obss ht40 configurations based on converged cfg component.
Remove related legacy codes.

Change-Id: If4f061a16e9a2a0bba81d1d24aa1f52bbeadacf5
CRs-Fixed: 2311907
This commit is contained in:
Wu Gao
2018-07-24 19:18:45 +08:00
committed by nshrivas
parent c9df6d01a1
commit 40ba553537
4 changed files with 252 additions and 0 deletions

View File

@@ -198,6 +198,25 @@ static void mlme_update_sap_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_INI_REDUCED_BEACON_INTERVAL);
}
static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc,
struct wlan_mlme_obss_ht40 *obss_ht40)
{
obss_ht40->active_dwelltime =
cfg_get(psoc, CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME);
obss_ht40->passive_dwelltime =
cfg_get(psoc, CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME);
obss_ht40->width_trigger_interval =
cfg_get(psoc, CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL);
obss_ht40->passive_per_channel = (uint32_t)
cfg_default(CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL);
obss_ht40->active_per_channel = (uint32_t)
cfg_default(CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL);
obss_ht40->width_trans_delay = (uint32_t)
cfg_default(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY);
obss_ht40->scan_activity_threshold = (uint32_t)
cfg_default(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD);
}
QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_obj *mlme_obj;
@@ -216,6 +235,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
mlme_update_sap_protection_cfg(psoc, &mlme_cfg->sap_protection_cfg);
mlme_init_chainmask_cfg(psoc, &mlme_cfg->chainmask_cfg);
mlme_update_sap_cfg(psoc, &mlme_cfg->sap_cfg);
mlme_init_obss_ht40_cfg(psoc, &mlme_cfg->obss_ht40);
return status;
}

View File

@@ -25,6 +25,7 @@
#include "cfg_mlme_chainmask.h"
#include "cfg_mlme_ht_caps.h"
#include "cfg_mlme_obss_ht40.h"
#include "cfg_mlme_vht_caps.h"
#include "cfg_mlme_rates.h"
#include "cfg_sap_protection.h"
@@ -33,6 +34,7 @@
#define CFG_MLME_ALL \
CFG_CHAINMASK_ALL \
CFG_HT_CAPS_ALL \
CFG_OBSS_HT40_ALL \
CFG_VHT_CAPS_ALL \
CFG_RATES_ALL \
CFG_SAP_PROTECTION_ALL \

View File

@@ -0,0 +1,208 @@
/*
* Copyright (c) 2012-2018 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 configuration definitions for MLME OBSS HT40.
*/
#ifndef CFG_MLME_OBSS_HT40_H__
#define CFG_MLME_OBSS_HT40_H__
/*
* <ini>
* obss_active_dwelltime - Set obss active dwelltime
* @Min: 10
* @Max: 1000
* @Default: 10
*
* This ini is used to set dwell time in secs for active
* obss scan
*
* Related: None
*
* Supported Feature: Scan
*
* Usage: External
*
* </ini>
*/
#define CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME CFG_INI_UINT( \
"obss_active_dwelltime", \
10, \
1000, \
10, \
CFG_VALUE_OR_DEFAULT, \
"Set obss active dwelltime")
/*
* <ini>
* obss_passive_dwelltime - Set obss passive dwelltime
* @Min: 5
* @Max: 1000
* @Default: 20
*
* This ini is used to set dwell time in secs for passive
* obss scan
*
* Related: None
*
* Supported Feature: Scan
*
* Usage: External
*
* </ini>
*/
#define CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME CFG_INI_UINT( \
"obss_passive_dwelltime", \
5, \
1000, \
20, \
CFG_VALUE_OR_DEFAULT, \
"Set obss passive dwelltime")
/*
* <ini>
* obss_width_trigger_interval - Set obss trigger interval
* @Min: 10
* @Max: 900
* @Default: 200
*
* This ini is used during an OBSS scan operation,
* where each channel in the set is scanned at least
* once per configured trigger interval time. Unit is TUs.
*
* Related: None
*
* Supported Feature: Scan
*
* Usage: External
*
* </ini>
*/
#define CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL CFG_INI_UINT( \
"obss_width_trigger_interval", \
10, \
900, \
200, \
CFG_VALUE_OR_DEFAULT, \
"Set obss trigger interval")
/*
* obss_passive_total_per_channel - Set obss scan passive total per channel
* @Min: 200
* @Max: 10000
* @Default: 200
*
* FW can perform multiple scans with in a OBSS scan interval. This cfg is for
* the total per channel dwell time of passive scans. Unit is TUs.
*
* Related: None
*
* Supported Feature: Scan
*
* Usage: Internal
*
*/
#define CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL CFG_UINT( \
"obss_passive_total_per_channel", \
200, \
10000, \
200, \
CFG_VALUE_OR_DEFAULT, \
"obss passive total per channel")
/*
* obss_active_total_per_channel - Set obss scan active total per channel
* @Min: 20
* @Max: 10000
* @Default: 20
*
* FW can perform multiple scans with in a OBSS scan interval. This cfg is for
* the total per channel dwell time of active scans. Unit is TUs.
*
* Related: None
*
* Supported Feature: Scan
*
* Usage: Internal
*
*/
#define CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL CFG_UINT( \
"obss_active_total_per_channel", \
20, \
10000, \
20, \
CFG_VALUE_OR_DEFAULT, \
"obss active total per channel")
/*
* obss_scan_activity_thre - Set obss scan activity threshold
* @Min: 0
* @Max: 100
* @Default: 25
*
* This cfg sets obss scan activity threshold.
*
* Related: None
*
* Supported Feature: Scan
*
* Usage: Internal
*
*/
#define CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD CFG_UINT( \
"obss_scan_activity_thre", \
0, \
100, \
25, \
CFG_VALUE_OR_DEFAULT, \
"obss ht40 scan activity threshold")
/*
* obss_width_transition_delay - Set obss width transition delay
* @Min: 5
* @Max: 100
* @Default: 5
*
* This cfg sets obss width transition delay, it is used to check exemption
* from scan. The unit is TUs.
*
* Related: None
*
* Supported Feature: Scan
*
* Usage: Internal
*
*/
#define CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY CFG_UINT( \
"obss_width_transition_delay", \
5, \
100, \
5, \
CFG_VALUE_OR_DEFAULT, \
"obss ht40 width transition delay")
#define CFG_OBSS_HT40_ALL \
CFG(CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME) \
CFG(CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME) \
CFG(CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL) \
CFG(CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL) \
CFG(CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL) \
CFG(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD) \
CFG(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY)
#endif /* CFG_MLME_OBSS_HT40_H__ */

View File

@@ -180,15 +180,37 @@ struct wlan_mlme_chainmask {
uint8_t rx_chain_mask_5g;
};
/**
* struct wlan_mlme_obss_ht40 - OBSS HT40 config items
* @active_dwelltime: obss active dwelltime
* @passive_dwelltime: obss passive dwelltime
* @width_trigger_interval: obss trigger interval
* @passive_per_channel: obss scan passive total duration per channel
* @active_per_channel: obss scan active total duration per channel
* @width_trans_delay: obss width transition delay
* @scan_activity_threshold: obss scan activity threshold
*/
struct wlan_mlme_obss_ht40 {
uint32_t active_dwelltime;
uint32_t passive_dwelltime;
uint32_t width_trigger_interval;
uint32_t passive_per_channel;
uint32_t active_per_channel;
uint32_t width_trans_delay;
uint32_t scan_activity_threshold;
};
/**
* struct wlan_mlme_cfg - MLME config items
* @ht_cfg: HT related CFG Items
* @obss_ht40:obss ht40 CFG Items
* @vht_cfg: VHT related CFG Items
* @rates: Rates related cfg items
* @sap_protection_cfg: SAP erp protection related CFG items
*/
struct wlan_mlme_cfg {
struct wlan_mlme_ht_caps ht_caps;
struct wlan_mlme_obss_ht40 obss_ht40;
struct wlan_mlme_vht_caps vht_caps;
struct wlan_mlme_rates rates;
struct wlan_mlme_sap_protection sap_protection_cfg;