summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h10
-rw-r--r--core/hdd/inc/wlan_hdd_main.h2
-rw-r--r--core/hdd/inc/wlan_hdd_wmm.h4
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c9
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c7
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c4
-rw-r--r--core/hdd/src/wlan_hdd_main.c2
-rw-r--r--core/hdd/src/wlan_hdd_wmm.c6
-rw-r--r--core/mac/inc/qwlan_version.h6
-rw-r--r--core/mac/inc/sir_api.h12
-rw-r--r--core/mac/src/pe/rrm/rrm_api.c50
-rw-r--r--core/mac/src/pe/sch/sch_beacon_gen.c8
-rw-r--r--core/sap/inc/sap_api.h7
-rw-r--r--core/sap/src/sap_ch_select.c243
-rw-r--r--core/sap/src/sap_fsm.c27
-rw-r--r--core/sap/src/sap_internal.h6
-rw-r--r--core/sme/inc/csr_api.h2
-rw-r--r--core/sme/inc/csr_internal.h2
-rw-r--r--core/sme/inc/sme_qos_api.h4
-rw-r--r--core/sme/src/common/sme_api.c15
-rw-r--r--core/sme/src/csr/csr_api_roam.c12
-rw-r--r--core/wma/src/wma_scan_roam.c31
22 files changed, 128 insertions, 341 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 11817f9704af..29cbd5a83397 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -1840,8 +1840,8 @@ enum hdd_dot11_mode {
* <ini>
* gForce1x1Exception - force 1x1 when connecting to certain peer
* @Min: 0
- * @Max: 1
- * @Default: 0
+ * @Max: 2
+ * @Default: 1
*
* This INI when enabled will force 1x1 connection with certain peer.
*
@@ -1856,7 +1856,7 @@ enum hdd_dot11_mode {
*/
#define CFG_FORCE_1X1_NAME "gForce1x1Exception"
#define CFG_FORCE_1X1_MIN (0)
-#define CFG_FORCE_1X1_MAX (1)
+#define CFG_FORCE_1X1_MAX (2)
#define CFG_FORCE_1X1_DEFAULT (1)
/*
@@ -16395,7 +16395,7 @@ struct hdd_config {
uint32_t mawc_nlo_exp_backoff_ratio;
uint32_t mawc_nlo_init_scan_interval;
uint32_t mawc_nlo_max_scan_interval;
- bool is_force_1x1;
+ uint8_t is_force_1x1;
uint16_t num_11b_tx_chains;
uint16_t num_11ag_tx_chains;
/* LCA(Last connected AP) disallow configs */
@@ -16526,6 +16526,8 @@ struct hdd_config {
uint16_t thermal_throt_dc;
#endif
bool disable_4way_hs_offload;
+ bool ShortGI80MhzEnable;
+ bool ShortGI160MhzEnable;
};
#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 0312da3f6601..624d8ff03718 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1589,7 +1589,7 @@ struct hdd_adapter_s {
bool offloads_configured;
/* DSCP to UP QoS Mapping */
- sme_QosWmmUpType hddWmmDscpToUpMap[WLAN_HDD_MAX_DSCP + 1];
+ sme_QosWmmUpType hddWmmDscpToUpMap[WLAN_MAX_DSCP + 1];
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
bool isLinkLayerStatsSet;
diff --git a/core/hdd/inc/wlan_hdd_wmm.h b/core/hdd/inc/wlan_hdd_wmm.h
index 30a5b202192e..c9e31d6d4c1f 100644
--- a/core/hdd/inc/wlan_hdd_wmm.h
+++ b/core/hdd/inc/wlan_hdd_wmm.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2012,2016-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2012,2016-2017, 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
@@ -194,8 +194,6 @@ extern const uint8_t hdd_qdisc_ac_to_tl_ac[];
extern const uint8_t hdd_wmm_up_to_ac_map[];
extern const uint8_t hdd_linux_up_to_ac_map[];
-#define WLAN_HDD_MAX_DSCP 0x3f
-
/**
* hdd_wmmps_helper() - Function to set uapsd psb dynamically
*
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index e04e9a0ed1ff..618b2875813a 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -1873,12 +1873,13 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter,
* eConnectionState_Connecting state mean that connection is in
* progress so no need to set state to eConnectionState_NotConnected
*/
- if ((eConnectionState_Connecting !=
- pHddStaCtx->conn_info.connState)) {
+ if (eConnectionState_Connecting != pHddStaCtx->conn_info.connState)
hdd_conn_set_connection_state(pAdapter,
eConnectionState_NotConnected);
- hdd_set_roaming_in_progress(false);
- }
+
+ /* Clear roaming in progress flag */
+ hdd_set_roaming_in_progress(false);
+
#ifdef WLAN_FEATURE_GTK_OFFLOAD
if ((QDF_STA_MODE == pAdapter->device_mode) ||
(QDF_P2P_CLIENT_MODE == pAdapter->device_mode)) {
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index edda70828e15..c47987d70367 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -8571,15 +8571,14 @@ static bool hdd_update_vht_cap_in_cfg(hdd_context_t *hdd_ctx)
(config->dot11Mode == eHDD_DOT11_MODE_11ac)) {
/* Currently shortGI40Mhz is used for shortGI80Mhz and 160MHz*/
if (sme_cfg_set_int(hdd_ctx->hHal, WNI_CFG_VHT_SHORT_GI_80MHZ,
- config->ShortGI40MhzEnable) == QDF_STATUS_E_FAILURE) {
+ config->ShortGI80MhzEnable) == QDF_STATUS_E_FAILURE) {
status = false;
hdd_err("Couldn't pass WNI_VHT_SHORT_GI_80MHZ to CFG");
}
if (sme_cfg_set_int(hdd_ctx->hHal,
- WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
- config->ShortGI40MhzEnable) ==
- QDF_STATUS_E_FAILURE) {
+ WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
+ config->ShortGI160MhzEnable) == QDF_STATUS_E_FAILURE) {
status = false;
hdd_err("Couldn't pass SHORT_GI_160MHZ to CFG");
}
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 9d53066ec6c9..fdc20ab86bc9 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -18500,6 +18500,8 @@ int wlan_hdd_try_disconnect(hdd_adapter_t *pAdapter)
if (!rc) {
hdd_err("roaming comp var timed out session Id: %d",
pAdapter->sessionId);
+ /* Clear roaming in progress flag */
+ hdd_set_roaming_in_progress(false);
}
if (pAdapter->roam_ho_fail) {
INIT_COMPLETION(pAdapter->disconnect_comp_var);
@@ -18884,6 +18886,8 @@ int wlan_hdd_disconnect(hdd_adapter_t *pAdapter, u16 reason)
if (!rc) {
hdd_err("roaming comp var timed out session Id: %d",
pAdapter->sessionId);
+ /* Clear roaming in progress flag */
+ hdd_set_roaming_in_progress(false);
}
if (pAdapter->roam_ho_fail) {
INIT_COMPLETION(pAdapter->disconnect_comp_var);
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 6747d89d69e5..8a4591825f7a 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -1593,6 +1593,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
hdd_err("could not get GI 80 & 160");
value = 0;
}
+ pconfig->ShortGI160MhzEnable = cfg->vht_short_gi_160;
/* set the Guard interval 160MHz */
if (value && !cfg->vht_short_gi_160) {
status = sme_cfg_set_int(hdd_ctx->hHal,
@@ -1623,6 +1624,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
}
}
+ pconfig->ShortGI80MhzEnable = cfg->vht_short_gi_80;
if (cfg->vht_short_gi_80 & WMI_VHT_CAP_SGI_80MHZ)
band_5g->vht_cap.cap |= IEEE80211_VHT_CAP_SHORT_GI_80;
diff --git a/core/hdd/src/wlan_hdd_wmm.c b/core/hdd/src/wlan_hdd_wmm.c
index 2e568294581f..b7f4f361fd36 100644
--- a/core/hdd/src/wlan_hdd_wmm.c
+++ b/core/hdd/src/wlan_hdd_wmm.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
@@ -54,8 +54,6 @@
#include <cds_sched.h>
#include "sme_api.h"
-#define WLAN_HDD_MAX_DSCP 0x3f
-
#define HDD_WMM_UP_TO_AC_MAP_SIZE 8
const uint8_t hdd_wmm_up_to_ac_map[] = {
@@ -1281,7 +1279,7 @@ QDF_STATUS hdd_wmm_init(hdd_adapter_t *pAdapter)
/* DSCP to User Priority Lookup Table
* By default use the 3 Precedence bits of DSCP as the User Priority
*/
- for (dscp = 0; dscp <= WLAN_HDD_MAX_DSCP; dscp++)
+ for (dscp = 0; dscp <= WLAN_MAX_DSCP; dscp++)
hddWmmDscpToUpMap[dscp] = dscp >> 3;
/* Special case for Expedited Forwarding (DSCP 46) */
diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h
index d60887bdae29..b42e20c62967 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 "T"
-#define QWLAN_VERSION_BUILD 75
+#define QWLAN_VERSION_EXTRA "C"
+#define QWLAN_VERSION_BUILD 76
-#define QWLAN_VERSIONSTR "5.1.1.75T"
+#define QWLAN_VERSIONSTR "5.1.1.76C"
#endif /* QWLAN_VERSION_H */
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index 803d8af3e63b..3fdc2869f661 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -161,6 +161,18 @@ enum sir_conn_update_reason {
SIR_UPDATE_REASON_PRE_CAC,
};
+/**
+ * enum force_1x1_type - enum to specify the type of forced 1x1 ini provided.
+ * @FORCE_1X1_DISABLED: even if the AP is present in OUI, 1x1 will not be forced
+ * @FORCE_1X1_ENABLED_FOR_AS: If antenna sharing supported, then only do 1x1.
+ * @FORCE_1X1_ENABLED_FORCED: If AP present in OUI, force 1x1 connection.
+ */
+enum force_1x1_type {
+ FORCE_1X1_DISABLED,
+ FORCE_1X1_ENABLED_FOR_AS,
+ FORCE_1X1_ENABLED_FORCED,
+};
+
typedef enum {
eSIR_EXTSCAN_INVALID,
eSIR_EXTSCAN_START_RSP,
diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c
index e001fbbb26fb..5ef0a9afbb0c 100644
--- a/core/mac/src/pe/rrm/rrm_api.c
+++ b/core/mac/src/pe/rrm/rrm_api.c
@@ -681,28 +681,19 @@ rrm_process_beacon_report_req(tpAniSirGlobal pMac,
return eRRM_SUCCESS;
}
-/* -------------------------------------------------------------------- */
/**
- * rrm_fill_beacon_ies
- *
- * FUNCTION:
- *
- * LOGIC: Fills Fixed fields and Ies in bss description to an array of uint8_t.
- *
- * ASSUMPTIONS:
- *
- * NOTE:
- *
- * @param pIes - pointer to the buffer that should be populated with ies.
- * @param pNumIes - returns the num of ies filled in this param.
- * @param pIesMaxSize - Max size of the buffer pIes.
- * @param eids - pointer to array of eids. If NULL, all ies will be populated.
- * @param numEids - number of elements in array eids.
- * @start_offset: Offset from where the IEs in the bss_desc should be parsed
- * @param pBssDesc - pointer to Bss Description.
- *
- * Returns: Remaining length of IEs in current bss_desc which are not included
- * in pIes.
+ * rrm_fill_beacon_ies() - Fills Fixed fields and Ies in bss description to an
+ * array of uint8_t.
+ * @pIes - pointer to the buffer that should be populated with ies.
+ * @pNumIes - returns the num of ies filled in this param.
+ * @pIesMaxSize - Max size of the buffer pIes.
+ * @eids - pointer to array of eids. If NULL, all ies will be populated.
+ * @numEids - number of elements in array eids.
+ * @offset: Offset from where the IEs in the bss_desc should be parsed
+ * @pBssDesc - pointer to Bss Description.
+ *
+ * Return: Remaining length of IEs in current bss_desc which are not included
+ * in pIes.
*/
static uint8_t
rrm_fill_beacon_ies(tpAniSirGlobal pMac,
@@ -710,8 +701,8 @@ rrm_fill_beacon_ies(tpAniSirGlobal pMac,
uint8_t *eids, uint8_t numEids, uint8_t start_offset,
tpSirBssDescription pBssDesc)
{
- uint8_t len, *pBcnIes, count = 0, i;
- uint16_t BcnNumIes, total_ies_len;
+ uint8_t *pBcnIes, count = 0, i;
+ uint16_t BcnNumIes, total_ies_len, len;
uint8_t rem_len = 0;
if ((pIes == NULL) || (pNumIes == NULL) || (pBssDesc == NULL)) {
@@ -756,12 +747,19 @@ rrm_fill_beacon_ies(tpAniSirGlobal pMac,
}
while (BcnNumIes > 0) {
- len = *(pBcnIes + 1) + 2; /* element id + length. */
+ len = *(pBcnIes + 1);
+ len += 2; /* element id + length. */
pe_debug("EID = %d, len = %d total = %d",
*pBcnIes, *(pBcnIes + 1), len);
- if (!len) {
- pe_err("Invalid length");
+ if (BcnNumIes < len) {
+ pe_err("RRM: Invalid IE len:%d exp_len:%d",
+ len, BcnNumIes);
+ break;
+ }
+
+ if (len <= 2) {
+ pe_err("RRM: Invalid IE");
break;
}
diff --git a/core/mac/src/pe/sch/sch_beacon_gen.c b/core/mac/src/pe/sch/sch_beacon_gen.c
index f4ea26b5d5de..511b07cf699f 100644
--- a/core/mac/src/pe/sch/sch_beacon_gen.c
+++ b/core/mac/src/pe/sch/sch_beacon_gen.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
@@ -882,6 +882,12 @@ static QDF_STATUS write_beacon_to_memory(tpAniSirGlobal pMac, uint16_t size,
/* copy end of beacon only if length > 0 */
if (length > 0) {
+ if (size + psessionEntry->schBeaconOffsetEnd >
+ SIR_MAX_BEACON_SIZE) {
+ pe_err("beacon tmp fail size %d BeaconOffsetEnd %d",
+ size, psessionEntry->schBeaconOffsetEnd);
+ return QDF_STATUS_E_FAILURE;
+ }
for (i = 0; i < psessionEntry->schBeaconOffsetEnd; i++)
psessionEntry->pSchBeaconFrameBegin[size++] =
psessionEntry->pSchBeaconFrameEnd[i];
diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h
index c82ab0a28f9e..40bb31e29890 100644
--- a/core/sap/inc/sap_api.h
+++ b/core/sap/inc/sap_api.h
@@ -869,13 +869,6 @@ typedef struct sap_SoftapStats_s {
#endif
} tSap_SoftapStats, *tpSap_SoftapStats;
-#ifdef FEATURE_WLAN_CH_AVOID
-/* Store channel safety information */
-typedef struct {
- uint16_t channelNumber;
- bool isSafe;
-} sapSafeChannelType;
-#endif /* FEATURE_WLAN_CH_AVOID */
void sap_cleanup_channel_list(void *sapContext);
void sapCleanupAllChannelList(void);
diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c
index 07ad3db04ade..621bf7bde477 100644
--- a/core/sap/src/sap_ch_select.c
+++ b/core/sap/src/sap_ch_select.c
@@ -119,52 +119,6 @@
#define ACS_WEIGHT_SOFTAP_TX_POWER_THROUGHPUT_CFG(weights) \
(((weights) & 0xf00000) >> 20)
-#ifdef FEATURE_WLAN_CH_AVOID
-sapSafeChannelType safe_channels[NUM_CHANNELS] = {
- {1, true},
- {2, true},
- {3, true},
- {4, true},
- {5, true},
- {6, true},
- {7, true},
- {8, true},
- {9, true},
- {10, true},
- {11, true},
- {12, true},
- {13, true},
- {14, true},
- {36, true},
- {40, true},
- {44, true},
- {48, true},
- {52, true},
- {56, true},
- {60, true},
- {64, true},
- {100, true},
- {104, true},
- {108, true},
- {112, true},
- {116, true},
- {120, true},
- {124, true},
- {128, true},
- {132, true},
- {136, true},
- {140, true},
- {144, true},
- {149, true},
- {153, true},
- {157, true},
- {161, true},
- {165, true},
- {169, true},
- {173, true},
-};
-#endif
-
typedef struct {
uint16_t chStartNum;
uint32_t weight;
@@ -392,84 +346,6 @@ static void sap_process_avoid_ie(tHalHandle hal,
}
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
-#ifdef FEATURE_WLAN_CH_AVOID
-/*==========================================================================
- FUNCTION sap_update_unsafe_channel_list
-
- DESCRIPTION
- Function Undate unsafe channel list table
-
- DEPENDENCIES
- NA.
-
- IN
- SapContext pointer
-
- RETURN VALUE
- NULL
- ============================================================================*/
-void sap_update_unsafe_channel_list(ptSapContext pSapCtx)
-{
- uint16_t i, j;
- uint16_t unsafe_channel_list[NUM_CHANNELS];
- uint16_t unsafe_channel_count = 0;
- qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
-
- if (!qdf_ctx) {
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_FATAL,
- "qdf_ctx is NULL");
- return;
- }
-
- /* Flush, default set all channel safe */
- for (i = 0; i < NUM_CHANNELS; i++) {
- safe_channels[i].isSafe = true;
- }
-
- /* Try to find unsafe channel */
-#if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE)
- for (i = 0; i < NUM_CHANNELS; i++) {
- if (pSapCtx->dfs_ch_disable == true) {
- if (CDS_IS_DFS_CH(safe_channels[i].channelNumber)) {
- safe_channels[i].isSafe = false;
- QDF_TRACE(QDF_MODULE_ID_SAP,
- QDF_TRACE_LEVEL_DEBUG,
- "%s: DFS Ch %d is not safe in"
- " Concurrent mode",
- __func__,
- safe_channels[i].channelNumber);
- }
- }
- }
-#endif
- pld_get_wlan_unsafe_channel(qdf_ctx->dev,
- unsafe_channel_list,
- &unsafe_channel_count,
- sizeof(unsafe_channel_list));
-
- unsafe_channel_count = QDF_MIN(unsafe_channel_count,
- (uint16_t)NUM_CHANNELS);
-
- for (i = 0; i < unsafe_channel_count; i++) {
- for (j = 0; j < NUM_CHANNELS; j++) {
- if (safe_channels[j].channelNumber ==
- unsafe_channel_list[i]) {
- /* Found unsafe channel, update it */
- safe_channels[j].isSafe = false;
- QDF_TRACE(QDF_MODULE_ID_SAP,
- QDF_TRACE_LEVEL_DEBUG,
- FL("CH %d is not safe"),
- unsafe_channel_list[i]);
- break;
- }
- }
- }
-
- return;
-}
-
-#endif /* FEATURE_WLAN_CH_AVOID */
-
/*==========================================================================
FUNCTION sap_cleanup_channel_list
@@ -629,9 +505,6 @@ static bool sap_chan_sel_init(tHalHandle halHandle,
uint16_t channelnum = 0;
tpAniSirGlobal pMac = PMAC_STRUCT(halHandle);
bool chSafe = true;
-#ifdef FEATURE_WLAN_CH_AVOID
- uint16_t i;
-#endif
uint32_t dfs_master_cap_enabled;
bool include_dfs_ch = true;
bool sta_sap_scc_on_dfs_chan =
@@ -708,19 +581,8 @@ static bool sap_chan_sel_init(tHalHandle halHandle,
}
}
-#ifdef FEATURE_WLAN_CH_AVOID
- for (i = 0; i < NUM_CHANNELS; i++) {
- if ((safe_channels[i].channelNumber == *pChans) &&
- (false == safe_channels[i].isSafe)) {
- QDF_TRACE(QDF_MODULE_ID_SAP,
- QDF_TRACE_LEVEL_DEBUG,
- "In %s, Ch %d is not safe", __func__,
- *pChans);
- chSafe = false;
- break;
- }
- }
-#endif /* FEATURE_WLAN_CH_AVOID */
+ if (!cds_is_safe_channel(*pChans))
+ chSafe = false;
/* OFDM rates are not supported on channel 14 */
if (*pChans == 14 &&
@@ -2588,101 +2450,6 @@ static bool sap_is_ch_non_overlap(ptSapContext sap_ctx, uint16_t ch)
return false;
}
-#ifdef FEATURE_WLAN_CH_AVOID
-/**
- * sap_select_channel_no_scan_result() - select SAP channel when no scan results
- * are available.
- * @sap_ctx: Sap context
- *
- * Returns: channel number if success, 0 otherwise
- */
-static uint8_t sap_select_channel_no_scan_result(tHalHandle hal,
- ptSapContext sap_ctx)
-{
- enum channel_state ch_type;
- uint8_t i, first_safe_ch_in_range = SAP_CHANNEL_NOT_SELECTED;
- uint32_t dfs_master_cap_enabled;
- uint32_t start_ch_num = sap_ctx->acs_cfg->start_ch;
- uint32_t end_ch_num = sap_ctx->acs_cfg->end_ch;
-
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
- FL("start - end: %d - %d"), start_ch_num, end_ch_num);
-
- sme_cfg_get_int(hal, WNI_CFG_DFS_MASTER_ENABLED,
- &dfs_master_cap_enabled);
-
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
- "%s: dfs_master %x", __func__, dfs_master_cap_enabled);
-
- /* get a channel in PCL and within the range */
- for (i = 0; i < sap_ctx->acs_cfg->pcl_ch_count; i++) {
- if ((sap_ctx->acs_cfg->pcl_channels[i] < start_ch_num) ||
- (sap_ctx->acs_cfg->pcl_channels[i] > end_ch_num))
- continue;
-
- first_safe_ch_in_range = sap_ctx->acs_cfg->pcl_channels[i];
- break;
- }
-
- if (SAP_CHANNEL_NOT_SELECTED != first_safe_ch_in_range)
- return first_safe_ch_in_range;
-
- for (i = 0; i < NUM_CHANNELS; i++) {
- if ((safe_channels[i].channelNumber < start_ch_num) ||
- (safe_channels[i].channelNumber > end_ch_num))
- continue;
-
- ch_type = cds_get_channel_state(safe_channels[i].channelNumber);
-
- if ((ch_type == CHANNEL_STATE_DISABLE) ||
- (ch_type == CHANNEL_STATE_INVALID))
- continue;
- if ((!dfs_master_cap_enabled) &&
- (CHANNEL_STATE_DFS == ch_type)) {
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
- "%s: DFS master mode disabled. Skip DFS channel %d",
- __func__, safe_channels[i].channelNumber);
- continue;
- }
- if ((sap_ctx->dfs_mode == ACS_DFS_MODE_DISABLE) &&
- (CHANNEL_STATE_DFS == ch_type))
- continue;
-
- if (safe_channels[i].isSafe == true) {
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
- FL("channel %d in the configuration is safe"),
- safe_channels[i].channelNumber);
- first_safe_ch_in_range = safe_channels[i].channelNumber;
- break;
- }
-
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
- FL("channel %d in the configuration is unsafe"),
- safe_channels[i].channelNumber);
- }
-
- /* if no channel selected return SAP_CHANNEL_NOT_SELECTED */
- return first_safe_ch_in_range;
-}
-#else
-static uint8_t sap_select_channel_no_scan_result(tHalHandle hal,
- ptSapContext sap_ctx)
-{
- uint32_t start_ch_num = sap_ctx->acs_cfg->start_ch;
-
- QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
- FL("start - end: %d - %d"),
- start_ch_num,
- sap_ctx->acs_cfg->end_ch);
-
- sap_ctx->acs_cfg->pri_ch = start_ch_num;
- sap_ctx->acs_cfg->ht_sec_ch = 0;
-
- /* pick the first channel in configured range */
- return start_ch_num;
-}
-#endif /* FEATURE_WLAN_CH_AVOID */
-
/**
* sap_select_channel() - select SAP channel
* @hal: Pointer to HAL handle
@@ -2709,10 +2476,6 @@ uint8_t sap_select_channel(tHalHandle hal, ptSapContext sap_ctx,
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
"In %s, Running SAP Ch Select", __func__);
-#ifdef FEATURE_WLAN_CH_AVOID
- sap_update_unsafe_channel_list(sap_ctx);
-#endif
-
/*
* If ACS weight is not enabled on noise_floor/channel_free/tx_power,
* then skip acs process if no bss found.
@@ -2725,7 +2488,7 @@ uint8_t sap_select_channel(tHalHandle hal, ptSapContext sap_ctx,
#ifndef SOFTAP_CHANNEL_RANGE
return SAP_CHANNEL_NOT_SELECTED;
#else
- return sap_select_channel_no_scan_result(hal, sap_ctx);
+ return sap_select_default_oper_chan(sap_ctx->acs_cfg);
#endif
}
diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c
index 4d9e7ed4025c..f5aadcca0c81 100644
--- a/core/sap/src/sap_fsm.c
+++ b/core/sap/src/sap_fsm.c
@@ -58,10 +58,6 @@
/*----------------------------------------------------------------------------
* External declarations for global context
* -------------------------------------------------------------------------*/
-#ifdef FEATURE_WLAN_CH_AVOID
-extern sapSafeChannelType safe_channels[];
-#endif /* FEATURE_WLAN_CH_AVOID */
-
/*----------------------------------------------------------------------------
* Static Variable Definitions
* -------------------------------------------------------------------------*/
@@ -2324,6 +2320,9 @@ QDF_STATUS sap_goto_channel_sel(ptSapContext sap_context,
"%s: Override ch %d to %d due to CC Intf",
__func__, sap_context->channel, con_ch);
sap_context->channel = con_ch;
+ if (CDS_IS_CHANNEL_24GHZ(con_ch))
+ sap_context->ch_params.ch_width =
+ CH_WIDTH_20MHZ;
cds_set_channel_params(sap_context->channel, 0,
&sap_context->ch_params);
}
@@ -2385,6 +2384,9 @@ QDF_STATUS sap_goto_channel_sel(ptSapContext sap_context,
__func__, sap_context->channel,
con_ch);
sap_context->channel = con_ch;
+ if (CDS_IS_CHANNEL_24GHZ(con_ch))
+ sap_context->ch_params.ch_width =
+ CH_WIDTH_20MHZ;
cds_set_channel_params(sap_context->channel, 0,
&sap_context->ch_params);
}
@@ -4838,12 +4840,10 @@ static QDF_STATUS sap_get_channel_list(ptSapContext sap_ctx,
uint8_t end_ch_num, band_end_ch;
uint32_t en_lte_coex;
tHalHandle hal = CDS_GET_HAL_CB(sap_ctx->p_cds_gctx);
-#ifdef FEATURE_WLAN_CH_AVOID
- uint8_t i;
-#endif
tpAniSirGlobal mac_ctx;
tSapChSelSpectInfo spect_info_obj = { NULL, 0 };
uint16_t ch_width;
+ uint8_t i;
if (NULL == hal) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
@@ -4958,13 +4958,6 @@ static QDF_STATUS sap_get_channel_list(ptSapContext sap_ctx,
continue;
}
-#ifdef FEATURE_WLAN_CH_AVOID
- for (i = 0; i < NUM_CHANNELS; i++) {
- if (safe_channels[i].channelNumber ==
- CDS_CHANNEL_NUM(loop_count)) {
- /* Check if channel is safe */
- if (true == safe_channels[i].isSafe) {
-#endif
#ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE
uint8_t ch;
@@ -5001,12 +4994,6 @@ static QDF_STATUS sap_get_channel_list(ptSapContext sap_ctx,
list[ch_count] = CDS_CHANNEL_NUM(loop_count);
ch_count++;
#endif
-#ifdef FEATURE_WLAN_CH_AVOID
- }
- break;
- }
- }
-#endif
}
for (i = 0; i < ch_count; i++) {
diff --git a/core/sap/src/sap_internal.h b/core/sap/src/sap_internal.h
index 7a525d4cc944..c7c7394c85db 100644
--- a/core/sap/src/sap_internal.h
+++ b/core/sap/src/sap_internal.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
@@ -365,10 +365,6 @@ QDF_STATUS sap_acquire_global_lock(ptSapContext pSapCtx);
QDF_STATUS sap_release_global_lock(ptSapContext pSapCtx);
-#ifdef FEATURE_WLAN_CH_AVOID
-void sap_update_unsafe_channel_list(ptSapContext pSapCtx);
-#endif /* FEATURE_WLAN_CH_AVOID */
-
uint8_t
sap_indicate_radar(ptSapContext sapContext,
tSirSmeDfsEventInd *dfs_event);
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index 92d67e8536bb..fef3c05dc7a3 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1409,7 +1409,7 @@ typedef struct tagCsrConfigParam {
uint8_t fils_max_chan_guard_time;
uint16_t pkt_err_disconn_th;
bool is_bssid_hint_priority;
- bool is_force_1x1;
+ uint8_t is_force_1x1;
uint16_t num_11b_tx_chains;
uint16_t num_11ag_tx_chains;
uint32_t disallow_duration;
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index 8661f12f8330..ee6570d5e7aa 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -676,7 +676,7 @@ typedef struct tagCsrConfig {
uint8_t fils_max_chan_guard_time;
uint16_t pkt_err_disconn_th;
bool is_bssid_hint_priority;
- bool is_force_1x1;
+ uint8_t is_force_1x1;
uint16_t num_11b_tx_chains;
uint16_t num_11ag_tx_chains;
uint32_t disallow_duration;
diff --git a/core/sme/inc/sme_qos_api.h b/core/sme/inc/sme_qos_api.h
index b110f16c8448..e767cb0d0f81 100644
--- a/core/sme/inc/sme_qos_api.h
+++ b/core/sme/inc/sme_qos_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2017, 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
@@ -42,6 +42,8 @@
#define SME_QOS_UAPSD_VI 0x02
#define SME_QOS_UAPSD_BE 0x08
#define SME_QOS_UAPSD_BK 0x04
+#define WLAN_MAX_DSCP 0x3f
+
/*---------------------------------------------------------------------------
Enumeration of the various QoS status types that would be reported to HDD
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 12ae3afe075d..d75124737651 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -13974,21 +13974,12 @@ QDF_STATUS sme_update_dsc_pto_up_mapping(tHalHandle hHal,
}
for (i = 0; i < SME_QOS_WMM_UP_MAX; i++) {
for (j = pSession->QosMapSet.dscp_range[i][0];
- j <= pSession->QosMapSet.dscp_range[i][1];
- j++) {
- if ((pSession->QosMapSet.dscp_range[i][0] == 255)
- && (pSession->QosMapSet.dscp_range[i][1] ==
- 255)) {
- QDF_TRACE(QDF_MODULE_ID_SME,
- QDF_TRACE_LEVEL_DEBUG,
- FL("User Priority %d isn't used"), i);
- break;
- }
+ j <= pSession->QosMapSet.dscp_range[i][1] &&
+ j <= WLAN_MAX_DSCP; j++)
dscpmapping[j] = i;
- }
}
for (i = 0; i < pSession->QosMapSet.num_dscp_exceptions; i++)
- if (pSession->QosMapSet.dscp_exceptions[i][0] != 255)
+ if (pSession->QosMapSet.dscp_exceptions[i][0] <= WLAN_MAX_DSCP)
dscpmapping[pSession->QosMapSet.dscp_exceptions[i][0]] =
pSession->QosMapSet.dscp_exceptions[i][1];
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 6d7f23d21bcb..ef9bdd63b8bc 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -16053,14 +16053,18 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
sme_debug("1x1 with 1 Chain AP");
}
- if (pMac->roam.configParam.is_force_1x1 &&
- pMac->lteCoexAntShare &&
- is_vendor_ap_present) {
+ if (is_vendor_ap_present &&
+ ((pMac->roam.configParam.is_force_1x1 ==
+ FORCE_1X1_ENABLED_FOR_AS && pMac->lteCoexAntShare) ||
+ pMac->roam.configParam.is_force_1x1 ==
+ FORCE_1X1_ENABLED_FORCED)) {
pSession->supported_nss_1x1 = true;
pSession->vdev_nss = 1;
pSession->nss = 1;
pSession->nss_forced_1x1 = true;
- sme_debug("For special ap, NSS: %d", pSession->nss);
+ sme_debug("For special ap, NSS: %d force 1x1 %d",
+ pSession->nss,
+ pMac->roam.configParam.is_force_1x1);
}
/*
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index e99baba16613..f365b8b71a6c 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -730,6 +730,27 @@ error:
return qdf_status;
}
+static inline wmi_host_channel_width
+wma_map_phy_ch_bw_to_wmi_channel_width(enum phy_ch_width ch_width)
+{
+ switch (ch_width) {
+ case CH_WIDTH_20MHZ:
+ return WMI_HOST_CHAN_WIDTH_20;
+ case CH_WIDTH_40MHZ:
+ return WMI_HOST_CHAN_WIDTH_40;
+ case CH_WIDTH_80MHZ:
+ return WMI_HOST_CHAN_WIDTH_80;
+ case CH_WIDTH_160MHZ:
+ return WMI_HOST_CHAN_WIDTH_160;
+ case CH_WIDTH_5MHZ:
+ return WMI_HOST_CHAN_WIDTH_5;
+ case CH_WIDTH_10MHZ:
+ return WMI_HOST_CHAN_WIDTH_10;
+ default:
+ return WMI_HOST_CHAN_WIDTH_20;
+ }
+}
+
/**
* wma_update_channel_list() - update channel list
* @handle: wma handle
@@ -747,6 +768,7 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
int i;
struct scan_chan_list_params scan_ch_param = {0};
wmi_channel_param *tchan_info;
+ struct ch_params_s ch_params = {0};
scan_ch_param.chan_info = qdf_mem_malloc(sizeof(wmi_channel) *
chan_list->numChan);
@@ -759,6 +781,7 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
WMA_LOGD("no of channels = %d", chan_list->numChan);
tchan_info = scan_ch_param.chan_info;
scan_ch_param.num_scan_chans = chan_list->numChan;
+ scan_ch_param.max_bw_support_present = true;
wma_handle->saved_chan.num_channels = chan_list->numChan;
WMA_LOGD("ht %d, vht %d, vht_24 %d", chan_list->ht_en,
chan_list->vht_en, chan_list->vht_24_en);
@@ -813,6 +836,14 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
WMI_SET_CHANNEL_REG_POWER(tchan_info,
chan_list->chanParam[i].pwr);
+ ch_params.ch_width = CH_WIDTH_160MHZ;
+ cds_set_channel_params(chan_list->chanParam[i].chanId, 0,
+ &ch_params);
+
+ WMI_SET_CHANNEL_MAX_BANDWIDTH(tchan_info,
+ wma_map_phy_ch_bw_to_wmi_channel_width(
+ ch_params.ch_width));
+
tchan_info++;
}