Merge 166c36edd6 on remote branch
Change-Id: Ia90f36ef44825a93058e116f9a9f71d1c856f42d
This commit is contained in:
commit
399a6bb396
16 files changed
+116
-73
No files matched your search
@@ -1294,7 +1294,8 @@ WMI_OBJS := $(WMI_OBJ_DIR)/wmi_unified.o \
|
||||
$(WMI_OBJ_DIR)/wmi_unified_api.o \
|
||||
$(WMI_OBJ_DIR)/wmi_unified_reg_api.o \
|
||||
$(WMI_OBJ_DIR)/wmi_unified_vdev_api.o \
|
||||
$(WMI_OBJ_DIR)/wmi_unified_vdev_tlv.o
|
||||
$(WMI_OBJ_DIR)/wmi_unified_vdev_tlv.o \
|
||||
$(WMI_OBJ_DIR)/wmi_unified_crypto_api.o
|
||||
|
||||
ifeq ($(CONFIG_POWER_MANAGEMENT_OFFLOAD), y)
|
||||
WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_pmo_api.o
|
||||
|
||||
@@ -2359,6 +2359,9 @@ static void mlme_init_reg_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
&valid_channel_list_num);
|
||||
reg->valid_channel_list_num = (uint8_t)valid_channel_list_num;
|
||||
|
||||
reg->enable_nan_on_indoor_channels =
|
||||
cfg_get(psoc, CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN);
|
||||
|
||||
pdev = wlan_objmgr_get_pdev_by_id(psoc, 0, WLAN_MLME_NB_ID);
|
||||
if (!pdev) {
|
||||
mlme_legacy_err("null pdev");
|
||||
|
||||
@@ -104,6 +104,29 @@
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"enable/disable ETSI SRD channels in master mode")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* enable_nan_indoor_channel - Enable Indoor channels for NAN
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to support to indoor channels for NAN interface
|
||||
* Customer can config this item to enable/disable NAN in indoor channel
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: NAN
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN CFG_INI_BOOL( \
|
||||
"enable_nan_indoor_channel", \
|
||||
0, \
|
||||
"enable/disable indoor channels for NAN")
|
||||
|
||||
#ifdef SAP_AVOID_ACS_FREQ_LIST
|
||||
#define SAP_AVOID_ACS_FREQ_LIST_DEFAULT ""
|
||||
|
||||
@@ -334,6 +357,7 @@
|
||||
CFG(CFG_ENABLE_PENDING_CHAN_LIST_REQ) \
|
||||
CFG(CFG_ENABLE_11D_IN_WORLD_MODE) \
|
||||
CFG(CFG_ETSI_SRD_CHAN_IN_MASTER_MODE) \
|
||||
CFG(CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN) \
|
||||
CFG(CFG_RESTART_BEACONING_ON_CH_AVOID) \
|
||||
CFG(CFG_INDOOR_CHANNEL_SUPPORT) \
|
||||
CFG(CFG_SCAN_11D_INTERVAL) \
|
||||
|
||||
@@ -1926,6 +1926,17 @@ wlan_mlme_get_srd_master_mode_for_vdev(struct wlan_objmgr_psoc *psoc,
|
||||
enum QDF_OPMODE vdev_opmode,
|
||||
bool *value);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_indoor_support_for_nan - Get indoor channel support for NAN
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: pointer to the value which will be filled for the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_mlme_get_indoor_support_for_nan(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_vht_enable2x2() - Enables/disables VHT Tx/Rx MCS values for 2x2
|
||||
* @psoc: psoc context
|
||||
|
||||
@@ -2252,6 +2252,7 @@ enum mlme_reg_srd_master_modes {
|
||||
* @enable_pending_chan_list_req: enables/disables scan channel
|
||||
* list command to FW till the current scan is complete.
|
||||
* @retain_nol_across_regdmn_update: Retain the NOL list across the regdomain.
|
||||
* @enable_nan_on_indoor_channels: Enable nan on Indoor channels
|
||||
*/
|
||||
struct wlan_mlme_reg {
|
||||
uint32_t self_gen_frm_pwr;
|
||||
@@ -2272,6 +2273,7 @@ struct wlan_mlme_reg {
|
||||
bool ignore_fw_reg_offload_ind;
|
||||
bool enable_pending_chan_list_req;
|
||||
bool retain_nol_across_regdmn_update;
|
||||
bool enable_nan_on_indoor_channels;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -2985,6 +2985,24 @@ wlan_mlme_get_vht20_mcs9(struct wlan_objmgr_psoc *psoc, bool *value)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_mlme_get_indoor_support_for_nan(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
*value = false;
|
||||
mlme_legacy_err("Failed to get MLME Obj");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
*value = mlme_obj->cfg.reg.enable_nan_on_indoor_channels;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_mlme_get_srd_master_mode_for_vdev(struct wlan_objmgr_psoc *psoc,
|
||||
enum QDF_OPMODE vdev_opmode,
|
||||
|
||||
@@ -207,6 +207,18 @@ bool wlan_nan_get_sap_conc_support(struct wlan_objmgr_psoc *psoc);
|
||||
* Return: Cleanup NAN state upon NAN disable
|
||||
*/
|
||||
QDF_STATUS nan_disable_cleanup(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* wlan_is_nan_allowed_on_freq() - Check if NAN is allowed on given freq
|
||||
* @pdev: pdev context
|
||||
* @freq: Frequency to be checked
|
||||
*
|
||||
* Check if NAN/NDP can be enabled on given frequency.
|
||||
*
|
||||
* Return: True if NAN is allowed on the given frequency
|
||||
*/
|
||||
bool wlan_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq);
|
||||
|
||||
#else /* WLAN_FEATURE_NAN */
|
||||
static inline QDF_STATUS nan_init(void)
|
||||
{
|
||||
@@ -252,5 +264,11 @@ QDF_STATUS nan_disable_cleanup(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
static inline
|
||||
bool wlan_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_NAN */
|
||||
#endif /* _WLAN_NAN_API_H_ */
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2021 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
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "wlan_objmgr_pdev_obj.h"
|
||||
#include "wlan_objmgr_vdev_obj.h"
|
||||
#include "nan_ucfg_api.h"
|
||||
#include <wlan_mlme_api.h>
|
||||
|
||||
static QDF_STATUS nan_psoc_obj_created_notification(
|
||||
struct wlan_objmgr_psoc *psoc, void *arg_list)
|
||||
@@ -414,3 +415,24 @@ QDF_STATUS nan_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool wlan_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq)
|
||||
{
|
||||
bool nan_allowed = true;
|
||||
|
||||
/* Check for SRD channels */
|
||||
if (wlan_reg_is_etsi13_srd_chan_for_freq(pdev, freq))
|
||||
wlan_mlme_get_srd_master_mode_for_vdev(wlan_pdev_get_psoc(pdev),
|
||||
QDF_NAN_DISC_MODE,
|
||||
&nan_allowed);
|
||||
|
||||
/* Check for Indoor channels */
|
||||
if (wlan_reg_is_freq_indoor(pdev, freq))
|
||||
wlan_mlme_get_indoor_support_for_nan(wlan_pdev_get_psoc(pdev),
|
||||
&nan_allowed);
|
||||
/* Check for dfs only if channel is not indoor */
|
||||
else if (wlan_reg_is_dfs_for_freq(pdev, freq))
|
||||
nan_allowed = false;
|
||||
|
||||
return nan_allowed;
|
||||
}
|
||||
@@ -1276,15 +1276,5 @@ QDF_STATUS ucfg_nan_disable_ind_to_userspace(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
bool ucfg_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq)
|
||||
{
|
||||
bool nan_allowed = false;
|
||||
|
||||
/* Check for SRD channels only */
|
||||
if (!wlan_reg_is_etsi13_srd_chan_for_freq(pdev, freq))
|
||||
return true;
|
||||
|
||||
wlan_mlme_get_srd_master_mode_for_vdev(wlan_pdev_get_psoc(pdev),
|
||||
QDF_NAN_DISC_MODE,
|
||||
&nan_allowed);
|
||||
|
||||
return nan_allowed;
|
||||
return wlan_is_nan_allowed_on_freq(pdev, freq);
|
||||
}
|
||||
@@ -4035,7 +4035,8 @@ static QDF_STATUS wlan_hdd_set_key_helper(struct hdd_adapter *adapter,
|
||||
if (!vdev)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
ret = wlan_cfg80211_crypto_add_key(vdev,
|
||||
WLAN_CRYPTO_KEY_TYPE_UNICAST, 0);
|
||||
WLAN_CRYPTO_KEY_TYPE_UNICAST, 0,
|
||||
false);
|
||||
hdd_objmgr_put_vdev(vdev);
|
||||
if (ret != 0) {
|
||||
hdd_err("crypto add key fail, status: %d", ret);
|
||||
|
||||
@@ -17507,7 +17507,7 @@ static int wlan_hdd_add_key_ibss(struct hdd_adapter *adapter,
|
||||
if (!vdev)
|
||||
return -EINVAL;
|
||||
errno = wlan_cfg80211_crypto_add_key(vdev, WLAN_CRYPTO_KEY_TYPE_GROUP,
|
||||
key_index);
|
||||
key_index, false);
|
||||
if (errno) {
|
||||
hdd_err("add_ibss_key failed, errno: %d", errno);
|
||||
hdd_objmgr_put_vdev(vdev);
|
||||
@@ -17572,10 +17572,11 @@ static int wlan_hdd_add_key_sap(struct hdd_adapter *adapter,
|
||||
|
||||
if (hostapd_state->bss_state == BSS_START) {
|
||||
errno =
|
||||
wlan_cfg80211_crypto_add_key(vdev, (pairwise ?
|
||||
WLAN_CRYPTO_KEY_TYPE_UNICAST :
|
||||
WLAN_CRYPTO_KEY_TYPE_GROUP),
|
||||
key_index);
|
||||
wlan_cfg80211_crypto_add_key(vdev,
|
||||
(pairwise ?
|
||||
WLAN_CRYPTO_KEY_TYPE_UNICAST :
|
||||
WLAN_CRYPTO_KEY_TYPE_GROUP),
|
||||
key_index, true);
|
||||
if (!errno)
|
||||
wma_update_set_key(adapter->vdev_id, pairwise,
|
||||
key_index, cipher);
|
||||
@@ -17608,7 +17609,7 @@ static int wlan_hdd_add_key_sta(struct hdd_adapter *adapter,
|
||||
errno = wlan_cfg80211_crypto_add_key(vdev, (pairwise ?
|
||||
WLAN_CRYPTO_KEY_TYPE_UNICAST :
|
||||
WLAN_CRYPTO_KEY_TYPE_GROUP),
|
||||
key_index);
|
||||
key_index, true);
|
||||
hdd_objmgr_put_vdev(vdev);
|
||||
if (!errno && adapter->send_mode_change) {
|
||||
wlan_hdd_send_mode_change_event();
|
||||
@@ -17994,7 +17995,7 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
|
||||
wlan_cfg80211_crypto_add_key(adapter->vdev, (unicast ?
|
||||
WLAN_CRYPTO_KEY_TYPE_UNICAST :
|
||||
WLAN_CRYPTO_KEY_TYPE_GROUP),
|
||||
key_index);
|
||||
key_index, true);
|
||||
wma_update_set_key(adapter->vdev_id, unicast, key_index,
|
||||
crypto_key->cipher_type);
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
#define QWLAN_VERSION_MAJOR 5
|
||||
#define QWLAN_VERSION_MINOR 2
|
||||
#define QWLAN_VERSION_PATCH 022
|
||||
#define QWLAN_VERSION_EXTRA "F"
|
||||
#define QWLAN_VERSION_EXTRA "I"
|
||||
#define QWLAN_VERSION_BUILD 8
|
||||
|
||||
#define QWLAN_VERSIONSTR "5.2.022.8F"
|
||||
#define QWLAN_VERSIONSTR "5.2.022.8I"
|
||||
|
||||
#endif /* QWLAN_VERSION_H */
|
||||
@@ -956,10 +956,6 @@ void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id,
|
||||
uint8_t *hostv4addr, uint8_t *destv4addr,
|
||||
uint8_t *destmac);
|
||||
|
||||
int wma_vdev_install_key_complete_event_handler(void *handle,
|
||||
uint8_t *event,
|
||||
uint32_t len);
|
||||
|
||||
/**
|
||||
* wma_objmgr_set_peer_mlme_phymode() - set phymode to peer object
|
||||
* @wma: wma handle
|
||||
|
||||
@@ -3234,12 +3234,6 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
|
||||
wma_handle->staDynamicDtim =
|
||||
ucfg_pmo_get_sta_dynamic_dtim(wma_handle->psoc);
|
||||
|
||||
/* register for install key completion event */
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
wmi_vdev_install_key_complete_event_id,
|
||||
wma_vdev_install_key_complete_event_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
|
||||
#ifdef WLAN_FEATURE_STATS_EXT
|
||||
/* register for extended stats event */
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
|
||||
@@ -836,45 +836,6 @@ void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id,
|
||||
wmi_unified_set_sta_keep_alive_cmd(wma->wmi_handle, ¶ms);
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_vdev_install_key_complete_event_handler() - install key complete handler
|
||||
* @handle: wma handle
|
||||
* @event: event data
|
||||
* @len: data length
|
||||
*
|
||||
* This event is sent by fw once WPA/WPA2 keys are installed in fw.
|
||||
*
|
||||
* Return: 0 for success or error code
|
||||
*/
|
||||
int wma_vdev_install_key_complete_event_handler(void *handle,
|
||||
uint8_t *event,
|
||||
uint32_t len)
|
||||
{
|
||||
WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID_param_tlvs *param_buf = NULL;
|
||||
wmi_vdev_install_key_complete_event_fixed_param *key_fp = NULL;
|
||||
|
||||
if (!event) {
|
||||
WMA_LOGE("%s: event param null", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
param_buf = (WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID_param_tlvs *) event;
|
||||
if (!param_buf) {
|
||||
WMA_LOGE("%s: received null buf from target", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
key_fp = param_buf->fixed_param;
|
||||
if (!key_fp) {
|
||||
WMA_LOGE("%s: received null event data from target", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
/*
|
||||
* Do nothing for now. Completion of set key is already indicated to lim
|
||||
*/
|
||||
wma_debug("WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID");
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* 802.11n D2.0 defined values for "Minimum MPDU Start Spacing":
|
||||
* 0 for no restriction
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2018, 2021 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
|
||||
@@ -73,6 +73,7 @@
|
||||
#define A_PRINTF(args ...) \
|
||||
QDF_TRACE_ERROR(QDF_MODULE_ID_QDF, args)
|
||||
#define A_SNPRINTF(buf, len, args ...) snprintf(buf, len, args)
|
||||
#define A_OFFSETOF(type, field) offsetof(type, field)
|
||||
|
||||
/*
|
||||
* Timer Functions
|
||||
|
||||
Reference in new issue
Block a user