qcacld-3.0: Refactor CFG_FINE_TIME_MEAS_CAPABILITY cfg

Refactor following CFG_FINE_TIME_MEAS_CAPABILITY cfg items.

Change-Id: I854e584e366490f788ee778adad3fec0c2b5c8cc
CRs-Fixed: 2357070
Bu işleme şunda yer alıyor:
Arif Hussain
2018-11-27 19:01:15 -08:00
işlemeyi yapan: nshrivas
ebeveyn 4966f697ef
işleme bd5194c5e0
11 değiştirilmiş dosya ile 197 ekleme ve 60 silme

Dosyayı Görüntüle

@@ -50,6 +50,7 @@
#include "cfg_mlme_threshold.h"
#include "cfg_mlme_feature_flag.h"
#include "cfg_mlme_wep_params.h"
#include "cfg_mlme_wifi_pos.h"
/* Please Maintain Alphabetic Order here */
#define CFG_MLME_ALL \
@@ -80,6 +81,7 @@
CFG_TWT_ALL \
CFG_VHT_CAPS_ALL \
CFG_WEP_PARAMS_ALL \
CFG_WIFI_POS_ALL \
CFG_WPS_ALL
#endif /* __CFG_MLME_H */

Dosyayı Görüntüle

@@ -0,0 +1,74 @@
/*
* 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_WIFI_POS_H
#define __CFG_MLME_WIFI_POS_H
/*
* <ini>
* gfine_time_meas_cap - fine timing measurement capability information
* @Min: 0x0000
* @Max: 0x00BD
* @Default: 0x00BD
*
* fine timing measurement capability information
*
* <----- fine_time_meas_cap (in bits) ----->
* +----------+-----+-----+------+------+-------+-------+-----+-----+
* | 8-31 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
* +----------+-----+-----+------+------+-------+-------+-----+-----+
* | reserved | SAP | SAP |P2P-GO|P2P-GO|P2P-CLI|P2P-CLI| STA | STA |
* | |resp |init |resp |init |resp |init |resp |init |
* +----------+-----+-----+------+------+-------+-------+-----+-----+
*
* resp - responder role; init- initiator role
*
* CFG_FINE_TIME_MEAS_CAPABILITY_MAX computed based on the table
* +-----------------+-----------------+-----------+
* | Device Role | Initiator | Responder |
* +-----------------+-----------------+-----------+
* | Station | Y | N |
* | P2P-CLI | Y | Y |
* | P2P-GO | Y | Y |
* | SAP | N | Y |
* +-----------------+-----------------+-----------+
*
* Related: None
*
* Supported Feature: WIFI POS
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_FINE_TIME_MEAS_CAPABILITY CFG_INI_UINT( \
"gfine_time_meas_cap", \
0x0000, \
0x00BD, \
0x00BD, \
CFG_VALUE_OR_DEFAULT, \
"fine timing measurement capability")
#define CFG_WIFI_POS_ALL \
CFG(CFG_FINE_TIME_MEAS_CAPABILITY)
#endif /* __CFG_MLME_WIFI_POS_H */

Dosyayı Görüntüle

@@ -1644,6 +1644,14 @@ struct wlan_mlme_wep_cfg {
struct mlme_cfg_str wep_default_key_4;
};
/**
* struct wlan_mlme_wifi_pos_cfg - WIFI POS configs
* @fine_time_meas_cap: fine timing measurement capability information
*/
struct wlan_mlme_wifi_pos_cfg {
uint32_t fine_time_meas_cap;
};
/**
* struct wlan_mlme_cfg - MLME config items
* @chainmask_cfg: VHT chainmask related cfg items
@@ -1672,6 +1680,7 @@ struct wlan_mlme_wep_cfg {
* @acs: ACS related CFG items
* @feature_flags: Feature flag config items
* @wep_params: WEP related config items
* @wifi_pos_cfg: WIFI POS config
* @wmm_params: WMM related CFG & INI Items
* @wps_params: WPS related CFG itmes
*/
@@ -1704,6 +1713,7 @@ struct wlan_mlme_cfg {
struct wlan_mlme_acs acs;
struct wlan_mlme_feature_flag feature_flags;
struct wlan_mlme_wep_cfg wep_params;
struct wlan_mlme_wifi_pos_cfg wifi_pos_cfg;
struct wlan_mlme_wmm_params wmm_params;
struct wlan_mlme_wps_params wps_params;
};

Dosyayı Görüntüle

@@ -789,6 +789,28 @@ QDF_STATUS
ucfg_mlme_set_dfs_filter_offload(struct wlan_objmgr_psoc *psoc,
bool dfs_filter_offload);
/**
* ucfg_mlme_get_fine_time_meas_cap() - Get fine timing measurement capability
* @psoc: pointer to psoc object
* @fine_time_meas_cap: Pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_fine_time_meas_cap(struct wlan_objmgr_psoc *psoc,
uint32_t *fine_time_meas_cap);
/**
* ucfg_mlme_set_fine_time_meas_cap() - Set fine timing measurement capability
* @psoc: pointer to psoc object
* @fine_time_meas_cap: Value to be set
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_fine_time_meas_cap(struct wlan_objmgr_psoc *psoc,
uint32_t fine_time_meas_cap);
/**
* ucfg_mlme_get_pmkid_modes() - Get PMKID modes
* @psoc: pointer to psoc object

Dosyayı Görüntüle

@@ -206,6 +206,39 @@ ucfg_mlme_get_dfs_master_capability(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_fine_time_meas_cap(struct wlan_objmgr_psoc *psoc,
uint32_t *fine_time_meas_cap)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*fine_time_meas_cap =
cfg_default(CFG_FINE_TIME_MEAS_CAPABILITY);
return QDF_STATUS_E_INVAL;
}
*fine_time_meas_cap = mlme_obj->cfg.wifi_pos_cfg.fine_time_meas_cap;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_set_fine_time_meas_cap(struct wlan_objmgr_psoc *psoc,
uint32_t fine_time_meas_cap)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj)
return QDF_STATUS_E_INVAL;
mlme_obj->cfg.wifi_pos_cfg.fine_time_meas_cap = fine_time_meas_cap;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_dfs_disable_channel_switch(struct wlan_objmgr_psoc *psoc,
bool *dfs_disable_channel_switch)