Merge tag 'MMI-T2SN33.73-22-3' of https://github.com/MotorolaMobilityLLC/vendor-qcom-opensource-wlan-qcacld-3.0 into lineage-20
"Devon push for Android 13" * tag 'MMI-T2SN33.73-22-3' of https://github.com/MotorolaMobilityLLC/vendor-qcom-opensource-wlan-qcacld-3.0: qcacld-3.0: Ignore CSA request for invalid channel Revert "qcacld-3.0: Fix OOB issue when access wma_find_vdev_by_addr" qcacld-3.0: Fix OOB issue when access wma_find_vdev_by_addr qcacld-3.0: Fix OOB in wma_scan_roam.c qcacld-3.0: Success return from dynamic nss chain support check for 1x1 Report the actual link speed by default qcacld-3.0: Update VHT IE with highest supported LGI rate qcacld-3.0: Reset the wiphy suspended flag at the end of SSR Export correct ELF file for Odessa Support loading moto specific ini configurations qcacld-3.0: Advertise Adaptive 11R supported feature to user space Handle invalid TWT value correctly. qcacld-3.0: Validate TWT setup cmd/request type value Revert "(CR) use bt_coex_mode_set to deterministically signify the DHCP start / Stop" fix wlan fw path error prop (CR)-Fill the MAC address more appropriately lito: Update FW version for R - Update wifimacaddr command line arg add wifi tx pwr limit cmd for mimo device use bt_coex_mode_set to deterministically signify the DHCP start / Stop Store WLAN Unstripped and ELF in build archives Disable CH14 for JAPAN Prop (CR): Store WLAN Unstripped in build archives generate 2 mac address based on serial number demsg error logs cleaup prop (CR) Dont initialise ACL list Restructure (CR): Use copy_from_user function get correct tx power from ioctl Prop (CR) WLAN Clark Enable extended iwpriv cmnds prop (CR)-Allow ioctl called from Motcode (CR):Not able to disconnect any connected device Fix iwpriv panic prop (CR): Add new sysfs entries for SAR cutback Resolve compilation issues update NOTICE for vendor/qcom/opensource/wlan/qcacld-3.0$ prop (CR)-Support STA+MHS concurrency mode Rework reading MAC address from UTAG WLAN: Implement reading of MAC address from UTAG for sm6150 prop (CR)-Support for 12M WLAN Radiated Power test Change-Id: If34d1ac59e6ed2eb1baf7437e4ea23284ee5cfb7
This commit is contained in:
18 files changed
+663
-65
No files matched your search
@@ -132,6 +132,37 @@ ifneq ($(WLAN_CFG_OVERRIDE_$(LOCAL_DEV_NAME)),)
|
||||
KBUILD_OPTIONS += WLAN_CFG_OVERRIDE="$(WLAN_CFG_OVERRIDE_$(LOCAL_DEV_NAME))"
|
||||
endif
|
||||
|
||||
##########################################################
|
||||
# Copy the unstrip file and corresponding elf file to out symbols folders
|
||||
WLAN_SYMBOLS_OUT := $(TARGET_OUT_UNSTRIPPED)/$(LOCAL_PATH)
|
||||
UNSTRIPPED_MODULE := $(WLAN_CHIPSET)_$(LOCAL_DEV_NAME).ko.unstripped
|
||||
UNSTRIPPED_FILE_PATH := $(TARGET_OUT_INTERMEDIATES)/$(LOCAL_PATH)/$(UNSTRIPPED_MODULE)
|
||||
|
||||
INSTALL_WLAN_UNSTRIPPED_MODULE := mkdir -p $(WLAN_SYMBOLS_OUT); \
|
||||
cp -rf $(UNSTRIPPED_FILE_PATH) $(WLAN_SYMBOLS_OUT);
|
||||
|
||||
ifneq ($(filter msm8998 sdm845 sdm670 sdm710, $(TARGET_BOARD_PLATFORM)),)
|
||||
WLAN_ELF_FILE_PATH := vendor/qcom/nonhlos/wlan_proc/build/ms/WLAN_MERGED.elf
|
||||
else ifneq ($(filter sdm660, $(TARGET_BOARD_PLATFORM)),)
|
||||
WLAN_ELF_FILE_PATH := vendor/qcom/nonhlos/WLAN.HL.1.0.1/wlan_proc/build/ms/WLAN_MERGED.elf
|
||||
else ifneq ($(filter sm6150, $(TARGET_BOARD_PLATFORM)),)
|
||||
ifeq ($(WLAN_FW_ALT_AT43), true)
|
||||
WLAN_ELF_FILE_PATH := vendor/qcom/nonhlos/WLAN.HL.3.0.1/wlan_proc/build/ms/*.elf
|
||||
else
|
||||
WLAN_ELF_FILE_PATH := vendor/qcom/nonhlos/WLAN.HL.3.2.2/wlan_proc/build/ms/*.elf
|
||||
endif
|
||||
else ifneq ($(filter trinket, $(TARGET_BOARD_PLATFORM)),)
|
||||
WLAN_ELF_FILE_PATH := vendor/qcom/nonhlos/WLAN.HL.3.0.2/wlan_proc/build/ms/WLAN_MERGED.elf
|
||||
else ifneq ($(filter lito, $(TARGET_BOARD_PLATFORM)),)
|
||||
WLAN_ELF_FILE_PATH := vendor/qcom/nonhlos/WLAN.HL.3.3.1/wlan_proc/build/ms/Msaipan_WLAN_MERGED.elf
|
||||
else ifneq ($(filter bengal, $(TARGET_BOARD_PLATFORM)),)
|
||||
WLAN_ELF_FILE_PATH := vendor/qcom/nonhlos/WLAN.HL.3.2.4/wlan_proc/build/ms/WLAN_MERGED.elf
|
||||
endif
|
||||
|
||||
ifneq ($(WLAN_ELF_FILE_PATH),)
|
||||
INSTALL_WLAN_UNSTRIPPED_MODULE += cp -rf $(WLAN_ELF_FILE_PATH) $(WLAN_SYMBOLS_OUT)
|
||||
endif
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := $(WLAN_CHIPSET)_$(LOCAL_DEV_NAME).ko
|
||||
LOCAL_MODULE_KBUILD_NAME := $(LOCAL_MOD_NAME).ko
|
||||
@@ -146,6 +177,9 @@ else
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/modules/$(WLAN_CHIPSET)
|
||||
endif
|
||||
|
||||
# Once unstripped file is generated, copy the same to out symbols folder
|
||||
LOCAL_POST_INSTALL_CMD := $(INSTALL_WLAN_UNSTRIPPED_MODULE)
|
||||
|
||||
include $(DLKM_DIR)/AndroidKernelModule.mk
|
||||
###########################################################
|
||||
|
||||
@@ -170,6 +204,11 @@ endif
|
||||
|
||||
$(shell mkdir -p $(TARGET_FW_PATH); \
|
||||
ln -sf $(TARGET_MAC_BIN_PATH)/wlan_mac.bin $(TARGET_FW_PATH)/wlan_mac.bin)
|
||||
|
||||
# BEGIN IKSWR-45692, support loading moto specific configurations
|
||||
$(shell ln -sf $(TARGET_CFG_PATH)/WCNSS_mot_cfg.ini $(TARGET_FW_PATH)/WCNSS_mot_cfg.ini)
|
||||
# END IKSWR-45692
|
||||
|
||||
ifneq ($(GENERIC_ODM_IMAGE),true)
|
||||
$(shell ln -sf $(TARGET_CFG_PATH)/WCNSS_qcom_cfg.ini $(TARGET_FW_PATH)/WCNSS_qcom_cfg.ini)
|
||||
endif
|
||||
|
||||
@@ -2701,6 +2701,13 @@ cppflags-$(CONFIG_QCA_WIFI_FTM) += -DQCA_WIFI_FTM
|
||||
cppflags-$(CONFIG_NL80211_TESTMODE) += -DQCA_WIFI_FTM_NL80211
|
||||
cppflags-$(CONFIG_LINUX_QCMBR) += -DLINUX_QCMBR -DQCA_WIFI_FTM_IOCTL
|
||||
|
||||
# WLAN_WHITE_LIST - WLAN Radiated Power Test
|
||||
# For user software build, wlan driver needs to allow the factory
|
||||
# commnds only for Tx_opcode and NART commands based off 12M doc
|
||||
ifeq ($(TARGET_BUILD_VARIANT),user)
|
||||
CDEFINES += -DWLAN_WHITE_LIST
|
||||
endif
|
||||
|
||||
#Enable Checksum Offload support
|
||||
cppflags-$(CONFIG_CHECKSUM_OFFLOAD) += -DCHECKSUM_OFFLOAD
|
||||
|
||||
@@ -3018,6 +3025,8 @@ cppflags-$(CONFIG_WLAN_HANG_EVENT) += -DHIF_BUS_LOG_INFO
|
||||
cppflags-$(CONFIG_WLAN_HANG_EVENT) += -DDP_SUPPORT_RECOVERY_NOTIFY
|
||||
#endof dummy flags
|
||||
|
||||
cppflags-y += -DMOTO_UTAGS_MAC
|
||||
|
||||
ccflags-$(CONFIG_ENABLE_SIZE_OPTIMIZE) += -Os
|
||||
|
||||
# DFS component
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
|
||||
|
||||
Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
|
||||
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.
|
||||
|
||||
This file was originally distributed by Qualcomm Atheros, Inc.
|
||||
under proprietary terms before Copyright ownership was assigned
|
||||
to the Linux Foundation.
|
||||
@@ -97,7 +97,7 @@ enum mlme_stats_link_speed_rpt_type {
|
||||
"gReportMaxLinkSpeed", \
|
||||
CFG_STATS_LINK_SPEED_REPORT_ACTUAL, \
|
||||
CFG_STATS_LINK_SPEED_REPORT_MAX_SCALED, \
|
||||
CFG_STATS_LINK_SPEED_REPORT_MAX_SCALED, \
|
||||
CFG_STATS_LINK_SPEED_REPORT_ACTUAL, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Max link speed")
|
||||
|
||||
|
||||
@@ -113,16 +113,16 @@
|
||||
#define CFG_VHT_RX_SUPP_DATA_RATE CFG_UINT( \
|
||||
"rx_supp_data_rate", \
|
||||
0, \
|
||||
866, \
|
||||
866, \
|
||||
780, \
|
||||
780, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"VHT RX SUPP DATA RATE")
|
||||
|
||||
#define CFG_VHT_TX_SUPP_DATA_RATE CFG_UINT( \
|
||||
"tx_supp_data_rate", \
|
||||
0, \
|
||||
866, \
|
||||
866, \
|
||||
780, \
|
||||
780, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"VHT TX SUPP DATA RATE")
|
||||
|
||||
|
||||
@@ -1179,6 +1179,16 @@ ucfg_mlme_is_roam_scan_offload_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_tgt_adaptive_11r_cap(struct wlan_objmgr_psoc *psoc,
|
||||
bool val);
|
||||
/**
|
||||
* ucfg_mlme_get_adaptive11r_enabled() - get adaptive 11R enabled status
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: pointer to the value which will be filled for the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_adaptive11r_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
ucfg_mlme_set_tgt_adaptive_11r_cap(struct wlan_objmgr_psoc *psoc,
|
||||
@@ -1186,6 +1196,14 @@ ucfg_mlme_set_tgt_adaptive_11r_cap(struct wlan_objmgr_psoc *psoc,
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
ucfg_mlme_get_adaptive11r_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value)
|
||||
{
|
||||
*value = false;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -896,6 +896,22 @@ ucfg_mlme_set_tgt_adaptive_11r_cap(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_adaptive11r_enabled(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
*val = cfg_default(CFG_ADAPTIVE_11R);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
*val = mlme_obj->cfg.lfr.enable_adaptive_11r;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS
|
||||
|
||||
@@ -89,6 +89,9 @@ struct channel_list_info {
|
||||
|
||||
#define WE_SET_THERMAL_THROTTLE_CFG 27
|
||||
|
||||
/* for moto SAR features, support tx pwr limit settings on mimo device */
|
||||
#define WE_SET_MIMO_TX_POWER 32
|
||||
|
||||
#define WE_P2P_NOA_CMD 2
|
||||
|
||||
#define QCSAP_IOCTL_MODIFY_ACL (SIOCIWFIRSTPRIV + 18)
|
||||
|
||||
@@ -267,6 +267,11 @@ struct hdd_config {
|
||||
eCsrRoamWmmUserModeType hdd_to_csr_wmm_mode(uint8_t mode);
|
||||
|
||||
QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx);
|
||||
#ifdef MOTO_UTAGS_MAC
|
||||
QDF_STATUS hdd_update_mac_serial(struct hdd_context *hdd_ctx);
|
||||
QDF_STATUS hdd_generate_random_mac_from_serialno(char *serialNo,
|
||||
int serialength, char *computedMac);
|
||||
#endif
|
||||
QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx);
|
||||
QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx);
|
||||
QDF_STATUS hdd_set_sme_chan_list(struct hdd_context *hdd_ctx);
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
#ifdef MSM_PLATFORM
|
||||
#define WLAN_INI_FILE "wlan/qca_cld/" PREFIX "WCNSS_qcom_cfg.ini"
|
||||
#define WLAN_MAC_FILE "wlan/qca_cld/" PREFIX "wlan_mac.bin"
|
||||
// BEGIN IKSWR-45692, support loading moto specific configurations
|
||||
#define WLAN_MOT_INI_FILE "wlan/qca_cld/" PREFIX "WCNSS_mot_cfg.ini"
|
||||
// END IKSWR-45692
|
||||
#else
|
||||
#define WLAN_INI_FILE "wlan/" PREFIX "qcom_cfg.ini"
|
||||
#define WLAN_MAC_FILE "wlan/" PREFIX "wlan_mac.bin"
|
||||
|
||||
Regular → Executable
+247
-2
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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
|
||||
@@ -49,6 +50,153 @@
|
||||
#include "hdd_dp_cfg.h"
|
||||
#include "wlan_hdd_object_manager.h"
|
||||
|
||||
#ifdef MOTO_UTAGS_MAC
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <crypto/md5.h>
|
||||
#include <crypto/hash.h>
|
||||
|
||||
#define WIFI_MAC_BOOTARG "wifimacaddr="
|
||||
#define DEVICE_SERIALNO_BOOTARG "androidboot.serialno="
|
||||
#define MACSTRLEN 12
|
||||
|
||||
struct sdesc {
|
||||
struct shash_desc shash;
|
||||
char ctx[];
|
||||
};
|
||||
|
||||
QDF_STATUS hdd_update_mac_serial(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
|
||||
int len = 0;
|
||||
int serialnoLen = 0;
|
||||
|
||||
char *buffer = NULL;
|
||||
char *bufferPtr = NULL;
|
||||
char *computedMac = NULL;
|
||||
const char *cmd_line = NULL;
|
||||
tSirMacAddr mac_addr;
|
||||
|
||||
struct device_node *chosen_node = NULL;
|
||||
computedMac = (char*)qdf_mem_malloc(QDF_MAC_ADDR_SIZE);
|
||||
|
||||
chosen_node = of_find_node_by_name(NULL, "chosen");
|
||||
hdd_err("%s: get chosen node \n", __func__);
|
||||
|
||||
if (!chosen_node)
|
||||
{
|
||||
hdd_err("%s: get chosen node read failed \n", __func__);
|
||||
goto config_exit;
|
||||
} else {
|
||||
cmd_line = of_get_property(chosen_node, "bootargs", &len);
|
||||
if (!cmd_line || len <= 0) {
|
||||
hdd_err("%s: get the barcode bootargs failed \n", __func__);
|
||||
qdf_status = QDF_STATUS_E_FAILURE;
|
||||
goto config_exit;
|
||||
} else {
|
||||
buffer = strstr(cmd_line, DEVICE_SERIALNO_BOOTARG);
|
||||
if (buffer == NULL) {
|
||||
hdd_err("%s: " DEVICE_SERIALNO_BOOTARG" not present cmd line argc",
|
||||
__func__);
|
||||
qdf_status = QDF_STATUS_E_FAILURE;
|
||||
goto config_exit;
|
||||
} else {
|
||||
buffer += strlen(DEVICE_SERIALNO_BOOTARG);
|
||||
bufferPtr = buffer;
|
||||
while (*bufferPtr != ' ') {
|
||||
bufferPtr++;
|
||||
serialnoLen = serialnoLen + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*Data have been read from boot serial no */
|
||||
/*Now generate random unique the 6 byte string */
|
||||
if (hdd_generate_random_mac_from_serialno(buffer, serialnoLen,
|
||||
computedMac) != QDF_STATUS_SUCCESS) {
|
||||
qdf_status = QDF_STATUS_E_FAILURE;
|
||||
goto config_exit;
|
||||
}
|
||||
qdf_mem_copy(&hdd_ctx->provisioned_mac_addr[0].bytes[0],
|
||||
(uint8_t *)computedMac, QDF_MAC_ADDR_SIZE);
|
||||
qdf_mem_copy(&mac_addr, &hdd_ctx->provisioned_mac_addr[0].bytes[0],
|
||||
sizeof(tSirMacAddr));
|
||||
hdd_ctx->num_provisioned_addr = 1; // Only one address was generated
|
||||
hdd_populate_random_mac_addr(hdd_ctx, QDF_MAX_CONCURRENCY_PERSONA - 1);
|
||||
sme_set_custom_mac_addr(mac_addr);
|
||||
config_exit:
|
||||
qdf_mem_free(computedMac);
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
QDF_STATUS hdd_generate_random_mac_from_serialno(char *serialNo, int serialnoLen,
|
||||
char *macAddr)
|
||||
{
|
||||
unsigned int size;
|
||||
struct crypto_shash *md5;
|
||||
struct sdesc *sdescmd5;
|
||||
char *hashBuf = NULL;
|
||||
|
||||
QDF_STATUS cryptoStatus = QDF_STATUS_SUCCESS;
|
||||
hashBuf = (char*)qdf_mem_malloc(16);
|
||||
|
||||
/*Motorola OUI*/
|
||||
macAddr[0] = 0x38;
|
||||
macAddr[1] = 0x80;
|
||||
macAddr[2] = 0xDF;
|
||||
|
||||
md5 = crypto_alloc_shash("md5", 0, 0);
|
||||
if (IS_ERR(md5)) {
|
||||
cryptoStatus = QDF_STATUS_E_FAILURE;
|
||||
hdd_err("%s: Crypto md5 allocation error \n", __func__);
|
||||
qdf_mem_free(hashBuf);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
size = sizeof(struct shash_desc) + crypto_shash_descsize(md5);
|
||||
|
||||
sdescmd5 = kmalloc(size, GFP_KERNEL);
|
||||
if (!sdescmd5) {
|
||||
cryptoStatus = QDF_STATUS_E_FAILURE;
|
||||
hdd_err("%s: Memory allocation error \n", __func__);
|
||||
goto crypto_hash_err;
|
||||
}
|
||||
|
||||
sdescmd5->shash.tfm = md5;
|
||||
sdescmd5->shash.flags = 0x0;
|
||||
|
||||
if (crypto_shash_init(&sdescmd5->shash)) {
|
||||
cryptoStatus = QDF_STATUS_E_FAILURE;
|
||||
goto crypto_hash_err;
|
||||
}
|
||||
|
||||
if (crypto_shash_update(&sdescmd5->shash, serialNo, serialnoLen)) {
|
||||
cryptoStatus = QDF_STATUS_E_FAILURE;
|
||||
goto crypto_hash_err;
|
||||
}
|
||||
|
||||
if (crypto_shash_final(&sdescmd5->shash, &hashBuf[0])) {
|
||||
cryptoStatus = QDF_STATUS_E_FAILURE;
|
||||
goto crypto_hash_err;
|
||||
}
|
||||
|
||||
macAddr[3] = hashBuf[0];
|
||||
macAddr[4] = hashBuf[1];
|
||||
macAddr[5] = hashBuf[2];
|
||||
|
||||
hdd_err("%02X:%02X:%02X:%02X:%02X:%02X is the new MAC generated from serial number \n", macAddr[0],
|
||||
macAddr[1], macAddr[2], macAddr[3],
|
||||
macAddr[4], macAddr[5]);
|
||||
crypto_hash_err:
|
||||
qdf_mem_free(hashBuf);
|
||||
crypto_free_shash(md5);
|
||||
kfree(sdescmd5);
|
||||
|
||||
return cryptoStatus;
|
||||
}
|
||||
#else
|
||||
|
||||
/**
|
||||
* get_next_line() - find and locate the new line pointer
|
||||
* @str: pointer to string
|
||||
@@ -126,6 +274,8 @@ static char *i_trim(char *str)
|
||||
return str;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/** struct hdd_cfg_entry - ini configuration entry
|
||||
* @name: name of the entry
|
||||
* @value: value of the entry
|
||||
@@ -226,6 +376,7 @@ static void hdd_set_power_save_offload_config(struct hdd_context *hdd_ctx)
|
||||
* Return: QDF_STATUS_SUCCESS if the MAC address is found from cfg file
|
||||
* and overwritten, otherwise QDF_STATUS_E_INVAL
|
||||
*/
|
||||
#ifndef MOTO_UTAGS_MAC
|
||||
QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
int status, i = 0;
|
||||
@@ -339,6 +490,100 @@ config_exit:
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
#else
|
||||
QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
int len = 0;
|
||||
int i = 0;
|
||||
int intf = 0;
|
||||
char *bufferPtr = NULL;
|
||||
char name[QDF_MAX_CONCURRENCY_PERSONA][16] = {{0}};
|
||||
char buffer_temp[QDF_MAX_CONCURRENCY_PERSONA][MACSTRLEN+1] = {{0}};
|
||||
const char *cmd_line = NULL;
|
||||
struct device_node *chosen_node = NULL;
|
||||
char *buffer = NULL;
|
||||
|
||||
struct hdd_cfg_entry macTable[QDF_MAX_CONCURRENCY_PERSONA];
|
||||
tSirMacAddr customMacAddr;
|
||||
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
|
||||
memset(macTable, 0, sizeof(macTable));
|
||||
|
||||
/*Implemenation of QCOM is to read the MAC address from the predefined*/
|
||||
/*location where WLAN MMAC File have the MAC Address */
|
||||
/* Read MACs from bootparams. */
|
||||
chosen_node = of_find_node_by_name(NULL, "chosen");
|
||||
hdd_err("%s: get chosen node \n", __func__);
|
||||
if (!chosen_node)
|
||||
{
|
||||
hdd_err("%s: get chosen node read failed \n", __func__);
|
||||
goto config_exit;
|
||||
} else {
|
||||
cmd_line = of_get_property(chosen_node, "bootargs", &len);
|
||||
|
||||
if (!cmd_line || len <= 0) {
|
||||
hdd_err("%s: get wlan MACs bootargs failed \n", __func__);
|
||||
qdf_status = QDF_STATUS_E_FAILURE;
|
||||
goto config_exit;
|
||||
} else {
|
||||
buffer = strstr(cmd_line, WIFI_MAC_BOOTARG);
|
||||
if (buffer == NULL) {
|
||||
hdd_err("%s: " WIFI_MAC_BOOTARG " bootarg cmd line is null", __func__);
|
||||
qdf_status = QDF_STATUS_E_FAILURE;
|
||||
goto config_exit;
|
||||
} else {
|
||||
buffer += strlen(WIFI_MAC_BOOTARG);
|
||||
bufferPtr = buffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Mac address data format used by qcom:
|
||||
* Intf0MacAddress=00AA00BB00CC
|
||||
* Intf1MacAddress=00AA00BB00CD
|
||||
* xxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
* Intf0MacAddress used for 1 macaddress
|
||||
* if gp2pdeviceAdmistered is set to 1
|
||||
* if s020deviceAdmisnited is set to 0
|
||||
* it will use Intf1MacAddress for P2P seprately
|
||||
* Motorola decided to use gp2pdeviceAdmistered = 1 i.e use
|
||||
* locally gerated bin MAC addr for P2P
|
||||
* From bootarg we need to strip off : from macaddress
|
||||
*/
|
||||
while (*bufferPtr != '\0' && *bufferPtr != ' ') {
|
||||
if (*bufferPtr != ':' && *bufferPtr != ',') {
|
||||
buffer_temp[intf][i++] = *bufferPtr;
|
||||
if (i == MACSTRLEN) {
|
||||
buffer_temp[intf][i] = '\0';
|
||||
sprintf(name[intf], "Intf%dMacAddress", intf);
|
||||
macTable[intf].name = name[intf];
|
||||
macTable[intf].value = buffer_temp[intf];
|
||||
i = 0;
|
||||
intf++;
|
||||
hdd_ctx->num_provisioned_addr++;
|
||||
if (intf >= QDF_MAX_CONCURRENCY_PERSONA)
|
||||
break;
|
||||
}
|
||||
}
|
||||
bufferPtr++;
|
||||
}
|
||||
|
||||
for (i = 0; i < intf; i++)
|
||||
hdd_err("Mac address table from utag: [%s][%s]", macTable[i].name, macTable[i].value);
|
||||
|
||||
update_mac_from_string(hdd_ctx, &macTable[0], intf);
|
||||
hdd_populate_random_mac_addr(hdd_ctx, QDF_MAX_CONCURRENCY_PERSONA - intf);
|
||||
qdf_mem_copy(&customMacAddr, &hdd_ctx->provisioned_mac_addr[0].bytes[0],
|
||||
sizeof(tSirMacAddr));
|
||||
sme_set_custom_mac_addr(customMacAddr);
|
||||
|
||||
config_exit:
|
||||
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hdd_disable_runtime_pm() - Override to disable runtime_pm.
|
||||
* @cfg_ini: Handle to struct hdd_config
|
||||
@@ -1118,7 +1363,7 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t tx_nss,
|
||||
adapter->vdev_id);
|
||||
if (!bval) {
|
||||
hdd_err("Nss in 1x1, no change required, 2x2 mode disabled");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
for (band = NSS_CHAINS_BAND_2GHZ; band < NSS_CHAINS_BAND_MAX;
|
||||
|
||||
@@ -263,7 +263,7 @@ static const struct ieee80211_channel hdd_channels_2_4_ghz[] = {
|
||||
HDD2GHZCHAN(2462, 11, 0),
|
||||
HDD2GHZCHAN(2467, 12, 0),
|
||||
HDD2GHZCHAN(2472, 13, 0),
|
||||
HDD2GHZCHAN(2484, 14, 0),
|
||||
|
||||
};
|
||||
|
||||
static const struct ieee80211_channel hdd_channels_5_ghz[] = {
|
||||
@@ -1937,7 +1937,7 @@ static int wlan_hdd_set_acs_ch_range(
|
||||
sap_cfg->acs_cfg.start_ch_freq =
|
||||
wlan_reg_ch_to_freq(CHAN_ENUM_2412);
|
||||
sap_cfg->acs_cfg.end_ch_freq =
|
||||
wlan_reg_ch_to_freq(CHAN_ENUM_2484);
|
||||
wlan_reg_ch_to_freq(CHAN_ENUM_2472);
|
||||
} else if (hw_mode == QCA_ACS_MODE_IEEE80211G) {
|
||||
sap_cfg->acs_cfg.hw_mode = eCSR_DOT11_MODE_11g;
|
||||
sap_cfg->acs_cfg.start_ch_freq =
|
||||
@@ -4017,6 +4017,16 @@ __wlan_hdd_cfg80211_get_features(struct wiphy *wiphy,
|
||||
wlan_hdd_cfg80211_set_feature(feature_flags,
|
||||
QCA_WLAN_VENDOR_FEATURE_OCE_STA_CFON);
|
||||
|
||||
value = false;
|
||||
status = ucfg_mlme_get_adaptive11r_enabled(hdd_ctx->psoc, &value);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
hdd_err("could not get FT-Adaptive 11R info");
|
||||
if (value) {
|
||||
hdd_debug("FT-Adaptive 11R is Enabled");
|
||||
wlan_hdd_cfg80211_set_feature(feature_flags,
|
||||
QCA_WLAN_VENDOR_FEATURE_ADAPTIVE_11R);
|
||||
}
|
||||
|
||||
ucfg_mlme_get_twt_requestor(hdd_ctx->psoc, &twt_req);
|
||||
ucfg_mlme_get_twt_responder(hdd_ctx->psoc, &twt_res);
|
||||
|
||||
|
||||
Regular → Executable
+4
-4
@@ -335,8 +335,8 @@ void wlan_hdd_debugfs_csr_init(struct hdd_adapter *adapter)
|
||||
adapter->debugfs_phy,
|
||||
csr, &fops_csr_debugfs);
|
||||
if (!csr->entry)
|
||||
hdd_err("Failed to create debugfs file: %s",
|
||||
csr->name);
|
||||
hdd_debug("Failed to create debugfs file: %s",
|
||||
csr->name); // MOT IKSWQ-39460 abhkumar Error logs cleanup
|
||||
}
|
||||
|
||||
csr = &adapter->csr_file[HDD_DEBUFS_FILE_ID_OFFLOAD_INFO];
|
||||
@@ -348,7 +348,7 @@ void wlan_hdd_debugfs_csr_init(struct hdd_adapter *adapter)
|
||||
adapter->debugfs_phy,
|
||||
csr, &fops_csr_debugfs);
|
||||
if (!csr->entry)
|
||||
hdd_err("Failed to create generic_info debugfs file");
|
||||
hdd_debug("Failed to create generic_info debugfs file"); // MOT IKSWQ-39460 abhkumar Error logs cleanup
|
||||
}
|
||||
|
||||
csr = &adapter->csr_file[HDD_DEBUFS_FILE_ID_ROAM_SCAN_STATS_INFO];
|
||||
@@ -360,7 +360,7 @@ void wlan_hdd_debugfs_csr_init(struct hdd_adapter *adapter)
|
||||
adapter->debugfs_phy,
|
||||
csr, &fops_csr_debugfs);
|
||||
if (!csr->entry)
|
||||
hdd_err("Failed to create generic_info debugfs file");
|
||||
hdd_debug("Failed to create generic_info debugfs file"); // MOT IKSWQ-39460 abhkumar Error logs cleanup
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -343,15 +343,43 @@ static __iw_softap_setparam(struct net_device *dev,
|
||||
{
|
||||
struct hdd_adapter *adapter = (netdev_priv(dev));
|
||||
mac_handle_t mac_handle;
|
||||
int *value = (int *)extra;
|
||||
int sub_cmd = value[0];
|
||||
int set_value = value[1];
|
||||
//BEGIN MOT a19110 IKDREL3KK-11113 Fix iwpriv panic
|
||||
int *value;
|
||||
uint8_t *mot_value; //MOT a19110 IKLOCSEN-3014 Use copy from user
|
||||
int sub_cmd;
|
||||
int set_value;
|
||||
int *tmp = (int *) extra;
|
||||
//END IKDREL3KK-11113
|
||||
QDF_STATUS status;
|
||||
int ret = 0;
|
||||
struct hdd_context *hdd_ctx;
|
||||
bool bval = false;
|
||||
|
||||
hdd_enter_dev(dev);
|
||||
//BEGIN MOT a19110 IKDREL3KK-11113 Fix iwpriv panic to 8998
|
||||
//BEGIN MOT a19110 IKLOCSEN-3014 use copy_from_user to avoid junk value
|
||||
if (tmp[0] < 0 || tmp[0] > QCSAP_SET_BTCOEX_LOW_RSSI_THRESHOLD) {
|
||||
mot_value = (uint8_t *)kmalloc(wrqu->data.length+1, GFP_KERNEL);
|
||||
if(copy_from_user((uint8_t *) mot_value, (uint8_t *)(wrqu->data.pointer), wrqu->data.length)) {
|
||||
hdd_err("%s -- copy_from_user --data pointer failed! bailing",
|
||||
__func__);
|
||||
kfree(mot_value);
|
||||
return -EFAULT;
|
||||
}
|
||||
sub_cmd = (int )(*(mot_value + 0));
|
||||
set_value = (int )(*(mot_value + 1));
|
||||
kfree(mot_value);
|
||||
} else {
|
||||
value = (int *)extra;
|
||||
sub_cmd = value[0];
|
||||
set_value = value[1];
|
||||
}
|
||||
//END IKLOCSEN-3014
|
||||
if (!adapter || !adapter->hdd_ctx) {
|
||||
hdd_err("Either hostpad adapter is null or Hal ctx is null");
|
||||
return -EINVAL;
|
||||
}
|
||||
//END IKDREL3KK-11113
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
@@ -1398,7 +1426,7 @@ int __iw_softap_modify_acl(struct net_device *dev,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
struct hdd_adapter *adapter = (netdev_priv(dev));
|
||||
uint8_t *value = (uint8_t *) extra;
|
||||
uint8_t *value = (uint8_t *) kmalloc(wrqu->data.length+1, GFP_KERNEL); //MOT IKLOCSEN-3014
|
||||
uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
|
||||
int list_type, cmd, i;
|
||||
int ret;
|
||||
@@ -1409,8 +1437,18 @@ int __iw_softap_modify_acl(struct net_device *dev,
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
if (0 != ret) {
|
||||
kfree(value); //MOT IKLOCSEN-3014
|
||||
return ret;
|
||||
}
|
||||
//BEGIN MOT a19110 IKLOCSEN-3014 use copy_from_user to avoid junk value
|
||||
if(copy_from_user((uint8_t *) value, (uint8_t *)(wrqu->data.pointer), wrqu->data.length)) {
|
||||
hdd_err("%s -- copy_from_user --data pointer failed! bailing",
|
||||
__func__);
|
||||
kfree(value);
|
||||
return -EFAULT;
|
||||
}
|
||||
//END IKLOCSEN-3014
|
||||
|
||||
ret = hdd_check_private_wext_control(hdd_ctx, info);
|
||||
if (0 != ret)
|
||||
@@ -1423,6 +1461,7 @@ int __iw_softap_modify_acl(struct net_device *dev,
|
||||
i++;
|
||||
cmd = (int)(*(value + i));
|
||||
|
||||
kfree(value);//MOT IKLOCSEN-3014
|
||||
hdd_debug("Modify ACL mac:" QDF_MAC_ADDR_FMT " type: %d cmd: %d",
|
||||
QDF_MAC_ADDR_REF(peer_mac), list_type, cmd);
|
||||
|
||||
@@ -1514,17 +1553,23 @@ static __iw_softap_set_max_tx_power(struct net_device *dev,
|
||||
{
|
||||
struct hdd_adapter *adapter = (netdev_priv(dev));
|
||||
struct hdd_context *hdd_ctx;
|
||||
int *value = (int *)extra;
|
||||
uint8_t *mot_value;
|
||||
int set_value;
|
||||
int ret;
|
||||
struct qdf_mac_addr bssid = QDF_MAC_ADDR_BCAST_INIT;
|
||||
struct qdf_mac_addr selfMac = QDF_MAC_ADDR_BCAST_INIT;
|
||||
|
||||
hdd_enter_dev(dev);
|
||||
|
||||
if (!value)
|
||||
mot_value = (uint8_t*)kmalloc(wrqu->data.length+1, GFP_KERNEL);
|
||||
if (NULL == mot_value)
|
||||
return -ENOMEM;
|
||||
|
||||
if(copy_from_user((uint8_t *)mot_value, (uint8_t *)(wrqu->data.pointer), wrqu->data.length)) {
|
||||
hdd_err("%s -- copy from user -- data pointer failed! bailing", __func__);
|
||||
kfree(mot_value);
|
||||
return -EFAULT;
|
||||
}
|
||||
set_value = (int)(*(mot_value + 0));
|
||||
kfree(mot_value);
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
@@ -1538,8 +1583,7 @@ static __iw_softap_set_max_tx_power(struct net_device *dev,
|
||||
qdf_copy_macaddr(&bssid, &adapter->mac_addr);
|
||||
qdf_copy_macaddr(&selfMac, &adapter->mac_addr);
|
||||
|
||||
set_value = value[0];
|
||||
if (QDF_STATUS_SUCCESS !=
|
||||
if (QDF_STATUS_SUCCESS !=
|
||||
sme_set_max_tx_power(hdd_ctx->mac_handle, bssid,
|
||||
selfMac, set_value)) {
|
||||
hdd_err("Setting maximum tx power failed");
|
||||
@@ -1794,7 +1838,7 @@ static __iw_softap_disassoc_sta(struct net_device *dev,
|
||||
{
|
||||
struct hdd_adapter *adapter = (netdev_priv(dev));
|
||||
struct hdd_context *hdd_ctx;
|
||||
uint8_t *peer_macaddr;
|
||||
uint8_t *peer_macaddr = (uint8_t *)kmalloc(wrqu->data.length+1, GFP_KERNEL); //MOT IKLOCSEN-3014
|
||||
int ret;
|
||||
struct csr_del_sta_params del_sta_params;
|
||||
|
||||
@@ -1802,22 +1846,33 @@ static __iw_softap_disassoc_sta(struct net_device *dev,
|
||||
|
||||
if (!capable(CAP_NET_ADMIN)) {
|
||||
hdd_err("permission check failed");
|
||||
kfree(peer_macaddr); //MOT IKLOCSEN-3014
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
if (0 != ret){
|
||||
kfree(peer_macaddr); //MOT IKLOCSEN-3014
|
||||
return ret;
|
||||
|
||||
}
|
||||
ret = hdd_check_private_wext_control(hdd_ctx, info);
|
||||
if (0 != ret)
|
||||
if (0 != ret){
|
||||
kfree(peer_macaddr); //MOT IKLOCSEN-3014
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* iwpriv tool or framework calls this ioctl with
|
||||
* data passed in extra (less than 16 octets);
|
||||
*/
|
||||
peer_macaddr = (uint8_t *) (extra);
|
||||
//BEGIN MOT a19110 IKLOCSEN-3014 use copy_from_user to avoid junk value
|
||||
if(copy_from_user((uint8_t *) peer_macaddr, (uint8_t *)(wrqu->data.pointer), wrqu->data.length)) {
|
||||
hdd_err("%s -- copy_from_user --data pointer failed! bailing",
|
||||
__func__);
|
||||
kfree(peer_macaddr);
|
||||
return -EFAULT;
|
||||
}
|
||||
//END IKLOCSEN-3014
|
||||
|
||||
hdd_debug("data " QDF_MAC_ADDR_FMT,
|
||||
QDF_MAC_ADDR_REF(peer_macaddr));
|
||||
@@ -1826,7 +1881,7 @@ static __iw_softap_disassoc_sta(struct net_device *dev,
|
||||
SIR_MAC_MGMT_DISASSOC,
|
||||
&del_sta_params);
|
||||
hdd_softap_sta_disassoc(adapter, &del_sta_params);
|
||||
|
||||
kfree(peer_macaddr); //MOT IKLOCSEN-3014
|
||||
hdd_exit();
|
||||
return 0;
|
||||
}
|
||||
@@ -3057,6 +3112,13 @@ static const struct iw_priv_args hostapd_private_args[] = {
|
||||
}
|
||||
,
|
||||
#endif /* FW_THERMAL_THROTTLE_SUPPORT */
|
||||
/* for moto SAR feature */
|
||||
{
|
||||
WE_SET_MIMO_TX_POWER,
|
||||
IW_PRIV_TYPE_INT | MAX_VAR_ARGS,
|
||||
0, "setTxPowerM"
|
||||
}
|
||||
,
|
||||
/* handlers for main ioctl */
|
||||
{
|
||||
QCSAP_IOCTL_MODIFY_ACL,
|
||||
|
||||
@@ -247,6 +247,17 @@ static int enable_11d = -1;
|
||||
static int enable_dfs_chan_scan = -1;
|
||||
static bool is_mode_change_psoc_idle_shutdown;
|
||||
|
||||
#define BUF_LEN_SAR 10
|
||||
static char sar_sta_buffer[BUF_LEN_SAR];
|
||||
static struct kparam_string sar_sta = {
|
||||
.string = sar_sta_buffer,
|
||||
.maxlen = BUF_LEN_SAR,
|
||||
};
|
||||
static char sar_mhs_buffer[BUF_LEN_SAR];
|
||||
static struct kparam_string sar_mhs = {
|
||||
.string = sar_mhs_buffer,
|
||||
.maxlen = BUF_LEN_SAR,
|
||||
};
|
||||
#define WLAN_NLINK_CESIUM 30
|
||||
|
||||
static qdf_wake_lock_t wlan_wake_lock;
|
||||
@@ -1858,43 +1869,42 @@ static void hdd_update_tgt_vht_cap(struct hdd_context *hdd_ctx,
|
||||
hdd_err("unable to get vht_enable2x2");
|
||||
|
||||
if (vht_enable_2x2) {
|
||||
if (cfg->vht_short_gi_80 & WMI_VHT_CAP_SGI_80MHZ) {
|
||||
/* Update 2x2 Highest Short GI data rate */
|
||||
tx_highest_data_rate =
|
||||
VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_2_2;
|
||||
rx_highest_data_rate =
|
||||
VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_2_2;
|
||||
} else {
|
||||
tx_highest_data_rate =
|
||||
VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
|
||||
rx_highest_data_rate =
|
||||
VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
|
||||
}
|
||||
|
||||
status = ucfg_mlme_cfg_set_vht_rx_supp_data_rate(hdd_ctx->psoc,
|
||||
rx_highest_data_rate);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
hdd_err("Failed to set rx_supp_data_rate");
|
||||
|
||||
status = ucfg_mlme_cfg_set_vht_tx_supp_data_rate(hdd_ctx->psoc,
|
||||
tx_highest_data_rate);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
hdd_err("Failed to set tx_supp_data_rate");
|
||||
|
||||
/* Update the real highest data rate to wiphy */
|
||||
if (cfg->vht_short_gi_80 & WMI_VHT_CAP_SGI_80MHZ) {
|
||||
if (vht_enable_2x2) {
|
||||
tx_highest_data_rate =
|
||||
VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_2_2_SGI80;
|
||||
rx_highest_data_rate =
|
||||
VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_2_2_SGI80;
|
||||
} else {
|
||||
/* Update 2x2 Rx Highest Long GI data Rate */
|
||||
tx_highest_data_rate =
|
||||
VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_2_2;
|
||||
rx_highest_data_rate =
|
||||
VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_2_2;
|
||||
}
|
||||
} else if (cfg->vht_short_gi_80 & WMI_VHT_CAP_SGI_80MHZ) {
|
||||
/* Update 1x1 Highest Short GI data rate */
|
||||
tx_highest_data_rate =
|
||||
VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1_SGI80;
|
||||
rx_highest_data_rate =
|
||||
rx_highest_data_rate =
|
||||
VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1_SGI80;
|
||||
} else {
|
||||
/* Update 1x1 Highest Long GI data rate */
|
||||
tx_highest_data_rate = VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
|
||||
rx_highest_data_rate = VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
|
||||
}
|
||||
}
|
||||
|
||||
status = ucfg_mlme_cfg_set_vht_rx_supp_data_rate(
|
||||
hdd_ctx->psoc,
|
||||
rx_highest_data_rate);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
hdd_err("Failed to set rx_supp_data_rate");
|
||||
|
||||
status = ucfg_mlme_cfg_set_vht_tx_supp_data_rate(
|
||||
hdd_ctx->psoc,
|
||||
tx_highest_data_rate);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
hdd_err("Failed to set tx_supp_data_rate");
|
||||
|
||||
if (WMI_VHT_CAP_MAX_MPDU_LEN_11454 == cfg->vht_max_mpdu)
|
||||
band_5g->vht_cap.cap |= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454;
|
||||
else if (WMI_VHT_CAP_MAX_MPDU_LEN_7935 == cfg->vht_max_mpdu)
|
||||
@@ -11863,6 +11873,14 @@ struct hdd_context *hdd_context_create(struct device *dev)
|
||||
goto err_release_store;
|
||||
}
|
||||
|
||||
// BEGIN IKSWR-45692, support loading moto specific configurations
|
||||
status = cfg_psoc_parse(hdd_ctx->psoc, WLAN_MOT_INI_FILE);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
hdd_err("Failed to parse cfg %s, skip!",
|
||||
WLAN_MOT_INI_FILE);
|
||||
}
|
||||
// END IKSWR-45692
|
||||
|
||||
hdd_cfg_params_init(hdd_ctx);
|
||||
|
||||
/* apply multiplier config, if not already set via module parameter */
|
||||
@@ -12700,6 +12718,14 @@ static int hdd_initialize_mac_address(struct hdd_context *hdd_ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef MOTO_UTAGS_MAC
|
||||
hdd_warn("Can't update mac config via wlan_mac.bin, using MAC from serial number");
|
||||
|
||||
status = hdd_update_mac_serial(hdd_ctx);
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
hdd_info("using default MAC address");
|
||||
|
||||
/* Use fw provided MAC */
|
||||
@@ -16432,6 +16458,11 @@ exit:
|
||||
return errno;
|
||||
}
|
||||
|
||||
static int sar_changed_handler(const char *kmessage,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
return param_set_copystring(kmessage, kp);
|
||||
}
|
||||
static int hdd_set_con_mode(enum QDF_GLOBAL_MODE mode)
|
||||
{
|
||||
con_mode = mode;
|
||||
@@ -18130,6 +18161,11 @@ static const struct kernel_param_ops fwpath_ops = {
|
||||
.get = param_get_string,
|
||||
};
|
||||
|
||||
static const struct kernel_param_ops sar_ops = {
|
||||
.set = sar_changed_handler,
|
||||
.get = param_get_string,
|
||||
};
|
||||
|
||||
module_param_cb(con_mode, &con_mode_ops, &con_mode,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
|
||||
@@ -18143,6 +18179,11 @@ module_param_cb(con_mode_epping, &con_mode_epping_ops,
|
||||
|
||||
module_param_cb(fwpath, &fwpath_ops, &fwpath,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
module_param_cb(sar_sta, &sar_ops, &sar_sta,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
module_param_cb(sar_mhs, &sar_ops, &sar_mhs,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
|
||||
|
||||
module_param(enable_dfs_chan_scan, int, S_IRUSR | S_IRGRP | S_IROTH);
|
||||
|
||||
|
||||
@@ -1632,6 +1632,9 @@ QDF_STATUS hdd_wlan_re_init(void)
|
||||
if (hdd_ctx->hdd_wlan_suspended)
|
||||
hdd_ctx->hdd_wlan_suspended = false;
|
||||
|
||||
if (hdd_ctx->is_wiphy_suspended)
|
||||
hdd_ctx->is_wiphy_suspended = false;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
err_re_init:
|
||||
|
||||
@@ -980,6 +980,8 @@
|
||||
*/
|
||||
#define WE_SET_CHANNEL 88
|
||||
#define WE_SET_CONC_SYSTEM_PREF 89
|
||||
#define MAX_SUB_CMD 91 // Motorola, IKDREL3KK-10418
|
||||
|
||||
|
||||
/*
|
||||
* <ioctl>
|
||||
@@ -2579,6 +2581,9 @@
|
||||
#define WE_SET_TXRX_STATS 24
|
||||
|
||||
|
||||
/* for moto SAR features, support tx pwr limit settings on mimo device */
|
||||
#define WE_SET_MIMO_TX_POWER 32
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
#undef MAX_VAR_ARGS
|
||||
#define MAX_VAR_ARGS 11
|
||||
@@ -6639,9 +6644,13 @@ static int __iw_set_three_ints_getnone(struct net_device *dev,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
int *value = (int *)extra;
|
||||
int sub_cmd = value[0];
|
||||
int ret;
|
||||
//BEGIN MOT a19110 IKSWL-15774 Ioctl from Mot code
|
||||
int *value;
|
||||
int sub_cmd, cmd_len;
|
||||
int *tmp_value;
|
||||
int *get_value = NULL;
|
||||
int ret = 0;
|
||||
//END IKSWL-15774
|
||||
uint8_t dual_mac_feature = DISABLE_DBS_CXN_AND_SCAN;
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
QDF_STATUS status;
|
||||
@@ -6656,6 +6665,29 @@ static int __iw_set_three_ints_getnone(struct net_device *dev,
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
//BEGIN MOT a19110 IKSWL-15774 Ioctl from Mot code
|
||||
tmp_value = (int *)extra;
|
||||
|
||||
// Copy from wrqu structure if it was a ioctl from Motorola code
|
||||
if(tmp_value[0] < 0 || (tmp_value[0] >= MAX_SUB_CMD)) {
|
||||
cmd_len = wrqu->data.length;
|
||||
get_value = (int *) kmalloc(cmd_len+1, GFP_KERNEL); // Motorola, IKHSS7-39028
|
||||
|
||||
if(get_value == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
if(copy_from_user((char *) get_value, (char*)(wrqu->data.pointer), cmd_len)) {
|
||||
hdd_alert("copy_from_user --data pointer failed! bailing");
|
||||
kfree(get_value);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
value = (int *)get_value;
|
||||
} else {
|
||||
value = (int *)extra;
|
||||
}
|
||||
sub_cmd = value[0];
|
||||
//END IKSWL-15774
|
||||
|
||||
ret = hdd_check_private_wext_control(hdd_ctx, info);
|
||||
if (0 != ret)
|
||||
@@ -6700,6 +6732,11 @@ static int __iw_set_three_ints_getnone(struct net_device *dev,
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
//BEGIN MOT a19110 IKSWL-15774 Ioctl from Mot code
|
||||
if(get_value != NULL)
|
||||
kfree(get_value);
|
||||
//END IKSWL-15774
|
||||
hdd_exit();
|
||||
return ret;
|
||||
}
|
||||
@@ -8160,6 +8197,81 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
|
||||
break;
|
||||
}
|
||||
#endif /* FW_THERMAL_THROTTLE_SUPPORT */
|
||||
|
||||
/* for moto SAR features, support tx pwr limit settings on mimo device */
|
||||
case WE_SET_MIMO_TX_POWER:
|
||||
{
|
||||
struct sar_limit_cmd_params *sar_limit_cmd;
|
||||
mac_handle_t mac_handle = hdd_ctx->mac_handle;
|
||||
int ret = -EINVAL;
|
||||
uint32_t num_limit_rows = 4;
|
||||
struct sar_limit_cmd_row *row;
|
||||
|
||||
if (!mac_handle)
|
||||
return -EINVAL;
|
||||
|
||||
sar_limit_cmd = qdf_mem_malloc(sizeof(struct sar_limit_cmd_params));
|
||||
if (!sar_limit_cmd)
|
||||
return -ENOMEM;
|
||||
|
||||
sar_limit_cmd->commit_limits = 1;
|
||||
sar_limit_cmd->sar_enable = WMI_SAR_FEATURE_ON_USER_DEFINED;
|
||||
|
||||
row = qdf_mem_malloc(sizeof(*row) * num_limit_rows);
|
||||
if (!row) {
|
||||
qdf_mem_free(sar_limit_cmd);
|
||||
hdd_err("Failed to allocate memory for sar_limit_row_list");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
//Below band/chain/limit_value number will get from Modem
|
||||
//either CCK or OFDM, set the validity_bitmap as WMI_SAR_BAND_ID_VALID_MASK |WMI_SAR_CHAIN_ID_VALID_MASK
|
||||
row[0].band_id = WMI_SAR_2G_ID; //WMI_SAR_2G_ID - 0; WMI_SAR_5G_ID - 1
|
||||
row[0].chain_id = 0;
|
||||
row[0].mod_id = WMI_SAR_MOD_OFDM;
|
||||
row[0].limit_value = apps_args[0];
|
||||
row[0].validity_bitmap = WMI_SAR_BAND_ID_VALID_MASK |WMI_SAR_CHAIN_ID_VALID_MASK;
|
||||
|
||||
row[1].band_id = WMI_SAR_2G_ID; //WMI_SAR_2G_ID - 0; WMI_SAR_5G_ID - 1
|
||||
row[1].chain_id = 1;
|
||||
row[1].mod_id = WMI_SAR_MOD_OFDM;
|
||||
row[1].limit_value = apps_args[1];
|
||||
row[1].validity_bitmap = WMI_SAR_BAND_ID_VALID_MASK |WMI_SAR_CHAIN_ID_VALID_MASK;
|
||||
|
||||
row[2].band_id = WMI_SAR_5G_ID; //WMI_SAR_2G_ID - 0; WMI_SAR_5G_ID - 1
|
||||
row[2].chain_id = 0;
|
||||
row[2].mod_id = WMI_SAR_MOD_OFDM;
|
||||
row[2].limit_value = apps_args[2];
|
||||
row[2].validity_bitmap = WMI_SAR_BAND_ID_VALID_MASK |WMI_SAR_CHAIN_ID_VALID_MASK |WMI_SAR_MOD_ID_VALID_MASK;
|
||||
|
||||
row[3].band_id = WMI_SAR_5G_ID; //WMI_SAR_2G_ID - 0; WMI_SAR_5G_ID - 1
|
||||
row[3].chain_id = 1;
|
||||
row[3].mod_id = WMI_SAR_MOD_OFDM;
|
||||
row[3].limit_value = apps_args[3];
|
||||
row[3].validity_bitmap = WMI_SAR_BAND_ID_VALID_MASK |WMI_SAR_CHAIN_ID_VALID_MASK |WMI_SAR_MOD_ID_VALID_MASK;
|
||||
|
||||
sar_limit_cmd->num_limit_rows = num_limit_rows;
|
||||
sar_limit_cmd->sar_limit_row_list = row;
|
||||
hdd_info("change pwr limit to [%d, %d, %d, %d].",
|
||||
row[0].limit_value, row[1].limit_value, row[2].limit_value, row[3].limit_value);
|
||||
if (sme_set_sar_power_limits(mac_handle,sar_limit_cmd)
|
||||
!= QDF_STATUS_SUCCESS) {
|
||||
hdd_err("Setting maximum tx power failed");
|
||||
if(sar_limit_cmd) {
|
||||
qdf_mem_free(sar_limit_cmd->sar_limit_row_list);
|
||||
qdf_mem_free(sar_limit_cmd);
|
||||
}
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
else{
|
||||
/* save settings in hdd_ctx, so can restore configs after SSR */
|
||||
hdd_store_sar_config(hdd_ctx, sar_limit_cmd);
|
||||
hdd_info("Setting maximum tx power successful");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
hdd_err("Invalid IOCTL command %d", sub_cmd);
|
||||
@@ -10835,6 +10947,11 @@ static const struct iw_priv_args we_private_args[] = {
|
||||
0,
|
||||
"ch_avoid"},
|
||||
#endif
|
||||
/* for moto SAR features, support tx pwr limit settings on mimo device */
|
||||
{WE_SET_MIMO_TX_POWER,
|
||||
IW_PRIV_TYPE_INT | MAX_VAR_ARGS,
|
||||
0,
|
||||
"setTxPowerM"},
|
||||
/* handlers for main ioctl */
|
||||
{WLAN_PRIV_FIPS_TEST,
|
||||
IW_PRIV_TYPE_BYTE | WE_MAX_STR_LEN,
|
||||
|
||||
@@ -797,6 +797,9 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
|
||||
pmac->sap.SapDfsInfo.sap_ch_switch_mode,
|
||||
pmac->sap.SapDfsInfo.reduced_beacon_interval);
|
||||
|
||||
//BEGIN MOT a19110 IKSWO-8490 Comment out initialisation of
|
||||
//acl list. We use driver ioctl to set it
|
||||
#if 0
|
||||
/* Copy MAC filtering settings to sap context */
|
||||
sap_ctx->eSapMacAddrAclMode = config->SapMacaddr_acl;
|
||||
qdf_mem_copy(sap_ctx->acceptMacList, config->accept_mac,
|
||||
@@ -807,7 +810,10 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
|
||||
sizeof(config->deny_mac));
|
||||
sap_ctx->nDenyMac = config->num_deny_mac;
|
||||
sap_sort_mac_list(sap_ctx->denyMacList, sap_ctx->nDenyMac);
|
||||
sap_ctx->beacon_tx_rate = config->beacon_tx_rate;
|
||||
#endif
|
||||
//END IKSWO-8490
|
||||
sap_ctx->beacon_tx_rate = config->beacon_tx_rate;
|
||||
|
||||
|
||||
/* Fill in the event structure for FSM */
|
||||
sap_event.event = eSAP_HDD_START_INFRA_BSS;
|
||||
@@ -2231,11 +2237,11 @@ void wlansap_extend_to_acs_range(mac_handle_t mac_handle,
|
||||
}
|
||||
|
||||
if (*end_ch_freq <= wlan_reg_ch_to_freq(CHAN_ENUM_2484)) {
|
||||
*bandEndChannel = CHAN_ENUM_2484;
|
||||
*bandEndChannel = CHAN_ENUM_2472;
|
||||
tmp_end_ch_freq = (*end_ch_freq + ACS_2G_EXTEND) <=
|
||||
wlan_reg_ch_to_freq(CHAN_ENUM_2484) ?
|
||||
wlan_reg_ch_to_freq(CHAN_ENUM_2472) ?
|
||||
(*end_ch_freq + ACS_2G_EXTEND) :
|
||||
wlan_reg_ch_to_freq(CHAN_ENUM_2484);
|
||||
wlan_reg_ch_to_freq(CHAN_ENUM_2472);
|
||||
} else if (*end_ch_freq <= wlan_reg_ch_to_freq(CHAN_ENUM_5865)) {
|
||||
*bandEndChannel = CHAN_ENUM_5865;
|
||||
tmp_end_ch_freq = (*end_ch_freq + ACS_5G_EXTEND) <=
|
||||
|
||||
Reference in new issue
Block a user