summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kbuild7
-rw-r--r--core/cds/inc/cds_concurrency.h14
-rw-r--r--core/cds/inc/cds_reg_service.h4
-rw-r--r--core/cds/src/cds_concurrency.c327
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h53
-rw-r--r--core/hdd/inc/wlan_hdd_main.h11
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c32
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c23
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c80
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.h13
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c38
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.h14
-rw-r--r--core/hdd/src/wlan_hdd_ioctl.c11
-rw-r--r--core/hdd/src/wlan_hdd_main.c167
-rw-r--r--core/hdd/src/wlan_hdd_scan.c24
-rw-r--r--core/hdd/src/wlan_hdd_stats.c4
-rw-r--r--core/mac/inc/qwlan_version.h6
-rw-r--r--core/mac/src/include/dot11f.h4
-rw-r--r--core/mac/src/pe/lim/lim_api.c4
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_req_messages.c9
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c9
-rw-r--r--core/mac/src/pe/lim/lim_process_sme_req_messages.c2
-rw-r--r--core/mac/src/pe/lim/lim_scan_result_utils.c11
-rw-r--r--core/mac/src/pe/lim/lim_security_utils.c2
-rw-r--r--core/mac/src/pe/sch/sch_beacon_process.c24
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/dot11f.c252
-rw-r--r--core/pld/inc/pld_common.h3
-rw-r--r--core/pld/src/pld_common.c25
-rw-r--r--core/pld/src/pld_snoc.h11
-rw-r--r--core/sap/inc/sap_api.h27
-rw-r--r--core/sap/src/sap_api_link_cntl.c12
-rw-r--r--core/sap/src/sap_module.c149
-rw-r--r--core/sme/inc/csr_api.h4
-rw-r--r--core/sme/inc/csr_internal.h1
-rw-r--r--core/sme/src/common/sme_api.c1
-rw-r--r--core/sme/src/csr/csr_api_roam.c149
-rw-r--r--core/sme/src/csr/csr_api_scan.c20
-rw-r--r--core/sme/src/csr/csr_neighbor_roam.c14
-rw-r--r--core/sme/src/csr/csr_util.c74
-rw-r--r--core/sme/src/rrm/sme_rrm.c33
-rw-r--r--core/wma/src/wma_mgmt.c6
-rw-r--r--core/wma/src/wma_ocb.c10
-rw-r--r--core/wma/src/wma_scan_roam.c15
-rw-r--r--core/wma/src/wma_utils.c125
-rw-r--r--uapi/linux/qca_vendor.h49
45 files changed, 1381 insertions, 492 deletions
diff --git a/Kbuild b/Kbuild
index 90486f343a9b..cfa13e139986 100644
--- a/Kbuild
+++ b/Kbuild
@@ -291,6 +291,9 @@ ifneq ($(CONFIG_MOBILE_ROUTER), y)
CONFIG_QCOM_ESE := y
endif
+#Enable beacon reporting feature
+CONFIG_WLAN_BEACON_REPORTING := y
+
# Feature flags which are not (currently) configurable via Kconfig
#Whether to build debug version
@@ -1455,6 +1458,10 @@ ifeq ($(CONFIG_WLAN_FEATURE_SAE),y)
CDEFINES += -DWLAN_FEATURE_SAE
endif
+ifeq ($(CONFIG_WLAN_BEACON_REPORTING),y)
+CDEFINES += -DNTH_BEACON_OFFLOAD
+endif
+
ifeq ($(BUILD_DIAG_VERSION),1)
CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT
CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_CSR
diff --git a/core/cds/inc/cds_concurrency.h b/core/cds/inc/cds_concurrency.h
index 3ae3c34cc584..87e5deee66bf 100644
--- a/core/cds/inc/cds_concurrency.h
+++ b/core/cds/inc/cds_concurrency.h
@@ -796,6 +796,7 @@ QDF_STATUS cds_current_connections_update(uint32_t session_id,
enum sir_conn_update_reason);
bool cds_is_ibss_conn_exist(uint8_t *ibss_channel);
struct cds_conc_connection_info *cds_get_conn_info(uint32_t *len);
+
#ifdef MPC_UT_FRAMEWORK
QDF_STATUS cds_incr_connection_count_utfw(
uint32_t vdev_id, uint32_t tx_streams, uint32_t rx_streams,
@@ -916,6 +917,19 @@ QDF_STATUS cds_get_pcl_for_existing_conn(enum cds_con_mode mode,
uint8_t *pcl_ch, uint32_t *len,
uint8_t *weight_list, uint32_t weight_len,
bool all_matching_cxn_to_del);
+
+/**
+ * cds_get_valid_chans_from_range() - get valid channels from range
+ * @ch_list: pointer to channel list
+ * @ch_cnt: channel number of channel list
+ * @mode: device mode
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS cds_get_valid_chans_from_range(uint8_t *ch_list,
+ uint32_t *ch_cnt,
+ enum cds_con_mode mode);
+
QDF_STATUS cds_get_valid_chan_weights(struct sir_pcl_chan_weights *weight,
enum cds_con_mode mode);
QDF_STATUS cds_set_hw_mode_on_channel_switch(uint8_t session_id);
diff --git a/core/cds/inc/cds_reg_service.h b/core/cds/inc/cds_reg_service.h
index 22985ef5ff73..26d35c3928ed 100644
--- a/core/cds/inc/cds_reg_service.h
+++ b/core/cds/inc/cds_reg_service.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019 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
@@ -37,6 +37,8 @@
#define CDS_CHANNEL_FREQ(chan_enum) chan_mapping[chan_enum].center_freq
#define CDS_IS_DFS_CH(chan_num) (cds_get_channel_state((chan_num)) == \
CHANNEL_STATE_DFS)
+#define CDS_IS_DISABLE_CH(chan_num) (cds_get_channel_state((chan_num)) == \
+ CHANNEL_STATE_DISABLE)
#define CDS_IS_PASSIVE_OR_DISABLE_CH(chan_num) \
(cds_get_channel_state(chan_num) != CHANNEL_STATE_ENABLE)
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index f9b3ccdb7122..ee5ab899f2b0 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -5693,6 +5693,295 @@ static bool cds_is_dbs_allowed_for_concurrency(
}
/**
+ * cds_skip_dfs_ch() - skip dfs channel or not
+ * @skip_dfs_channel: return check result
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS cds_skip_dfs_ch(bool *skip_dfs_channel)
+{
+ bool sta_sap_scc_on_dfs_chan;
+ struct cds_config_info *cds_cfg;
+
+ cds_cfg = cds_get_ini_config();
+ if (!cds_cfg) {
+ cds_err("cds config is NULL");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ *skip_dfs_channel = false;
+ if (!cds_cfg->dfs_master_enable) {
+ cds_debug("skip DFS ch for SAP/Go dfs master cap %d",
+ cds_cfg->dfs_master_enable);
+ *skip_dfs_channel = true;
+ }
+
+ if (!*skip_dfs_channel) {
+ sta_sap_scc_on_dfs_chan =
+ cds_is_sta_sap_scc_allowed_on_dfs_channel();
+ if (cds_mode_specific_connection_count(CDS_STA_MODE, NULL)
+ > 0 && !sta_sap_scc_on_dfs_chan) {
+ cds_debug("SAP/Go skips DFS ch if sta connects");
+ *skip_dfs_channel = true;
+ }
+ }
+
+ return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * cds_modify_sap_pcl_based_on_dfs() - filter out DFS channel if needed
+ * @pcl_list_org: channel list to filter out
+ * @weight_list_org: weight of channel list
+ * @pcl_len_org: length of channel list
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS cds_modify_sap_pcl_based_on_dfs(uint8_t *pcl_list_org,
+ uint8_t *weight_list_org,
+ uint32_t *pcl_len_org)
+{
+ size_t i, pcl_len = 0;
+ bool skip_dfs_channel = false;
+ QDF_STATUS status;
+
+ if (*pcl_len_org > QDF_MAX_NUM_CHAN) {
+ cds_err("Invalid PCL List Length %d", *pcl_len_org);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ status = cds_skip_dfs_ch(&skip_dfs_channel);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ cds_err("failed to get skip dfs ch info");
+ return status;
+ }
+
+ if (!skip_dfs_channel) {
+ cds_debug("No more operation on DFS channel");
+ return QDF_STATUS_SUCCESS;
+ }
+
+ for (i = 0; i < *pcl_len_org; i++) {
+ if (!CDS_IS_DFS_CH(pcl_list_org[i])) {
+ pcl_list_org[pcl_len] = pcl_list_org[i];
+ weight_list_org[pcl_len++] = weight_list_org[i];
+ }
+ }
+
+ *pcl_len_org = pcl_len;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * cds_modify_sap_pcl_based_on_nol() - filter out nol channel
+ * @pcl_list_org: channel list to filter out
+ * @weight_list_org: weight of channel list
+ * @pcl_len_org: length of channel list
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS cds_modify_sap_pcl_based_on_nol(
+ uint8_t *pcl_list_org,
+ uint8_t *weight_list_org,
+ uint32_t *pcl_len_org)
+{
+ size_t i, pcl_len = 0;
+
+ if (*pcl_len_org > QDF_MAX_NUM_CHAN) {
+ cds_err("Invalid PCL List Length %d", *pcl_len_org);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ for (i = 0; i < *pcl_len_org; i++) {
+ if (!CDS_IS_DISABLE_CH(pcl_list_org[i])) {
+ pcl_list_org[pcl_len] = pcl_list_org[i];
+ weight_list_org[pcl_len++] = weight_list_org[i];
+ }
+ }
+
+ *pcl_len_org = pcl_len;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * cds_modify_sap_pcl_based_on_srd() - filter out srd channel if needed
+ * @pcl_list_org: pointer to channel list
+ * @weight_list_org: pointer to weight of channel list
+ * @pcl_len_org: pointer to length of channel list
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS cds_modify_sap_pcl_based_on_srd(
+ uint8_t *pcl_list_org,
+ uint8_t *weight_list_org,
+ uint32_t *pcl_len_org)
+{
+ size_t i, pcl_len = 0;
+ bool skip_srd_chan;
+ struct cds_config_info *cds_cfg;
+
+ cds_cfg = cds_get_ini_config();
+ if (!cds_cfg) {
+ cds_err("cds config is NULL");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ skip_srd_chan = !cds_cfg->etsi_srd_chan_in_master_mode &&
+ cds_is_5g_regdmn_etsi13();
+
+ if (!skip_srd_chan)
+ return QDF_STATUS_SUCCESS;
+
+ if (*pcl_len_org > QDF_MAX_NUM_CHAN) {
+ cds_err("Invalid PCL List Length %d", *pcl_len_org);
+ return QDF_STATUS_E_FAILURE;
+ }
+ for (i = 0; i < *pcl_len_org; i++) {
+ if (cds_is_etsi13_regdmn_srd_chan(cds_chan_to_freq(
+ pcl_list_org[i])))
+ continue;
+ pcl_list_org[pcl_len] = pcl_list_org[i];
+ weight_list_org[pcl_len++] = weight_list_org[i];
+ }
+
+ *pcl_len_org = pcl_len;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * cds_pcl_modification_for_sap() - filter out channels for sap
+ * @pcl_channels: pointer to channel list
+ * @pcl_weight: pointer to weight of channel list
+ * @len: pointer to length of channel list
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS cds_pcl_modification_for_sap(
+ uint8_t *pcl_channels, uint8_t *pcl_weight,
+ uint32_t *len)
+{
+ QDF_STATUS status;
+ size_t i;
+
+ if (cds_is_sap_mandatory_channel_set()) {
+ status = cds_modify_sap_pcl_based_on_mandatory_channel(
+ pcl_channels, pcl_weight, len);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ cds_err("failed to get mandatory modified pcl for SAP");
+ return status;
+ }
+ cds_debug("mandatory modified pcl len:%d", *len);
+ for (i = 0; i < *len; i++)
+ cds_debug("chan:%d weight:%d",
+ pcl_channels[i], pcl_weight[i]);
+ }
+
+ status = cds_modify_sap_pcl_based_on_nol(
+ pcl_channels, pcl_weight, len);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ cds_err("failed to get nol modified pcl for SAP");
+ return status;
+ }
+ cds_debug("nol modified pcl len:%d", *len);
+ for (i = 0; i < *len; i++)
+ cds_debug("chan:%d weight:%d",
+ pcl_channels[i], pcl_weight[i]);
+
+ status = cds_modify_sap_pcl_based_on_dfs(
+ pcl_channels, pcl_weight, len);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ cds_err("failed to get dfs modified pcl for SAP");
+ return status;
+ }
+ cds_debug("dfs modified pcl len:%d", *len);
+ for (i = 0; i < *len; i++)
+ cds_debug("chan:%d weight:%d",
+ pcl_channels[i], pcl_weight[i]);
+
+ status = cds_modify_sap_pcl_based_on_srd(
+ pcl_channels, pcl_weight, len);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ cds_err("failed to get srd modified pcl for SAP");
+ return status;
+ }
+ cds_debug("modified final pcl len:%d", *len);
+ for (i = 0; i < *len; i++)
+ cds_debug("chan:%d weight:%d",
+ pcl_channels[i], pcl_weight[i]);
+
+ return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * cds_pcl_modification_for_p2p_go() - filter out channels for go
+ * @pcl_channels: pointer to channel list
+ * @pcl_weight: pointer to weight of channel list
+ * @len: pointer to length of channel list
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS cds_pcl_modification_for_p2p_go(
+ uint8_t *pcl_channels, uint8_t *pcl_weight,
+ uint32_t *len)
+{
+ QDF_STATUS status;
+ size_t i;
+
+ status = cds_modify_pcl_based_on_enabled_channels(
+ pcl_channels, pcl_weight, len);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ cds_err("failed to get enabled channel modified pcl for GO");
+ return status;
+ }
+ cds_debug("enabled channel modified pcl len:%d", *len);
+ for (i = 0; i < *len; i++)
+ cds_debug("chan:%d weight:%d",
+ pcl_channels[i], pcl_weight[i]);
+
+ return QDF_STATUS_SUCCESS;
+}
+
+/**
+ * cds_mode_specific_modification_on_pcl() - filter out channel based on mode
+ * @pcl_channels: pointer to channel list
+ * @pcl_weight: pointer to weight of channel list
+ * @len: pointer to length of channel list
+ * @mode: device mode
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS cds_mode_specific_modification_on_pcl(
+ uint8_t *pcl_channels, uint8_t *pcl_weight,
+ uint32_t *len, enum cds_con_mode mode)
+{
+ QDF_STATUS status = QDF_STATUS_E_FAILURE;
+
+ switch (mode) {
+ case CDS_SAP_MODE:
+ status = cds_pcl_modification_for_sap(
+ pcl_channels, pcl_weight, len);
+ break;
+ case CDS_P2P_GO_MODE:
+ status = cds_pcl_modification_for_p2p_go(
+ pcl_channels, pcl_weight, len);
+ break;
+ case CDS_STA_MODE:
+ case CDS_P2P_CLIENT_MODE:
+ case CDS_IBSS_MODE:
+ status = QDF_STATUS_SUCCESS;
+ break;
+ default:
+ cds_err("unexpected mode %d", mode);
+ break;
+ }
+
+ return status;
+}
+
+/**
* cds_get_pcl() - provides the preferred channel list for
* new connection
* @mode: Device mode
@@ -10312,6 +10601,44 @@ bool cds_is_force_scc(void)
(hdd_ctx->config->WlanMccToSccSwitchMode ==
QDF_MCC_TO_SCC_WITH_PREFERRED_BAND));
}
+
+QDF_STATUS cds_get_valid_chans_from_range(
+ uint8_t *ch_list,
+ uint32_t *ch_cnt,
+ enum cds_con_mode mode)
+{
+ uint8_t ch_weight_list[QDF_MAX_NUM_CHAN];
+ uint32_t ch_weight_len;
+ QDF_STATUS status;
+ size_t chan_index = 0;
+
+ if (!ch_list || !ch_cnt) {
+ cds_err("Null parameters");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ for (chan_index = 0; chan_index < *ch_cnt; chan_index++)
+ ch_weight_list[chan_index] = WEIGHT_OF_GROUP1_PCL_CHANNELS;
+
+ ch_weight_len = *ch_cnt;
+
+ /* check the channel avoidance list for beaconing entities */
+ if (mode == CDS_SAP_MODE || mode == CDS_P2P_GO_MODE)
+ cds_update_with_safe_channel_list(ch_list, ch_cnt,
+ ch_weight_list,
+ ch_weight_len);
+
+ status = cds_mode_specific_modification_on_pcl(
+ ch_list, ch_weight_list, ch_cnt, mode);
+
+ if (QDF_IS_STATUS_ERROR(status)) {
+ cds_err("failed to get modified pcl for mode %d", mode);
+ return status;
+ }
+
+ return status;
+}
+
/**
* cds_get_valid_chan_weights() - Get the weightage for all
* requested valid channels
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 867e2a58c26d..0c36f4851814 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -1456,6 +1456,34 @@ enum hdd_dot11_mode {
/*
* <ini>
+ * honour_nl_scan_policy_flags - This ini will decide whether to honour
+ * NL80211 scan policy flags
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This parameter will decide whether to honour scan flags such as
+ * NL80211_SCAN_FLAG_HIGH_ACCURACY , NL80211_SCAN_FLAG_LOW_SPAN,
+ * NL80211_SCAN_FLAG_LOW_POWER.
+ * Acceptable values for this:
+ * 0: Config is disabled
+ * 1: Config is enabled
+ *
+ * Related: None
+ *
+ * Supported Feature: Scan
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_HONOUR_NL_SCAN_POLICY_FLAGS_NAME "honour_nl_scan_policy_flags"
+#define CFG_HONOUR_NL_SCAN_POLICY_FLAGS_MIN (0)
+#define CFG_HONOUR_NL_SCAN_POLICY_FLAGS_MAX (1)
+#define CFG_HONOUR_NL_SCAN_POLICY_FLAGS_DEFAULT (1)
+
+/*
+ * <ini>
* adaptive_dwell_mode_enabled - Enable adaptive dwell mode
* @Min: 0
* @Max: 1
@@ -1856,6 +1884,29 @@ enum hdd_dot11_mode {
/*
* <ini>
+ * nth_beacon_reporting - Enable/Disable the nth beacon reporting offload
+ * @Min: 0
+ * @Max: 65536
+ * @Default: 0
+ *
+ * The configured value will be used by firmware to forward
+ * that beacon to host which is then forwarded to the userspace.
+ *
+ * Related: None
+ *
+ * Supported Feature: Beacon reporting
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_NTH_BEACON_REPORTING_OFFLOAD_NAME "nth_beacon_reporting"
+#define CFG_NTH_BEACON_REPORTING_OFFLOAD_MIN (0)
+#define CFG_NTH_BEACON_REPORTING_OFFLOAD_MAX (65536)
+#define CFG_NTH_BEACON_REPORTING_OFFLOAD_DEFAULT (0)
+
+/*
+ * <ini>
* g11agNumTxChains - Number of Tx Chanins in 11ag mode
* @Min: 0
* @Max: 2
@@ -16087,6 +16138,7 @@ struct hdd_config {
bool enable_dp_trace;
uint8_t dp_trace_config[DP_TRACE_CONFIG_STRING_LENGTH];
bool adaptive_dwell_mode_enabled;
+ bool honour_nl_scan_policy_flags;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode_nc;
enum wmi_dwelltime_adaptive_mode roamscan_adaptive_dwell_mode;
@@ -16326,6 +16378,7 @@ struct hdd_config {
uint32_t btm_max_attempt_cnt;
uint32_t btm_sticky_time;
uint32_t btm_query_bitmask;
+ uint16_t beacon_reporting;
};
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index a2d1ae143ddb..a0d9c12d6ef4 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1062,6 +1062,8 @@ enum dhcp_nego_status {
* MSB of rx_mc_bc_cnt indicates whether FW supports rx_mc_bc_cnt
* feature or not, if first bit is 1 it indictes that FW supports this
* feature, if it is 0 it indicates FW doesn't support this feature
+ * @support_mode: Max supported mode of a station currently
+ * connected to sap
*/
typedef struct {
bool isUsed;
@@ -1107,6 +1109,7 @@ typedef struct {
uint16_t capability;
uint32_t rx_mc_bc_cnt;
uint32_t rx_retry_cnt;
+ uint8_t support_mode;
} hdd_station_info_t;
/**
@@ -3216,4 +3219,12 @@ void hdd_get_nud_stats_cb(void *data, struct rsp_stats *rsp, void *context);
void hdd_sched_scan_results(struct wiphy *wiphy, uint64_t reqid);
+/**
+ * hdd_set_nth_beacon_offload() - Send the nth beacon offload command to FW
+ * @adapter: HDD adapter
+ * @value: Value of n, for which the nth beacon will be forwarded by the FW
+ *
+ * Return: QDF_STATUS_SUCCESS on success and failure status on failure
+ */
+QDF_STATUS hdd_set_nth_beacon_offload(hdd_adapter_t *adapter, uint16_t value);
#endif /* end #if !defined(WLAN_HDD_MAIN_H) */
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 32bb9454f378..519eecc1a0d1 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -1811,7 +1811,7 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter,
/* clear scan cache for Link Lost */
if (pRoamInfo && !pRoamInfo->reasonCode &&
eCSR_ROAM_LOSTLINK == roamStatus) {
- wlan_hdd_cfg80211_update_bss_list(pAdapter,
+ wlan_hdd_cfg80211_unlink_bss(pAdapter,
pHddStaCtx->conn_info.bssId.bytes);
sme_remove_bssid_from_scan_list(pHddCtx->hHal,
pHddStaCtx->conn_info.bssId.bytes);
@@ -1947,6 +1947,9 @@ QDF_STATUS hdd_change_peer_state(hdd_adapter_t *pAdapter,
#endif
if (sta_state == OL_TXRX_PEER_STATE_AUTH) {
+ /* Reset scan reject params on successful set key */
+ hdd_debug("Reset scan reject params");
+ hdd_init_scan_reject_params(pAdapter->pHddCtx);
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
/* make sure event is reset */
INIT_COMPLETION(pAdapter->sta_authorized_event);
@@ -2690,6 +2693,16 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
/* Indicate 'connect' status to user space */
hdd_send_association_event(dev, pRoamInfo);
+ /* Send beacon reporting offload command to FW */
+ if (pHddCtx->config->beacon_reporting) {
+ qdf_status = hdd_set_nth_beacon_offload
+ (pAdapter,
+ pHddCtx->config->beacon_reporting);
+
+ if (QDF_IS_STATUS_ERROR(qdf_status))
+ hdd_err("Failed to set nth beacon reporting");
+ }
+
if (cds_is_mcc_in_24G()) {
if (pHddCtx->miracast_value)
cds_set_mas(pAdapter, pHddCtx->miracast_value);
@@ -3169,7 +3182,7 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
pRoamInfo->statusCode) ||
(eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE ==
pRoamInfo->statusCode)))) {
- wlan_hdd_cfg80211_update_bss_list(pAdapter,
+ wlan_hdd_cfg80211_unlink_bss(pAdapter,
pRoamInfo ?
pRoamInfo->bssid.bytes :
pWextState->req_bssId.bytes);
@@ -3177,7 +3190,9 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
pRoamInfo ?
pRoamInfo->bssid.bytes :
pWextState->req_bssId.bytes);
- connect_timeout = true;
+ if (roamResult !=
+ eCSR_ROAM_RESULT_SCAN_FOR_SSID_FAILURE)
+ connect_timeout = true;
}
/*
@@ -5162,13 +5177,18 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId,
case eCSR_ROAM_NAPI_OFF:
hdd_debug("After Roam Synch Comp: NAPI Serialize OFF");
hdd_napi_serialize(0);
- hdd_set_roaming_in_progress(false);
- if (roamResult == eCSR_ROAM_RESULT_FAILURE)
+ if (roamResult == eCSR_ROAM_RESULT_FAILURE) {
pAdapter->roam_ho_fail = true;
- else
+ hdd_set_roaming_in_progress(false);
+ } else {
pAdapter->roam_ho_fail = false;
+ }
complete(&pAdapter->roaming_comp_var);
break;
+ case eCSR_ROAM_SYNCH_COMPLETE:
+ hdd_debug("LFR3: Roam synch complete");
+ hdd_set_roaming_in_progress(false);
+ break;
case eCSR_ROAM_SHOULD_ROAM:
/* notify apps that we can't pass traffic anymore */
hdd_info("Disabling queues");
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 0e55b4166a34..dba9f1cfad47 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -4300,6 +4300,13 @@ struct reg_table_entry g_registry_table[] = {
CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_MIN,
CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_MAX),
+ REG_VARIABLE(CFG_HONOUR_NL_SCAN_POLICY_FLAGS_NAME, WLAN_PARAM_Integer,
+ struct hdd_config, honour_nl_scan_policy_flags,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_HONOUR_NL_SCAN_POLICY_FLAGS_DEFAULT,
+ CFG_HONOUR_NL_SCAN_POLICY_FLAGS_MIN,
+ CFG_HONOUR_NL_SCAN_POLICY_FLAGS_MAX),
+
REG_VARIABLE(CFG_ADAPTIVE_DWELL_MODE_ENABLED_NAME, WLAN_PARAM_Integer,
struct hdd_config, adaptive_dwell_mode_enabled,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -5796,6 +5803,14 @@ struct reg_table_entry g_registry_table[] = {
CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_DEFAULT,
CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_MIN,
CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_MAX),
+
+ REG_VARIABLE(CFG_NTH_BEACON_REPORTING_OFFLOAD_NAME,
+ WLAN_PARAM_Integer,
+ struct hdd_config, beacon_reporting,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_NTH_BEACON_REPORTING_OFFLOAD_DEFAULT,
+ CFG_NTH_BEACON_REPORTING_OFFLOAD_MIN,
+ CFG_NTH_BEACON_REPORTING_OFFLOAD_MAX),
};
/**
@@ -7534,6 +7549,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_NAME,
pHddCtx->config->extscan_adaptive_dwell_mode);
hdd_debug("Name = [%s] Value = [%u]",
+ CFG_HONOUR_NL_SCAN_POLICY_FLAGS_NAME,
+ pHddCtx->config->honour_nl_scan_policy_flags);
+ hdd_debug("Name = [%s] Value = [%u]",
CFG_ADAPTIVE_DWELL_MODE_ENABLED_NAME,
pHddCtx->config->adaptive_dwell_mode_enabled);
hdd_debug("Name = [%s] Value = [%u]",
@@ -7836,6 +7854,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
pHddCtx->config->btm_sticky_time);
hdd_debug("Name = [btm_query_bitmask] value = [0x%x]",
pHddCtx->config->btm_query_bitmask);
+ hdd_debug("Name = [%s] value = [%u]",
+ CFG_NTH_BEACON_REPORTING_OFFLOAD_NAME,
+ pHddCtx->config->beacon_reporting);
}
/**
@@ -10411,6 +10432,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
pHddCtx->config->scan_adaptive_dwell_mode;
smeConfig->csrConfig.scan_adaptive_dwell_mode_nc =
pHddCtx->config->scan_adaptive_dwell_mode_nc;
+ smeConfig->csrConfig.honour_nl_scan_policy_flags =
+ pHddCtx->config->honour_nl_scan_policy_flags;
smeConfig->csrConfig.roamscan_adaptive_dwell_mode =
pHddCtx->config->roamscan_adaptive_dwell_mode;
smeConfig->csrConfig.roam_force_rssi_trigger =
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index d91035fef36b..6cfbc3d2c828 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -4551,7 +4551,8 @@ static int hdd_get_cached_station_remote(hdd_context_t *hdd_ctx,
(sizeof(stainfo->rx_mc_bc_cnt) +
NLA_HDRLEN) +
(sizeof(stainfo->rx_retry_cnt) +
- NLA_HDRLEN);
+ NLA_HDRLEN) +
+ (sizeof(stainfo->support_mode) + NLA_HDRLEN);
skb = cfg80211_vendor_cmd_alloc_reply_skb(hdd_ctx->wiphy, nl_buf_len);
if (!skb) {
@@ -4575,7 +4576,7 @@ static int hdd_get_cached_station_remote(hdd_context_t *hdd_ctx,
stainfo->ch_width = hdd_decode_ch_width((tSirMacHTChannelWidth)
stainfo->ch_width);
- if (nla_put_u32(skb, REMOTE_SUPPORTED_MODE, stainfo->dot11_mode) ||
+ if (nla_put_u32(skb, REMOTE_SUPPORTED_MODE, stainfo->support_mode) ||
nla_put_u8(skb, REMOTE_CH_WIDTH, stainfo->ch_width)) {
hdd_err("remote ch put fail");
goto fail;
@@ -4612,7 +4613,10 @@ static int hdd_get_cached_station_remote(hdd_context_t *hdd_ctx,
goto fail;
}
}
-
+ if (nla_put_u32(skb, WLAN802_11_MODE, stainfo->dot11_mode)) {
+ hdd_err("dot11 mode put fail");
+ goto fail;
+ }
qdf_mem_zero(stainfo, sizeof(*stainfo));
return cfg80211_vendor_cmd_reply(skb);
@@ -4911,6 +4915,40 @@ hdd_cfg80211_get_station_cmd(struct wiphy *wiphy,
#undef REMOTE_PAD
#endif
+/**
+ * hdd_get_roam_reason() - convert wmi roam reason to
+ * enum qca_roam_reason
+ * @roam_scan_trigger: wmi roam scan trigger ID
+ *
+ * Return: Meaningful qca_roam_reason from enum WMI_ROAM_TRIGGER_REASON_ID
+ */
+static enum qca_roam_reason hdd_get_roam_reason(uint32_t roam_scan_trigger)
+{
+ switch (roam_scan_trigger) {
+ case WMI_ROAM_TRIGGER_REASON_PER:
+ return QCA_ROAM_REASON_PER;
+ case WMI_ROAM_TRIGGER_REASON_BMISS:
+ return QCA_ROAM_REASON_BEACON_MISS;
+ case WMI_ROAM_TRIGGER_REASON_LOW_RSSI:
+ case WMI_ROAM_TRIGGER_REASON_BACKGROUND:
+ return QCA_ROAM_REASON_POOR_RSSI;
+ case WMI_ROAM_TRIGGER_REASON_HIGH_RSSI:
+ return QCA_ROAM_REASON_BETTER_RSSI;
+ case WMI_ROAM_TRIGGER_REASON_DENSE:
+ return QCA_ROAM_REASON_CONGESTION;
+ case WMI_ROAM_TRIGGER_REASON_FORCED:
+ return QCA_ROAM_REASON_USER_TRIGGER;
+ case WMI_ROAM_TRIGGER_REASON_BTM:
+ return QCA_ROAM_REASON_BTM;
+ case WMI_ROAM_TRIGGER_REASON_BSS_LOAD:
+ return QCA_ROAM_REASON_BSS_LOAD;
+ default:
+ return QCA_ROAM_REASON_UNKNOWN;
+ }
+
+ return QCA_ROAM_REASON_UNKNOWN;
+}
+
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
/**
* __wlan_hdd_cfg80211_keymgmt_set_key() - Store the Keys in the driver session
@@ -5372,6 +5410,7 @@ int wlan_hdd_send_roam_auth_event(hdd_adapter_t *adapter, uint8_t *bssid,
eCsrAuthType auth_type;
uint32_t fils_params_len;
int status;
+ enum qca_roam_reason hdd_roam_reason;
ENTER();
@@ -5450,6 +5489,15 @@ int wlan_hdd_send_roam_auth_event(hdd_adapter_t *adapter, uint8_t *bssid,
goto nla_put_failure;
}
+ hdd_roam_reason =
+ hdd_get_roam_reason(roam_info_ptr->roam_reason);
+
+ if (nla_put_u8(skb, QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_REASON,
+ hdd_roam_reason)) {
+ hdd_err("roam reason send failure");
+ goto nla_put_failure;
+ }
+
status = wlan_hdd_add_fils_params_roam_auth_event(skb,
roam_info_ptr);
if (status)
@@ -10878,7 +10926,7 @@ qca_wlan_vendor_set_nud_stats[STATS_SET_MAX + 1] = {
const struct nla_policy
qca_wlan_vendor_set_connectivity_check_stats[CONNECTIVITY_STATS_SET_MAX + 1] = {
[STATS_PKT_INFO_TYPE] = {.type = NLA_U32 },
- [STATS_DNS_DOMAIN_NAME] = {.type = NLA_BINARY,
+ [STATS_DNS_DOMAIN_NAME] = {.type = NLA_NUL_STRING,
.len = DNS_DOMAIN_NAME_MAX_LEN },
[STATS_SRC_PORT] = {.type = NLA_U32 },
[STATS_DEST_PORT] = {.type = NLA_U32 },
@@ -16063,16 +16111,7 @@ static void wlan_hdd_fill_per_chain_rssi(struct cfg80211_inform_bss *data,
}
#endif
-/*
- * wlan_hdd_cfg80211_update_bss_list :to inform nl80211
- * interface that BSS might have been lost.
- * @pAdapter: adaptor
- * @bssid: bssid which might have been lost
- *
- * Return: bss which is unlinked from kernel cache
- */
-struct cfg80211_bss *wlan_hdd_cfg80211_update_bss_list(
- hdd_adapter_t *pAdapter, tSirMacAddr bssid)
+void wlan_hdd_cfg80211_unlink_bss(hdd_adapter_t *pAdapter, tSirMacAddr bssid)
{
struct net_device *dev = pAdapter->dev;
struct wireless_dev *wdev = dev->ieee80211_ptr;
@@ -16081,14 +16120,15 @@ struct cfg80211_bss *wlan_hdd_cfg80211_update_bss_list(
bss = hdd_cfg80211_get_bss(wiphy, NULL, bssid,
NULL, 0);
- if (bss == NULL) {
+ if (!bss) {
hdd_err("BSS not present");
} else {
hdd_debug("cfg80211_unlink_bss called for BSSID "
MAC_ADDRESS_STR, MAC_ADDR_ARRAY(bssid));
cfg80211_unlink_bss(wiphy, bss);
+ /* cfg80211_get_bss get bss with ref count so release it */
+ cfg80211_put_bss(wiphy, bss);
}
- return bss;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) || \
@@ -19769,7 +19809,6 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
hdd_context_t *pHddCtx;
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
hdd_hostapd_state_t *hapd_state;
- int status;
uint8_t staId;
uint8_t *mac;
@@ -19790,10 +19829,11 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
pAdapter->sessionId, pAdapter->device_mode));
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
- status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- return status;
+ if (!pHddCtx) {
+ hdd_err("pHddCtx is NULL");
+ return -EINVAL;
+ }
mac = (uint8_t *) pDelStaParams->peerMacAddr.bytes;
diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h
index 772ed6b1db31..e7fc0c9d984e 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.h
+++ b/core/hdd/src/wlan_hdd_cfg80211.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 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
@@ -470,8 +470,15 @@ void wlan_hdd_cfg80211_chainrssi_callback(void *hdd_ctx, void *pmsg,
void hdd_rssi_threshold_breached(void *hddctx,
struct rssi_breach_event *data);
-struct cfg80211_bss *wlan_hdd_cfg80211_update_bss_list(hdd_adapter_t *pAdapter,
- tSirMacAddr bssid);
+/*
+ * wlan_hdd_cfg80211_unlink_bss :to inform nl80211
+ * interface that BSS might have been lost.
+ * @pAdapter: adapter
+ * @bssid: bssid which might have been lost
+ *
+ * Return: void
+ */
+void wlan_hdd_cfg80211_unlink_bss(hdd_adapter_t *pAdapter, tSirMacAddr bssid);
int wlan_hdd_cfg80211_update_bss(struct wiphy *wiphy,
hdd_adapter_t *pAdapter,
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 532f961ca6c3..e7b33031fdc1 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 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
@@ -88,6 +88,11 @@
#define SAP_24GHZ_CH_COUNT (14)
#define ACS_SCAN_EXPIRY_TIMEOUT_S 4
+/* Defines the BIT position of HT caps is support mode field of stainfo */
+#define HDD_HT_CAPS_PRESENT 0
+/* Defines the BIT position of VHT caps is support mode field of stainfo */
+#define HDD_VHT_CAPS_PRESENT 1
+
/*
* 11B, 11G Rate table include Basic rate and Extended rate
* The IDX field is the rate index
@@ -1486,10 +1491,14 @@ static void hdd_fill_station_info(hdd_adapter_t *pHostapdAdapter,
if (event->vht_caps.present) {
stainfo->vht_present = true;
hdd_copy_vht_caps(&stainfo->vht_caps, &event->vht_caps);
+ stainfo->support_mode |=
+ (stainfo->vht_present << HDD_VHT_CAPS_PRESENT);
}
if (event->ht_caps.present) {
stainfo->ht_present = true;
hdd_copy_ht_caps(&stainfo->ht_caps, &event->ht_caps);
+ stainfo->support_mode |=
+ (stainfo->ht_present << HDD_HT_CAPS_PRESENT);
}
/* Initialize DHCP info */
@@ -7755,7 +7764,7 @@ static inline int wlan_hdd_set_udp_resp_offload(hdd_adapter_t *padapter,
}
#endif
-static void hdd_check_and_disconnect_sta_on_invalid_channel(
+void hdd_check_and_disconnect_sta_on_invalid_channel(
hdd_context_t *hdd_ctx)
{
hdd_adapter_t *sta_adapter;
@@ -7860,13 +7869,11 @@ int wlan_hdd_restore_channels(hdd_context_t *hdd_ctx)
* Restore the orginal states of the channels
* only if we have cached non zero values
*/
- if (cache_chann->channel_info[i].reg_status)
- cds_set_channel_state(rf_channel,
- cache_chann->
- channel_info[i].reg_status);
+ cds_set_channel_state(rf_channel,
+ cache_chann->
+ channel_info[i].reg_status);
- if (cache_chann->channel_info[i].wiphy_status && wiphy_channel)
- wiphy_channel->flags =
+ wiphy_channel->flags =
cache_chann->channel_info[i].wiphy_status;
}
@@ -8077,18 +8084,6 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
pHddCtx);
}
- if (pHostapdAdapter->device_mode == QDF_SAP_MODE &&
- !iniConfig->disable_channel) {
- /*
- * Disable the channels received in command
- * SET_DISABLE_CHANNEL_LIST
- */
- status = wlan_hdd_disable_channels(pHddCtx);
- if (!QDF_IS_STATUS_SUCCESS(status))
- hdd_err("Disable channel list fail");
- hdd_check_and_disconnect_sta_on_invalid_channel(pHddCtx);
- }
-
pConfig = &pHostapdAdapter->sessionCtx.ap.sapConfig;
pBeacon = pHostapdAdapter->sessionCtx.ap.beacon;
@@ -8674,9 +8669,6 @@ exit:
return 0;
error:
- if (pHostapdAdapter->device_mode == QDF_SAP_MODE &&
- !iniConfig->disable_channel)
- wlan_hdd_restore_channels(pHddCtx);
/* Revert the indoor to passive marking if START BSS fails */
if (iniConfig->disable_indoor_channel &&
pHostapdAdapter->device_mode == QDF_SAP_MODE) {
diff --git a/core/hdd/src/wlan_hdd_hostapd.h b/core/hdd/src/wlan_hdd_hostapd.h
index cb2a31b327f0..23fc35f61ecc 100644
--- a/core/hdd/src/wlan_hdd_hostapd.h
+++ b/core/hdd/src/wlan_hdd_hostapd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 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
@@ -153,4 +153,16 @@ QDF_STATUS hdd_softap_set_peer_authorized(hdd_adapter_t *adapter,
*/
int wlan_hdd_disable_channels(hdd_context_t *hdd_ctx);
+/*
+ * hdd_check_and_disconnect_sta_on_invalid_channel() - Disconnect STA if it is
+ * on invalid channel
+ * @hdd_ctx: pointer to hdd context
+ *
+ * STA should be disconnected before starting the SAP if it is on indoor
+ * channel.
+ *
+ * Return: void
+ */
+void hdd_check_and_disconnect_sta_on_invalid_channel(hdd_context_t *hdd_ctx);
+
#endif /* end #if !defined(WLAN_HDD_HOSTAPD_H) */
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index bd92ed5ad5ea..9e89e85a3aef 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -7169,7 +7169,7 @@ static void disconnect_sta_and_stop_sap(hdd_context_t *hdd_ctx)
if (!hdd_ctx)
return;
- wlan_hdd_disable_channels(hdd_ctx);
+ hdd_check_and_disconnect_sta_on_invalid_channel(hdd_ctx);
status = hdd_get_front_adapter(hdd_ctx, &adapter_node);
while (adapter_node && (status == QDF_STATUS_SUCCESS)) {
@@ -7356,11 +7356,16 @@ static int hdd_parse_disable_chan_cmd(hdd_adapter_t *adapter, uint8_t *ptr)
ret = 0;
}
- if (!is_command_repeated && hdd_ctx->config->disable_channel)
- disconnect_sta_and_stop_sap(hdd_ctx);
mem_alloc_failed:
qdf_mutex_release(&hdd_ctx->cache_channel_lock);
+ if (!is_command_repeated && hdd_ctx->original_channels) {
+ ret = wlan_hdd_disable_channels(hdd_ctx);
+ if (ret)
+ return ret;
+ disconnect_sta_and_stop_sap(hdd_ctx);
+ }
+
EXIT();
return ret;
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 3dc1d087275c..c78c66991e96 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -5014,6 +5014,11 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
cds_flush_delayed_work(&adapter->acs_pending_work);
clear_bit(ACS_PENDING, &adapter->event_flags);
}
+
+ /* Diassociate with all the peers before stop ap post */
+ if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags))
+ wlan_hdd_del_station(adapter);
+
hdd_ipa_flush(hdd_ctx);
case QDF_P2P_GO_MODE:
@@ -8065,111 +8070,6 @@ static void hdd_set_thermal_level_cb(void *context, u_int8_t level)
}
/**
- * hdd_get_safe_channel_from_pcl_and_acs_range() - Get safe channel for SAP
- * restart
- * @adapter: AP adapter, which should be checked for NULL
- *
- * Get a safe channel to restart SAP. PCL already takes into account the
- * unsafe channels. So, the PCL is validated with the ACS range to provide
- * a safe channel for the SAP to restart.
- *
- * Return: Channel number to restart SAP in case of success. In case of any
- * failure, the channel number returned is zero.
- */
-static uint8_t hdd_get_safe_channel_from_pcl_and_acs_range(
- hdd_adapter_t *adapter)
-{
- struct sir_pcl_list pcl;
- QDF_STATUS status;
- uint32_t i, j;
- tHalHandle *hal_handle;
- hdd_context_t *hdd_ctx;
- bool found = false;
-
- hdd_ctx = WLAN_HDD_GET_CTX(adapter);
- if (!hdd_ctx) {
- hdd_err("invalid HDD context");
- return INVALID_CHANNEL_ID;
- }
-
- hal_handle = WLAN_HDD_GET_HAL_CTX(adapter);
- if (!hal_handle) {
- hdd_err("invalid HAL handle");
- return INVALID_CHANNEL_ID;
- }
-
- status = cds_get_pcl_for_existing_conn(CDS_SAP_MODE,
- pcl.pcl_list, &pcl.pcl_len,
- pcl.weight_list, QDF_ARRAY_SIZE(pcl.weight_list),
- false);
- if (QDF_IS_STATUS_ERROR(status)) {
- hdd_err("Get PCL failed");
- return INVALID_CHANNEL_ID;
- }
-
- /*
- * In some scenarios, like hw dbs disabled, sap+sap case, if operating
- * channel is unsafe channel, the pcl may be empty, instead of return,
- * try to choose a safe channel from acs range.
- */
- if (!pcl.pcl_len)
- hdd_debug("pcl length is zero!");
-
- hdd_debug("start:%d end:%d",
- adapter->sessionCtx.ap.sapConfig.acs_cfg.start_ch,
- adapter->sessionCtx.ap.sapConfig.acs_cfg.end_ch);
-
- /* PCL already takes unsafe channel into account */
- for (i = 0; i < pcl.pcl_len; i++) {
- hdd_debug("chan[%d]:%d", i, pcl.pcl_list[i]);
- if ((pcl.pcl_list[i] >=
- adapter->sessionCtx.ap.sapConfig.acs_cfg.start_ch) &&
- (pcl.pcl_list[i] <=
- adapter->sessionCtx.ap.sapConfig.acs_cfg.end_ch)) {
- hdd_debug("found PCL safe chan:%d", pcl.pcl_list[i]);
- return pcl.pcl_list[i];
- }
- }
-
- hdd_debug("no safe channel from PCL found in ACS range");
-
- /* Try for safe channel from all valid channel */
- pcl.pcl_len = MAX_NUM_CHAN;
- status = sme_get_cfg_valid_channels(hal_handle, pcl.pcl_list,
- &pcl.pcl_len);
- if (QDF_IS_STATUS_ERROR(status)) {
- hdd_err("error in getting valid channel list");
- return INVALID_CHANNEL_ID;
- }
-
- for (i = 0; i < pcl.pcl_len; i++) {
- hdd_debug("chan[%d]:%d", i, pcl.pcl_list[i]);
- found = false;
- for (j = 0; j < hdd_ctx->unsafe_channel_count; j++) {
- if (pcl.pcl_list[i] ==
- hdd_ctx->unsafe_channel_list[j]) {
- hdd_debug("unsafe chan:%d", pcl.pcl_list[i]);
- found = true;
- break;
- }
- }
-
- if (found)
- continue;
-
- if ((pcl.pcl_list[i] >=
- adapter->sessionCtx.ap.sapConfig.acs_cfg.start_ch) &&
- (pcl.pcl_list[i] <=
- adapter->sessionCtx.ap.sapConfig.acs_cfg.end_ch)) {
- hdd_debug("found safe chan:%d", pcl.pcl_list[i]);
- return pcl.pcl_list[i];
- }
- }
-
- return INVALID_CHANNEL_ID;
-}
-
-/**
* hdd_restart_sap() - Restarts SAP on the given channel
* @adapter: AP adapter
* @channel: Channel
@@ -8325,8 +8225,8 @@ void hdd_unsafe_channel_restart_sap(hdd_context_t *hdd_ctxt)
}
restart_chan =
- hdd_get_safe_channel_from_pcl_and_acs_range(
- adapter_temp);
+ wlansap_get_safe_channel_from_pcl_and_acs_range(
+ adapter_temp->sessionCtx.ap.sapContext);
if (!restart_chan) {
hdd_err("fail to restart SAP");
} else {
@@ -8866,6 +8766,19 @@ list_destroy:
return ret;
}
+/*
+ * enum hdd_block_shutdown - Control if driver allows modem shutdown
+ * @HDD_UNBLOCK_MODEM_SHUTDOWN: Unblock shutdown
+ * @HDD_BLOCK_MODEM_SHUTDOWN: Block shutdown
+ *
+ * On calling pld_block_shutdown API with the given values, modem
+ * graceful shutdown is blocked/unblocked.
+ */
+enum hdd_block_shutdown {
+ HDD_UNBLOCK_MODEM_SHUTDOWN,
+ HDD_BLOCK_MODEM_SHUTDOWN,
+};
+
/**
* ie_whitelist_attrs_init() - initialize ie whitelisting attributes
* @hdd_ctx: pointer to hdd context
@@ -8919,9 +8832,15 @@ static void hdd_iface_change_callback(void *priv)
ENTER();
hdd_debug("Interface change timer expired close the modules!");
+
+ /* Block the modem graceful shutdown till stop modules is completed */
+ pld_block_shutdown(hdd_ctx->parent_dev, HDD_BLOCK_MODEM_SHUTDOWN);
+
ret = hdd_wlan_stop_modules(hdd_ctx, false);
if (ret)
hdd_err("Failed to stop modules");
+
+ pld_block_shutdown(hdd_ctx->parent_dev, HDD_UNBLOCK_MODEM_SHUTDOWN);
EXIT();
}
@@ -13365,6 +13284,11 @@ void hdd_set_roaming_in_progress(bool value)
hdd_ctx->roaming_in_progress = value;
hdd_debug("Roaming in Progress set to %d", value);
+ if (!hdd_ctx->roaming_in_progress) {
+ /* Reset scan reject params on successful roam complete */
+ hdd_debug("Reset scan reject params");
+ hdd_init_scan_reject_params(hdd_ctx);
+ }
}
/**
@@ -13543,6 +13467,35 @@ void hdd_pld_ipa_uc_shutdown_pipes(void)
hdd_ipa_uc_force_pipe_shutdown(hdd_ctx);
}
+#ifdef NTH_BEACON_OFFLOAD
+/**
+ * hdd_set_nth_beacon_offload() - Send the nth beacon offload command to FW
+ * @adapter: HDD adapter
+ * @value: Value of n, for which the nth beacon will be forwarded by the FW
+ *
+ * Return: QDF_STATUS_SUCCESS on success and failure status on failure
+ */
+QDF_STATUS hdd_set_nth_beacon_offload(hdd_adapter_t *adapter, uint16_t value)
+{
+ int ret;
+
+ ret = sme_cli_set_command(adapter->sessionId,
+ WMI_VDEV_PARAM_NTH_BEACON_TO_HOST,
+ value, VDEV_CMD);
+ if (ret) {
+ hdd_err("WMI_VDEV_PARAM_NTH_BEACON_TO_HOST %d", ret);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ return QDF_STATUS_SUCCESS;
+}
+#else
+QDF_STATUS hdd_set_nth_beacon_offload(hdd_adapter_t *adapter, uint16_t value)
+{
+ return QDF_STATUS_SUCCESS;
+}
+#endif
+
/**
* hdd_start_driver_ops_timer() - Starts driver ops inactivity timer
* @drv_op: Enum indicating driver op
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index ecc78d864f5c..54ec15b87817 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 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
@@ -657,16 +657,18 @@ static void hdd_update_dbs_scan_ctrl_ext_flag(hdd_context_t *hdd_ctx,
goto end;
}
- if (scan_req->scan_flags & SME_SCAN_FLAG_HIGH_ACCURACY) {
- hdd_debug("DBS disabled due to high accuracy scan request");
- goto end;
- }
- if (scan_req->scan_flags & SME_SCAN_FLAG_LOW_POWER ||
- scan_req->scan_flags & SME_SCAN_FLAG_LOW_SPAN) {
- hdd_debug("DBS enable due to Low span/power request 0x%x",
- scan_req->scan_flags);
- scan_dbs_policy = SME_SCAN_DBS_POLICY_IGNORE_DUTY;
- goto end;
+ if (hdd_ctx->config->honour_nl_scan_policy_flags) {
+ if (scan_req->scan_flags & SME_SCAN_FLAG_HIGH_ACCURACY) {
+ hdd_debug("DBS disabled for high accuracy request");
+ goto end;
+ }
+ if (scan_req->scan_flags & SME_SCAN_FLAG_LOW_POWER ||
+ scan_req->scan_flags & SME_SCAN_FLAG_LOW_SPAN) {
+ hdd_debug("DBS enable for Low span/power request 0x%x",
+ scan_req->scan_flags);
+ scan_dbs_policy = SME_SCAN_DBS_POLICY_IGNORE_DUTY;
+ goto end;
+ }
}
if (!(hdd_ctx->is_dbs_scan_duty_cycle_enabled)) {
scan_dbs_policy = SME_SCAN_DBS_POLICY_IGNORE_DUTY;
diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c
index 6efe9edb7b98..806b8129f8f2 100644
--- a/core/hdd/src/wlan_hdd_stats.c
+++ b/core/hdd/src/wlan_hdd_stats.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 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
@@ -3099,7 +3099,7 @@ static uint32_t hdd_get_max_rate_legacy(hdd_station_info_t *stainfo,
maxidx < stainfo->max_ext_idx)
maxidx = stainfo->max_ext_idx;
- for (i = 0; QDF_ARRAY_SIZE(supported_data_rate); i++) {
+ for (i = 0; i < QDF_ARRAY_SIZE(supported_data_rate); i++) {
if (supported_data_rate[i].beacon_rate_index == maxidx)
maxrate =
supported_data_rate[i].supported_rate[rssidx];
diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h
index 757de3dcc201..b39ea7041107 100644
--- a/core/mac/inc/qwlan_version.h
+++ b/core/mac/inc/qwlan_version.h
@@ -32,9 +32,9 @@
#define QWLAN_VERSION_MAJOR 5
#define QWLAN_VERSION_MINOR 1
#define QWLAN_VERSION_PATCH 1
-#define QWLAN_VERSION_EXTRA "C"
-#define QWLAN_VERSION_BUILD 71
+#define QWLAN_VERSION_EXTRA "E"
+#define QWLAN_VERSION_BUILD 72
-#define QWLAN_VERSIONSTR "5.1.1.71C"
+#define QWLAN_VERSIONSTR "5.1.1.72E"
#endif /* QWLAN_VERSION_H */
diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h
index cc69a0ed216d..8c16f417604e 100644
--- a/core/mac/src/include/dot11f.h
+++ b/core/mac/src/include/dot11f.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 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
@@ -26,7 +26,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Tue Dec 11 14:40:59 2018 from the following file(s):
+ * Mon Mar 25 14:48:07 2019 from the following file(s):
*
* dot11f.frms
*
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c
index 08a5dd1734e8..1d7c0fb67187 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2019 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
@@ -607,6 +607,8 @@ void lim_cleanup(tpAniSirGlobal pMac)
}
if (pMac->lim.gpLimMlmSetKeysReq != NULL) {
+ qdf_mem_zero(pMac->lim.gpLimMlmSetKeysReq,
+ sizeof(tLimMlmSetKeysReq));
qdf_mem_free(pMac->lim.gpLimMlmSetKeysReq);
pMac->lim.gpLimMlmSetKeysReq = NULL;
}
diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
index f696fa1a9a4a..f5afc60e231e 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
@@ -2107,6 +2107,8 @@ lim_process_mlm_set_keys_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
mlm_set_keys_req = (tLimMlmSetKeysReq *) msg_buf;
if (mac_ctx->lim.gpLimMlmSetKeysReq != NULL) {
+ qdf_mem_zero(mac_ctx->lim.gpLimMlmSetKeysReq,
+ sizeof(tLimMlmSetKeysReq));
qdf_mem_free(mac_ctx->lim.gpLimMlmSetKeysReq);
mac_ctx->lim.gpLimMlmSetKeysReq = NULL;
}
@@ -2255,9 +2257,6 @@ lim_process_mlm_set_keys_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
session->peSessionId);
/* Package WMA_SET_BSSKEY_REQ message parameters */
lim_send_set_bss_key_req(mac_ctx, mlm_set_keys_req, session);
-
- qdf_mem_zero(mlm_set_keys_req->key, sizeof(tSirKeys));
- mlm_set_keys_req->numKeys = 0;
return;
} else {
/*
@@ -2267,15 +2266,11 @@ lim_process_mlm_set_keys_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
lim_send_set_sta_key_req(mac_ctx, mlm_set_keys_req, sta_idx,
(uint8_t) default_key_id, session,
true);
- qdf_mem_zero(mlm_set_keys_req->key, sizeof(tSirKeys));
- mlm_set_keys_req->numKeys = 0;
return;
}
end:
mlm_set_keys_cnf.sessionId = mlm_set_keys_req->sessionId;
lim_post_sme_set_keys_cnf(mac_ctx, mlm_set_keys_req, &mlm_set_keys_cnf);
- qdf_mem_zero(mlm_set_keys_req->key, sizeof(tSirKeys));
- mlm_set_keys_req->numKeys = 0;
}
/**
diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
index 612d9316428f..da44e6c14053 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
@@ -2720,7 +2720,7 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx,
session_entry = pe_find_session_by_session_id(mac_ctx, session_id);
if (session_entry == NULL) {
pe_err("session does not exist for given session_id");
- qdf_mem_zero(msg->bodyptr, sizeof(tSetBssKeyParams));
+ qdf_mem_zero(msg->bodyptr, sizeof(tSetStaKeyParams));
qdf_mem_free(msg->bodyptr);
msg->bodyptr = NULL;
lim_send_sme_set_context_rsp(mac_ctx,
@@ -2746,7 +2746,7 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx,
else
mlm_set_key_cnf.key_len_nonzero = false;
- qdf_mem_zero(msg->bodyptr, sizeof(tSetBssKeyParams));
+ qdf_mem_zero(msg->bodyptr, sizeof(tSetStaKeyParams));
qdf_mem_free(msg->bodyptr);
msg->bodyptr = NULL;
@@ -2765,6 +2765,8 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx,
* Free the buffer cached for the global
* mac_ctx->lim.gpLimMlmSetKeysReq
*/
+ qdf_mem_zero(mac_ctx->lim.gpLimMlmSetKeysReq,
+ sizeof(tLimMlmSetKeysReq));
qdf_mem_free(mac_ctx->lim.gpLimMlmSetKeysReq);
mac_ctx->lim.gpLimMlmSetKeysReq = NULL;
}
@@ -2808,6 +2810,7 @@ void lim_process_mlm_set_bss_key_rsp(tpAniSirGlobal mac_ctx,
if (session_entry == NULL) {
pe_err("session does not exist for given sessionId [%d]",
session_id);
+ qdf_mem_zero(msg->bodyptr, sizeof(tSetBssKeyParams));
qdf_mem_free(msg->bodyptr);
msg->bodyptr = NULL;
lim_send_sme_set_context_rsp(mac_ctx, set_key_cnf.peer_macaddr,
@@ -2865,6 +2868,8 @@ void lim_process_mlm_set_bss_key_rsp(tpAniSirGlobal mac_ctx,
* Free the buffer cached for the
* global mac_ctx->lim.gpLimMlmSetKeysReq
*/
+ qdf_mem_zero(mac_ctx->lim.gpLimMlmSetKeysReq,
+ sizeof(tLimMlmSetKeysReq));
qdf_mem_free(mac_ctx->lim.gpLimMlmSetKeysReq);
mac_ctx->lim.gpLimMlmSetKeysReq = NULL;
}
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index b30f4c89d950..37f0f62ab5c5 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -4141,6 +4141,7 @@ static void __lim_process_roam_scan_offload_req(tpAniSirGlobal mac_ctx,
local_ie_buf = qdf_mem_malloc(MAX_DEFAULT_SCAN_IE_LEN);
if (!local_ie_buf) {
pe_err("Mem Alloc failed for local_ie_buf");
+ qdf_mem_zero(req_buffer, sizeof(tSirRoamOffloadScanReq));
qdf_mem_free(req_buffer);
return;
}
@@ -4168,6 +4169,7 @@ static void __lim_process_roam_scan_offload_req(tpAniSirGlobal mac_ctx,
status = wma_post_ctrl_msg(mac_ctx, &wma_msg);
if (eSIR_SUCCESS != status) {
pe_err("Posting WMA_ROAM_SCAN_OFFLOAD_REQ failed");
+ qdf_mem_zero(req_buffer, sizeof(tSirRoamOffloadScanReq));
qdf_mem_free(req_buffer);
}
}
diff --git a/core/mac/src/pe/lim/lim_scan_result_utils.c b/core/mac/src/pe/lim/lim_scan_result_utils.c
index 01979f416566..d17eacea4cf1 100644
--- a/core/mac/src/pe/lim/lim_scan_result_utils.c
+++ b/core/mac/src/pe/lim/lim_scan_result_utils.c
@@ -449,17 +449,14 @@ lim_check_and_add_bss_description(tpAniSirGlobal mac_ctx,
}
}
- /* Drop beacon, if CH do not match, Drop */
- if (!fProbeRsp &&
- (drop_bcn_prb_rsp || is_unsafe_chan)) {
- pe_debug("Beacon Rsp dropped. Channel in BD: %d Channel in beacon: %d",
+ /* Drop beacon/Probe, if CH do not match, Drop */
+ if (drop_bcn_prb_rsp || is_unsafe_chan) {
+ pe_debug("Beacon/Probe Rsp dropped. Channel in BD: %d Channel in beacon: %d",
rx_chan_bd, rx_chan_in_beacon);
return;
}
- /* Probe RSP, do not drop */
else {
- if (!mac_ctx->allow_adj_ch_bcn)
- flags |= WLAN_SKIP_RSSI_UPDATE;
+ flags |= WLAN_SKIP_RSSI_UPDATE;
pe_debug("SSID: %s CH in ProbeRsp: %d CH in BD: %d mismatch Do Not Drop",
bpr->ssId.ssId, rx_chan_in_beacon,
WMA_GET_RX_CH(rx_packet_info));
diff --git a/core/mac/src/pe/lim/lim_security_utils.c b/core/mac/src/pe/lim/lim_security_utils.c
index 56bb15d9bb51..a99bcff2a561 100644
--- a/core/mac/src/pe/lim/lim_security_utils.c
+++ b/core/mac/src/pe/lim/lim_security_utils.c
@@ -854,6 +854,8 @@ void lim_send_set_bss_key_req(tpAniSirGlobal pMac,
/* Respond to SME with LIM_MLM_SETKEYS_CNF */
mlmSetKeysCnf.resultCode = eSIR_SME_HAL_SEND_MESSAGE_FAIL;
+ qdf_mem_zero(pSetBssKeyParams, sizeof(tSetBssKeyParams));
+ qdf_mem_free(pSetBssKeyParams);
} else
return; /* Continue after WMA_SET_BSSKEY_RSP... */
diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c
index ba12a507375a..787e43a0a545 100644
--- a/core/mac/src/pe/sch/sch_beacon_process.c
+++ b/core/mac/src/pe/sch/sch_beacon_process.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 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
@@ -546,15 +546,14 @@ sch_bcn_process_sta_ibss(tpAniSirGlobal mac_ctx,
if ((operMode == eHT_CHANNEL_WIDTH_80MHZ) &&
(bcn->OperatingMode.chanWidth > eHT_CHANNEL_WIDTH_80MHZ))
skip_opmode_update = true;
+
if (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE == cb_mode) {
/*
- * if channel bonding is disabled from INI and
- * receiving beacon which has operating mode IE
- * containing channel width change then don't update
- * CH_WIDTH
+ * if channel bonding is disabled from INI don't
+ * update the CH_WIDTH
*/
- pe_err("CB disabled & CH_WIDTH changed old[%d] new[%d]",
- operMode, bcn->OperatingMode.chanWidth);
+ pe_debug_rate_limited(30, "CB disabled skip bw update: old[%d] new[%d]",
+ operMode, bcn->OperatingMode.chanWidth);
return;
}
@@ -620,15 +619,14 @@ sch_bcn_process_sta_ibss(tpAniSirGlobal mac_ctx,
if (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE == cb_mode) {
/*
- * if channel bonding is disabled from INI and
- * receiving beacon which has operating mode IE
- * containing channel width change then don't update
- * the CH_WIDTH
+ * if channel bonding is disabled from INI don't
+ * update the CH_WIDTH
*/
- pe_err("CB disabled & VHT CH_WIDTH changed old[%d] new[%d]",
- operMode, bcn->VHTOperation.chanWidth);
+ pe_debug_rate_limited(30, "CB disabled, skip ch width update: old[%d] new[%d]",
+ operMode, bcn->VHTOperation.chanWidth);
return;
}
+
if (!skip_opmode_update &&
(operMode != bcn->VHTOperation.chanWidth)) {
pe_debug("received VHTOP CHWidth %d staIdx = %d",
diff --git a/core/mac/src/sys/legacy/src/utils/src/dot11f.c b/core/mac/src/sys/legacy/src/utils/src/dot11f.c
index fa57865abc1e..391d1b8801eb 100644
--- a/core/mac/src/sys/legacy/src/utils/src/dot11f.c
+++ b/core/mac/src/sys/legacy/src/utils/src/dot11f.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 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
@@ -24,7 +24,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Tue Dec 11 14:40:59 2018 from the following file(s):
+ * Mon Mar 25 14:48:07 2019 from the following file(s):
*
* dot11f.frms
*
@@ -1635,7 +1635,7 @@ uint32_t dot11f_unpack_ie_gtk(tpAniSirGlobal pCtx,
uint16_t tmp9__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -1686,7 +1686,7 @@ uint32_t dot11f_unpack_ie_igtk(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -1734,7 +1734,7 @@ uint32_t dot11f_unpack_ie_r0_kh_id(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_PMK_R0_ID = (uint8_t)(ielen);
if (ielen > 48) {
@@ -1759,7 +1759,7 @@ uint32_t dot11f_unpack_ie_r1_kh_id(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 6)) {
pDst->present = 0;
@@ -1783,7 +1783,7 @@ uint32_t dot11f_unpack_ie_ap_channel_report(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -1816,7 +1816,7 @@ uint32_t dot11f_unpack_ie_bcn_reporting_detail(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -1840,7 +1840,7 @@ uint32_t dot11f_unpack_ie_beacon_report_frm_body(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_reportedFields = (uint8_t)(ielen);
if (ielen > 224) {
@@ -1865,7 +1865,7 @@ uint32_t dot11f_unpack_ie_beacon_reporting(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -1897,7 +1897,7 @@ uint32_t dot11f_unpack_ie_condensed_country_str(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -1921,7 +1921,7 @@ uint32_t dot11f_unpack_ie_measurement_pilot(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -1949,7 +1949,7 @@ uint32_t dot11f_unpack_ie_multi_bssid(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -1977,7 +1977,7 @@ uint32_t dot11f_unpack_ie_ric_data(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -2017,7 +2017,7 @@ uint32_t dot11f_unpack_ie_ric_descriptor(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -2050,7 +2050,7 @@ uint32_t dot11f_unpack_ie_rrm_enabled_cap(tpAniSirGlobal pCtx,
uint8_t tmp14__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -2137,7 +2137,7 @@ uint32_t dot11f_unpack_ie_requested_info(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_requested_eids = (uint8_t)(ielen);
DOT11F_MEMCPY(pCtx, pDst->requested_eids, pBuf, (ielen));
@@ -2185,7 +2185,7 @@ uint32_t dot11f_unpack_ie_schedule(tpAniSirGlobal pCtx,
uint16_t tmp15__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -2245,7 +2245,7 @@ uint32_t dot11f_unpack_ie_tclas(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -2440,7 +2440,7 @@ uint32_t dot11f_unpack_ie_ts_delay(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 4)) {
pDst->present = 0;
@@ -2464,7 +2464,7 @@ uint32_t dot11f_unpack_ie_tsf_info(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -2499,7 +2499,7 @@ uint32_t dot11f_unpack_ie_tspec(tpAniSirGlobal pCtx,
uint16_t tmp18__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -2666,7 +2666,7 @@ uint32_t dot11f_unpack_ie_vht_caps(tpAniSirGlobal pCtx,
uint16_t tmp21__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 4)) {
pDst->present = 0;
@@ -2746,7 +2746,7 @@ uint32_t dot11f_unpack_ie_vht_operation(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -2795,7 +2795,7 @@ uint32_t dot11f_unpack_ie_wmm_schedule(tpAniSirGlobal pCtx,
uint16_t tmp22__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -2867,7 +2867,7 @@ uint32_t dot11f_unpack_ie_wmmtclas(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -3071,7 +3071,7 @@ uint32_t dot11f_unpack_ie_wmmtclasproc(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -3107,7 +3107,7 @@ uint32_t dot11f_unpack_ie_wmmts_delay(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -3146,7 +3146,7 @@ uint32_t dot11f_unpack_ie_wmmtspec(tpAniSirGlobal pCtx,
uint16_t tmp25__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -3322,7 +3322,7 @@ uint32_t dot11f_unpack_ie_wider_bw_chan_switch_ann(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -3362,7 +3362,7 @@ uint32_t dot11f_unpack_ie_azimuth_req(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -3387,7 +3387,7 @@ uint32_t dot11f_unpack_ie_beacon_report_frm_body_fragment_id(tpAniSirGlobal pCtx
uint16_t tmp26__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -3414,7 +3414,7 @@ uint32_t dot11f_unpack_ie_last_beacon_report_indication(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -3438,7 +3438,7 @@ uint32_t dot11f_unpack_ie_max_age(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -3491,7 +3491,7 @@ uint32_t dot11f_unpack_ie_neighbor_rpt(tpAniSirGlobal pCtx,
uint8_t tmp28__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 6)) {
pDst->present = 0;
@@ -3584,7 +3584,7 @@ uint32_t dot11f_unpack_ie_req_mac_addr(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 6)) {
pDst->present = 0;
@@ -3608,7 +3608,7 @@ uint32_t dot11f_unpack_ie_tgt_mac_addr(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 6)) {
pDst->present = 0;
@@ -3632,7 +3632,7 @@ uint32_t dot11f_unpack_ie_vht_transmit_power_env(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_bytes = (uint8_t)(ielen);
if (ielen > 5) {
@@ -3657,7 +3657,7 @@ uint32_t dot11f_unpack_ie_aid(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -3681,7 +3681,7 @@ uint32_t dot11f_unpack_ie_cf_params(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -3729,7 +3729,7 @@ uint32_t dot11f_unpack_ie_challenge_text(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_text = (uint8_t)(ielen);
if (ielen > 253) {
@@ -3754,7 +3754,7 @@ uint32_t dot11f_unpack_ie_chan_switch_ann(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -3810,7 +3810,7 @@ uint32_t dot11f_unpack_ie_channel_switch_wrapper(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
(void)pCtx;
status |= unpack_core(pCtx,
@@ -3836,7 +3836,7 @@ uint32_t dot11f_unpack_ie_country(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 3)) {
pDst->present = 0;
@@ -3885,7 +3885,7 @@ uint32_t dot11f_unpack_ie_edca_param_set(tpAniSirGlobal pCtx,
uint8_t tmp36__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -4038,7 +4038,7 @@ uint32_t dot11f_unpack_ie_erp_info(tpAniSirGlobal pCtx,
uint8_t tmp37__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -4066,7 +4066,7 @@ uint32_t dot11f_unpack_ie_ese_cckm_opaque(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_data = (uint8_t)(ielen);
if (ielen > 20) {
@@ -4092,7 +4092,7 @@ uint32_t dot11f_unpack_ie_ese_rad_mgmt_cap(tpAniSirGlobal pCtx,
uint8_t tmp38__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -4126,7 +4126,7 @@ uint32_t dot11f_unpack_ie_ese_traf_strm_met(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -4166,7 +4166,7 @@ uint32_t dot11f_unpack_ie_ese_traf_strm_rate_set(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -4199,7 +4199,7 @@ uint32_t dot11f_unpack_ie_ese_txmit_power(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -4231,7 +4231,7 @@ uint32_t dot11f_unpack_ie_ese_version(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -4255,7 +4255,7 @@ uint32_t dot11f_unpack_ie_ESP_information(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_variable_data = (uint8_t)(ielen);
if (ielen > 96) {
@@ -4280,7 +4280,7 @@ uint32_t dot11f_unpack_ie_ext_cap(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (!ielen) /* Check to ensure copying of ielen bytes */
@@ -4312,7 +4312,7 @@ uint32_t dot11f_unpack_ie_ext_supp_rates(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
for (i = 0; i < ielen; i++) {
if ((DOT11F_IS_BG_RATE(pBuf[i] & 0x7F)) &&
@@ -4343,7 +4343,7 @@ uint32_t dot11f_unpack_ie_fh_param_set(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -4391,7 +4391,7 @@ uint32_t dot11f_unpack_ie_fh_params(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -4423,7 +4423,7 @@ uint32_t dot11f_unpack_ie_fh_patt_table(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -4500,7 +4500,7 @@ uint32_t dot11f_unpack_ie_ft_info(tpAniSirGlobal pCtx,
uint16_t tmp39__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -4565,7 +4565,7 @@ uint32_t dot11f_unpack_ie_ht_caps(tpAniSirGlobal pCtx,
uint8_t tmp44__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -4687,7 +4687,7 @@ uint32_t dot11f_unpack_ie_ht_info(tpAniSirGlobal pCtx,
uint16_t tmp47__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -4769,7 +4769,7 @@ uint32_t dot11f_unpack_ie_ibss_params(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -4793,7 +4793,7 @@ uint32_t dot11f_unpack_ie_link_identifier(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 6)) {
pDst->present = 0;
@@ -4924,7 +4924,7 @@ uint32_t dot11f_unpack_ie_measurement_report(tpAniSirGlobal pCtx,
uint8_t tmp50__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -5308,7 +5308,7 @@ uint32_t dot11f_unpack_ie_measurement_request(tpAniSirGlobal pCtx,
uint8_t tmp51__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -5536,7 +5536,7 @@ uint32_t dot11f_unpack_ie_mobility_domain(tpAniSirGlobal pCtx,
uint8_t tmp52__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -5600,7 +5600,7 @@ uint32_t dot11f_unpack_ie_neighbor_report(tpAniSirGlobal pCtx,
uint8_t tmp54__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 6)) {
pDst->present = 0;
@@ -5693,7 +5693,7 @@ uint32_t dot11f_unpack_ie_obss_scan_parameters(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -5766,7 +5766,7 @@ uint32_t dot11f_unpack_ie_operating_mode(tpAniSirGlobal pCtx,
uint8_t tmp55__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -5981,7 +5981,7 @@ uint32_t dot11f_unpack_ie_p2_pie_opaque(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_data = (uint8_t)(ielen);
if (ielen > 249) {
@@ -6084,7 +6084,7 @@ uint32_t dot11f_unpack_ie_pti_control(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6117,7 +6117,7 @@ uint32_t dot11f_unpack_ie_pu_buffer_status(tpAniSirGlobal pCtx,
uint8_t tmp56__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6146,7 +6146,7 @@ uint32_t dot11f_unpack_ie_power_caps(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6178,7 +6178,7 @@ uint32_t dot11f_unpack_ie_power_constraints(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6202,7 +6202,7 @@ uint32_t dot11f_unpack_ie_qbss_load(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -6242,7 +6242,7 @@ uint32_t dot11f_unpack_ie_QCN_IE(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 4)) {
pDst->present = 0;
@@ -6266,7 +6266,7 @@ uint32_t dot11f_unpack_ie_QComVendorIE(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6299,7 +6299,7 @@ uint32_t dot11f_unpack_ie_qos_caps_ap(tpAniSirGlobal pCtx,
uint8_t tmp57__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6329,7 +6329,7 @@ uint32_t dot11f_unpack_ie_qos_caps_station(tpAniSirGlobal pCtx,
uint8_t tmp58__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6360,7 +6360,7 @@ uint32_t dot11f_unpack_ie_qos_map_set(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_dscp_exceptions = (uint8_t)(ielen);
if (ielen > 60) {
@@ -6385,7 +6385,7 @@ uint32_t dot11f_unpack_ie_quiet(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6433,7 +6433,7 @@ uint32_t dot11f_unpack_ie_rcpiie(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6507,7 +6507,7 @@ uint32_t dot11f_unpack_ie_ric_data_desc(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
(void)pCtx;
status |= unpack_core(pCtx,
@@ -6536,7 +6536,7 @@ uint32_t dot11f_unpack_ie_rsn(tpAniSirGlobal pCtx,
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -6709,7 +6709,7 @@ uint32_t dot11f_unpack_ie_rsniie(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6733,7 +6733,7 @@ uint32_t dot11f_unpack_ie_rsn_opaque(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_data = (uint8_t)(ielen);
if (ielen > 253) {
@@ -6758,7 +6758,7 @@ uint32_t dot11f_unpack_ie_supp_channels(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_bands = (uint8_t)(ielen / 2);
if (ielen > 48 * 2) {
@@ -6783,7 +6783,7 @@ uint32_t dot11f_unpack_ie_supp_operating_classes(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_classes = (uint8_t)(ielen);
if (ielen > 32) {
@@ -6810,7 +6810,7 @@ uint32_t dot11f_unpack_ie_supp_rates(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
for (i = 0; i < ielen; i++) {
if ((DOT11F_IS_BG_RATE(pBuf[i] & 0x7F)) &&
@@ -6841,7 +6841,7 @@ uint32_t dot11f_unpack_ie_tim(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6890,7 +6890,7 @@ uint32_t dot11f_unpack_ie_tpc_report(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6922,7 +6922,7 @@ uint32_t dot11f_unpack_ie_tpc_request(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
(void)pCtx;
return status;
@@ -6940,7 +6940,7 @@ uint32_t dot11f_unpack_ie_time_advertisement(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -6980,7 +6980,7 @@ uint32_t dot11f_unpack_ie_timeout_interval(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -7012,7 +7012,7 @@ uint32_t dot11f_unpack_ie_vht_ext_bss_load(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -7068,7 +7068,7 @@ uint32_t dot11f_unpack_ie_vendor1_ie(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
(void)pCtx;
return status;
@@ -7086,7 +7086,7 @@ uint32_t dot11f_unpack_ie_vendor3_ie(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
(void)pCtx;
return status;
@@ -7105,7 +7105,7 @@ uint32_t dot11f_unpack_ie_wapi(tpAniSirGlobal pCtx,
uint16_t tmp59__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -7219,7 +7219,7 @@ uint32_t dot11f_unpack_ie_wapi_opaque(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_data = (uint8_t)(ielen);
if (ielen > 253) {
@@ -7244,7 +7244,7 @@ uint32_t dot11f_unpack_ie_wfatpc(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -7276,7 +7276,7 @@ uint32_t dot11f_unpack_ie_wfdie_opaque(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_data = (uint8_t)(ielen);
if (ielen > 249) {
@@ -7302,7 +7302,7 @@ uint32_t dot11f_unpack_ie_wmm_caps(tpAniSirGlobal pCtx,
uint8_t tmp60__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -7344,7 +7344,7 @@ uint32_t dot11f_unpack_ie_wmm_info_ap(tpAniSirGlobal pCtx,
uint8_t tmp61__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -7380,7 +7380,7 @@ uint32_t dot11f_unpack_ie_wmm_info_station(tpAniSirGlobal pCtx,
uint8_t tmp62__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -7427,7 +7427,7 @@ uint32_t dot11f_unpack_ie_wmm_params(tpAniSirGlobal pCtx,
uint8_t tmp70__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -7591,7 +7591,7 @@ uint32_t dot11f_unpack_ie_wpa(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -7700,7 +7700,7 @@ uint32_t dot11f_unpack_ie_wpa_opaque(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_data = (uint8_t)(ielen);
if (ielen > 249) {
@@ -8011,7 +8011,7 @@ uint32_t dot11f_unpack_ie_wsc_ie_opaque(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_data = (uint8_t)(ielen);
if (ielen > 249) {
@@ -8219,7 +8219,7 @@ uint32_t dot11f_unpack_ie_dh_parameter_element(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -8247,7 +8247,7 @@ uint32_t dot11f_unpack_ie_ext_chan_switch_ann(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -8295,7 +8295,7 @@ uint32_t dot11f_unpack_ie_fils_assoc_delay_info(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -8319,7 +8319,7 @@ uint32_t dot11f_unpack_ie_fils_hlp_container(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 6)) {
pDst->present = 0;
@@ -8356,7 +8356,7 @@ uint32_t dot11f_unpack_ie_fils_indication(tpAniSirGlobal pCtx,
uint16_t tmp71__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 2)) {
pDst->present = 0;
@@ -8393,7 +8393,7 @@ uint32_t dot11f_unpack_ie_fils_kde(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 8)) {
pDst->present = 0;
@@ -8421,7 +8421,7 @@ uint32_t dot11f_unpack_ie_fils_key_confirmation(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_key_auth = (uint8_t)(ielen);
DOT11F_MEMCPY(pCtx, pDst->key_auth, pBuf, (ielen));
@@ -8441,7 +8441,7 @@ uint32_t dot11f_unpack_ie_fils_nonce(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 16)) {
pDst->present = 0;
@@ -8465,7 +8465,7 @@ uint32_t dot11f_unpack_ie_fils_public_key(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -8493,7 +8493,7 @@ uint32_t dot11f_unpack_ie_fils_session(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 8)) {
pDst->present = 0;
@@ -8517,7 +8517,7 @@ uint32_t dot11f_unpack_ie_fils_wrapped_data(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_wrapped_data = (uint8_t)(ielen);
DOT11F_MEMCPY(pCtx, pDst->wrapped_data, pBuf, (ielen));
@@ -8537,7 +8537,7 @@ uint32_t dot11f_unpack_ie_fragment_ie(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_data = (uint8_t)(ielen);
DOT11F_MEMCPY(pCtx, pDst->data, pBuf, (ielen));
@@ -8558,7 +8558,7 @@ uint32_t dot11f_unpack_ie_hs20vendor_ie(tpAniSirGlobal pCtx,
uint8_t tmp72__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -8615,7 +8615,7 @@ uint32_t dot11f_unpack_ie_ht2040_bss_coexistence(tpAniSirGlobal pCtx,
uint8_t tmp73__;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -8645,7 +8645,7 @@ uint32_t dot11f_unpack_ie_ht2040_bss_intolerant_report(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -8678,7 +8678,7 @@ uint32_t dot11f_unpack_ie_osen_ie(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
pDst->num_data = (uint8_t)(ielen);
DOT11F_MEMCPY(pCtx, pDst->data, pBuf, (ielen));
@@ -8698,7 +8698,7 @@ uint32_t dot11f_unpack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
@@ -8737,7 +8737,7 @@ uint32_t dot11f_unpack_ie_vendor_vht_ie(tpAniSirGlobal pCtx,
uint32_t status = DOT11F_PARSE_SUCCESS;
(void) pBuf; (void)ielen; /* Shutup the compiler */
if (pDst->present)
- status = DOT11F_DUPLICATE_IE;
+ return DOT11F_DUPLICATE_IE;
pDst->present = 1;
if (unlikely(ielen < 1)) {
pDst->present = 0;
diff --git a/core/pld/inc/pld_common.h b/core/pld/inc/pld_common.h
index dfad21ec716c..aef1aaecc70c 100644
--- a/core/pld/inc/pld_common.h
+++ b/core/pld/inc/pld_common.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019 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
@@ -560,6 +560,7 @@ int pld_smmu_map(struct device *dev, phys_addr_t paddr,
unsigned int pld_socinfo_get_serial_number(struct device *dev);
int pld_is_qmi_disable(struct device *dev);
int pld_is_fw_down(void);
+void pld_block_shutdown(struct device *dev, bool status);
int pld_force_assert_target(struct device *dev);
bool pld_is_fw_dump_skipped(struct device *dev);
diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c
index e0d8c58ec671..d278a004b3b2 100644
--- a/core/pld/src/pld_common.c
+++ b/core/pld/src/pld_common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019 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
@@ -1552,3 +1552,26 @@ enum pld_cc_src pld_get_cc_source(struct device *dev)
return PLD_SOURCE_CORE;
}
#endif
+/**
+ * pld_block_shutdown() - Block/Unblock modem shutdown
+ * @dev: device
+ * @status: status true or false
+ *
+ * This API will be called to Block/Unblock modem shutdown.
+ * True - Block shutdown
+ * False - Unblock shutdown
+ *
+ * Return: None
+ */
+void pld_block_shutdown(struct device *dev, bool status)
+{
+ enum pld_bus_type type = pld_get_bus_type(dev);
+
+ switch (type) {
+ case PLD_BUS_TYPE_SNOC:
+ pld_snoc_block_shutdown(status);
+ break;
+ default:
+ break;
+ }
+}
diff --git a/core/pld/src/pld_snoc.h b/core/pld/src/pld_snoc.h
index 614415ae02a9..fcaad1297d4a 100644
--- a/core/pld/src/pld_snoc.h
+++ b/core/pld/src/pld_snoc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019 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
@@ -130,6 +130,10 @@ static inline int pld_snoc_is_fw_rejuvenate(void)
{
return 0;
}
+
+static inline void pld_snoc_block_shutdown(bool status)
+{
+}
#else
int pld_snoc_register_driver(void);
void pld_snoc_unregister_driver(void);
@@ -253,5 +257,10 @@ static inline int pld_snoc_is_fw_rejuvenate(void)
{
return icnss_is_rejuvenate();
}
+
+static inline void pld_snoc_block_shutdown(bool status)
+{
+ icnss_block_shutdown(status);
+}
#endif
#endif
diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h
index c27d9382f2c2..c82ab0a28f9e 100644
--- a/core/sap/inc/sap_api.h
+++ b/core/sap/inc/sap_api.h
@@ -1056,6 +1056,33 @@ void wlansap_set_stop_bss_inprogress(void *ctx, bool in_progress);
*/
bool wlansap_check_sap_started(void *sap_ctx);
+/**
+ * wlansap_filter_ch_based_acs() -filter out channel based on acs
+ * @sap_ctx: sap context
+ * @ch_list: pointer to channel list
+ * @ch_cnt: channel number of channel list
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlansap_filter_ch_based_acs(void *sap_ctx,
+ uint8_t *ch_list,
+ uint32_t *ch_cnt);
+#if defined(FEATURE_WLAN_CH_AVOID)
+/**
+ * wlansap_get_safe_channel_from_pcl_and_acs_range() - Get safe channel for SAP
+ * restart
+ * @cds_ctx: sap context
+ *
+ * Get a safe channel to restart SAP. PCL already takes into account the
+ * unsafe channels. So, the PCL is validated with the ACS range to provide
+ * a safe channel for the SAP to restart.
+ *
+ * Return: Channel number to restart SAP in case of success. In case of any
+ * failure, the channel number returned is zero.
+ */
+uint8_t wlansap_get_safe_channel_from_pcl_and_acs_range(void *cds_ctx);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/core/sap/src/sap_api_link_cntl.c b/core/sap/src/sap_api_link_cntl.c
index 4e3e9fe68fe3..94a2fe95f287 100644
--- a/core/sap/src/sap_api_link_cntl.c
+++ b/core/sap/src/sap_api_link_cntl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 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
@@ -358,19 +358,11 @@ wlansap_pre_start_bss_acs_scan_callback(tHalHandle hal_handle, void *pcontext,
}
if (oper_channel == SAP_CHANNEL_NOT_SELECTED) {
-#ifdef SOFTAP_CHANNEL_RANGE
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
- FL("No suitable channel selected"));
-
- sap_ctx->sap_state = eSAP_ACS_CHANNEL_SELECTED;
- sap_ctx->sap_status = eSAP_STATUS_FAILURE;
- goto close_session;
- } else {
-#else
+ FL("No suitable channel, so select default channel"));
sap_ctx->channel =
sap_select_default_oper_chan(sap_ctx->acs_cfg);
} else {
-#endif
/* Valid Channel Found from scan results. */
sap_ctx->acs_cfg->pri_ch = oper_channel;
sap_ctx->channel = oper_channel;
diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c
index 3721fad5e415..b1d7ed4b510c 100644
--- a/core/sap/src/sap_module.c
+++ b/core/sap/src/sap_module.c
@@ -3867,3 +3867,152 @@ bool wlansap_check_sap_started(void *sap_ctx)
return false;
}
+
+QDF_STATUS wlansap_filter_ch_based_acs(void *cds_ctx,
+ uint8_t *ch_list,
+ uint32_t *ch_cnt)
+{
+ size_t ch_index;
+ uint32_t target_ch_cnt = 0;
+ ptSapContext sap_ctx;
+
+ sap_ctx = CDS_GET_SAP_CB(cds_ctx);
+
+ if (!sap_ctx || !ch_list || !ch_cnt || !sap_ctx->acs_cfg) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
+ "Null parameters");
+ return QDF_STATUS_E_FAULT;
+ }
+
+ for (ch_index = 0; ch_index < *ch_cnt; ch_index++) {
+ if (ch_list[ch_index] >= sap_ctx->acs_cfg->start_ch &&
+ ch_list[ch_index] <= sap_ctx->acs_cfg->end_ch)
+ ch_list[target_ch_cnt++] = ch_list[ch_index];
+ }
+
+ *ch_cnt = target_ch_cnt;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+#if defined(FEATURE_WLAN_CH_AVOID)
+/**
+ * wlansap_get_safe_channel() - Get safe channel from current regulatory
+ * @cds_ctx: sap context
+ *
+ * This function is used to get safe channel from current regulatory valid
+ * channels to restart SAP if failed to get safe channel from PCL.
+ *
+ * Return: Channel number to restart SAP in case of success. In case of any
+ * failure, the channel number returned is zero.
+ */
+static uint8_t
+wlansap_get_safe_channel(void *cds_ctx)
+{
+ struct sir_pcl_list pcl;
+ QDF_STATUS status;
+ ptSapContext sap_ctx;
+
+ sap_ctx = CDS_GET_SAP_CB(cds_ctx);
+
+ if (!sap_ctx) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
+ "Invalid sap_ctx %pK",
+ sap_ctx);
+ return INVALID_CHANNEL_ID;
+ }
+
+ status = cds_get_valid_chans(pcl.pcl_list,
+ &pcl.pcl_len);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
+ "error %d in getting valid channel list", status);
+ return INVALID_CHANNEL_ID;
+ }
+
+ status = wlansap_filter_ch_based_acs(cds_ctx,
+ pcl.pcl_list,
+ &pcl.pcl_len);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
+ "failed to filter ch from acs %d", status);
+ return INVALID_CHANNEL_ID;
+ }
+
+ if (pcl.pcl_len) {
+ status = cds_get_valid_chans_from_range(pcl.pcl_list,
+ &pcl.pcl_len,
+ CDS_SAP_MODE);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
+ "failed to get valid channel: %d", status);
+ return INVALID_CHANNEL_ID;
+ }
+
+ if (pcl.pcl_len) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
+ "select %d from valid channel list",
+ pcl.pcl_list[0]);
+ return pcl.pcl_list[0];
+ }
+ }
+
+ return INVALID_CHANNEL_ID;
+}
+
+uint8_t wlansap_get_safe_channel_from_pcl_and_acs_range(void *cds_ctx)
+{
+ struct sir_pcl_list pcl;
+ QDF_STATUS status;
+ ptSapContext sap_ctx;
+
+ sap_ctx = CDS_GET_SAP_CB(cds_ctx);
+
+ if (!sap_ctx) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
+ "Invalid sap_ctx %pK",
+ sap_ctx);
+ return INVALID_CHANNEL_ID;
+ }
+
+ status = cds_get_pcl_for_existing_conn(
+ CDS_SAP_MODE, pcl.pcl_list, &pcl.pcl_len,
+ pcl.weight_list, QDF_ARRAY_SIZE(pcl.weight_list),
+ false);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
+ "Get PCL failed");
+ return INVALID_CHANNEL_ID;
+ }
+
+ if (pcl.pcl_len) {
+ status = wlansap_filter_ch_based_acs(cds_ctx,
+ pcl.pcl_list,
+ &pcl.pcl_len);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
+ "failed to filter ch from acs %d", status);
+ return INVALID_CHANNEL_ID;
+ }
+
+ if (pcl.pcl_len) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
+ "select %d from valid channel list",
+ pcl.pcl_list[0]);
+ return pcl.pcl_list[0];
+ }
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
+ "no safe channel from PCL found in ACS range");
+ } else {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
+ "pcl length is zero!");
+ }
+
+ /*
+ * In some scenarios, like hw dbs disabled, sap+sap case, if operating
+ * channel is unsafe channel, the pcl may be empty, instead of return,
+ * try to choose a safe channel from acs range.
+ */
+ return wlansap_get_safe_channel(cds_ctx);
+}
+#endif
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index bf3ed3f0e4b2..c0ec960d1947 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -539,6 +539,8 @@ typedef enum {
eCSR_ROAM_ABORT,
eCSR_ROAM_NAPI_OFF,
eCSR_ROAM_SAE_COMPUTE,
+ /* LFR3 Roam sync complete */
+ eCSR_ROAM_SYNCH_COMPLETE,
} eRoamCmdStatus;
/* comment inside indicates what roaming callback gets */
@@ -1384,6 +1386,7 @@ typedef struct tagCsrConfigParam {
uint32_t edca_bk_aifs;
uint32_t edca_be_aifs;
bool enable_fatal_event;
+ bool honour_nl_scan_policy_flags;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode_nc;
enum wmi_dwelltime_adaptive_mode roamscan_adaptive_dwell_mode;
@@ -1591,6 +1594,7 @@ typedef struct tagCsrRoamInfo {
int rx_rate;
tSirMacCapabilityInfo capability_info;
uint32_t rx_mc_bc_cnt;
+ uint8_t roam_reason;
} tCsrRoamInfo;
typedef struct tagCsrFreqScanInfo {
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index f42222b60f8e..2001a6824eae 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -654,6 +654,7 @@ typedef struct tagCsrConfig {
uint32_t edca_be_aifs;
bool enable_fatal_event;
bool vendor_vht_sap;
+ bool honour_nl_scan_policy_flags;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode_nc;
enum wmi_dwelltime_adaptive_mode roamscan_adaptive_dwell_mode;
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index b64a1d0a1ad3..e287fe51acc3 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -9382,6 +9382,7 @@ QDF_STATUS sme_stop_roaming(tHalHandle hal, uint8_t session_id, uint8_t reason)
status = wma_post_ctrl_msg(mac_ctx, &wma_msg);
if (eSIR_SUCCESS != status) {
sme_err("Posting WMA_ROAM_SCAN_OFFLOAD_REQ failed");
+ qdf_mem_zero(req, sizeof(tSirRoamOffloadScanReq));
qdf_mem_free(req);
return QDF_STATUS_E_FAULT;
}
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 7b01d28f45c2..27d6fe309f43 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -109,6 +109,11 @@
/* Static Type declarations */
static tCsrRoamSession csr_roam_roam_session[CSR_ROAM_SESSION_MAX];
+/*
+ * To get 4 LSB of roam reason of roam_synch_data
+ * received from firmware
+ */
+#define ROAM_REASON_MASK 0x0F
/**
* csr_get_ielen_from_bss_description() - to get IE length
* from tSirBssDescription structure
@@ -2926,6 +2931,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pParam->roam_bad_rssi_thresh_offset_2g;
pMac->roam.configParam.enable_ftopen =
pParam->enable_ftopen;
+ pMac->roam.configParam.honour_nl_scan_policy_flags =
+ pParam->honour_nl_scan_policy_flags;
pMac->roam.configParam.scan_adaptive_dwell_mode =
pParam->scan_adaptive_dwell_mode;
pMac->roam.configParam.scan_adaptive_dwell_mode_nc =
@@ -3286,6 +3293,8 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->roam_bad_rssi_thresh_offset_2g =
cfg_params->roam_params.roam_bad_rssi_thresh_offset_2g;
pParam->enable_ftopen = cfg_params->enable_ftopen;
+ pParam->honour_nl_scan_policy_flags =
+ cfg_params->honour_nl_scan_policy_flags;
pParam->scan_adaptive_dwell_mode =
cfg_params->scan_adaptive_dwell_mode;
pParam->scan_adaptive_dwell_mode_nc =
@@ -4838,10 +4847,14 @@ static void csr_reset_cfg_privacy(tpAniSirGlobal pMac)
cfg_set_int(pMac, WNI_CFG_PRIVACY_ENABLED, 0);
cfg_set_int(pMac, WNI_CFG_RSN_ENABLED, 0);
- cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_1, Key0, 0);
- cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_2, Key1, 0);
- cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_3, Key2, 0);
- cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_4, Key3, 0);
+ cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_1, Key0,
+ WNI_CFG_WEP_DEFAULT_KEY_1_LEN);
+ cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_2, Key1,
+ WNI_CFG_WEP_DEFAULT_KEY_2_LEN);
+ cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_3, Key2,
+ WNI_CFG_WEP_DEFAULT_KEY_3_LEN);
+ cfg_set_str(pMac, WNI_CFG_WEP_DEFAULT_KEY_4, Key3,
+ WNI_CFG_WEP_DEFAULT_KEY_4_LEN);
cfg_set_int(pMac, WNI_CFG_WEP_KEY_LENGTH, 0);
cfg_set_int(pMac, WNI_CFG_WEP_DEFAULT_KEYID, 0);
}
@@ -10490,6 +10503,59 @@ static void csr_roam_roaming_state_start_bss_rsp_processor(tpAniSirGlobal pMac,
}
/**
+ * csr_roam_send_disconnect_done_indication() - Send disconnect ind to HDD.
+ *
+ * @mac_ctx: mac global context
+ * @msg_ptr: incoming message
+ *
+ * This function gives final disconnect event to HDD after all cleanup in
+ * lower layers is done.
+ *
+ * Return: None
+ */
+static void
+csr_roam_send_disconnect_done_indication(tpAniSirGlobal mac_ctx,
+ tSirSmeRsp *msg_ptr)
+{
+ struct sir_sme_discon_done_ind *discon_ind =
+ (struct sir_sme_discon_done_ind *)(msg_ptr);
+ tCsrRoamInfo roam_info;
+ tCsrRoamSession *session;
+
+ sme_debug("DISCONNECT_DONE_IND RC:%d", discon_ind->reason_code);
+
+ if (CSR_IS_SESSION_VALID(mac_ctx, discon_ind->session_id)) {
+ roam_info.reasonCode = discon_ind->reason_code;
+ roam_info.statusCode = eSIR_SME_STA_NOT_ASSOCIATED;
+ qdf_mem_copy(roam_info.peerMac.bytes, discon_ind->peer_mac,
+ ETH_ALEN);
+ roam_info.rssi = mac_ctx->peer_rssi;
+ roam_info.tx_rate = mac_ctx->peer_txrate;
+ roam_info.rx_rate = mac_ctx->peer_rxrate;
+ roam_info.rx_mc_bc_cnt = mac_ctx->rx_mc_bc_cnt;
+ roam_info.disassoc_reason = discon_ind->reason_code;
+
+ csr_roam_call_callback(mac_ctx, discon_ind->session_id,
+ &roam_info, 0, eCSR_ROAM_LOSTLINK,
+ eCSR_ROAM_RESULT_DISASSOC_IND);
+ session = CSR_GET_SESSION(mac_ctx, discon_ind->session_id);
+ if (session &&
+ !CSR_IS_INFRA_AP(&session->connectedProfile))
+ csr_roam_state_change(mac_ctx, eCSR_ROAMING_STATE_IDLE,
+ discon_ind->session_id);
+
+ } else {
+ sme_err("Inactive session %d", discon_ind->session_id);
+ }
+
+ /*
+ * Release WM status change command as eWNI_SME_DISCONNECT_DONE_IND
+ * has been sent to HDD and there is nothing else left to do.
+ */
+ csr_roam_wm_status_change_complete(mac_ctx);
+}
+
+/**
* csr_roaming_state_msg_processor() - process roaming messages
* @pMac: mac global context
* @pMsgBuf: message buffer
@@ -10619,6 +10685,9 @@ void csr_roaming_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf)
csr_sae_callback(pMac, pSmeRsp);
break;
+ case eWNI_SME_DISCONNECT_DONE_IND:
+ csr_roam_send_disconnect_done_indication(pMac, pSmeRsp);
+ break;
default:
sme_debug("Unexpected message type: %d[0x%X] received in substate %s",
pSmeRsp->messageType, pSmeRsp->messageType,
@@ -11840,60 +11909,6 @@ csr_roam_chk_lnk_disassoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
qdf_mem_free(cmd);
}
-/**
- * csr_roam_send_disconnect_done_indication() - Send disconnect ind to HDD.
- *
- * @mac_ctx: mac global context
- * @msg_ptr: incoming message
- *
- * This function gives final disconnect event to HDD after all cleanup in
- * lower layers is done.
- *
- * Return: None
- */
-static void
-csr_roam_send_disconnect_done_indication(tpAniSirGlobal mac_ctx, tSirSmeRsp
- *msg_ptr)
-{
- struct sir_sme_discon_done_ind *discon_ind =
- (struct sir_sme_discon_done_ind *)(msg_ptr);
- tCsrRoamInfo roam_info;
- tCsrRoamSession *session;
-
- sme_debug("eWNI_SME_DISCONNECT_DONE_IND RC:%d",
- discon_ind->reason_code);
-
- if (CSR_IS_SESSION_VALID(mac_ctx, discon_ind->session_id)) {
- roam_info.reasonCode = discon_ind->reason_code;
- roam_info.statusCode = eSIR_SME_STA_NOT_ASSOCIATED;
- qdf_mem_copy(roam_info.peerMac.bytes, discon_ind->peer_mac,
- ETH_ALEN);
- roam_info.rssi = mac_ctx->peer_rssi;
- roam_info.tx_rate = mac_ctx->peer_txrate;
- roam_info.rx_rate = mac_ctx->peer_rxrate;
- roam_info.rx_mc_bc_cnt = mac_ctx->rx_mc_bc_cnt;
- roam_info.disassoc_reason = discon_ind->reason_code;
-
- csr_roam_call_callback(mac_ctx, discon_ind->session_id,
- &roam_info, 0, eCSR_ROAM_LOSTLINK,
- eCSR_ROAM_RESULT_DISASSOC_IND);
- session = CSR_GET_SESSION(mac_ctx, discon_ind->session_id);
- if (session &&
- !CSR_IS_INFRA_AP(&session->connectedProfile))
- csr_roam_state_change(mac_ctx, eCSR_ROAMING_STATE_IDLE,
- discon_ind->session_id);
-
- } else
- sme_err("Inactive session %d",
- discon_ind->session_id);
-
- /*
- * Release WM status change command as eWNI_SME_DISCONNECT_DONE_IND
- * has been sent to HDD and there is nothing else left to do.
- */
- csr_roam_wm_status_change_complete(mac_ctx);
-}
-
static void
csr_roam_chk_lnk_deauth_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
{
@@ -17289,8 +17304,10 @@ QDF_STATUS csr_send_mb_set_context_req_msg(tpAniSirGlobal pMac,
status = cds_mq_post_message_by_priority(
QDF_MODULE_ID_PE, &cds_msg,
LOW_PRIORITY);
- if (QDF_IS_STATUS_ERROR(status))
+ if (QDF_IS_STATUS_ERROR(status)) {
+ qdf_mem_zero(pMsg, msgLen);
qdf_mem_free(pMsg);
+ }
} while (0);
return status;
}
@@ -22806,6 +22823,9 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx,
csr_roam_offload_scan(mac_ctx, session_id,
ROAM_SCAN_OFFLOAD_UPDATE_CFG,
REASON_CONNECT);
+ csr_roam_call_callback(mac_ctx, session_id, NULL, 0,
+ eCSR_ROAM_SYNCH_COMPLETE,
+ eCSR_ROAM_RESULT_SUCCESS);
return status;
default:
sme_debug("LFR3: callback reason %d", reason);
@@ -22821,10 +22841,8 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx,
return status;
}
conn_profile = &session->connectedProfile;
- csr_roam_stop_network(mac_ctx, session_id,
- session->pCurRoamProfile,
- bss_desc,
- ies_local);
+ csr_roam_stop_network(mac_ctx, session_id, session->pCurRoamProfile,
+ bss_desc, ies_local);
ps_global_info->remain_in_power_active_till_dhcp = false;
session->connectState = eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED;
roam_info = qdf_mem_malloc(sizeof(tCsrRoamInfo));
@@ -23074,9 +23092,14 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx,
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
FL("LFR3: Copy KCK, KEK(len %d) and Replay Ctr"),
roam_info->kek_len);
+ /* bit-4 and bit-5 indicate the subnet status */
roam_info->subnet_change_status =
CSR_GET_SUBNET_STATUS(roam_synch_data->roamReason);
+ /* fetch 4 LSB to get roam reason */
+ roam_info->roam_reason = roam_synch_data->roamReason &
+ ROAM_REASON_MASK;
+ sme_debug("Update roam reason : %d", roam_info->roam_reason);
csr_copy_fils_join_rsp_roam_info(roam_info, roam_synch_data);
csr_roam_call_callback(mac_ctx, session_id, roam_info, 0,
diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c
index b524cfeebddc..e9fb7daff066 100644
--- a/core/sme/src/csr/csr_api_scan.c
+++ b/core/sme/src/csr/csr_api_scan.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2019 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
@@ -596,15 +596,19 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId,
cfg_prm->scan_adaptive_dwell_mode;
}
- if (scan_req->scan_flags & SME_SCAN_FLAG_HIGH_ACCURACY)
- scan_req->scan_adaptive_dwell_mode = WMI_DWELL_MODE_STATIC;
+ if (cfg_prm->honour_nl_scan_policy_flags) {
+ if (scan_req->scan_flags & SME_SCAN_FLAG_HIGH_ACCURACY)
+ scan_req->scan_adaptive_dwell_mode =
+ WMI_DWELL_MODE_STATIC;
+
+ if (scan_req->scan_flags & SME_SCAN_FLAG_LOW_POWER ||
+ scan_req->scan_flags & SME_SCAN_FLAG_LOW_SPAN)
+ scan_req->scan_adaptive_dwell_mode =
+ WMI_DWELL_MODE_AGGRESSIVE;
- if (scan_req->scan_flags & SME_SCAN_FLAG_LOW_POWER ||
- scan_req->scan_flags & SME_SCAN_FLAG_LOW_SPAN) {
- scan_req->scan_adaptive_dwell_mode = WMI_DWELL_MODE_AGGRESSIVE;
+ sme_debug("Set scan adaptive dwell mode %d ",
+ scan_req->scan_adaptive_dwell_mode);
}
- sme_debug("Set scan adaptive dwell mode %d ",
- scan_req->scan_adaptive_dwell_mode);
status = csr_scan_copy_request(pMac, &scan_cmd->u.scanCmd.u.scanRequest,
scan_req);
/*
diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c
index fa49518bb945..274c8c3f5494 100644
--- a/core/sme/src/csr/csr_neighbor_roam.c
+++ b/core/sme/src/csr/csr_neighbor_roam.c
@@ -1008,14 +1008,16 @@ static void csr_neighbor_roam_info_ctx_init(
FL("isESEAssoc is = %d ft = %d"),
ngbr_roam_info->isESEAssoc, init_ft_flag);
#endif
- /* If "Legacy Fast Roaming" is enabled */
+ /* If "FastRoamEnabled" ini is enabled */
if (csr_roam_is_fast_roam_enabled(pMac, session_id))
init_ft_flag = true;
- if (init_ft_flag == false)
- return;
- /* Initialize all the data structures needed for the 11r FT Preauth */
- ngbr_roam_info->FTRoamInfo.currentNeighborRptRetryNum = 0;
- csr_neighbor_roam_purge_preauth_failed_list(pMac);
+
+ if (init_ft_flag) {
+ /* Initialize all the data needed for the 11r FT Preauth */
+ ngbr_roam_info->FTRoamInfo.currentNeighborRptRetryNum = 0;
+ csr_neighbor_roam_purge_preauth_failed_list(pMac);
+ }
+
if (csr_roam_is_roam_offload_scan_enabled(pMac)) {
/*
* If this is not a INFRA type BSS, then do not send the command
diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c
index f844303e835b..9f9be44a0c2f 100644
--- a/core/sme/src/csr/csr_util.c
+++ b/core/sme/src/csr/csr_util.c
@@ -4444,6 +4444,78 @@ uint8_t csr_retrieve_wpa_ie(tHalHandle hHal, tCsrRoamProfile *pProfile,
return cbWpaIe;
}
+#ifdef WLAN_FEATURE_11W
+/**
+ * csr_get_mc_mgmt_cipher(): Get mcast management cipher from profile rsn
+ * @mac: mac ctx
+ * @profile: connect profile
+ * @bss: ap scan entry
+ * @ap_ie: AP IE's
+ *
+ * Return: none
+ */
+static void csr_get_mc_mgmt_cipher(tpAniSirGlobal mac,
+ tCsrRoamProfile *profile,
+ tSirBssDescription *bss,
+ tDot11fBeaconIEs *ap_ie)
+{
+ int ret;
+ tDot11fIERSN rsn_ie = {0};
+ uint8_t n_mgmt_cipher = 1;
+ struct rsn_caps rsn_caps;
+ tDot11fBeaconIEs *local_ap_ie = ap_ie;
+ uint8_t grp_mgmt_arr[CSR_RSN_MAX_MULTICAST_CYPHERS][CSR_RSN_OUI_SIZE];
+
+ if (!profile->MFPEnabled)
+ return;
+
+ if (!local_ap_ie &&
+ (!QDF_IS_STATUS_SUCCESS(csr_get_parsed_bss_description_ies
+ (mac, bss, &local_ap_ie))))
+ return;
+
+ qdf_mem_copy(&rsn_caps, local_ap_ie->RSN.RSN_Cap, sizeof(rsn_caps));
+
+ if (!ap_ie && local_ap_ie)
+ /* locally allocated */
+ qdf_mem_free(local_ap_ie);
+
+ /* if AP is not PMF capable return */
+ if (!rsn_caps.MFPCapable)
+ return;
+
+ ret = dot11f_unpack_ie_rsn(mac, profile->pRSNReqIE + 2,
+ profile->nRSNReqIELength -2,
+ &rsn_ie, false);
+ if (DOT11F_FAILED(ret))
+ return;
+
+ qdf_mem_copy(&rsn_caps, rsn_ie.RSN_Cap, sizeof(rsn_caps));
+
+ /* if self cap is not PMF capable return */
+ if (!rsn_caps.MFPCapable)
+ return;
+
+ qdf_mem_copy(grp_mgmt_arr, rsn_ie.gp_mgmt_cipher_suite,
+ CSR_RSN_OUI_SIZE);
+ if (csr_is_group_mgmt_gmac_128(mac, grp_mgmt_arr, n_mgmt_cipher, NULL))
+ profile->mgmt_encryption_type = eSIR_ED_AES_GMAC_128;
+ else if (csr_is_group_mgmt_gmac_256(mac, grp_mgmt_arr,
+ n_mgmt_cipher, NULL))
+ profile->mgmt_encryption_type = eSIR_ED_AES_GMAC_256;
+ else
+ /* Default is CMAC */
+ profile->mgmt_encryption_type = eSIR_ED_AES_128_CMAC;
+}
+#else
+static inline
+void csr_get_mc_mgmt_cipher(tpAniSirGlobal mac,
+ tCsrRoamProfile *profile,
+ tSirBssDescription *bss,
+ tDot11fBeaconIEs *ap_ie)
+{
+}
+#endif
/* If a RSNIE exists in the profile, just use it. Or else construct
* one from the BSS Caller allocated memory for pWpaIe and guarrantee
* it can contain a max length WPA IE
@@ -4468,6 +4540,8 @@ uint8_t csr_retrieve_rsn_ie(tHalHandle hHal, uint32_t sessionId,
cbRsnIe = (uint8_t) pProfile->nRSNReqIELength;
qdf_mem_copy(pRsnIe, pProfile->pRSNReqIE,
cbRsnIe);
+ csr_get_mc_mgmt_cipher(pMac, pProfile,
+ pSirBssDesc, pIes);
} else {
sme_warn("csr_retrieve_rsn_ie detect invalid RSN IE length (%d)",
pProfile->nRSNReqIELength);
diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c
index 34b672f080a5..e4978f0f2ac1 100644
--- a/core/sme/src/rrm/sme_rrm.c
+++ b/core/sme/src/rrm/sme_rrm.c
@@ -296,9 +296,11 @@ static QDF_STATUS sme_ese_send_beacon_req_scan_results(
if (result_arr)
cur_result = result_arr[bss_counter];
- qdf_mem_zero(&bcn_rpt_rsp, sizeof(tSirEseBcnReportRsp));
do {
cur_meas_req = NULL;
+ /* memset bcn_rpt_rsp for each iteration */
+ qdf_mem_zero(&bcn_rpt_rsp, sizeof(bcn_rpt_rsp));
+
for (i = 0; i < rrm_ctx->eseBcnReqInfo.numBcnReqIe; i++) {
if (rrm_ctx->eseBcnReqInfo.bcnReq[i].channel ==
channel) {
@@ -357,9 +359,9 @@ static QDF_STATUS sme_ese_send_beacon_req_scan_results(
bcn_report->numBss++;
if (++j >= SIR_BCN_REPORT_MAX_BSS_DESC)
break;
- if (j >= bss_count)
+ if ((bss_counter + j) >= bss_count)
break;
- cur_result = result_arr[j];
+ cur_result = result_arr[bss_counter + j];
}
bss_counter += j;
@@ -1324,23 +1326,13 @@ static QDF_STATUS sme_rrm_process_neighbor_report(tpAniSirGlobal pMac,
tpRrmNeighborReportDesc pNeighborReportDesc;
uint8_t i = 0;
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
- uint32_t sessionId;
-
- /* Get the session id */
- status =
- csr_roam_get_session_id_from_bssid(pMac,
- (struct qdf_mac_addr *) pNeighborRpt->bssId,
- &sessionId);
- if (QDF_IS_STATUS_SUCCESS(status)) {
-#ifdef FEATURE_WLAN_ESE
- /* Clear the cache for ESE. */
- if (csr_roam_is_ese_assoc(pMac, sessionId)) {
- rrm_ll_purge_neighbor_cache(pMac,
- &pMac->rrm.rrmSmeContext.
- neighborReportCache);
- }
-#endif
- }
+
+ /* Purge the cache on reception of unsolicited neighbor report */
+ if (!pMac->rrm.rrmSmeContext.neighborReqControlInfo.
+ isNeighborRspPending)
+ rrm_ll_purge_neighbor_cache(pMac,
+ &pMac->rrm.rrmSmeContext.
+ neighborReportCache);
for (i = 0; i < pNeighborRpt->numNeighborReports; i++) {
pNeighborReportDesc =
@@ -1393,6 +1385,7 @@ end:
qdf_status = QDF_STATUS_E_FAILURE;
rrm_indicate_neighbor_report_result(pMac, qdf_status);
+
return status;
}
diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c
index 1dafa8ed0b2c..919b2543053e 100644
--- a/core/wma/src/wma_mgmt.c
+++ b/core/wma/src/wma_mgmt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 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
@@ -1762,6 +1762,7 @@ static QDF_STATUS wma_setup_install_key_cmd(tp_wma_handle wma_handle,
if (iface)
iface->is_waiting_for_key = false;
+ qdf_mem_zero(&params, sizeof(struct set_key_params));
return status;
}
@@ -1888,6 +1889,8 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info)
/* TODO: Should we wait till we get HTT_T2H_MSG_TYPE_SEC_IND? */
key_info->status = QDF_STATUS_SUCCESS;
+ qdf_mem_zero(&key_params, sizeof(struct wma_set_key_params));
+
out:
wma_send_msg_high_priority(wma_handle,
WMA_SET_BSSKEY_RSP, (void *)key_info, 0);
@@ -2178,6 +2181,7 @@ void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info)
key_params.key_len = key_info->key[i].keyLength;
status = wma_setup_install_key_cmd(wma_handle, &key_params,
opmode);
+ qdf_mem_zero(&key_params, sizeof(struct wma_set_key_params));
if (status == QDF_STATUS_E_NOMEM) {
WMA_LOGE("%s:Failed to setup install key buf",
__func__);
diff --git a/core/wma/src/wma_ocb.c b/core/wma/src/wma_ocb.c
index 64b615890693..41b13aff28a1 100644
--- a/core/wma/src/wma_ocb.c
+++ b/core/wma/src/wma_ocb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 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
@@ -653,9 +653,11 @@ static int wma_dcc_stats_event_handler(void *handle, uint8_t *event_buf,
fix_param = param_tlvs->fixed_param;
/* Allocate and populate the response */
if (fix_param->num_channels > ((WMI_SVC_MSG_MAX_SIZE -
- sizeof(*fix_param)) / sizeof(wmi_dcc_ndl_stats_per_channel))) {
- WMA_LOGE("%s: too many channels:%d", __func__,
- fix_param->num_channels);
+ sizeof(*fix_param)) / sizeof(wmi_dcc_ndl_stats_per_channel)) ||
+ fix_param->num_channels > param_tlvs->num_stats_per_channel_list) {
+ WMA_LOGE("%s: too many channels:%d actual:%d", __func__,
+ fix_param->num_channels,
+ param_tlvs->num_stats_per_channel_list);
QDF_ASSERT(0);
return -EINVAL;
}
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 857864d9da88..3bb9e2e049d7 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -1029,6 +1029,7 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle,
status = wmi_unified_roam_scan_offload_mode_cmd(wma_handle->wmi_handle,
scan_cmd_fp, params);
+ qdf_mem_zero(params, sizeof(struct roam_offload_scan_params));
qdf_mem_free(params);
if (QDF_IS_STATUS_ERROR(status))
return status;
@@ -2135,6 +2136,7 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
if (NULL == pMac) {
WMA_LOGE("%s: pMac is NULL", __func__);
+ qdf_mem_zero(roam_req, sizeof(tSirRoamOffloadScanReq));
qdf_mem_free(roam_req);
return QDF_STATUS_E_FAILURE;
}
@@ -2143,6 +2145,7 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
/* roam scan offload is not enabled in firmware.
* Cannot initialize it in the middle of connection.
*/
+ qdf_mem_zero(roam_req, sizeof(tSirRoamOffloadScanReq));
qdf_mem_free(roam_req);
return QDF_STATUS_E_PERM;
}
@@ -2525,6 +2528,7 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
default:
break;
}
+ qdf_mem_zero(roam_req, sizeof(tSirRoamOffloadScanReq));
qdf_mem_free(roam_req);
return qdf_status;
}
@@ -5206,6 +5210,17 @@ static int wma_group_num_bss_to_scan_id(const u_int8_t *cmd_param_info,
t_cached_result = cached_result;
t_scan_id_grp = &t_cached_result->result[0];
+ if ((t_cached_result->num_scan_ids *
+ QDF_MIN(t_scan_id_grp->num_results,
+ param_buf->num_bssid_list)) > param_buf->num_bssid_list) {
+ WMA_LOGE("%s:num_scan_ids %d, num_results %d num_bssid_list %d",
+ __func__,
+ t_cached_result->num_scan_ids,
+ t_scan_id_grp->num_results,
+ param_buf->num_bssid_list);
+ return -EINVAL;
+ }
+
WMA_LOGD("%s: num_scan_ids:%d", __func__,
t_cached_result->num_scan_ids);
for (i = 0; i < t_cached_result->num_scan_ids; i++) {
diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c
index bf44c21f48e3..7fc33d40bf42 100644
--- a/core/wma/src/wma_utils.c
+++ b/core/wma/src/wma_utils.c
@@ -817,12 +817,13 @@ static tSirLLStatsResults *wma_get_ll_stats_ext_buf(uint32_t *len,
* @param_buf: parameters without fixed length in WMI event
* @buf: buffer for TLV parameters
*
- * Return: None
+ * Return: QDF_STATUS
*/
-static void wma_fill_tx_stats(struct sir_wifi_ll_ext_stats *ll_stats,
- wmi_report_stats_event_fixed_param *fix_param,
- WMI_REPORT_STATS_EVENTID_param_tlvs *param_buf,
- uint8_t **buf, uint32_t *buf_length)
+static QDF_STATUS
+wma_fill_tx_stats(struct sir_wifi_ll_ext_stats *ll_stats,
+ wmi_report_stats_event_fixed_param *fix_param,
+ WMI_REPORT_STATS_EVENTID_param_tlvs *param_buf,
+ uint8_t **buf, uint32_t *buf_length)
{
uint8_t *result;
uint32_t i, j, k;
@@ -831,8 +832,9 @@ static void wma_fill_tx_stats(struct sir_wifi_ll_ext_stats *ll_stats,
struct sir_wifi_tx *tx_stats;
struct sir_wifi_ll_ext_peer_stats *peer_stats;
uint32_t *tx_mpdu_aggr, *tx_succ_mcs, *tx_fail_mcs, *tx_delay;
- uint32_t len, dst_len, tx_mpdu_aggr_array_len, tx_succ_mcs_array_len,
- tx_fail_mcs_array_len, tx_delay_array_len;
+ uint32_t len, dst_len, param_len, tx_mpdu_aggr_array_len,
+ tx_succ_mcs_array_len, tx_fail_mcs_array_len,
+ tx_delay_array_len;
result = *buf;
dst_len = *buf_length;
@@ -849,54 +851,67 @@ static void wma_fill_tx_stats(struct sir_wifi_ll_ext_stats *ll_stats,
len = fix_param->num_peer_ac_tx_stats *
WLAN_MAX_AC * tx_mpdu_aggr_array_len * sizeof(uint32_t);
- if (len <= dst_len) {
+ param_len = param_buf->num_tx_mpdu_aggr * sizeof(uint32_t);
+ if (len <= dst_len && len <= param_len && param_buf->tx_mpdu_aggr) {
tx_mpdu_aggr = (uint32_t *)result;
qdf_mem_copy(tx_mpdu_aggr, param_buf->tx_mpdu_aggr, len);
result += len;
dst_len -= len;
} else {
- WMA_LOGE(FL("TX_MPDU_AGGR buffer length is wrong."));
- tx_mpdu_aggr = NULL;
+ WMA_LOGE(FL("TX_MPDU_AGGR invalid arg, %d, %d, %d"),
+ len, dst_len, param_len);
+ return QDF_STATUS_E_FAILURE;
}
len = fix_param->num_peer_ac_tx_stats * WLAN_MAX_AC *
tx_succ_mcs_array_len * sizeof(uint32_t);
- if (len <= dst_len) {
+ param_len = param_buf->num_tx_succ_mcs * sizeof(uint32_t);
+ if (len <= dst_len && len <= param_len && param_buf->tx_succ_mcs) {
tx_succ_mcs = (uint32_t *)result;
qdf_mem_copy(tx_succ_mcs, param_buf->tx_succ_mcs, len);
result += len;
dst_len -= len;
} else {
- WMA_LOGE(FL("TX_SUCC_MCS buffer length is wrong."));
- tx_succ_mcs = NULL;
+ WMA_LOGE(FL("TX_SUCC_MCS invalid arg, %d, %d, %d"),
+ len, dst_len, param_len);
+ return QDF_STATUS_E_FAILURE;
}
len = fix_param->num_peer_ac_tx_stats * WLAN_MAX_AC *
tx_fail_mcs_array_len * sizeof(uint32_t);
- if (len <= dst_len) {
+ param_len = param_buf->num_tx_fail_mcs * sizeof(uint32_t);
+ if (len <= dst_len && len <= param_len && param_buf->tx_fail_mcs) {
tx_fail_mcs = (uint32_t *)result;
qdf_mem_copy(tx_fail_mcs, param_buf->tx_fail_mcs, len);
result += len;
dst_len -= len;
} else {
- WMA_LOGE(FL("TX_FAIL_MCS buffer length is wrong."));
- tx_fail_mcs = NULL;
+ WMA_LOGE(FL("TX_FAIL_MCS invalid arg, %d, %d %d"),
+ len, dst_len, param_len);
+ return QDF_STATUS_E_FAILURE;
}
len = fix_param->num_peer_ac_tx_stats *
WLAN_MAX_AC * tx_delay_array_len * sizeof(uint32_t);
- if (len <= dst_len) {
+ param_len = param_buf->num_tx_ppdu_delay * sizeof(uint32_t);
+ if (len <= dst_len && len <= param_len && param_buf->tx_ppdu_delay) {
tx_delay = (uint32_t *)result;
qdf_mem_copy(tx_delay, param_buf->tx_ppdu_delay, len);
result += len;
dst_len -= len;
} else {
- WMA_LOGE(FL("TX_DELAY buffer length is wrong."));
- tx_delay = NULL;
+ WMA_LOGE(FL("TX_DELAY invalid arg, %d, %d, %d"),
+ len, dst_len, param_len);
+ return QDF_STATUS_E_FAILURE;
}
/* per peer tx stats */
peer_stats = ll_stats->peer_stats;
+ if (!wmi_peer_tx || !wmi_tx || !peer_stats) {
+ WMA_LOGE(FL("Invalid arg, peer_tx %pK, wmi_tx %pK stats %pK"),
+ wmi_peer_tx, wmi_tx, peer_stats);
+ return QDF_STATUS_E_FAILURE;
+ }
for (i = 0; i < fix_param->num_peer_ac_tx_stats; i++) {
uint32_t peer_id = wmi_peer_tx[i].peer_id;
@@ -954,6 +969,8 @@ static void wma_fill_tx_stats(struct sir_wifi_ll_ext_stats *ll_stats,
}
*buf = result;
*buf_length = dst_len;
+
+ return QDF_STATUS_SUCCESS;
}
/**
@@ -963,12 +980,13 @@ static void wma_fill_tx_stats(struct sir_wifi_ll_ext_stats *ll_stats,
* @param_buf: parameters without fixed length in WMI event
* @buf: buffer for TLV parameters
*
- * Return: None
+ * Return: QDF_STATUS
*/
-static void wma_fill_rx_stats(struct sir_wifi_ll_ext_stats *ll_stats,
- wmi_report_stats_event_fixed_param *fix_param,
- WMI_REPORT_STATS_EVENTID_param_tlvs *param_buf,
- uint8_t **buf, uint32_t *buf_length)
+static QDF_STATUS
+wma_fill_rx_stats(struct sir_wifi_ll_ext_stats *ll_stats,
+ wmi_report_stats_event_fixed_param *fix_param,
+ WMI_REPORT_STATS_EVENTID_param_tlvs *param_buf,
+ uint8_t **buf, uint32_t *buf_length)
{
uint8_t *result;
uint32_t i, j, k;
@@ -977,7 +995,8 @@ static void wma_fill_rx_stats(struct sir_wifi_ll_ext_stats *ll_stats,
wmi_peer_ac_rx_stats *wmi_peer_rx;
struct sir_wifi_rx *rx_stats;
struct sir_wifi_ll_ext_peer_stats *peer_stats;
- uint32_t len, dst_len, rx_mpdu_aggr_array_len, rx_mcs_array_len;
+ uint32_t len, dst_len, param_len,
+ rx_mpdu_aggr_array_len, rx_mcs_array_len;
rx_mpdu_aggr_array_len = fix_param->rx_mpdu_aggr_array_len;
ll_stats->rx_mpdu_aggr_array_len = rx_mpdu_aggr_array_len;
@@ -990,30 +1009,39 @@ static void wma_fill_rx_stats(struct sir_wifi_ll_ext_stats *ll_stats,
dst_len = *buf_length;
len = sizeof(uint32_t) * (fix_param->num_peer_ac_rx_stats *
WLAN_MAX_AC * rx_mpdu_aggr_array_len);
- if (len <= dst_len) {
+ param_len = param_buf->num_rx_mpdu_aggr * sizeof(uint32_t);
+ if (len <= dst_len && len <= param_len && param_buf->rx_mpdu_aggr) {
rx_mpdu_aggr = (uint32_t *)result;
qdf_mem_copy(rx_mpdu_aggr, param_buf->rx_mpdu_aggr, len);
result += len;
dst_len -= len;
} else {
- WMA_LOGE(FL("RX_MPDU_AGGR array length is wrong."));
- rx_mpdu_aggr = NULL;
+ WMA_LOGE(FL("RX_MPDU_AGGR invalid arg %d, %d, %d"),
+ len, dst_len, param_len);
+ return QDF_STATUS_E_FAILURE;
}
len = sizeof(uint32_t) * (fix_param->num_peer_ac_rx_stats *
WLAN_MAX_AC * rx_mcs_array_len);
- if (len <= dst_len) {
+ param_len = param_buf->num_rx_mcs * sizeof(uint32_t);
+ if (len <= dst_len && len <= param_len && param_buf->rx_mcs) {
rx_mcs = (uint32_t *)result;
qdf_mem_copy(rx_mcs, param_buf->rx_mcs, len);
result += len;
dst_len -= len;
} else {
- WMA_LOGE(FL("RX_MCS array length is wrong."));
- rx_mcs = NULL;
+ WMA_LOGE(FL("RX_MCS invalid arg %d, %d, %d"),
+ len, dst_len, param_len);
+ return QDF_STATUS_E_FAILURE;
}
/* per peer rx stats */
peer_stats = ll_stats->peer_stats;
+ if (!wmi_peer_rx || !wmi_rx || !peer_stats) {
+ WMA_LOGE(FL("Invalid arg, peer_rx %pK, wmi_rx %pK stats %pK"),
+ wmi_peer_rx, wmi_rx, peer_stats);
+ return QDF_STATUS_E_FAILURE;
+ }
for (i = 0; i < fix_param->num_peer_ac_rx_stats; i++) {
uint32_t peer_id = wmi_peer_rx[i].peer_id;
struct sir_wifi_rx *ac;
@@ -1065,6 +1093,8 @@ static void wma_fill_rx_stats(struct sir_wifi_ll_ext_stats *ll_stats,
}
*buf = result;
*buf_length = dst_len;
+
+ return QDF_STATUS_SUCCESS;
}
/**
@@ -1116,7 +1146,15 @@ static int wma_ll_stats_evt_handler(void *handle, u_int8_t *event,
WMA_LOGD("%s: Posting MAC counters event to HDD", __func__);
param_buf = (WMI_REPORT_STATS_EVENTID_param_tlvs *)event;
+ if (!param_buf) {
+ WMA_LOGD("%s: param_buf is null", __func__);
+ return -EINVAL;
+ }
fixed_param = param_buf->fixed_param;
+ if (!fixed_param) {
+ WMA_LOGD("%s: fixed_param is null", __func__);
+ return -EINVAL;
+ }
wmi_cca_stats = param_buf->chan_cca_stats;
wmi_peer_signal = param_buf->peer_signal_stats;
wmi_peer_rx = param_buf->peer_ac_rx_stats;
@@ -1238,14 +1276,18 @@ static int wma_ll_stats_evt_handler(void *handle, u_int8_t *event,
}
result += i * sizeof(struct sir_wifi_chan_cca_stats);
- wma_fill_tx_stats(ll_stats, fixed_param, param_buf,
- &result, &result_size);
- wma_fill_rx_stats(ll_stats, fixed_param, param_buf,
- &result, &result_size);
- sme_msg.type = eWMI_SME_LL_STATS_IND;
- sme_msg.bodyptr = (void *)link_stats_results;
- sme_msg.bodyval = 0;
- qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
+ qdf_status = wma_fill_tx_stats(ll_stats, fixed_param, param_buf,
+ &result, &result_size);
+ if (QDF_IS_STATUS_SUCCESS(qdf_status))
+ qdf_status = wma_fill_rx_stats(ll_stats, fixed_param, param_buf,
+ &result, &result_size);
+ if (QDF_IS_STATUS_SUCCESS(qdf_status)) {
+ sme_msg.type = eWMI_SME_LL_STATS_IND;
+ sme_msg.bodyptr = (void *)link_stats_results;
+ sme_msg.bodyval = 0;
+ qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
+ }
+
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
WMA_LOGP(FL("Failed to post peer stat change msg!"));
qdf_mem_free(link_stats_results);
@@ -4041,6 +4083,7 @@ void wma_get_stats_req(WMA_HANDLE handle,
tp_wma_handle wma_handle = (tp_wma_handle) handle;
struct wma_txrx_node *node;
struct pe_stats_req cmd = {0};
+ uint8_t pdev_id;
tAniGetPEStatsRsp *pGetPEStatsRspParams;
@@ -4086,6 +4129,10 @@ void wma_get_stats_req(WMA_HANDLE handle,
node->stats_rsp->statsMask, get_stats_param->sessionId);
cmd.session_id = get_stats_param->sessionId;
+
+ cds_get_mac_id_by_session_id(get_stats_param->sessionId, &pdev_id);
+ cmd.pdev_id = WMA_MAC_TO_PDEV_MAP(pdev_id);
+
cmd.stats_mask = get_stats_param->statsMask;
if (wmi_unified_get_stats_cmd(wma_handle->wmi_handle, &cmd,
node->bssid)) {
diff --git a/uapi/linux/qca_vendor.h b/uapi/linux/qca_vendor.h
index fdc95618cba4..1e4eeb944928 100644
--- a/uapi/linux/qca_vendor.h
+++ b/uapi/linux/qca_vendor.h
@@ -2066,6 +2066,51 @@ enum qca_roaming_policy {
};
/**
+ * enum qca_roam_reason - Represents the reason codes for roaming. Used by
+ * QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_REASON.
+ *
+ * @QCA_ROAM_REASON_UNKNOWN: Any reason that do not classify under the below
+ * reasons.
+ *
+ * @QCA_ROAM_REASON_PER: Roam triggered when packet error rates(PER) breached
+ * the configured threshold.
+ *
+ * @QCA_ROAM_REASON_BEACON_MISS: Roam triggered due to the continuous configured
+ * beacon misses from the then connected AP.
+ *
+ * @QCA_ROAM_REASON_POOR_RSSI: Roam triggered due to the poor RSSI reported
+ * by the connected AP.
+ *
+ * @QCA_ROAM_REASON_BETTER_RSSI: Roam triggered for finding a BSSID with a
+ * better RSSI than the connected BSSID. Here the RSSI of the current BSSID is
+ * not poor.
+ *
+ * @QCA_ROAM_REASON_CONGESTION: Roam triggered considering the connected channel
+ * or environment being very noisy / congested.
+ *
+ * @QCA_ROAM_REASON_EXPLICIT_REQUEST: Roam triggered due to an explicit request
+ * from the user (user space).
+ *
+ * @QCA_ROAM_REASON_BTM: Roam triggered due to BTM request frame received from
+ * connected AP.
+ *
+ * @QCA_ROAM_REASON_BSS_LOAD: Roam triggered due to the channel utilization
+ * breaching out the configured threshold.
+ *
+ */
+enum qca_roam_reason {
+ QCA_ROAM_REASON_UNKNOWN,
+ QCA_ROAM_REASON_PER,
+ QCA_ROAM_REASON_BEACON_MISS,
+ QCA_ROAM_REASON_POOR_RSSI,
+ QCA_ROAM_REASON_BETTER_RSSI,
+ QCA_ROAM_REASON_CONGESTION,
+ QCA_ROAM_REASON_USER_TRIGGER,
+ QCA_ROAM_REASON_BTM,
+ QCA_ROAM_REASON_BSS_LOAD,
+};
+
+/**
* enum qca_wlan_vendor_attr_roam_auth - vendor event for roaming
* @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_BSSID: BSSID of the roamed AP
* @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_REQ_IE: Request IE
@@ -2082,6 +2127,9 @@ enum qca_roaming_policy {
* @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PMKID: AUTH PMKID
* @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_FILS_ERP_NEXT_SEQ_NUM: FILS erp next
* seq number
+ * @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_REASON: A 16-bit unsigned value
+ * representing the reasons for the roaming. Defined by enum
+ * qca_roam_reason.
*/
enum qca_wlan_vendor_attr_roam_auth {
QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_INVALID = 0,
@@ -2114,6 +2162,7 @@ enum qca_wlan_vendor_attr_roam_auth {
QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PMK,
QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PMKID,
QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_FILS_ERP_NEXT_SEQ_NUM,
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_REASON,
QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_MAX =
QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AFTER_LAST - 1