From 442b9f2ccb01bfd4a7d14d1ed7a0eddb08d85e09 Mon Sep 17 00:00:00 2001 From: wadesong Date: Fri, 15 Mar 2019 17:15:59 +0800 Subject: [PATCH] qcacld-3.0: Code refine for 4 ini items 1) Refine the documentation text of 4 ini items: gStaKeepAlivePeriod gApKeepAlivePeriod gChannelBondingMode5GHz gChannelBondingMode24GHz 2) Fix a discrepancy which happens when ini cfg values are converted from those defined in enum eIniChanBondState to the corresponding values in enum ePhyChanBondState. 3) Use the related APIs to setup channel bonding modes instead of directly assigning values. 4) Remove the redundant inclusion of the following two header files in csr_api_roam.c: cfg_ucfg_api.h wlan_mlme_api.h Change-Id: I43c1e5a05bbb34952a5c7bdbde734f4014592c12 CRs-Fixed: 2416991 --- .../dispatcher/inc/cfg_mlme_feature_flag.h | 14 +++++++++++++ components/mlme/dispatcher/inc/cfg_mlme_sta.h | 8 +++++--- .../mlme/dispatcher/inc/cfg_mlme_timeout.h | 2 +- core/sme/inc/csr_api.h | 20 +++++++++---------- core/sme/src/csr/csr_api_roam.c | 13 ++++++------ 5 files changed, 37 insertions(+), 20 deletions(-) diff --git a/components/mlme/dispatcher/inc/cfg_mlme_feature_flag.h b/components/mlme/dispatcher/inc/cfg_mlme_feature_flag.h index 7b9e1b8097e0..2bf42cb4c718 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_feature_flag.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_feature_flag.h @@ -167,6 +167,18 @@ * * This ini is used to set default channel bonding mode 24GHZ * + * 0 - 20MHz IF bandwidth centered on IF carrier + * 1 - 40MHz IF bandwidth with lower 20MHz supporting the primary channel + * 2 - reserved + * 3 - 40MHz IF bandwidth with higher 20MHz supporting the primary channel + * 4 - 20/40MHZ offset LOW 40/80MHZ offset CENTERED + * 5 - 20/40MHZ offset CENTERED 40/80MHZ offset CENTERED + * 6 - 20/40MHZ offset HIGH 40/80MHZ offset CENTERED + * 7 - 20/40MHZ offset LOW 40/80MHZ offset LOW + * 8 - 20/40MHZ offset HIGH 40/80MHZ offset LOW + * 9 - 20/40MHZ offset LOW 40/80MHZ offset HIGH + * 10 - 20/40MHZ offset-HIGH 40/80MHZ offset HIGH + * * Related: None * * Supported Feature: STA @@ -192,6 +204,8 @@ * * This ini is used to set default channel bonding mode 5GHZ * + * Values of 0 - 10 have the same meanings as for gChannelBondingMode24GHz. + * * Related: None * * Supported Feature: STA diff --git a/components/mlme/dispatcher/inc/cfg_mlme_sta.h b/components/mlme/dispatcher/inc/cfg_mlme_sta.h index 9f7237e4e21b..c47b5262eb75 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_sta.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_sta.h @@ -25,13 +25,15 @@ /* * - * gStaKeepAlivePeriod - Sends NULL frame to AP periodically in - * seconds to notify STA's existence + * gStaKeepAlivePeriod - STA keep alive period + * + * * @Min: 0 * @Max: 1000 * @Default: 60 * - * This ini is used to send default NULL frame to AP + * This ini is used to control how frequently STA should send NULL frames to AP + * (period in seconds) to notify AP of its existence. * * Related: None * diff --git a/components/mlme/dispatcher/inc/cfg_mlme_timeout.h b/components/mlme/dispatcher/inc/cfg_mlme_timeout.h index 4b7428f101d4..cab06f33f3bc 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_timeout.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_timeout.h @@ -219,7 +219,7 @@ * @Max: 65535 * @Default: 20 * - * This ini is used to set keep alive period of AP + * This ini is used to set keep alive period(in seconds) of AP * * Related: None. * diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 80224626d8ba..52c20ec4d547 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -161,16 +161,16 @@ typedef enum { typedef enum { eCSR_INI_SINGLE_CHANNEL_CENTERED = 0, - eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY, - eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY, - eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED, - eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED, - eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED, - eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW, - eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW, - eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH, - eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH, - eCSR_INI_CHANNEL_BONDING_STATE_MAX + eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY = 1, + eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY = 3, + eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED = 4, + eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED = 5, + eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED = 6, + eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW = 7, + eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW = 8, + eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH = 9, + eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH = 10, + eCSR_INI_CHANNEL_BONDING_STATE_MAX = 11 } eIniChanBondState; #define CSR_RSN_PMKID_SIZE 16 diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 8894d8576527..60f84c08e3eb 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -55,10 +55,9 @@ #include #include #include "wlan_mlme_api.h" +#include "wlan_mlme_ucfg_api.h" #include #include "cfg_mlme.h" -#include "cfg_ucfg_api.h" -#include "wlan_mlme_api.h" #include "wlan_mlme_public_struct.h" #include #include "wlan_qct_sys.h" @@ -1333,12 +1332,14 @@ void csr_set_global_cfgs(struct mac_context *mac) */ if (cfg_in_range(CFG_CHANNEL_BONDING_MODE_5GHZ, mac->roam.configParam.channelBondingMode5GHz)) - mac->mlme_cfg->feature_flags.channel_bonding_mode_5ghz = - mac->roam.configParam.channelBondingMode5GHz; + ucfg_mlme_set_channel_bonding_5ghz(mac->psoc, + mac->roam.configParam. + channelBondingMode5GHz); if (cfg_in_range(CFG_CHANNEL_BONDING_MODE_24GHZ, mac->roam.configParam.channelBondingMode24GHz)) - mac->mlme_cfg->feature_flags.channel_bonding_mode_24ghz = - mac->roam.configParam.channelBondingMode24GHz; + ucfg_mlme_set_channel_bonding_24ghz(mac->psoc, + mac->roam.configParam. + channelBondingMode24GHz); if (cfg_in_range(CFG_HEART_BEAT_THRESHOLD, mac->roam.configParam.HeartbeatThresh24))