qcacld-3.0: Refactor stats cfg items

Refactor following stats cfg items
CFG_PERIODIC_STATS_DISPLAY_TIME
CFG_LINK_SPEED_RSSI_MID
CFG_REPORT_MAX_LINK_SPEED
CFG_LINK_SPEED_RSSI_LOW
CFG_LINK_SPEED_RSSI_HIGH

Change-Id: I1b699d5fe5b3182c292cf10c85f842169bf14342
CRs-Fixed: 2362068
This commit is contained in:
Arif Hussain
2018-12-03 19:45:12 -08:00
committed by nshrivas
부모 de11de7550
커밋 ea44e974cd
6개의 변경된 파일355개의 추가작업 그리고 0개의 파일을 삭제

파일 보기

@@ -45,6 +45,7 @@
#include "cfg_mlme_fe_wmm.h"
#include "cfg_mlme_powersave.h"
#include "cfg_mlme_sap.h"
#include "cfg_mlme_stats.h"
#include "cfg_mlme_twt.h"
#include "cfg_mlme_scoring.h"
#include "cfg_mlme_oce.h"
@@ -87,6 +88,7 @@
CFG_SAP_PROTECTION_ALL \
CFG_SCORING_ALL \
CFG_STA_ALL \
CFG_STATS_ALL \
CFG_THRESHOLD_ALL \
CFG_TIMEOUT_ALL \
CFG_TWT_ALL \

파일 보기

@@ -0,0 +1,162 @@
/*
* 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 centralized definitions of converged configuration.
*/
#ifndef __CFG_MLME_STATS_H
#define __CFG_MLME_STATS_H
enum mlme_stats_link_speed_rpt_type {
CFG_STATS_LINK_SPEED_REPORT_ACTUAL = 0,
CFG_STATS_LINK_SPEED_REPORT_MAX = 1,
CFG_STATS_LINK_SPEED_REPORT_MAX_SCALED = 2,
};
/*
* <ini>
* periodic_stats_display_time - time(seconds) after which stats will be printed
* @Min: 0
* @Max: 256
* @Default: 10
*
* This values specifies the recurring time period after which stats will be
* printed in wlan driver logs.
*
* Usage: Internal / External
*
* </ini>
*/
#define CFG_PERIODIC_STATS_DISPLAY_TIME CFG_INI_UINT( \
"periodic_stats_display_time", \
0, \
256, \
10, \
CFG_VALUE_OR_DEFAULT, \
"time after which stats will be printed")
/*
* <ini>
* gLinkSpeedRssiMed - Used when eHDD_LINK_SPEED_REPORT_SCALED is selected
* @Min: -127
* @Max: 0
* @Default: -65
*
* This ini is used to set medium rssi link speed
*
* Related: None
*
* Supported Feature: STA
*
* Usage: Internal / External
*
* </ini>
*/
#define CFG_LINK_SPEED_RSSI_MID CFG_INI_INT( \
"gLinkSpeedRssiMed", \
-127, \
0, \
-65, \
CFG_VALUE_OR_DEFAULT, \
"medium rssi link speed")
/*
* <ini>
* gReportMaxLinkSpeed - Max link speed
* @Min: CFG_STATS_LINK_SPEED_REPORT_ACTUAL
* @Max: CFG_STATS_LINK_SPEED_REPORT_MAX_SCALED
* @Default: CFG_STATS_LINK_SPEED_REPORT_ACTUAL
*
* This ini is used to set Max link speed
*
* Related: None
*
* Supported Feature: STA
*
* Usage: Internal / External
*
* </ini>
*/
#define CFG_REPORT_MAX_LINK_SPEED CFG_INI_UINT( \
"gReportMaxLinkSpeed", \
CFG_STATS_LINK_SPEED_REPORT_ACTUAL, \
CFG_STATS_LINK_SPEED_REPORT_ACTUAL, \
CFG_STATS_LINK_SPEED_REPORT_MAX_SCALED, \
CFG_VALUE_OR_DEFAULT, \
"Max link speed")
/*
* <ini>
* gLinkSpeedRssiLow - Used when eHDD_LINK_SPEED_REPORT_SCALED is selected
* @Min: -127
* @Max: 0
* @Default: -80
*
* This ini is used to set low rssi link speed
*
* Related: None
*
* Supported Feature: STA
*
* Usage: Internal / External
*
* </ini>
*/
#define CFG_LINK_SPEED_RSSI_LOW CFG_INI_INT( \
"gLinkSpeedRssiLow", \
-127, \
0, \
-80, \
CFG_VALUE_OR_DEFAULT, \
"low rssi link speed")
/*
* <ini>
* gLinkSpeedRssiHigh - Report the max possible speed with RSSI scaling
* @Min: -127
* @Max: 0
* @Default: -55
*
* This ini is used to set default eHDD_LINK_SPEED_REPORT
* Used when eHDD_LINK_SPEED_REPORT_SCALED is selected
*
* Related: None
*
* Supported Feature: STA
*
* Usage: Internal / External
*
* </ini>
*/
#define CFG_LINK_SPEED_RSSI_HIGH CFG_INI_INT( \
"gLinkSpeedRssiHigh", \
-127, \
0, \
-55, \
CFG_VALUE_OR_DEFAULT, \
"max possible rssi link speed")
#define CFG_STATS_ALL \
CFG(CFG_PERIODIC_STATS_DISPLAY_TIME) \
CFG(CFG_LINK_SPEED_RSSI_HIGH) \
CFG(CFG_LINK_SPEED_RSSI_MID) \
CFG(CFG_LINK_SPEED_RSSI_LOW) \
CFG(CFG_REPORT_MAX_LINK_SPEED)
#endif /* __CFG_MLME_STATS_H */

파일 보기

@@ -1136,6 +1136,22 @@ struct wlan_mlme_sta_cfg {
enum station_keepalive_method sta_keepalive_method;
};
/**
* struct wlan_mlme_stats_cfg - MLME stats configuration items
* @stats_periodic_display_time: time after which stats will be printed
* @stats_link_speed_rssi_high: rssi link speed, high
* @stats_link_speed_rssi_med: medium rssi link speed
* @stats_link_speed_rssi_low: rssi link speed, low
* @stats_report_max_link_speed_rssi: report speed limit
*/
struct wlan_mlme_stats_cfg {
uint32_t stats_periodic_display_time;
int stats_link_speed_rssi_high;
int stats_link_speed_rssi_med;
int stats_link_speed_rssi_low;
uint32_t stats_report_max_link_speed_rssi;
};
/**
* enum roaming_dfs_channel_type - Allow dfs channel in roam
* @CFG_ROAMING_DFS_CHANNEL_DISABLED: Disallow dfs channel in roam
@@ -1804,6 +1820,7 @@ struct wlan_mlme_reg {
* @sap_cfg: sap CFG items
* @nss_chains_ini_cfg: Per vdev nss, chains related CFG items
* @sta: sta CFG Items
* @stats: stats CFG Items
* @scoring: BSS Scoring related CFG Items
* @oce: OCE related CFG items
* @threshold: threshold related cfg items
@@ -1843,6 +1860,7 @@ struct wlan_mlme_cfg {
struct wlan_mlme_cfg_sap sap_cfg;
struct wlan_mlme_nss_chains nss_chains_ini_cfg;
struct wlan_mlme_sta_cfg sta;
struct wlan_mlme_stats_cfg stats;
struct wlan_mlme_scoring_cfg scoring;
struct wlan_mlme_oce oce;
struct wlan_mlme_threshold threshold;

파일 보기

@@ -2484,6 +2484,64 @@ QDF_STATUS
ucfg_mlme_get_sta_keepalive_method(struct wlan_objmgr_psoc *psoc,
enum station_keepalive_method *val);
/**
* ucfg_mlme_stats_get_periodic_display_time() - get display time
* @psoc: pointer to psoc object
* @periodic_display_time: buffer to hold value
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_stats_get_periodic_display_time(struct wlan_objmgr_psoc *psoc,
uint32_t *periodic_display_time);
/**
* ucfg_mlme_stats_get_cfg_values() - get stats cfg values
* @psoc: pointer to psoc object
* @link_speed_rssi_high: link speed high limit
* @link_speed_rssi_mid: link speed high mid
* @link_speed_rssi_low: link speed high low
* @link_speed_rssi_report: link speed report limit
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_stats_get_cfg_values(struct wlan_objmgr_psoc *psoc,
int *link_speed_rssi_high,
int *link_speed_rssi_mid,
int *link_speed_rssi_low,
uint32_t *link_speed_rssi_report);
/**
* ucfg_mlme_stats_is_link_speed_report_actual() - is link speed report set
* actual
* @psoc: pointer to psoc object
*
* Return: True is report set to actual
*/
bool
ucfg_mlme_stats_is_link_speed_report_actual(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_mlme_stats_is_link_speed_report_max() - is link speed report set
* max
* @psoc: pointer to psoc object
*
* Return: True is report set to max
*/
bool
ucfg_mlme_stats_is_link_speed_report_max(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_mlme_stats_is_link_speed_report_max_scaled() - is link speed report set
* max scaled
* @psoc: pointer to psoc object
*
* Return: True is report set to max scaled
*/
bool
ucfg_mlme_stats_is_link_speed_report_max_scaled(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_mlme_get_wmm_dir_ac_vi() - Get TSPEC direction
* for VI