qcacld-3.0: Refine mlme product details configures

Refine mlme product details configures based on converged cfg component.
Remove related legacy codes.

Change-Id: I87ca037ac5c8e6c7cd166a2de17319a9a367fc7c
CRs-Fixed: 2304075
This commit is contained in:
Jiachao Wu
2018-08-24 18:24:34 +08:00
committed by Wu Gao
parent 1e536eab0c
commit 008cefd473
6 changed files with 348 additions and 0 deletions

View File

@@ -602,6 +602,27 @@ static void mlme_init_threshold_cfg(struct wlan_objmgr_psoc *psoc,
threshold->frag_threshold = cfg_get(psoc, CFG_FRAG_THRESHOLD);
}
static void
mlme_init_product_details_cfg(struct wlan_mlme_product_details_cfg
*product_details)
{
qdf_str_lcopy(product_details->manufacturer_name,
cfg_default(CFG_MFR_NAME),
sizeof(product_details->manufacturer_name));
qdf_str_lcopy(product_details->manufacture_product_name,
cfg_default(CFG_MFR_PRODUCT_NAME),
sizeof(product_details->manufacture_product_name));
qdf_str_lcopy(product_details->manufacture_product_version,
cfg_default(CFG_MFR_PRODUCT_VERSION),
sizeof(product_details->manufacture_product_version));
qdf_str_lcopy(product_details->model_name,
cfg_default(CFG_MODEL_NAME),
sizeof(product_details->model_name));
qdf_str_lcopy(product_details->model_number,
cfg_default(CFG_MODEL_NUMBER),
sizeof(product_details->model_number));
}
static void mlme_init_sta_cfg(struct wlan_objmgr_psoc *psoc,
struct wlan_mlme_sta_cfg *sta)
{
@@ -973,6 +994,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
mlme_init_sap_cfg(psoc, &mlme_cfg->sap_cfg);
mlme_init_he_cap_in_cfg(psoc, &mlme_cfg->he_caps);
mlme_init_obss_ht40_cfg(psoc, &mlme_cfg->obss_ht40);
mlme_init_product_details_cfg(&mlme_cfg->product_details);
mlme_init_sta_cfg(psoc, &mlme_cfg->sta);
mlme_init_lfr_cfg(psoc, &mlme_cfg->lfr);
mlme_init_feature_flag_in_cfg(psoc, &mlme_cfg->feature_flags);

View File

@@ -34,6 +34,7 @@
#include "cfg_mlme_vht_caps.h"
#include "cfg_qos.h"
#include "cfg_mlme_rates.h"
#include "wlan_mlme_product_details_cfg.h"
#include "cfg_mlme_sta.h"
#include "cfg_sap_protection.h"
#include "cfg_mlme_sap.h"
@@ -58,6 +59,7 @@
CFG_QOS_ALL \
CFG_RATES_ALL \
CFG_SAP_ALL \
CFG_MLME_PRODUCT_DETAILS_ALL \
CFG_SAP_PROTECTION_ALL \
CFG_SCORING_ALL \
CFG_STA_ALL \

View File

@@ -73,6 +73,76 @@ QDF_STATUS wlan_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
struct mlme_ht_capabilities_info
*ht_cap_info);
/**
* wlan_mlme_get_manufacturer_name() - get manufacturer name
* @psoc: pointer to psoc object
* @pbuf: pointer of the buff which will be filled for the caller
* @plen: pointer of max buffer length
* actual length will be returned at this address
* This function gets manufacturer name
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS
wlan_mlme_get_manufacturer_name(struct wlan_objmgr_psoc *psoc,
uint8_t *pbuf, uint32_t *plen);
/**
* wlan_mlme_get_model_number() - get model number
* @psoc: pointer to psoc object
* @pbuf: pointer of the buff which will be filled for the caller
* @plen: pointer of max buffer length
* actual length will be returned at this address
* This function gets model number
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS
wlan_mlme_get_model_number(struct wlan_objmgr_psoc *psoc,
uint8_t *pbuf, uint32_t *plen);
/**
* wlan_mlme_get_model_name() - get model name
* @psoc: pointer to psoc object
* @pbuf: pointer of the buff which will be filled for the caller
* @plen: pointer of max buffer length
* actual length will be returned at this address
* This function gets model name
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS
wlan_mlme_get_model_name(struct wlan_objmgr_psoc *psoc,
uint8_t *pbuf, uint32_t *plen);
/**
* wlan_mlme_get_manufacture_product_name() - get manufacture product name
* @psoc: pointer to psoc object
* @pbuf: pointer of the buff which will be filled for the caller
* @plen: pointer of max buffer length
* actual length will be returned at this address
* This function gets manufacture product name
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS
wlan_mlme_get_manufacture_product_name(struct wlan_objmgr_psoc *psoc,
uint8_t *pbuf, uint32_t *plen);
/**
* wlan_mlme_get_manufacture_product_version() - get manufacture product version
* @psoc: pointer to psoc object
* @pbuf: pointer of the buff which will be filled for the caller
* @plen: pointer of max buffer length
* actual length will be returned at this address
* This function gets manufacture product version
*
* Return: QDF_STATUS_SUCCESS - in case of success
*/
QDF_STATUS
wlan_mlme_get_manufacture_product_version(struct wlan_objmgr_psoc *psoc,
uint8_t *pbuf, uint32_t *plen);
/**
* wlan_mlme_set_ht_cap_info() - Set the HT cap info config
* @psoc: pointer to psoc object

View File

@@ -0,0 +1,140 @@
/*
* Copyright (c) 2011-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.
*/
#ifndef WLAN_MLME_PRODUCT_DETAILS_H__
#define WLAN_MLME_PRODUCT_DETAILS_H__
/*
* manufacturer_name - Set manufacture Name
* @Min_len: 0
* @Max_len: 63
* @Default: Qualcomm Atheros
*
* This internal CFG is used to set manufacture name
*
* Related: None
*
* Supported Feature: product details
*
* Usage: Internal
*
*/
#define CFG_MFR_NAME CFG_STRING( \
"manufacturer_name", \
0, \
WLAN_CFG_MFR_NAME_LEN, \
"Qualcomm Atheros", \
"Manufacture name")
/*
* model_number - Set model number
* @Min_len: 0
* @Max_len: 31
* @Default: MN1234
*
* This internal CFG is used to set model number
*
* Related: None
*
* Supported Feature: product details
*
* Usage: Internal
*
*/
#define CFG_MODEL_NUMBER CFG_STRING( \
"model_number", \
0, \
WLAN_CFG_MODEL_NUMBER_LEN, \
"MN1234", \
"model number")
/*
* model_name - Set model name
* @Min_len: 0
* @Max_len: 31
* @Default: WFR4031
*
* This internal CFG is used to set model name
*
* Related: None
*
* Supported Feature: product details
*
* Usage: Internal
*
*/
#define CFG_MODEL_NAME CFG_STRING( \
"model_name", \
0, \
WLAN_CFG_MODEL_NAME_LEN, \
"WFR4031", \
"model name")
/*
* manufacture_product_name - Set manufacture product name
* @Min_len: 0
* @Max_len: 31
* @Default: 11n-AP
*
* This internal CFG is used to set manufacture product name
*
* Related: None
*
* Supported Feature: product details
*
* Usage: Internal
*
*/
#define CFG_MFR_PRODUCT_NAME CFG_STRING( \
"manufacture_product_name", \
0, \
WLAN_CFG_MFR_PRODUCT_NAME_LEN, \
"11n-AP", \
"manufacture product name")
/*
* model_number - Set manufacture product version
* @Min_len: 0
* @Max_len: 31
* @Default: SN1234
*
* This internal CFG is used to set manufacture product version
*
* Related: None
*
* Supported Feature: product details
*
* Usage: Internal
*
*/
#define CFG_MFR_PRODUCT_VERSION CFG_STRING( \
"manufacture_product_version", \
0, \
WLAN_CFG_MFR_PRODUCT_VERSION_LEN, \
"SN1234", \
"manufacture product version")
#define CFG_MLME_PRODUCT_DETAILS_ALL \
CFG(CFG_MFR_NAME) \
CFG(CFG_MODEL_NUMBER) \
CFG(CFG_MODEL_NAME) \
CFG(CFG_MFR_PRODUCT_NAME) \
CFG(CFG_MFR_PRODUCT_VERSION)
#endif

View File

@@ -168,6 +168,12 @@ struct wlan_mlme_edca_params {
struct mlme_cfg_str etsi_acvo_b;
};
#define WLAN_CFG_MFR_NAME_LEN (63)
#define WLAN_CFG_MODEL_NUMBER_LEN (31)
#define WLAN_CFG_MODEL_NAME_LEN (31)
#define WLAN_CFG_MFR_PRODUCT_NAME_LEN (31)
#define WLAN_CFG_MFR_PRODUCT_VERSION_LEN (31)
/**
* struct mlme_ht_capabilities_info - HT Capabilities Info
* @l_sig_tx_op_protection: L-SIG TXOP Protection Mechanism support
@@ -529,6 +535,22 @@ struct wlan_mlme_generic {
uint16_t pmf_sa_query_retry_interval;
};
/*
* struct wlan_mlme_product_details_cfg - product details config items
* @manufacturer_name: manufacture name
* @model_number: model number
* @model_name: model name
* @manufacture_product_name: manufacture product name
* @manufacture_product_version: manufacture product version
*/
struct wlan_mlme_product_details_cfg {
char manufacturer_name[WLAN_CFG_MFR_NAME_LEN + 1];
char model_number[WLAN_CFG_MODEL_NUMBER_LEN + 1];
char model_name[WLAN_CFG_MODEL_NAME_LEN + 1];
char manufacture_product_name[WLAN_CFG_MFR_PRODUCT_NAME_LEN + 1];
char manufacture_product_version[WLAN_CFG_MFR_PRODUCT_VERSION_LEN + 1];
};
/**
* struct wlan_mlme_obss_ht40 - OBSS HT40 config items
* @active_dwelltime: obss active dwelltime
@@ -853,6 +875,7 @@ struct wlan_mlme_wep_cfg {
* @obss_ht40:obss ht40 CFG Items
* @vht_cfg: VHT related CFG Items
* @rates: Rates related cfg items
* @product_details: product details related CFG Items
* @sap_protection_cfg: SAP erp protection related CFG items
* @sta: sta CFG Items
* @scoring: BSS Scoring related CFG Items
@@ -872,6 +895,7 @@ struct wlan_mlme_cfg {
struct wlan_mlme_vht_caps vht_caps;
struct wlan_mlme_qos qos_mlme_params;
struct wlan_mlme_rates rates;
struct wlan_mlme_product_details_cfg product_details;
struct wlan_mlme_sap_protection sap_protection_cfg;
struct wlan_mlme_cfg_sap sap_cfg;
struct wlan_mlme_sta_cfg sta;

View File

@@ -244,6 +244,96 @@ QDF_STATUS wlan_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_mlme_get_manufacturer_name(struct wlan_objmgr_psoc *psoc,
uint8_t *pbuf, uint32_t *plen)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
*plen = qdf_str_lcopy(pbuf,
mlme_obj->cfg.product_details.manufacturer_name,
*plen);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_mlme_get_model_number(struct wlan_objmgr_psoc *psoc,
uint8_t *pbuf, uint32_t *plen)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
*plen = qdf_str_lcopy(pbuf,
mlme_obj->cfg.product_details.model_number,
*plen);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_mlme_get_model_name(struct wlan_objmgr_psoc *psoc,
uint8_t *pbuf, uint32_t *plen)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
*plen = qdf_str_lcopy(pbuf,
mlme_obj->cfg.product_details.model_name,
*plen);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_mlme_get_manufacture_product_version(struct wlan_objmgr_psoc *psoc,
uint8_t *pbuf, uint32_t *plen)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
*plen = qdf_str_lcopy(pbuf,
mlme_obj->cfg.product_details.manufacture_product_version,
*plen);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_mlme_get_manufacture_product_name(struct wlan_objmgr_psoc *psoc,
uint8_t *pbuf, uint32_t *plen)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
*plen = qdf_str_lcopy(pbuf,
mlme_obj->cfg.product_details.manufacture_product_name,
*plen);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_set_sap_listen_interval(struct wlan_objmgr_psoc *psoc,
int value)
{