summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/cds/inc/cds_concurrency.h12
-rw-r--r--core/cds/src/cds_api.c53
-rw-r--r--core/cds/src/cds_concurrency.c39
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h242
-rw-r--r--core/hdd/inc/wlan_hdd_ipa.h12
-rw-r--r--core/hdd/inc/wlan_hdd_main.h4
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c1
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c155
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c43
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.h1
-rw-r--r--core/hdd/src/wlan_hdd_driver_ops.c13
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c31
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.h9
-rw-r--r--core/hdd/src/wlan_hdd_ioctl.c15
-rw-r--r--core/hdd/src/wlan_hdd_ipa.c29
-rw-r--r--core/hdd/src/wlan_hdd_main.c149
-rw-r--r--core/hdd/src/wlan_hdd_napi.c2
-rw-r--r--core/hdd/src/wlan_hdd_power.c34
-rw-r--r--core/hdd/src/wlan_hdd_softap_tx_rx.c8
-rw-r--r--core/hdd/src/wlan_hdd_wext.c2
-rw-r--r--core/mac/inc/qwlan_version.h4
-rw-r--r--core/mac/inc/sir_api.h13
-rw-r--r--core/mac/inc/wni_api.h1
-rw-r--r--core/mac/src/cfg/cfgUtil/dot11f.frms4
-rw-r--r--core/mac/src/include/dot11f.h6
-rw-r--r--core/mac/src/pe/include/lim_api.h1
-rw-r--r--core/mac/src/pe/lim/lim_api.c20
-rw-r--r--core/mac/src/pe/lim/lim_process_assoc_req_frame.c329
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_req_messages.c2
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c10
-rw-r--r--core/mac/src/pe/lim/lim_send_sme_rsp_messages.c79
-rw-r--r--core/mac/src/pe/lim/lim_send_sme_rsp_messages.h1
-rw-r--r--core/mac/src/pe/lim/lim_utils.c2
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/dot11f.c24
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/mac_trace.c1
-rw-r--r--core/pld/inc/pld_common.h12
-rw-r--r--core/pld/src/pld_common.c5
-rw-r--r--core/pld/src/pld_snoc.h10
-rw-r--r--core/sap/src/sap_fsm.c14
-rw-r--r--core/sme/inc/csr_api.h4
-rw-r--r--core/sme/inc/csr_internal.h2
-rw-r--r--core/sme/inc/sme_api.h8
-rw-r--r--core/sme/src/common/sme_api.c12
-rw-r--r--core/sme/src/common/sme_power_save.c12
-rw-r--r--core/sme/src/csr/csr_api_roam.c41
-rw-r--r--core/sme/src/csr/csr_util.c24
-rw-r--r--core/wma/inc/wma.h2
-rw-r--r--core/wma/inc/wma_api.h12
-rw-r--r--core/wma/src/wma_dev_if.c3
-rw-r--r--core/wma/src/wma_features.c34
-rw-r--r--core/wma/src/wma_main.c2
-rw-r--r--core/wma/src/wma_mgmt.c4
-rw-r--r--core/wma/src/wma_scan_roam.c26
53 files changed, 1101 insertions, 477 deletions
diff --git a/core/cds/inc/cds_concurrency.h b/core/cds/inc/cds_concurrency.h
index 874a37faf93c..68c1c393de42 100644
--- a/core/cds/inc/cds_concurrency.h
+++ b/core/cds/inc/cds_concurrency.h
@@ -1018,15 +1018,19 @@ bool cds_is_safe_channel(uint8_t channel);
*/
bool cds_disallow_mcc(uint8_t channel);
/**
- * cds_get_alternate_channel_for_sap() - checks if any alternate channel can
+ * cds_get_diff_band_ch_for_sap() - checks if any alternate channel can
* be obtained from PCL if current channel can't be allowed
*
- * This function checks if any alternate channel can be obtained
- * from PCL or other means if current channel for SAP can't be allowed
+ * @channel: Present STA channel
+ *
+ * This API will get the PCl chanel list based upon the current connections
+ * and will return the different band channel to operate in DBS mode if enabled
+ * It may happen that STA+SAP SCC is not allowed, so we have to select a random
+ * preferred channel in different band than the STA channel.
*
* Return: New channel
*/
-uint8_t cds_get_alternate_channel_for_sap(void);
+uint8_t cds_get_diff_band_ch_for_sap(uint8_t channel);
/**
* cds_set_cur_conc_system_pref() - set the value of cur_conc_system_pref
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c
index bc9595bf7795..83abc1a53a90 100644
--- a/core/cds/src/cds_api.c
+++ b/core/cds/src/cds_api.c
@@ -755,10 +755,11 @@ pktlog_disable:
*/
QDF_STATUS cds_enable(v_CONTEXT_t cds_context)
{
- QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status;
tSirRetStatus sirStatus = eSIR_SUCCESS;
p_cds_contextType p_cds_context = (p_cds_contextType) cds_context;
tHalMacStartParameters halStartParams;
+ int errno;
/* We support only one instance for now ... */
if (gp_cds_context != p_cds_context) {
@@ -767,67 +768,47 @@ QDF_STATUS cds_enable(v_CONTEXT_t cds_context)
return QDF_STATUS_E_FAILURE;
}
- if ((p_cds_context->pWMAContext == NULL) ||
- (p_cds_context->pMACContext == NULL)) {
- if (p_cds_context->pWMAContext == NULL)
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
- "%s: WMA NULL context", __func__);
- else
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
- "%s: MAC NULL context", __func__);
+ if (!p_cds_context->pWMAContext) {
+ cds_err("WMA NULL context");
+ return QDF_STATUS_E_FAILURE;
+ }
+ if (!p_cds_context->pMACContext) {
+ cds_err("MAC NULL context");
return QDF_STATUS_E_FAILURE;
}
/* Start the wma */
qdf_status = wma_start(p_cds_context);
if (qdf_status != QDF_STATUS_SUCCESS) {
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
- "%s: Failed to start wma", __func__);
+ cds_err("Failed to start wma; status:%d", qdf_status);
return QDF_STATUS_E_FAILURE;
}
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
- "%s: wma correctly started", __func__);
/* Start the MAC */
- qdf_mem_zero(&halStartParams,
- sizeof(tHalMacStartParameters));
+ qdf_mem_zero(&halStartParams, sizeof(tHalMacStartParameters));
/* Start the MAC */
- sirStatus =
- mac_start(p_cds_context->pMACContext, &halStartParams);
+ sirStatus = mac_start(p_cds_context->pMACContext, &halStartParams);
if (eSIR_SUCCESS != sirStatus) {
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
- "%s: Failed to start MAC", __func__);
+ cds_err("Failed to start MAC; status:%d", sirStatus);
goto err_wma_stop;
}
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
- "%s: MAC correctly started", __func__);
-
/* START SME */
qdf_status = sme_start(p_cds_context->pMACContext);
-
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
- "%s: Failed to start SME", __func__);
+ cds_err("Failed to start SME; status:%d", qdf_status);
goto err_mac_stop;
}
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
- "%s: SME correctly started", __func__);
-
- if (ol_txrx_pdev_attach_target
- (p_cds_context->pdev_txrx_ctx)) {
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
- "%s: Failed attach target", __func__);
- goto err_sme_stop;
+ errno = ol_txrx_pdev_attach_target(p_cds_context->pdev_txrx_ctx);
+ if (errno) {
+ cds_err("Failed to attach pdev target; errno:%d", errno);
+ goto err_sme_stop;
}
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
- "%s: CDS Start is successful!!", __func__);
-
return QDF_STATUS_SUCCESS;
err_sme_stop:
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index f0ab58c58c46..5b997b87c918 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -8763,7 +8763,6 @@ void cds_restart_sap(hdd_adapter_t *ap_adapter)
hdd_cleanup_actionframe(hdd_ctx, ap_adapter);
hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter);
qdf_event_reset(&hostapd_state->qdf_stop_bss_event);
- hdd_ipa_ap_disconnect(ap_adapter);
if (QDF_STATUS_SUCCESS == wlansap_stop_bss(sap_ctx)) {
qdf_status =
qdf_wait_for_event_completion(&hostapd_state->
@@ -10183,20 +10182,24 @@ QDF_STATUS cds_get_sap_mandatory_channel(uint32_t *chan)
return QDF_STATUS_SUCCESS;
}
-uint8_t cds_get_alternate_channel_for_sap(void)
+uint8_t cds_get_diff_band_ch_for_sap(uint8_t channel)
{
uint8_t pcl_channels[QDF_MAX_NUM_CHAN];
uint8_t pcl_weight[QDF_MAX_NUM_CHAN];
- uint8_t channel = 0;
uint32_t pcl_len = 0;
+ uint8_t i = 0;
if (QDF_STATUS_SUCCESS == cds_get_pcl(CDS_SAP_MODE,
&pcl_channels[0], &pcl_len,
pcl_weight, QDF_ARRAY_SIZE(pcl_weight))) {
- channel = pcl_channels[0];
+ for (i = 0; i < pcl_len; i++) {
+ if (CDS_IS_SAME_BAND_CHANNELS(channel,
+ pcl_channels[i]))
+ continue;
+ return pcl_channels[i];
+ }
}
-
- return channel;
+ return 0;
}
QDF_STATUS cds_valid_sap_conc_channel_check(uint8_t *con_ch, uint8_t sap_ch)
@@ -10235,12 +10238,21 @@ QDF_STATUS cds_valid_sap_conc_channel_check(uint8_t *con_ch, uint8_t sap_ch)
if (cds_valid_sta_channel_check(channel)) {
if (CDS_IS_DFS_CH(channel) ||
- CDS_IS_PASSIVE_OR_DISABLE_CH(channel) ||
- !(hdd_ctx->config->sta_sap_scc_on_lte_coex_chan ||
- cds_is_safe_channel(channel))) {
+ CDS_IS_PASSIVE_OR_DISABLE_CH(channel) ||
+ !(hdd_ctx->config->sta_sap_scc_on_lte_coex_chan ||
+ cds_is_safe_channel(channel)) ||
+ (!(hdd_ctx->config->etsi_srd_chan_in_master_mode) &&
+ (cds_is_etsi13_regdmn_srd_chan(
+ cds_chan_to_freq(channel))))) {
+ if (CDS_IS_DFS_CH(channel) &&
+ sta_sap_scc_on_dfs_chan) {
+ cds_debug("STA, SAP SCC is allowed on DFS chan %u",
+ channel);
+ goto update_chan;
+ }
if (wma_is_hw_dbs_capable()) {
temp_channel =
- cds_get_alternate_channel_for_sap();
+ cds_get_diff_band_ch_for_sap(channel);
cds_debug("temp_channel is %d", temp_channel);
if (temp_channel) {
channel = temp_channel;
@@ -10256,13 +10268,6 @@ QDF_STATUS cds_valid_sap_conc_channel_check(uint8_t *con_ch, uint8_t sap_ch)
return QDF_STATUS_E_FAILURE;
}
} else {
- if (CDS_IS_DFS_CH(channel) &&
- sta_sap_scc_on_dfs_chan) {
- cds_debug("STA, SAP SCC is allowed on DFS chan %u",
- channel);
- goto update_chan;
- }
-
cds_warn("Can't have concurrency on %d",
channel);
return QDF_STATUS_E_FAILURE;
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index f111678f6831..2c9eb8082c06 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -14784,6 +14784,186 @@ enum hw_filter_mode {
/*
* <ini>
+ * gSetBTCMode - Config BTC mode
+ * @Min: 0
+ * @Max: 2
+ * @Default: 0
+ *
+ * 0 - TDD
+ * 1 - FDD
+ * 2 - Hybrid
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_BTC_MODE_NAME "gSetBTCMode"
+#define CFG_SET_BTC_MODE_MIN (0)
+#define CFG_SET_BTC_MODE_MAX (2)
+#define CFG_SET_BTC_MODE_DEFAULT (0)
+
+/*
+ * <ini>
+ * gSetAntennaIsolation - Set Antenna Isolation
+ * @Min: 0
+ * @Max: 255
+ * @Default: 25
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_ANTENNA_ISOLATION_NAME "gSetAntennaIsolation"
+#define CFG_SET_ANTENNA_ISOLATION_MIN (0)
+#define CFG_SET_ANTENNA_ISOLATION_MAX (255)
+#define CFG_SET_ANTENNA_ISOLATION_DEFAULT (25)
+
+/*
+ * <ini>
+ * gSetMaxTxPowerForBTC - Set Max WLAN Tx power in COEX scenario
+ * @Min: 0
+ * @Max: 100
+ * @Default: 100
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_MAX_TX_POWER_FOR_BTC_NAME "gSetMaxTxPowerForBTC"
+#define CFG_SET_MAX_TX_POWER_FOR_BTC_MIN (0)
+#define CFG_SET_MAX_TX_POWER_FOR_BTC_MAX (100)
+#define CFG_SET_MAX_TX_POWER_FOR_BTC_DEFAULT (100)
+
+/*
+ * <ini>
+ * gSetWlanLowRssiThreshold - Set WLAN low RSSI threshold for BTC mode switching
+ * @Min: -100
+ * @Max: 0
+ * @Default: -80
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_WLAN_LOW_RSSI_THRESHOLD_NAME "gSetWlanLowRssiThreshold"
+#define CFG_SET_WLAN_LOW_RSSI_THRESHOLD_MIN (-100)
+#define CFG_SET_WLAN_LOW_RSSI_THRESHOLD_MAX (0)
+#define CFG_SET_WLAN_LOW_RSSI_THRESHOLD_DEFAULT (-80)
+
+/*
+ * <ini>
+ * gSetBtLowRssiThreshold - Set BT low RSSI threshold for BTC mode switching
+ * @Min: -100
+ * @Max: 0
+ * @Default: -80
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_BT_LOW_RSSI_THRESHOLD_NAME "gSetBtLowRssiThreshold"
+#define CFG_SET_BT_LOW_RSSI_THRESHOLD_MIN (-100)
+#define CFG_SET_BT_LOW_RSSI_THRESHOLD_MAX (0)
+#define CFG_SET_BT_LOW_RSSI_THRESHOLD_DEFAULT (-80)
+
+/*
+ * <ini>
+ * gSetBtInterferenceLowLL - Set lower limit of low level BT interference
+ * @Min: -100
+ * @Max: 100
+ * @Default: -25
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_BT_INTERFERENCE_LOW_LL_NAME "gSetBtInterferenceLowLL"
+#define CFG_SET_BT_INTERFERENCE_LOW_LL_MIN (-100)
+#define CFG_SET_BT_INTERFERENCE_LOW_LL_MAX (100)
+#define CFG_SET_BT_INTERFERENCE_LOW_LL_DEFAULT (-25)
+
+/*
+ * <ini>
+ * gSetBtInterferenceLowUL - Set upper limit of low level BT interference
+ * @Min: -100
+ * @Max: 100
+ * @Default: -21
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_BT_INTERFERENCE_LOW_UL_NAME "gSetBtInterferenceLowUL"
+#define CFG_SET_BT_INTERFERENCE_LOW_UL_MIN (-100)
+#define CFG_SET_BT_INTERFERENCE_LOW_UL_MAX (100)
+#define CFG_SET_BT_INTERFERENCE_LOW_UL_DEFAULT (-21)
+
+/*
+ * <ini>
+ * gSetBtInterferenceMediumLL - Set lower limit of medium level BT interference
+ * @Min: -100
+ * @Max: 100
+ * @Default: -20
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_BT_INTERFERENCE_MEDIUM_LL_NAME "gSetBtInterferenceMediumLL"
+#define CFG_SET_BT_INTERFERENCE_MEDIUM_LL_MIN (-100)
+#define CFG_SET_BT_INTERFERENCE_MEDIUM_LL_MAX (100)
+#define CFG_SET_BT_INTERFERENCE_MEDIUM_LL_DEFAULT (-20)
+
+/*
+ * <ini>
+ * gSetBtInterferenceMediumUL - Set upper limit of medium level BT interference
+ * @Min: -100
+ * @Max: 100
+ * @Default: -16
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_BT_INTERFERENCE_MEDIUM_UL_NAME "gSetBtInterferenceMediumUL"
+#define CFG_SET_BT_INTERFERENCE_MEDIUM_UL_MIN (-100)
+#define CFG_SET_BT_INTERFERENCE_MEDIUM_UL_MAX (100)
+#define CFG_SET_BT_INTERFERENCE_MEDIUM_UL_DEFAULT (-16)
+
+/*
+ * <ini>
+ * gSetBtInterferenceHighLL - Set lower limit of high level BT interference
+ * @Min: -100
+ * @Max: 100
+ * @Default: -15
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_BT_INTERFERENCE_HIGH_LL_NAME "gSetBtInterferenceHighLL"
+#define CFG_SET_BT_INTERFERENCE_HIGH_LL_MIN (-100)
+#define CFG_SET_BT_INTERFERENCE_HIGH_LL_MAX (100)
+#define CFG_SET_BT_INTERFERENCE_HIGH_LL_DEFAULT (-15)
+
+/*
+ * <ini>
+ * gSetBtInterferenceHighUL - Set upper limit of high level BT interference
+ * @Min: -100
+ * @Max: 100
+ * @Default: -11
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_SET_BT_INTERFERENCE_HIGH_UL_NAME "gSetBtInterferenceHighUL"
+#define CFG_SET_BT_INTERFERENCE_HIGH_UL_MIN (-100)
+#define CFG_SET_BT_INTERFERENCE_HIGH_UL_MAX (100)
+#define CFG_SET_BT_INTERFERENCE_HIGH_UL_DEFAULT (-11)
+
+/*
+ * <ini>
* channel_select_logic_conc - Set channel selection logic
* for different concurrency combinations to DBS or inter band
* MCC. Default is DBS for STA+STA and STA+P2P.
@@ -14952,6 +15132,55 @@ enum hw_filter_mode {
#define CFG_MWS_COEX_5G_NR_PWR_LIMIT_MAX (0xFFFFFFFF)
#define CFG_MWS_COEX_5G_NR_PWR_LIMIT_DEFAULT (0x00000000)
#endif
+/*
+ * <ini>
+ * roam_preauth_retry_count
+ *
+ * @Min: 1
+ * @Max: 10
+ * @Default: 5
+ *
+ * The maximum number of software retries for preauth or
+ * reassoc made before picking up the next candidate for
+ * connection during roaming.
+ *
+ * Related: N/A
+ *
+ * Supported Features: Roaming
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_ROAM_PREAUTH_RETRY_COUNT_NAME "roam_preauth_retry_count"
+#define CFG_ROAM_PREAUTH_RETRY_COUNT_MIN (1)
+#define CFG_ROAM_PREAUTH_RETRY_COUNT_MAX (10)
+#define CFG_ROAM_PREAUTH_RETRY_COUNT_DEFAULT (5)
+
+/*
+ * <ini>
+ * roam_preauth_no_ack_timeout
+ *
+ * @Min: 5
+ * @Max: 50
+ * @Default: 5
+ *
+ * Time to wait (in ms) after sending an preauth or reassoc
+ * request which didn’t have an ack, before considering
+ * it as a failure and making another software retry.
+ *
+ * Related: N/A
+ *
+ * Supported Features: Roaming
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_NAME "roam_preauth_no_ack_timeout"
+#define CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_MIN (5)
+#define CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_MAX (50)
+#define CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_DEFAULT (5)
/*---------------------------------------------------------------------------
Type declarations
@@ -15886,9 +16115,22 @@ struct hdd_config {
bool enable_rtt_mac_randomization;
bool enable_ftopen;
bool is_unit_test_framework_enabled;
+ uint8_t set_btc_mode;
+ uint8_t set_antenna_isolation;
+ uint8_t set_max_tx_power_for_btc;
+ int16_t set_wlan_low_rssi_threshold;
+ int16_t set_bt_low_rssi_threshold;
+ int16_t set_bt_interference_low_ll;
+ int16_t set_bt_interference_low_ul;
+ int16_t set_bt_interference_medium_ll;
+ int16_t set_bt_interference_medium_ul;
+ int16_t set_bt_interference_high_ll;
+ int16_t set_bt_interference_high_ul;
bool disable_channel;
uint32_t enable_secondary_rate;
bool roam_force_rssi_trigger;
+ uint32_t roam_preauth_retry_count;
+ uint32_t roam_preauth_no_ack_timeout;
};
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
diff --git a/core/hdd/inc/wlan_hdd_ipa.h b/core/hdd/inc/wlan_hdd_ipa.h
index 1db77054de54..e1a0d41e10fa 100644
--- a/core/hdd/inc/wlan_hdd_ipa.h
+++ b/core/hdd/inc/wlan_hdd_ipa.h
@@ -163,6 +163,14 @@ void hdd_ipa_uc_info(hdd_context_t *hdd_ctx);
void hdd_ipa_clean_adapter_iface(hdd_adapter_t *adapter);
/**
+ * hdd_ipa_fw_rejuvenate() - send fw rejuvenate message to IPA driver
+ * @hdd_ctx: hdd context
+ *
+ * Return: void
+ */
+void hdd_ipa_fw_rejuvenate_send_msg(hdd_context_t *hdd_ctx);
+
+/**
* hdd_ipa_uc_disconnect_ap() - send ap disconnect event
* @hdd_ctx: pointer to hdd adapter
*
@@ -349,6 +357,10 @@ static inline void hdd_ipa_uc_info(hdd_context_t *hdd_ctx)
{
}
+static inline void hdd_ipa_fw_rejuvenate_send_msg(hdd_context_t *hdd_ctx)
+{
+}
+
static inline void hdd_ipa_clean_adapter_iface(hdd_adapter_t *adapter)
{
}
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 8bb825b9e4ef..8a31dc087341 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1444,8 +1444,8 @@ struct hdd_adapter_s {
struct completion roaming_comp_var;
- /** Completion of change country code */
- struct completion change_country_code;
+ /** Event of change country code */
+ qdf_event_t change_country_code;
/* completion variable for Linkup Event */
struct completion linkup_event_var;
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 930cf98bddf2..2347bb49db0f 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -1820,6 +1820,7 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter,
pHddStaCtx->conn_info.connState)) {
hdd_conn_set_connection_state(pAdapter,
eConnectionState_NotConnected);
+ hdd_set_roaming_in_progress(false);
}
#ifdef WLAN_FEATURE_GTK_OFFLOAD
if ((QDF_STA_MODE == pAdapter->device_mode) ||
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index fecc873469b8..44b17dba80fd 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -5616,6 +5616,91 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_DISABLE_CHANNEL_MIN,
CFG_ENABLE_DISABLE_CHANNEL_MAX),
+ REG_VARIABLE(CFG_SET_BTC_MODE_NAME, WLAN_PARAM_Integer,
+ struct hdd_config, set_btc_mode,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_BTC_MODE_DEFAULT,
+ CFG_SET_BTC_MODE_MIN,
+ CFG_SET_BTC_MODE_MAX),
+
+ REG_VARIABLE(CFG_SET_ANTENNA_ISOLATION_NAME, WLAN_PARAM_Integer,
+ struct hdd_config, set_antenna_isolation,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_ANTENNA_ISOLATION_DEFAULT,
+ CFG_SET_ANTENNA_ISOLATION_MIN,
+ CFG_SET_ANTENNA_ISOLATION_MAX),
+
+ REG_VARIABLE(CFG_SET_MAX_TX_POWER_FOR_BTC_NAME, WLAN_PARAM_Integer,
+ struct hdd_config, set_max_tx_power_for_btc,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_MAX_TX_POWER_FOR_BTC_DEFAULT,
+ CFG_SET_MAX_TX_POWER_FOR_BTC_MIN,
+ CFG_SET_MAX_TX_POWER_FOR_BTC_MAX),
+
+ REG_VARIABLE(CFG_SET_WLAN_LOW_RSSI_THRESHOLD_NAME,
+ WLAN_PARAM_SignedInteger,
+ struct hdd_config, set_wlan_low_rssi_threshold,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_WLAN_LOW_RSSI_THRESHOLD_DEFAULT,
+ CFG_SET_WLAN_LOW_RSSI_THRESHOLD_MIN,
+ CFG_SET_WLAN_LOW_RSSI_THRESHOLD_MAX),
+
+ REG_VARIABLE(CFG_SET_BT_LOW_RSSI_THRESHOLD_NAME,
+ WLAN_PARAM_SignedInteger,
+ struct hdd_config, set_bt_low_rssi_threshold,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_BT_LOW_RSSI_THRESHOLD_DEFAULT,
+ CFG_SET_BT_LOW_RSSI_THRESHOLD_MIN,
+ CFG_SET_BT_LOW_RSSI_THRESHOLD_MAX),
+
+ REG_VARIABLE(CFG_SET_BT_INTERFERENCE_LOW_LL_NAME,
+ WLAN_PARAM_SignedInteger,
+ struct hdd_config, set_bt_interference_low_ll,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_LOW_LL_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_LOW_LL_MIN,
+ CFG_SET_BT_INTERFERENCE_LOW_LL_MAX),
+
+ REG_VARIABLE(CFG_SET_BT_INTERFERENCE_LOW_UL_NAME,
+ WLAN_PARAM_SignedInteger,
+ struct hdd_config, set_bt_interference_low_ul,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_LOW_UL_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_LOW_UL_MIN,
+ CFG_SET_BT_INTERFERENCE_LOW_UL_MAX),
+
+ REG_VARIABLE(CFG_SET_BT_INTERFERENCE_MEDIUM_LL_NAME,
+ WLAN_PARAM_SignedInteger,
+ struct hdd_config, set_bt_interference_medium_ll,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_MEDIUM_LL_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_MEDIUM_LL_MIN,
+ CFG_SET_BT_INTERFERENCE_MEDIUM_LL_MAX),
+
+ REG_VARIABLE(CFG_SET_BT_INTERFERENCE_MEDIUM_UL_NAME,
+ WLAN_PARAM_SignedInteger,
+ struct hdd_config, set_bt_interference_medium_ul,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_MEDIUM_UL_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_MEDIUM_UL_MIN,
+ CFG_SET_BT_INTERFERENCE_MEDIUM_UL_MAX),
+
+ REG_VARIABLE(CFG_SET_BT_INTERFERENCE_HIGH_LL_NAME,
+ WLAN_PARAM_SignedInteger,
+ struct hdd_config, set_bt_interference_high_ll,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_HIGH_LL_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_HIGH_LL_MIN,
+ CFG_SET_BT_INTERFERENCE_HIGH_LL_MAX),
+
+ REG_VARIABLE(CFG_SET_BT_INTERFERENCE_HIGH_UL_NAME,
+ WLAN_PARAM_SignedInteger,
+ struct hdd_config, set_bt_interference_high_ul,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_HIGH_UL_DEFAULT,
+ CFG_SET_BT_INTERFERENCE_HIGH_UL_MIN,
+ CFG_SET_BT_INTERFERENCE_HIGH_UL_MAX),
+
REG_VARIABLE(CFG_ENABLE_SECONDARY_RATE_NAME,
WLAN_PARAM_HexInteger,
struct hdd_config, enable_secondary_rate,
@@ -5646,6 +5731,21 @@ struct reg_table_entry g_registry_table[] = {
CFG_MWS_COEX_5G_NR_PWR_LIMIT_MIN,
CFG_MWS_COEX_5G_NR_PWR_LIMIT_MAX),
#endif
+ REG_VARIABLE(CFG_ROAM_PREAUTH_RETRY_COUNT_NAME,
+ WLAN_PARAM_Integer,
+ struct hdd_config, roam_preauth_retry_count,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ROAM_PREAUTH_RETRY_COUNT_DEFAULT,
+ CFG_ROAM_PREAUTH_RETRY_COUNT_MIN,
+ CFG_ROAM_PREAUTH_RETRY_COUNT_MAX),
+
+ REG_VARIABLE(CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_NAME,
+ WLAN_PARAM_Integer,
+ struct hdd_config, roam_preauth_no_ack_timeout,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_DEFAULT,
+ CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_MIN,
+ CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_MAX),
};
/**
@@ -6652,6 +6752,49 @@ static void hdd_cfg_print_action_oui(hdd_context_t *hdd_ctx)
}
/**
+ * hdd_cfg_print_btc_params() - print btc param values
+ * @hdd_ctx: pointer to hdd context
+ *
+ * Return: None
+ */
+static void hdd_cfg_print_btc_params(hdd_context_t *hdd_ctx)
+{
+ hdd_debug("Name = [%s] value = [%d]",
+ CFG_SET_BTC_MODE_NAME,
+ hdd_ctx->config->set_btc_mode);
+ hdd_debug("Name = [%s] value = [%d]",
+ CFG_SET_ANTENNA_ISOLATION_NAME,
+ hdd_ctx->config->set_antenna_isolation);
+ hdd_debug("Name = [%s] value = [%d]",
+ CFG_SET_MAX_TX_POWER_FOR_BTC_NAME,
+ hdd_ctx->config->set_max_tx_power_for_btc);
+ hdd_debug("Name = [%s] value = [%d]",
+ CFG_SET_WLAN_LOW_RSSI_THRESHOLD_NAME,
+ hdd_ctx->config->set_wlan_low_rssi_threshold);
+ hdd_debug("Name = [%s] value = [%d]",
+ CFG_SET_BT_LOW_RSSI_THRESHOLD_NAME,
+ hdd_ctx->config->set_bt_low_rssi_threshold);
+ hdd_debug("Name = [%s] value = [%d]",
+ CFG_SET_BT_INTERFERENCE_LOW_LL_NAME,
+ hdd_ctx->config->set_bt_interference_low_ll);
+ hdd_debug("Name = [%s] value = [%d]",
+ CFG_SET_BT_INTERFERENCE_LOW_UL_NAME,
+ hdd_ctx->config->set_bt_interference_low_ul);
+ hdd_debug("Name = [%s] value = [%d]",
+ CFG_SET_BT_INTERFERENCE_MEDIUM_LL_NAME,
+ hdd_ctx->config->set_bt_interference_medium_ll);
+ hdd_debug("Name = [%s] value = [%d]",
+ CFG_SET_BT_INTERFERENCE_MEDIUM_UL_NAME,
+ hdd_ctx->config->set_bt_interference_medium_ul);
+ hdd_debug("Name = [%s] value = [%d]",
+ CFG_SET_BT_INTERFERENCE_HIGH_LL_NAME,
+ hdd_ctx->config->set_bt_interference_high_ll);
+ hdd_debug("Name = [%s] value = [%d]",
+ CFG_SET_BT_INTERFERENCE_HIGH_UL_NAME,
+ hdd_ctx->config->set_bt_interference_high_ul);
+}
+
+/**
* hdd_cfg_print() - print the hdd configuration
* @iniTable: pointer to hdd context
*
@@ -7617,8 +7760,14 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
CFG_ROAM_FORCE_RSSI_TRIGGER_NAME,
pHddCtx->config->roam_force_rssi_trigger);
hdd_cfg_print_mws_coex(pHddCtx);
-
+ hdd_debug("Name = [%s] Value = [%u]",
+ CFG_ROAM_PREAUTH_RETRY_COUNT_NAME,
+ pHddCtx->config->roam_preauth_retry_count);
+ hdd_debug("Name = [%s] Value = [%u]",
+ CFG_ROAM_PREAUTH_NO_ACK_TIMEOUT_NAME,
+ pHddCtx->config->roam_preauth_no_ack_timeout);
hdd_cfg_print_action_oui(pHddCtx);
+ hdd_cfg_print_btc_params(pHddCtx);
}
/**
@@ -10160,6 +10309,10 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
pHddCtx->config->enable_ftopen;
smeConfig->csrConfig.ho_delay_for_rx =
pHddCtx->config->ho_delay_for_rx;
+ smeConfig->csrConfig.roam_preauth_no_ack_timeout =
+ pHddCtx->config->roam_preauth_no_ack_timeout;
+ smeConfig->csrConfig.roam_preauth_retry_count =
+ pHddCtx->config->roam_preauth_retry_count;
smeConfig->csrConfig.min_delay_btw_roam_scans =
pHddCtx->config->min_delay_btw_roam_scans;
smeConfig->csrConfig.roam_trigger_reason_bitmask =
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 0e1c618f9884..d0ad19e1f54d 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -9309,10 +9309,12 @@ __wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy,
int ret;
qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
uint16_t *local_unsafe_list;
+ uint16_t unsafe_channel_count;
uint16_t unsafe_channel_index, local_unsafe_list_count;
tHddAvoidFreqList *channel_list;
enum tQDF_GLOBAL_CON_MODE curr_mode;
uint8_t num_args = 0;
+ bool user_set_avoid_channel = true;
ENTER_DEV(wdev->netdev);
@@ -9330,6 +9332,11 @@ __wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy,
ret = wlan_hdd_validate_context(hdd_ctx);
if (0 != ret)
return ret;
+ if (!data && data_len == 0) {
+ hdd_debug("Userspace doesn't set avoid frequency channel list");
+ user_set_avoid_channel = false;
+ goto process_unsafe_channel;
+ }
if (!data || data_len < (sizeof(channel_list->avoidFreqRangeCount) +
sizeof(tHddAvoidFreqRange))) {
hdd_err("Avoid frequency channel list empty");
@@ -9354,6 +9361,7 @@ __wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy,
return -EINVAL;
}
+process_unsafe_channel:
ret = hdd_clone_local_unsafe_chan(hdd_ctx,
&local_unsafe_list,
&local_unsafe_list_count);
@@ -9363,16 +9371,24 @@ __wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy,
pld_get_wlan_unsafe_channel(qdf_ctx->dev, hdd_ctx->unsafe_channel_list,
&(hdd_ctx->unsafe_channel_count),
sizeof(hdd_ctx->unsafe_channel_list));
-
- hdd_ctx->unsafe_channel_count = hdd_validate_avoid_freq_chanlist(
+ if (user_set_avoid_channel) {
+ hdd_ctx->unsafe_channel_count =
+ hdd_validate_avoid_freq_chanlist(
hdd_ctx,
channel_list);
+ unsafe_channel_count = hdd_ctx->unsafe_channel_count;
- pld_set_wlan_unsafe_channel(qdf_ctx->dev, hdd_ctx->unsafe_channel_list,
- hdd_ctx->unsafe_channel_count);
+ pld_set_wlan_unsafe_channel(qdf_ctx->dev,
+ hdd_ctx->unsafe_channel_list,
+ hdd_ctx->unsafe_channel_count);
+ } else {
+ unsafe_channel_count = QDF_MIN(
+ (uint16_t)hdd_ctx->unsafe_channel_count,
+ (uint16_t)NUM_CHANNELS);
+ }
for (unsafe_channel_index = 0;
- unsafe_channel_index < hdd_ctx->unsafe_channel_count;
+ unsafe_channel_index < unsafe_channel_count;
unsafe_channel_index++) {
hdd_debug("Channel %d is not safe",
hdd_ctx->unsafe_channel_list[unsafe_channel_index]);
@@ -14645,17 +14661,6 @@ static int wlan_hdd_cfg80211_change_bss(struct wiphy *wiphy,
return ret;
}
-/* FUNCTION: wlan_hdd_change_country_code_cd
- * to wait for contry code completion
- */
-void *wlan_hdd_change_country_code_cb(void *pAdapter)
-{
- hdd_adapter_t *call_back_pAdapter = pAdapter;
-
- complete(&call_back_pAdapter->change_country_code);
- return NULL;
-}
-
/**
* __wlan_hdd_cfg80211_change_iface() - change interface cfg80211 op
* @wiphy: Pointer to the wiphy structure
@@ -14724,7 +14729,11 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
/* Reset the current device mode bit mask */
cds_clear_concurrency_mode(pAdapter->device_mode);
- hdd_update_tdls_ct_and_teardown_links(pHddCtx);
+ if (!(pAdapter->device_mode == QDF_P2P_DEVICE_MODE &&
+ type == NL80211_IFTYPE_STATION)) {
+ hdd_debug("Teardown tdls links and disable tdls in FW as new interface is coming up");
+ hdd_update_tdls_ct_and_teardown_links(pHddCtx);
+ }
if ((pAdapter->device_mode == QDF_STA_MODE) ||
(pAdapter->device_mode == QDF_P2P_CLIENT_MODE) ||
(pAdapter->device_mode == QDF_P2P_DEVICE_MODE) ||
diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h
index b2d39fa6eacc..772ed6b1db31 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.h
+++ b/core/hdd/src/wlan_hdd_cfg80211.h
@@ -385,7 +385,6 @@ extern void wlan_hdd_cfg80211_update_replay_counter_cb(
tpSirGtkOffloadGetInfoRspParams
pGtkOffloadGetInfoRsp);
#endif
-void *wlan_hdd_change_country_code_cb(void *pAdapter);
void hdd_select_cbmode(hdd_adapter_t *pAdapter, uint8_t operationChannel,
struct ch_params_s *ch_params);
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c
index c6824643b1d3..7fed1ccfb0f4 100644
--- a/core/hdd/src/wlan_hdd_driver_ops.c
+++ b/core/hdd/src/wlan_hdd_driver_ops.c
@@ -1382,8 +1382,6 @@ static void wlan_hdd_set_the_pld_uevent(struct pld_uevent_data *uevent)
{
switch (uevent->uevent) {
case PLD_FW_DOWN:
- cds_set_target_ready(false);
- break;
case PLD_RECOVERY:
cds_set_target_ready(false);
cds_set_recovery_in_progress(true);
@@ -1404,6 +1402,7 @@ static void wlan_hdd_pld_uevent(struct device *dev,
struct pld_uevent_data *uevent)
{
enum cds_driver_state driver_state;
+ hdd_context_t *hdd_ctx;
ENTER();
@@ -1418,6 +1417,13 @@ static void wlan_hdd_pld_uevent(struct device *dev,
goto uevent_not_allowed;
}
+ hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
+
+ if (!hdd_ctx) {
+ hdd_err("hdd_ctx is NULL return");
+ return;
+ }
+
wlan_hdd_set_the_pld_uevent(uevent);
mutex_lock(&hdd_init_deinit_lock);
@@ -1429,6 +1435,9 @@ static void wlan_hdd_pld_uevent(struct device *dev,
break;
case PLD_FW_DOWN:
hdd_cleanup_on_fw_down();
+ if (pld_is_fw_rejuvenate() &&
+ hdd_ipa_is_enabled(hdd_ctx))
+ hdd_ipa_fw_rejuvenate_send_msg(hdd_ctx);
break;
}
mutex_unlock(&hdd_init_deinit_lock);
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 368d93bb518a..b8d2ff72750a 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -735,7 +735,6 @@ static int hdd_stop_bss_link(hdd_adapter_t *pHostapdAdapter,
return status;
if (test_bit(SOFTAP_BSS_STARTED, &pHostapdAdapter->event_flags)) {
- hdd_ipa_ap_disconnect(pHostapdAdapter);
status = wlansap_stop_bss(
WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter));
if (QDF_IS_STATUS_SUCCESS(status))
@@ -1658,6 +1657,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
hdd_station_info_t *stainfo;
cds_context_type *cds_ctx;
hdd_adapter_t *sta_adapter;
+ tsap_Config_t *sap_config;
dev = (struct net_device *)usrDataForCallback;
if (!dev) {
@@ -1706,6 +1706,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
dfs_info.channel = pHddApCtx->operatingChannel;
sme_get_country_code(pHddCtx->hHal, dfs_info.country_code, &cc_len);
+ sap_config = &pHostapdAdapter->sessionCtx.ap.sapConfig;
switch (sapEvent) {
case eSAP_START_BSS_EVENT:
@@ -1719,13 +1720,16 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
pHostapdAdapter->sessionId =
pSapEvent->sapevt.sapStartBssCompleteEvent.sessionId;
- pHostapdAdapter->sessionCtx.ap.sapConfig.channel =
+ sap_config->channel =
pSapEvent->sapevt.sapStartBssCompleteEvent.
operatingChannel;
- pHostapdAdapter->sessionCtx.ap.sapConfig.ch_params.ch_width =
+ sap_config->ch_params.ch_width =
pSapEvent->sapevt.sapStartBssCompleteEvent.ch_width;
+ cds_set_channel_params(sap_config->channel, 0,
+ &sap_config->ch_params);
+
pHostapdState->qdf_status =
pSapEvent->sapevt.sapStartBssCompleteEvent.status;
@@ -5349,7 +5353,6 @@ __iw_softap_stopbss(struct net_device *dev,
WLAN_HDD_GET_HOSTAP_STATE_PTR(pHostapdAdapter);
qdf_event_reset(&pHostapdState->qdf_stop_bss_event);
- hdd_ipa_ap_disconnect(pHostapdAdapter);
status = wlansap_stop_bss(
WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter));
if (QDF_IS_STATUS_SUCCESS(status)) {
@@ -8808,7 +8811,6 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
WLAN_HDD_GET_SAP_CTX_PTR(pAdapter), true);
qdf_event_reset(&pHostapdState->qdf_stop_bss_event);
- hdd_ipa_ap_disconnect(pAdapter);
status = wlansap_stop_bss(WLAN_HDD_GET_SAP_CTX_PTR(pAdapter));
if (QDF_IS_STATUS_SUCCESS(status)) {
qdf_status =
@@ -9091,6 +9093,11 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
hdd_err("SAP not allowed on DFS channel!!");
return -EINVAL;
}
+ if (cds_is_etsi13_regdmn_srd_chan(cds_chan_to_freq(channel) &&
+ !(pHddCtx->config->etsi_srd_chan_in_master_mode))) {
+ hdd_err("SAP SRD master mode not supported. Cannot start SAP");
+ return -EINVAL;
+ }
if (cds_is_sap_mandatory_chan_list_enabled()) {
if (CDS_IS_CHANNEL_5GHZ(channel)) {
@@ -9511,17 +9518,3 @@ void hdd_sap_destroy_events(hdd_adapter_t *adapter)
}
EXIT();
}
-void hdd_ipa_ap_disconnect(hdd_adapter_t *pAdapter)
-{
- hdd_context_t *hdd_ctx;
- hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
-
- if (hdd_ipa_is_enabled(hdd_ctx)) {
- if (hdd_ipa_wlan_evt(pAdapter,
- WLAN_HDD_GET_AP_CTX_PTR(pAdapter)->uBCStaId,
- HDD_IPA_AP_DISCONNECT,
- pAdapter->dev->dev_addr)) {
- hdd_err("WLAN_AP_DISCONNECT event failed");
- }
- }
-}
diff --git a/core/hdd/src/wlan_hdd_hostapd.h b/core/hdd/src/wlan_hdd_hostapd.h
index b23544b44387..cb2a31b327f0 100644
--- a/core/hdd/src/wlan_hdd_hostapd.h
+++ b/core/hdd/src/wlan_hdd_hostapd.h
@@ -143,15 +143,6 @@ QDF_STATUS hdd_softap_set_peer_authorized(hdd_adapter_t *adapter,
struct qdf_mac_addr *peer_mac);
/**
- * hdd_ipa_ap_disconnect() - call hdd_ipa_wlan_evt if
- * ipa is enabled
- * @pAdapter: pointer to adapter context
- *
- * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
- */
-void hdd_ipa_ap_disconnect(hdd_adapter_t *pAdapter);
-
-/**
* wlan_hdd_disable_channels() - Cache the channels
* and current state of the channels from the channel list
* received in the command and disable the channels on the
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index f64f9dccbfe0..add22dc65888 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -3129,7 +3129,6 @@ static int drv_cmd_country(hdd_adapter_t *adapter,
{
int ret = 0;
QDF_STATUS status;
- unsigned long rc;
char *country_code;
int32_t cc_from_db;
@@ -3163,7 +3162,7 @@ static int drv_cmd_country(hdd_adapter_t *adapter,
}
}
- INIT_COMPLETION(adapter->change_country_code);
+ qdf_event_reset(&adapter->change_country_code);
status = sme_change_country_code(hdd_ctx->hHal,
wlan_hdd_change_country_code_callback,
@@ -3172,12 +3171,14 @@ static int drv_cmd_country(hdd_adapter_t *adapter,
hdd_ctx->pcds_context,
true,
true);
- if (status == QDF_STATUS_SUCCESS) {
- rc = wait_for_completion_timeout(
- &adapter->change_country_code,
- msecs_to_jiffies(WLAN_WAIT_TIME_COUNTRY));
- if (!rc)
+ if (QDF_IS_STATUS_SUCCESS(status)) {
+ status = qdf_wait_for_event_completion(
+ &adapter->change_country_code,
+ WLAN_WAIT_TIME_COUNTRY);
+ if (QDF_IS_STATUS_ERROR(status)) {
hdd_err("SME while setting country code timed out");
+ ret = -ETIMEDOUT;
+ }
} else {
hdd_err("SME Change Country code fail, status %d",
status);
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 92fbbf6575e3..fa60b41cbea6 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -7642,4 +7642,33 @@ void hdd_ipa_clean_adapter_iface(hdd_adapter_t *adapter)
if (iface_ctx)
hdd_ipa_cleanup_iface(iface_ctx);
}
+
+void hdd_ipa_fw_rejuvenate_send_msg(hdd_context_t *hdd_ctx)
+{
+ struct hdd_ipa_priv *hdd_ipa;
+ struct ipa_msg_meta meta;
+ struct ipa_wlan_msg *msg;
+ int ret;
+
+ hdd_ipa = hdd_ctx->hdd_ipa;
+ meta.msg_len = sizeof(*msg);
+ msg = qdf_mem_malloc(meta.msg_len);
+ if (!msg) {
+ HDD_IPA_LOG(QDF_TRACE_LEVEL_DEBUG, "msg allocation failed");
+ return;
+ }
+ meta.msg_type = WLAN_FWR_SSR_BEFORE_SHUTDOWN;
+ HDD_IPA_LOG(QDF_TRACE_LEVEL_DEBUG, "ipa_send_msg(Evt:%d)",
+ meta.msg_type);
+ ret = ipa_send_msg(&meta, msg, hdd_ipa_msg_free_fn);
+
+ if (ret) {
+ HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
+ "ipa_send_msg(Evt:%d)-fail=%d",
+ meta.msg_type, ret);
+ qdf_mem_free(msg);
+ }
+ hdd_ipa->stats.num_send_msg++;
+}
+
#endif /* IPA_OFFLOAD */
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 072ce80a5a9e..9d6ffcb6a6cb 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -464,7 +464,7 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb,
}
if (!dev->ieee80211_ptr) {
- hdd_err("ieee80211_ptr is NULL!!!");
+ hdd_debug("ieee80211_ptr is NULL!!!");
return NOTIFY_DONE;
}
@@ -476,12 +476,19 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb,
}
if (hdd_ctx->driver_status == DRIVER_MODULES_CLOSED) {
- hdd_err("%s: Driver module is closed", __func__);
+ hdd_debug("%s: Driver module is closed", __func__);
return NOTIFY_DONE;
}
- if (cds_is_driver_recovering() || cds_is_driver_in_bad_state())
+ if (cds_is_driver_recovering()) {
+ hdd_debug("Driver is recovering");
return NOTIFY_DONE;
+ }
+
+ if (cds_is_driver_in_bad_state()) {
+ hdd_debug("Driver is in failed recovery state");
+ return NOTIFY_DONE;
+ }
hdd_debug("%s New Net Device State = %lu",
dev->name, state);
@@ -3236,16 +3243,14 @@ static hdd_adapter_t *hdd_alloc_station_adapter(hdd_context_t *hdd_ctx,
&adapter->qdf_session_open_event);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hdd_err("Session open QDF event init failed!");
- free_netdev(adapter->dev);
- return NULL;
+ goto err_qdf_init;
}
qdf_status = qdf_event_create(
&adapter->qdf_session_close_event);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hdd_err("Session close QDF event init failed!");
- free_netdev(adapter->dev);
- return NULL;
+ goto err_qdf_init;
}
init_completion(&adapter->disconnect_comp_var);
@@ -3263,7 +3268,11 @@ static hdd_adapter_t *hdd_alloc_station_adapter(hdd_context_t *hdd_ctx,
init_completion(&adapter->tdls_link_establish_req_comp);
#endif
init_completion(&adapter->ibss_peer_info_comp);
- init_completion(&adapter->change_country_code);
+ qdf_status = qdf_event_create(&adapter->change_country_code);
+ if (QDF_IS_STATUS_ERROR(qdf_status)) {
+ hdd_err("Change country code event init failed!");
+ goto err_qdf_init;
+ }
init_completion(&adapter->scan_info.abortscan_event_var);
@@ -3302,8 +3311,11 @@ static hdd_adapter_t *hdd_alloc_station_adapter(hdd_context_t *hdd_ctx,
spin_lock_init(&adapter->pause_map_lock);
adapter->start_time = adapter->last_time = qdf_system_ticks();
}
-
return adapter;
+
+err_qdf_init:
+ free_netdev(adapter->dev);
+ return NULL;
}
static QDF_STATUS hdd_register_interface(hdd_adapter_t *adapter, bool rtnl_held)
@@ -4970,7 +4982,6 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
QDF_STATUS status;
QDF_STATUS qdf_status;
- hdd_ipa_ap_disconnect(adapter);
/* Stop Bss. */
status = wlansap_stop_bss(
WLAN_HDD_GET_SAP_CTX_PTR(adapter));
@@ -9172,12 +9183,11 @@ static int hdd_update_country_code(hdd_context_t *hdd_ctx,
{
QDF_STATUS status;
int ret = 0;
- unsigned long rc;
if (country_code == NULL)
return 0;
- INIT_COMPLETION(adapter->change_country_code);
+ qdf_event_reset(&adapter->change_country_code);
status = sme_change_country_code(hdd_ctx->hHal,
wlan_hdd_change_country_code_callback,
@@ -9192,9 +9202,9 @@ static int hdd_update_country_code(hdd_context_t *hdd_ctx,
return -EINVAL;
}
- rc = wait_for_completion_timeout(&adapter->change_country_code,
- msecs_to_jiffies(WLAN_WAIT_TIME_COUNTRY));
- if (!rc) {
+ status = qdf_wait_for_event_completion(&adapter->change_country_code,
+ WLAN_WAIT_TIME_COUNTRY);
+ if (QDF_IS_STATUS_ERROR(status)) {
hdd_err("SME while setting country code timed out");
ret = -ETIMEDOUT;
}
@@ -9994,6 +10004,100 @@ static void hdd_send_all_sme_action_ouis(hdd_context_t *hdd_ctx)
}
/**
+ * hdd_send_coex_config_params() - Send coex config params to FW
+ * @hdd_ctx: HDD context
+ * @adapter: Primary adapter context
+ *
+ * This function is used to send all coex config related params to FW
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS hdd_send_coex_config_params(hdd_context_t *hdd_ctx,
+ hdd_adapter_t *adapter)
+{
+ QDF_STATUS status;
+ struct coex_config_params coex_cfg_params = {0};
+ struct hdd_config *config;
+
+ if (!hdd_ctx) {
+ hdd_err("hdd_ctx is invalid");
+ return QDF_STATUS_E_INVAL;
+ }
+
+ if (!adapter) {
+ hdd_err("adapter is invalid");
+ return QDF_STATUS_E_INVAL;
+ }
+
+ config = hdd_ctx->config;
+ if (!config) {
+ hdd_err("hdd config got NULL");
+ return QDF_STATUS_E_NULL_VALUE;
+ }
+
+ coex_cfg_params.vdev_id = adapter->sessionId;
+ coex_cfg_params.config_type = COEX_CONFIG_TX_POWER;
+ coex_cfg_params.config_value[0] = config->set_max_tx_power_for_btc;
+
+ status = sme_send_coex_config_cmd(&coex_cfg_params);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ hdd_err("Failed to send coex Tx power");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ coex_cfg_params.config_type = COEX_CONFIG_HANDOVER_RSSI;
+ coex_cfg_params.config_value[0] = config->set_wlan_low_rssi_threshold;
+
+ status = sme_send_coex_config_cmd(&coex_cfg_params);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ hdd_err("Failed to send coex handover RSSI");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ coex_cfg_params.config_type = COEX_CONFIG_BTC_MODE;
+ coex_cfg_params.config_value[0] = config->set_btc_mode;
+
+ status = sme_send_coex_config_cmd(&coex_cfg_params);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ hdd_err("Failed to send coex BTC mode");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ coex_cfg_params.config_type = COEX_CONFIG_ANTENNA_ISOLATION;
+ coex_cfg_params.config_value[0] = config->set_antenna_isolation;
+
+ status = sme_send_coex_config_cmd(&coex_cfg_params);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ hdd_err("Failed to send coex antenna isolation");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ coex_cfg_params.config_type = COEX_CONFIG_BT_LOW_RSSI_THRESHOLD;
+ coex_cfg_params.config_value[0] = config->set_bt_low_rssi_threshold;
+
+ status = sme_send_coex_config_cmd(&coex_cfg_params);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ hdd_err("Failed to send coex BT low RSSI threshold");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ coex_cfg_params.config_type = COEX_CONFIG_BT_INTERFERENCE_LEVEL;
+ coex_cfg_params.config_value[0] = config->set_bt_interference_low_ll;
+ coex_cfg_params.config_value[1] = config->set_bt_interference_low_ul;
+ coex_cfg_params.config_value[2] = config->set_bt_interference_medium_ll;
+ coex_cfg_params.config_value[3] = config->set_bt_interference_medium_ul;
+ coex_cfg_params.config_value[4] = config->set_bt_interference_high_ll;
+ coex_cfg_params.config_value[5] = config->set_bt_interference_high_ul;
+
+ status = sme_send_coex_config_cmd(&coex_cfg_params);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ hdd_err("Failed to send coex BT interference level");
+ return QDF_STATUS_E_FAILURE;
+ }
+ return QDF_STATUS_SUCCESS;
+}
+
+/**
* hdd_pre_enable_configure() - Configurations prior to cds_enable
* @hdd_ctx: HDD context
*
@@ -10210,9 +10314,8 @@ int hdd_dbs_scan_selection_init(hdd_context_t *hdd_ctx)
(CFG_DBS_SCAN_PARAM_PER_CLIENT
* CFG_DBS_SCAN_CLIENTS_MAX));
- hdd_info("numentries %hu", numentries);
if (!numentries) {
- hdd_info("Donot send scan_selection_config");
+ hdd_debug("Do not send scan_selection_config");
return 0;
}
@@ -10396,11 +10499,9 @@ static int hdd_features_init(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter)
goto out;
}
- ret = hdd_init_mws_coex(adapter);
- if (ret) {
- hdd_err("Error initializing mws-coex");
- goto out;
- }
+ hdd_init_mws_coex(adapter);
+
+ hdd_send_coex_config_params(hdd_ctx, adapter);
/* FW capabilities received, Set the Dot11 mode */
sme_setdef_dot11mode(hdd_ctx->hHal);
@@ -12045,7 +12146,6 @@ void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter)
hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter);
hdd_debug("Now doing SAP STOPBSS");
qdf_event_reset(&hostapd_state->qdf_stop_bss_event);
- hdd_ipa_ap_disconnect(ap_adapter);
if (QDF_STATUS_SUCCESS == wlansap_stop_bss(hdd_ap_ctx->
sapContext)) {
qdf_status = qdf_wait_for_event_completion(
@@ -12107,6 +12207,9 @@ void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter, bool reinit)
goto end;
}
+ cds_set_channel_params(hdd_ap_ctx->sapConfig.channel, 0,
+ &hdd_ap_ctx->sapConfig.ch_params);
+
qdf_event_reset(&hostapd_state->qdf_event);
if (wlansap_start_bss(hdd_ap_ctx->sapContext, hdd_hostapd_sap_event_cb,
&hdd_ap_ctx->sapConfig,
diff --git a/core/hdd/src/wlan_hdd_napi.c b/core/hdd/src/wlan_hdd_napi.c
index 0793cc785ff1..d358bd5a9b95 100644
--- a/core/hdd/src/wlan_hdd_napi.c
+++ b/core/hdd/src/wlan_hdd_napi.c
@@ -119,7 +119,7 @@ int hdd_napi_create(void)
hdd_err("ERR(%d) creating NAPI instances",
rc);
} else {
- hdd_info("napi instances were created. Map=0x%x", rc);
+ hdd_debug("napi instances were created. Map=0x%x", rc);
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
if (unlikely(NULL == hdd_ctx)) {
QDF_ASSERT(0);
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index 902c8d2f1b98..f53b4f58805a 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -1703,6 +1703,7 @@ int wlan_hdd_set_powersave(hdd_adapter_t *adapter,
{
tHalHandle hal;
hdd_context_t *hdd_ctx;
+ QDF_STATUS status = QDF_STATUS_SUCCESS;
if (NULL == adapter) {
hdd_err("Adapter NULL");
@@ -1734,9 +1735,11 @@ int wlan_hdd_set_powersave(hdd_adapter_t *adapter,
if (QDF_STA_MODE == adapter->device_mode ||
QDF_P2P_CLIENT_MODE == adapter->device_mode) {
hdd_debug("Disabling Auto Power save timer");
- sme_ps_disable_auto_ps_timer(
+ status = sme_ps_disable_auto_ps_timer(
WLAN_HDD_GET_HAL_CTX(adapter),
adapter->sessionId);
+ if (status != QDF_STATUS_SUCCESS)
+ goto end;
}
if (hdd_ctx->config && hdd_ctx->config->is_ps_enabled) {
@@ -1746,13 +1749,19 @@ int wlan_hdd_set_powersave(hdd_adapter_t *adapter,
* Enter Power Save command received from GUI
* this means DHCP is completed
*/
- if (timeout)
- sme_ps_enable_auto_ps_timer(hal,
+ if (timeout) {
+ status = sme_ps_enable_auto_ps_timer(hal,
adapter->sessionId,
timeout);
- else
- sme_ps_enable_disable(hal, adapter->sessionId,
- SME_PS_ENABLE);
+ if (status != QDF_STATUS_SUCCESS)
+ goto end;
+ } else {
+ status = sme_ps_enable_disable(hal,
+ adapter->sessionId,
+ SME_PS_ENABLE);
+ if (status != QDF_STATUS_SUCCESS)
+ goto end;
+ }
} else {
hdd_debug("Power Save is not enabled in the cfg");
}
@@ -1763,12 +1772,17 @@ int wlan_hdd_set_powersave(hdd_adapter_t *adapter,
* Enter Full power command received from GUI
* this means we are disconnected
*/
- sme_ps_disable_auto_ps_timer(WLAN_HDD_GET_HAL_CTX(adapter),
- adapter->sessionId);
- sme_ps_enable_disable(hal, adapter->sessionId, SME_PS_DISABLE);
+ status = sme_ps_disable_auto_ps_timer(
+ WLAN_HDD_GET_HAL_CTX(adapter),
+ adapter->sessionId);
+ if (status != QDF_STATUS_SUCCESS)
+ goto end;
+ status = sme_ps_enable_disable(hal, adapter->sessionId,
+ SME_PS_DISABLE);
}
- return 0;
+end:
+ return qdf_status_to_os_return(status);
}
static void wlan_hdd_print_suspend_fail_stats(hdd_context_t *hdd_ctx)
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index 0dfbfe3f3bfb..fb60e3759682 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -1207,6 +1207,14 @@ QDF_STATUS hdd_softap_stop_bss(hdd_adapter_t *pAdapter)
sme_update_channel_list(pHddCtx->hHal);
}
+ if (hdd_ipa_is_enabled(pHddCtx)) {
+ if (hdd_ipa_wlan_evt(pAdapter,
+ WLAN_HDD_GET_AP_CTX_PTR(pAdapter)->uBCStaId,
+ HDD_IPA_AP_DISCONNECT,
+ pAdapter->dev->dev_addr))
+ hdd_err("WLAN_AP_DISCONNECT event failed");
+ }
+
return qdf_status;
}
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index 463a351d4fba..36fc15610624 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -5930,7 +5930,7 @@ void wlan_hdd_change_country_code_callback(void *context)
hdd_adapter_t *adapter = context;
if (adapter && (WLAN_HDD_ADAPTER_MAGIC == adapter->magic))
- complete(&adapter->change_country_code);
+ qdf_event_set(&adapter->change_country_code);
}
/**
diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h
index 43bc98147283..0d7a0678303c 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 "A"
+#define QWLAN_VERSION_EXTRA "W"
#define QWLAN_VERSION_BUILD 65
-#define QWLAN_VERSIONSTR "5.1.1.65A"
+#define QWLAN_VERSIONSTR "5.1.1.65W"
#endif /* QWLAN_VERSION_H */
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index 89540f72606f..6d29ed76f973 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -349,6 +349,7 @@ typedef enum eSirResultCodes {
eSIR_SME_DEAUTH_STATUS,
eSIR_PNO_SCAN_SUCCESS,
eSIR_SME_INVALID_SESSION,
+ eSIR_SME_PEER_CREATE_FAILED,
eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
} tSirResultCodes;
@@ -1866,16 +1867,6 @@ typedef struct sSirSmeSwitchChannelInd {
struct qdf_mac_addr bssid; /* BSSID */
} tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd;
-/* / Definition for Neighbor BSS indication */
-/* / MAC ---> */
-/* / MAC reports this each time a new I/BSS is detected */
-typedef struct sSirSmeNeighborBssInd {
- uint16_t messageType; /* eWNI_SME_NEIGHBOR_BSS_IND */
- uint16_t length;
- uint8_t sessionId;
- tSirBssDescription bssDescription[1];
-} tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd;
-
/* / Definition for MIC failure indication */
/* / MAC ---> */
/* / MAC reports this each time a MIC failure occures on Rx TKIP packet */
@@ -3725,6 +3716,8 @@ typedef struct sSirRoamOffloadScanReq {
struct rsn_caps rsn_caps;
struct wmi_11k_offload_params offload_11k_params;
uint32_t ho_delay_for_rx;
+ uint32_t roam_preauth_retry_count;
+ uint32_t roam_preauth_no_ack_timeout;
uint32_t min_delay_btw_roam_scans;
uint32_t roam_trigger_reason_bitmask;
bool roam_force_rssi_trigger;
diff --git a/core/mac/inc/wni_api.h b/core/mac/inc/wni_api.h
index 7177c5b1ea2d..42769a276fe6 100644
--- a/core/mac/inc/wni_api.h
+++ b/core/mac/inc/wni_api.h
@@ -72,7 +72,6 @@ enum eWniMsgTypes {
eWNI_SME_SWITCH_CHL_IND,
eWNI_SME_STOP_BSS_REQ,
eWNI_SME_STOP_BSS_RSP,
- eWNI_SME_NEIGHBOR_BSS_IND,
eWNI_SME_DEAUTH_CNF,
eWNI_SME_MIC_FAILURE_IND,
eWNI_SME_ADDTS_REQ,
diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms
index e9a7334de603..d6c59ef1f9c0 100644
--- a/core/mac/src/cfg/cfgUtil/dot11f.frms
+++ b/core/mac/src/cfg/cfgUtil/dot11f.frms
@@ -1336,7 +1336,7 @@ IE TPCReport (EID_TPC_REPORT) // 7.3.2.18
IE SuppChannels (EID_SUPPORTED_CHANNELS) // 7.2.3.19
{
- bands[2][1..48];
+ bands[2][0..48];
}
IE SuppOperatingClasses (EID_SUPPORTED_OPER_CLASSES)
@@ -1399,7 +1399,7 @@ IE RSN (EID_RSN) // 7.3.2.25
IE RSNOpaque (EID_RSN) // 7.3.2.25
{
- data[ 6..253 ];
+ data[ 0..253 ];
}
IE WAPI (EID_WAPI) // 7.3.2.25
diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h
index aac7e935635b..ec18de2565ac 100644
--- a/core/mac/src/include/dot11f.h
+++ b/core/mac/src/include/dot11f.h
@@ -26,7 +26,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Tue Jun 5 17:04:23 2018 from the following file(s):
+ * Mon Aug 27 19:26:46 2018 from the following file(s):
*
* dot11f.frms
*
@@ -6772,7 +6772,7 @@ typedef struct sDot11fIERSNOpaque {
#define DOT11F_EID_RSNOPAQUE (48)
/* N.B. These #defines do *not* include the EID & length */
-#define DOT11F_IE_RSNOPAQUE_MIN_LEN (6)
+#define DOT11F_IE_RSNOPAQUE_MIN_LEN (0)
#define DOT11F_IE_RSNOPAQUE_MAX_LEN (253)
@@ -6812,7 +6812,7 @@ typedef struct sDot11fIESuppChannels {
#define DOT11F_EID_SUPPCHANNELS (36)
/* N.B. These #defines do *not* include the EID & length */
-#define DOT11F_IE_SUPPCHANNELS_MIN_LEN (2)
+#define DOT11F_IE_SUPPCHANNELS_MIN_LEN (0)
#define DOT11F_IE_SUPPCHANNELS_MAX_LEN (96)
diff --git a/core/mac/src/pe/include/lim_api.h b/core/mac/src/pe/include/lim_api.h
index f56056e8b0e9..ec7ca33f8b04 100644
--- a/core/mac/src/pe/include/lim_api.h
+++ b/core/mac/src/pe/include/lim_api.h
@@ -101,6 +101,7 @@ typedef enum eMgmtFrmDropReason {
eMGMT_DROP_NON_SCAN_MODE_FRAME,
eMGMT_DROP_INVALID_SIZE,
eMGMT_DROP_SPURIOUS_FRAME,
+ eMGMT_DROP_DUPLICATE_AUTH_FRAME,
} tMgmtFrmDropReason;
/**
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c
index 1ac14a200920..c6bf61be991c 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -46,6 +46,7 @@
#include "lim_ibss_peer_mgmt.h"
#include "lim_admit_control.h"
#include "lim_send_sme_rsp_messages.h"
+#include "lim_security_utils.h"
#include "wmm_apsd.h"
#include "lim_trace.h"
#include "lim_ft_defs.h"
@@ -2375,6 +2376,25 @@ tMgmtFrmDropReason lim_is_pkt_candidate_for_drop(tpAniSirGlobal pMac,
/* Drop the Probe Request in IBSS mode, if STA did not send out the last beacon */
/* In IBSS, the node which sends out the beacon, is supposed to respond to ProbeReq */
return eMGMT_DROP_NOT_LAST_IBSS_BCN;
+ } else if (subType == SIR_MAC_MGMT_AUTH) {
+ uint16_t curr_seq_num = 0;
+ struct tLimPreAuthNode *auth_node;
+
+ pHdr = WMA_GET_RX_MAC_HEADER(pRxPacketInfo);
+ psessionEntry = pe_find_session_by_bssid(pMac, pHdr->bssId,
+ &sessionId);
+ if (!psessionEntry)
+ return eMGMT_DROP_NO_DROP;
+
+ curr_seq_num = ((pHdr->seqControl.seqNumHi << 4) |
+ (pHdr->seqControl.seqNumLo));
+ auth_node = lim_search_pre_auth_list(pMac, pHdr->sa);
+ if (auth_node && pHdr->fc.retry &&
+ (auth_node->seq_num == curr_seq_num)) {
+ pe_err("auth frame, seq num: %d is already processed, drop it",
+ curr_seq_num);
+ return eMGMT_DROP_DUPLICATE_AUTH_FRAME;
+ }
}
return eMGMT_DROP_NO_DROP;
diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
index a0705ba905a6..12e1237302a9 100644
--- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
+++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
@@ -718,6 +718,171 @@ static void lim_print_ht_cap(tpAniSirGlobal mac_ctx, tpPESession session,
}
/**
+ * lim_check_wpa_rsn_ie() - wpa and rsn ie related checks
+ * @session: pointer to pe session entry
+ * @mac_ctx: pointer to Global MAC structure
+ * @sub_type: Assoc(=0) or Reassoc(=1) Requestframe
+ * @hdr: pointer to the MAC head
+ * @assoc_req: pointer to ASSOC/REASSOC Request frame
+ * @pmf_connection: flag indicating pmf connection
+ *
+ * This function checks if wpa/rsn IE is present and validates
+ * ie version, length and mismatch.
+ *
+ * Return: true if no error, false otherwise
+ */
+static bool lim_check_wpa_rsn_ie(tpPESession session, tpAniSirGlobal mac_ctx,
+ uint8_t sub_type, tpSirMacMgmtHdr hdr,
+ tpSirAssocReq assoc_req, bool *pmf_connection)
+{
+ uint32_t ret;
+ tDot11fIEWPA dot11f_ie_wpa = {0};
+ tDot11fIERSN dot11f_ie_rsn = {0};
+ tSirRetStatus status = eSIR_SUCCESS;
+
+ /*
+ * Clear the buffers so that frame parser knows that there isn't a
+ * previously decoded IE in these buffers
+ */
+ qdf_mem_set((uint8_t *)&dot11f_ie_rsn, sizeof(dot11f_ie_rsn), 0);
+ qdf_mem_set((uint8_t *)&dot11f_ie_wpa, sizeof(dot11f_ie_wpa), 0);
+
+ pe_err("RSN enabled auth, Re/Assoc req from STA: "
+ MAC_ADDRESS_STR, MAC_ADDR_ARRAY(hdr->sa));
+ if (assoc_req->rsnPresent) {
+ if (!assoc_req->rsn.length) {
+ pe_warn("Re/Assoc rejected from: "
+ MAC_ADDRESS_STR,
+ MAC_ADDR_ARRAY(hdr->sa));
+ /*
+ * rcvd Assoc req frame with RSN IE but
+ * length is 0
+ */
+ lim_send_assoc_rsp_mgmt_frame(
+ mac_ctx,
+ eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS,
+ 1, hdr->sa, sub_type, 0, session);
+ return false;
+ }
+
+ /* Unpack the RSN IE */
+ ret = dot11f_unpack_ie_rsn(
+ mac_ctx,
+ &assoc_req->rsn.info[0],
+ assoc_req->rsn.length,
+ &dot11f_ie_rsn, false);
+ if (!DOT11F_SUCCEEDED(ret)) {
+ pe_err("Invalid RSN ie");
+ lim_send_assoc_rsp_mgmt_frame(
+ mac_ctx,
+ eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS,
+ 1, hdr->sa, sub_type, 0, session);
+ return false;
+ }
+
+ /* Check RSN version is supported */
+ if (SIR_MAC_OUI_VERSION_1 ==
+ dot11f_ie_rsn.version) {
+ /*
+ * check the groupwise and
+ * pairwise cipher suites
+ */
+ status = lim_check_rx_rsn_ie_match(
+ mac_ctx, dot11f_ie_rsn,
+ session,
+ assoc_req->HTCaps.present,
+ pmf_connection);
+ if (eSIR_SUCCESS != status) {
+ pe_warn("Re/Assoc rejected from: "
+ MAC_ADDRESS_STR,
+ MAC_ADDR_ARRAY(hdr->sa));
+ /*
+ * some IE is not
+ * properly sent
+ * received Association
+ * req frame with RSN IE
+ * but length is 0
+ */
+ lim_send_assoc_rsp_mgmt_frame(
+ mac_ctx,
+ status, 1,
+ hdr->sa,
+ sub_type, 0,
+ session);
+ return false;
+ }
+ } else {
+ pe_warn("Re/Assoc rejected from: "
+ MAC_ADDRESS_STR,
+ MAC_ADDR_ARRAY(hdr->sa));
+ /*
+ * rcvd Assoc req frame with RSN
+ * IE version wrong
+ */
+ lim_send_assoc_rsp_mgmt_frame(
+ mac_ctx,
+ eSIR_MAC_UNSUPPORTED_RSN_IE_VERSION_STATUS,
+ 1, hdr->sa, sub_type, 0,
+ session);
+ return false;
+ }
+ } else if (assoc_req->wpaPresent) {
+ if (!assoc_req->wpa.length) {
+ pe_warn("Re/Assoc rejected from: "
+ MAC_ADDRESS_STR,
+ MAC_ADDR_ARRAY(hdr->sa));
+ /*
+ * rcvd Assoc req frame with invalid WPA
+ * IE
+ */
+ lim_send_assoc_rsp_mgmt_frame(
+ mac_ctx,
+ eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS,
+ 1, hdr->sa, sub_type, 0, session);
+ return false;
+ }
+ /* Unpack the WPA IE */
+ ret = dot11f_unpack_ie_wpa(
+ mac_ctx,
+ &assoc_req->wpa.info[4],
+ (assoc_req->wpa.length - 4),
+ &dot11f_ie_wpa, false);
+ if (!DOT11F_SUCCEEDED(ret)) {
+ pe_err("Invalid WPA IE");
+ lim_send_assoc_rsp_mgmt_frame(
+ mac_ctx,
+ eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS,
+ 1, hdr->sa, sub_type, 0,
+ session);
+ return false;
+ }
+ /*
+ * check the groupwise and pairwise
+ * cipher suites
+ */
+ status = lim_check_rx_wpa_ie_match(
+ mac_ctx, dot11f_ie_wpa,
+ session,
+ assoc_req->HTCaps.present);
+ if (eSIR_SUCCESS != status) {
+ pe_warn("Re/Assoc rejected from: "
+ MAC_ADDRESS_STR,
+ MAC_ADDR_ARRAY(hdr->sa));
+ /*
+ * rcvd Assoc req frame with WPA
+ * IE but mismatch
+ */
+ lim_send_assoc_rsp_mgmt_frame(
+ mac_ctx, status, 1,
+ hdr->sa, sub_type, 0,
+ session);
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
* lim_chk_n_process_wpa_rsn_ie() - wpa ie related checks
* @mac_ctx: pointer to Global MAC structure
* @hdr: pointer to the MAC head
@@ -737,16 +902,6 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx,
uint8_t sub_type, bool *pmf_connection)
{
uint8_t *wps_ie = NULL;
- uint32_t ret;
- tDot11fIEWPA dot11f_ie_wpa = {0};
- tDot11fIERSN dot11f_ie_rsn = {0};
- tSirRetStatus status = eSIR_SUCCESS;
- /*
- * Clear the buffers so that frame parser knows that there isn't a
- * previously decoded IE in these buffers
- */
- qdf_mem_set((uint8_t *) &dot11f_ie_rsn, sizeof(dot11f_ie_rsn), 0);
- qdf_mem_set((uint8_t *) &dot11f_ie_wpa, sizeof(dot11f_ie_wpa), 0);
/* if additional IE is present, check if it has WscIE */
if (assoc_req->addIEPresent && assoc_req->addIE.length)
@@ -756,149 +911,21 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx,
pe_debug("Assoc req addIEPresent: %d addIE length: %d",
assoc_req->addIEPresent, assoc_req->addIE.length);
- /* when wps_ie is present, RSN/WPA IE is ignored */
- if (wps_ie == NULL) {
- /* check whether as RSN IE is present */
- if (LIM_IS_AP_ROLE(session) &&
- session->pLimStartBssReq->privacy &&
- session->pLimStartBssReq->rsnIE.length) {
- pe_err("RSN enabled auth, Re/Assoc req from STA: "
- MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(hdr->sa));
- if (assoc_req->rsnPresent) {
- if (assoc_req->rsn.length) {
- /* Unpack the RSN IE */
- ret = dot11f_unpack_ie_rsn(mac_ctx,
- &assoc_req->rsn.info[0],
- assoc_req->rsn.length,
- &dot11f_ie_rsn, false);
- if (!DOT11F_SUCCEEDED(ret)) {
- pe_err("Invalid RSN ie");
- return false;
- }
-
- /* Check RSN version is supported */
- if (SIR_MAC_OUI_VERSION_1 ==
- dot11f_ie_rsn.version) {
- /*
- * check the groupwise and
- * pairwise cipher suites
- */
- status =
- lim_check_rx_rsn_ie_match(
- mac_ctx, dot11f_ie_rsn,
- session,
- assoc_req->HTCaps.present,
- pmf_connection);
- if (eSIR_SUCCESS != status) {
- pe_warn("Re/Assoc rejected from: " MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(
- hdr->sa));
-
- /*
- * some IE is not
- * properly sent
- * received Association
- * req frame with RSN IE
- * but length is 0
- */
- lim_send_assoc_rsp_mgmt_frame(
- mac_ctx,
- status, 1,
- hdr->sa,
- sub_type, 0,
- session);
- return false;
- }
- } else {
- pe_warn("Re/Assoc rejected from: " MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(
- hdr->sa));
- /*
- * rcvd Assoc req frame with RSN
- * IE version wrong
- */
- lim_send_assoc_rsp_mgmt_frame(
- mac_ctx,
- eSIR_MAC_UNSUPPORTED_RSN_IE_VERSION_STATUS,
- 1, hdr->sa, sub_type, 0,
- session);
- return false;
- }
- } else {
- pe_warn("Re/Assoc rejected from: "
- MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(hdr->sa));
- /*
- * rcvd Assoc req frame with RSN IE but
- * length is 0
- */
- lim_send_assoc_rsp_mgmt_frame(mac_ctx,
- eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS,
- 1, hdr->sa, sub_type, 0,
- session);
- return false;
- }
- } /* end - if(assoc_req->rsnPresent) */
- if ((!assoc_req->rsnPresent) && assoc_req->wpaPresent) {
- /* Unpack the WPA IE */
- if (assoc_req->wpa.length) {
- /* OUI is not taken care */
- ret = dot11f_unpack_ie_wpa(mac_ctx,
- &assoc_req->wpa.info[4],
- (assoc_req->wpa.length - 4),
- &dot11f_ie_wpa, false);
- if (!DOT11F_SUCCEEDED(ret)) {
- pe_err("Invalid WPA IE");
- return false;
- }
- /*
- * check the groupwise and pairwise
- * cipher suites
- */
- status = lim_check_rx_wpa_ie_match(
- mac_ctx, dot11f_ie_wpa,
- session,
- assoc_req->HTCaps.present);
- if (eSIR_SUCCESS != status) {
- pe_warn("Re/Assoc rejected from: "
- MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(
- hdr->sa));
- /*
- * rcvd Assoc req frame with WPA
- * IE but mismatch
- */
- lim_send_assoc_rsp_mgmt_frame(
- mac_ctx, status, 1,
- hdr->sa, sub_type, 0,
- session);
- return false;
- }
- } else {
- pe_warn("Re/Assoc rejected from: "
- MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(hdr->sa));
- /*
- * rcvd Assoc req frame with invalid WPA
- * IE
- */
- lim_send_assoc_rsp_mgmt_frame(mac_ctx,
- eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS,
- 1, hdr->sa, sub_type, 0,
- session);
- return false;
- } /* end - if(assoc_req->wpa.length) */
- } /* end - if(assoc_req->wpaPresent) */
- }
- /*
- * end of if(session->pLimStartBssReq->privacy
- * && session->pLimStartBssReq->rsnIE->length)
- */
- } /* end of if( ! assoc_req->wscInfo.present ) */
- else {
+ if (wps_ie) {
pe_debug("Assoc req WSE IE is present");
+ return true;
}
+
+ /* when wps_ie is present, RSN/WPA IE is ignored */
+ if (LIM_IS_AP_ROLE(session) &&
+ session->pLimStartBssReq->privacy &&
+ session->pLimStartBssReq->rsnIE.length) {
+ /* check whether RSN IE is present */
+ return lim_check_wpa_rsn_ie(
+ session, mac_ctx, sub_type,
+ hdr, assoc_req, pmf_connection);
+ }
+
return true;
}
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 9af8233c980f..e524420c93d0 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
@@ -814,7 +814,7 @@ failure:
MTRACE(mac_trace(mac, TRACE_CODE_MLM_STATE, session_entry->peSessionId,
session_entry->limMlmState));
session_entry->limMlmState = eLIM_MLM_IDLE_STATE;
- mlm_join_cnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
+ mlm_join_cnf.resultCode = eSIR_SME_PEER_CREATE_FAILED;
mlm_join_cnf.sessionId = session_entry->peSessionId;
mlm_join_cnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS;
lim_post_sme_message(mac, LIM_MLM_JOIN_CNF, (uint32_t *) &mlm_join_cnf);
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 f5f1597e0a6f..dc457fa318a8 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
@@ -1365,8 +1365,14 @@ void lim_handle_sme_join_result(tpAniSirGlobal mac_ctx,
session_entry->pLimJoinReq = NULL;
}
error:
- /* Delete the session if JOIN failure occurred. */
- if (result_code != eSIR_SME_SUCCESS) {
+ /* Delete the session if JOIN failure occurred.
+ * if the peer is not created, then there is no
+ * need to send down the set link state which will
+ * try to delete the peer. Instead a join response
+ * failure should be sent to the upper layers.
+ */
+ if (result_code != eSIR_SME_SUCCESS &&
+ result_code != eSIR_SME_PEER_CREATE_FAILED) {
param = qdf_mem_malloc(sizeof(join_params));
if (param != NULL) {
param->result_code = result_code;
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index 933972ad11c5..d884e66494c3 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -1668,85 +1668,6 @@ lim_send_sme_set_context_rsp(tpAniSirGlobal pMac,
pMac->lim.sme_msg_callback(pMac, &msg);
} /*** end lim_send_sme_set_context_rsp() ***/
-/**
- * lim_send_sme_neighbor_bss_ind()
- *
- ***FUNCTION:
- * This function is called by lim_lookup_nadd_hash_entry() to send
- * eWNI_SME_NEIGHBOR_BSS_IND message to host
- *
- ***PARAMS:
- *
- ***LOGIC:
- *
- ***ASSUMPTIONS:
- * NA
- *
- ***NOTE:
- * This function is used for sending eWNI_SME_NEIGHBOR_BSS_IND to
- * host upon detecting new BSS during background scanning if CFG
- * option is enabled for sending such indication
- *
- * @param pMac - Pointer to Global MAC structure
- * @return None
- */
-
-void
-lim_send_sme_neighbor_bss_ind(tpAniSirGlobal pMac, tLimScanResultNode *pBssDescr)
-{
- tSirMsgQ msgQ;
- uint32_t val;
- tSirSmeNeighborBssInd *pNewBssInd;
-
- if ((pMac->lim.gLimSmeState != eLIM_SME_LINK_EST_WT_SCAN_STATE) ||
- ((pMac->lim.gLimSmeState == eLIM_SME_LINK_EST_WT_SCAN_STATE) &&
- pMac->lim.gLimRspReqd)) {
- /* LIM is not in background scan state OR */
- /* current scan is initiated by HDD. */
- /* No need to send new BSS indication to HDD */
- return;
- }
-
- if (wlan_cfg_get_int(pMac, WNI_CFG_NEW_BSS_FOUND_IND, &val) !=
- eSIR_SUCCESS) {
- pe_err("could not get NEIGHBOR_BSS_IND from CFG");
- return;
- }
-
- if (val == 0)
- return;
-
- /**
- * Need to indicate new BSSs found during
- * background scanning to host.
- * Allocate buffer for sending indication.
- * Length of buffer is length of BSS description
- * and length of header itself
- */
- val = pBssDescr->bssDescription.length + sizeof(uint16_t) +
- sizeof(uint32_t) + sizeof(uint8_t);
- pNewBssInd = qdf_mem_malloc(val);
- if (NULL == pNewBssInd) {
- /* Log error */
- pe_err("call to AllocateMemory failed for eWNI_SME_NEIGHBOR_BSS_IND");
- return;
- }
-
- pNewBssInd->messageType = eWNI_SME_NEIGHBOR_BSS_IND;
- pNewBssInd->length = (uint16_t) val;
- pNewBssInd->sessionId = 0;
-
- qdf_mem_copy((uint8_t *) pNewBssInd->bssDescription,
- (uint8_t *) &pBssDescr->bssDescription,
- pBssDescr->bssDescription.length + sizeof(uint16_t));
-
- msgQ.type = eWNI_SME_NEIGHBOR_BSS_IND;
- msgQ.bodyptr = pNewBssInd;
- msgQ.bodyval = 0;
- MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, msgQ.type));
- lim_sys_process_mmh_msg_api(pMac, &msgQ, ePROT);
-} /*** end lim_send_sme_neighbor_bss_ind() ***/
-
/** -----------------------------------------------------------------
\brief lim_send_sme_addts_rsp() - sends SME ADDTS RSP
\ This function sends a eWNI_SME_ADDTS_RSP to SME.
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h
index 4082040cc54f..1c00c2a14d39 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h
@@ -77,7 +77,6 @@ void lim_send_sme_wm_status_change_ntf(tpAniSirGlobal, tSirSmeStatusChangeCode,
uint32_t *, uint16_t, uint8_t);
void lim_send_sme_set_context_rsp(tpAniSirGlobal, struct qdf_mac_addr, uint16_t,
tSirResultCodes, tpPESession, uint8_t, uint16_t);
-void lim_send_sme_neighbor_bss_ind(tpAniSirGlobal, tLimScanResultNode *);
void lim_handle_delete_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ MsgQ);
void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx, tpSirMsgQ msg);
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index a5e9b3f8b947..391d91837c2a 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -312,8 +312,6 @@ char *lim_msg_str(uint32_t msgType)
return "eWNI_SME_STOP_BSS_REQ";
case eWNI_SME_STOP_BSS_RSP:
return "eWNI_SME_STOP_BSS_RSP";
- case eWNI_SME_NEIGHBOR_BSS_IND:
- return "eWNI_SME_NEIGHBOR_BSS_IND";
case eWNI_SME_DEAUTH_CNF:
return "eWNI_SME_DEAUTH_CNF";
case eWNI_SME_ADDTS_REQ:
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 ee772e76742d..1131a6d99fda 100644
--- a/core/mac/src/sys/legacy/src/utils/src/dot11f.c
+++ b/core/mac/src/sys/legacy/src/utils/src/dot11f.c
@@ -24,7 +24,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Tue Jun 5 17:04:23 2018 from the following file(s):
+ * Mon Aug 27 19:26:46 2018 from the following file(s):
*
* dot11f.frms
*
@@ -8907,7 +8907,7 @@ static const tIEDefn IES_AssocRequest[] = {
0, DOT11F_EID_POWERCAPS, 0, 0, },
{ offsetof(tDot11fAssocRequest, SuppChannels),
offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels",
- 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
+ 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
0, DOT11F_EID_SUPPCHANNELS, 0, 0, },
{ offsetof(tDot11fAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps,
present), 0, "HTCaps", 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0},
@@ -8917,7 +8917,7 @@ static const tIEDefn IES_AssocRequest[] = {
0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0},
0, DOT11F_EID_QOSCAPSSTATION, 0, 0, },
{ offsetof(tDot11fAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque,
- present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+ present), 0, "RSNOpaque", 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
0, DOT11F_EID_RSNOPAQUE, 0, 0, },
{ offsetof(tDot11fAssocRequest, ExtSuppRates),
offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates",
@@ -9209,7 +9209,7 @@ static const tIEDefn IES_Authentication[] = {
0, DOT11F_EID_CHALLENGETEXT, 0, 0, },
{ offsetof(tDot11fAuthentication, RSNOpaque),
offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque",
- 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+ 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
0, DOT11F_EID_RSNOPAQUE, 0, 0, },
{ offsetof(tDot11fAuthentication, MobilityDomain),
offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain",
@@ -9548,7 +9548,7 @@ static const tIEDefn IES_Beacon2[] = {
present), 0, "ExtSuppRates", 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0},
0, DOT11F_EID_EXTSUPPRATES, 0, 0, },
{ offsetof(tDot11fBeacon2, RSNOpaque), offsetof(tDot11fIERSNOpaque,
- present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+ present), 0, "RSNOpaque", 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
0, DOT11F_EID_RSNOPAQUE, 0, 0, },
{ offsetof(tDot11fBeacon2, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet,
present), 0, "EDCAParamSet", 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0},
@@ -10384,7 +10384,7 @@ static const tIEDefn IES_ProbeResponse[] = {
0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0},
0, DOT11F_EID_EXTSUPPRATES, 0, 0, },
{ offsetof(tDot11fProbeResponse, RSNOpaque), offsetof(tDot11fIERSNOpaque,
- present), 0, "RSNOpaque", 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+ present), 0, "RSNOpaque", 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
0, DOT11F_EID_RSNOPAQUE, 0, 0, },
{ offsetof(tDot11fProbeResponse, QBSSLoad), offsetof(tDot11fIEQBSSLoad,
present), 0, "QBSSLoad", 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0},
@@ -10651,11 +10651,11 @@ static const tIEDefn IES_ReAssocRequest[] = {
0, DOT11F_EID_POWERCAPS, 0, 0, },
{ offsetof(tDot11fReAssocRequest, SuppChannels),
offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels",
- 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
+ 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
0, DOT11F_EID_SUPPCHANNELS, 0, 0, },
{ offsetof(tDot11fReAssocRequest, RSNOpaque),
offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque",
- 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+ 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
0, DOT11F_EID_RSNOPAQUE, 0, 0, },
{ offsetof(tDot11fReAssocRequest, QOSCapsStation),
offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation",
@@ -10804,7 +10804,7 @@ static const tIEDefn IES_ReAssocResponse[] = {
0, DOT11F_EID_RRMENABLEDCAP, 0, 0, },
{ offsetof(tDot11fReAssocResponse, RSNOpaque),
offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque",
- 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
+ 0, 2, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0},
0, DOT11F_EID_RSNOPAQUE, 0, 0, },
{ offsetof(tDot11fReAssocResponse, MobilityDomain),
offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain",
@@ -11043,7 +11043,7 @@ static const tIEDefn IES_TDLSDisRsp[] = {
0, DOT11F_EID_EXTSUPPRATES, 0, 0, },
{ offsetof(tDot11fTDLSDisRsp, SuppChannels),
offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels",
- 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
+ 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
0, DOT11F_EID_SUPPCHANNELS, 0, 0, },
{ offsetof(tDot11fTDLSDisRsp, SuppOperatingClasses),
offsetof(tDot11fIESuppOperatingClasses, present), 0,
@@ -11253,7 +11253,7 @@ static const tIEDefn IES_TDLSSetupReq[] = {
0, DOT11F_EID_EXTSUPPRATES, 0, 0, },
{ offsetof(tDot11fTDLSSetupReq, SuppChannels),
offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels",
- 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
+ 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
0, DOT11F_EID_SUPPCHANNELS, 0, 0, },
{ offsetof(tDot11fTDLSSetupReq, RSN), offsetof(tDot11fIERSN, present), 0,
"RSN", 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
@@ -11342,7 +11342,7 @@ static const tIEDefn IES_TDLSSetupRsp[] = {
0, DOT11F_EID_EXTSUPPRATES, 0, 0, },
{ offsetof(tDot11fTDLSSetupRsp, SuppChannels),
offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels",
- 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
+ 0, 2, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
0, DOT11F_EID_SUPPCHANNELS, 0, 0, },
{ offsetof(tDot11fTDLSSetupRsp, RSN), offsetof(tDot11fIERSN, present), 0,
"RSN", 0, 4, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
diff --git a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c
index 487e1db0f58a..c2ec4b77982a 100644
--- a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c
+++ b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c
@@ -248,7 +248,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
CASE_RETURN_STRING(eWNI_SME_SWITCH_CHL_IND);
CASE_RETURN_STRING(eWNI_SME_STOP_BSS_REQ);
CASE_RETURN_STRING(eWNI_SME_STOP_BSS_RSP);
- CASE_RETURN_STRING(eWNI_SME_NEIGHBOR_BSS_IND);
CASE_RETURN_STRING(eWNI_SME_DEAUTH_CNF);
CASE_RETURN_STRING(eWNI_SME_MIC_FAILURE_IND);
CASE_RETURN_STRING(eWNI_SME_ADDTS_REQ);
diff --git a/core/pld/inc/pld_common.h b/core/pld/inc/pld_common.h
index 8ac433861c47..dfad21ec716c 100644
--- a/core/pld/inc/pld_common.h
+++ b/core/pld/inc/pld_common.h
@@ -562,6 +562,18 @@ int pld_is_qmi_disable(struct device *dev);
int pld_is_fw_down(void);
int pld_force_assert_target(struct device *dev);
bool pld_is_fw_dump_skipped(struct device *dev);
+
+/**
+ * pld_is_fw_rejuvenate() - Check WLAN fw is rejuvenating
+ *
+ * Help the driver decide whether FW down is due to
+ * SSR or FW rejuvenate.
+ *
+ * Return: 1 FW is rejuvenating
+ * 0 FW is not rejuvenating
+ */
+int pld_is_fw_rejuvenate(void);
+
void pld_set_cc_source(struct device *dev, enum pld_cc_src cc_source);
enum pld_cc_src pld_get_cc_source(struct device *dev);
diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c
index cecd9ca28a96..e0d8c58ec671 100644
--- a/core/pld/src/pld_common.c
+++ b/core/pld/src/pld_common.c
@@ -1476,6 +1476,11 @@ bool pld_is_fw_dump_skipped(struct device *dev)
return ret;
}
+int pld_is_fw_rejuvenate(void)
+{
+ return pld_snoc_is_fw_rejuvenate();
+}
+
#ifdef CONFIG_CNSS_UTILS
/**
* pld_set_cc_source() - Set the country code source
diff --git a/core/pld/src/pld_snoc.h b/core/pld/src/pld_snoc.h
index 7efc785d01e3..614415ae02a9 100644
--- a/core/pld/src/pld_snoc.h
+++ b/core/pld/src/pld_snoc.h
@@ -125,6 +125,11 @@ static inline int pld_snoc_set_fw_log_mode(struct device *dev, u8 fw_log_mode)
{
return 0;
}
+
+static inline int pld_snoc_is_fw_rejuvenate(void)
+{
+ return 0;
+}
#else
int pld_snoc_register_driver(void);
void pld_snoc_unregister_driver(void);
@@ -243,5 +248,10 @@ static inline int pld_snoc_force_assert_target(struct device *dev)
{
return icnss_trigger_recovery(dev);
}
+
+static inline int pld_snoc_is_fw_rejuvenate(void)
+{
+ return icnss_is_rejuvenate();
+}
#endif
#endif
diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c
index db481a1fa65b..aca25fd7a45d 100644
--- a/core/sap/src/sap_fsm.c
+++ b/core/sap/src/sap_fsm.c
@@ -4305,17 +4305,9 @@ static QDF_STATUS sap_fsm_state_disconnecting(ptSapContext sap_ctx,
"eSAP_DISCONNECTING", "eSAP_DISCONNECTED");
sap_ctx->sapsMachine = eSAP_DISCONNECTED;
- /* Close the SME session */
- if (true == sap_ctx->isSapSessionOpen) {
- sap_ctx->isSapSessionOpen = false;
- qdf_status = sap_close_session(hal, sap_ctx,
- sap_roam_session_close_callback, true);
- if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
- qdf_status = sap_signal_hdd_event(sap_ctx, NULL,
- eSAP_STOP_BSS_EVENT,
- (void *)eSAP_STATUS_SUCCESS);
- }
- }
+ qdf_status = sap_signal_hdd_event(sap_ctx, NULL,
+ eSAP_STOP_BSS_EVENT,
+ (void *)eSAP_STATUS_SUCCESS);
} else if (msg == eWNI_SME_CHANNEL_CHANGE_REQ) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
FL("sapdfs: Send channel change request on sapctx[%pK]"),
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index f1439dc7f3ad..ebf87f4b1961 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -779,6 +779,8 @@ typedef enum {
*/
#define CSR_CB_CHANNEL_GAP 4
#define CSR_CB_CENTER_CHANNEL_OFFSET 2
+#define CSR_SEC_CHANNEL_OFFSET 4
+
/* WEP keysize (in bits) */
typedef enum {
@@ -1305,6 +1307,8 @@ typedef struct tagCsrConfigParam {
uint8_t max_amsdu_num;
uint8_t nSelect5GHzMargin;
uint32_t ho_delay_for_rx;
+ uint32_t roam_preauth_retry_count;
+ uint32_t roam_preauth_no_ack_timeout;
uint32_t min_delay_btw_roam_scans;
uint32_t roam_trigger_reason_bitmask;
uint8_t isCoalesingInIBSSAllowed;
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index c73d7b0530f8..5cc359c01728 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -606,6 +606,8 @@ typedef struct tagCsrConfig {
uint8_t max_amsdu_num;
uint8_t nSelect5GHzMargin;
uint32_t ho_delay_for_rx;
+ uint32_t roam_preauth_retry_count;
+ uint32_t roam_preauth_no_ack_timeout;
uint32_t min_delay_btw_roam_scans;
uint32_t roam_trigger_reason_bitmask;
uint8_t isCoalesingInIBSSAllowed;
diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h
index 3a71ec424921..d2a2a416c19d 100644
--- a/core/sme/inc/sme_api.h
+++ b/core/sme/inc/sme_api.h
@@ -1735,6 +1735,14 @@ QDF_STATUS sme_get_sar_power_limits(tHalHandle hal,
QDF_STATUS sme_set_sar_power_limits(tHalHandle hal,
struct sar_limit_cmd_params *sar_limit_cmd);
+/**
+ * sme_send_coex_config_cmd() - Send COEX config params
+ * @coex_cfg_params: struct to coex config params
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS sme_send_coex_config_cmd(struct coex_config_params *coex_cfg_params);
+
void sme_set_cc_src(tHalHandle hal_handle, enum country_src);
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 302e1b5f78b8..0f5b31260983 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -17636,6 +17636,18 @@ QDF_STATUS sme_set_sar_power_limits(tHalHandle hal,
return wma_set_sar_limit(wma_handle, sar_limit_cmd);
}
+QDF_STATUS sme_send_coex_config_cmd(struct coex_config_params *coex_cfg_params)
+{
+ void *wma_handle;
+
+ wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
+ if (!wma_handle) {
+ sme_err("wma handle is NULL");
+ return QDF_STATUS_E_FAILURE;
+ }
+ return wma_send_coex_config_cmd(wma_handle, coex_cfg_params);
+}
+
#ifdef WLAN_FEATURE_DISA
/**
* sme_encrypt_decrypt_msg() - handles encrypt/decrypt mesaage
diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c
index 42bf8316aea0..a39a2de27e61 100644
--- a/core/sme/src/common/sme_power_save.c
+++ b/core/sme/src/common/sme_power_save.c
@@ -518,8 +518,16 @@ QDF_STATUS sme_ps_enable_disable(tHalHandle hal_ctx, uint32_t session_id,
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_ctx);
status = sme_enable_sta_ps_check(mac_ctx, session_id);
- if (status != QDF_STATUS_SUCCESS)
+ if (status != QDF_STATUS_SUCCESS) {
+ /*
+ * In non associated state ps state will be disabled in FW.
+ * Hence, return success if ps disable is requested
+ * in disconnected state.
+ */
+ if (command == SME_PS_DISABLE)
+ status = QDF_STATUS_SUCCESS;
return status;
+ }
status = sme_ps_process_command(mac_ctx, session_id, command);
return status;
}
@@ -1049,7 +1057,7 @@ QDF_STATUS sme_ps_enable_auto_ps_timer(tHalHandle hal_ctx,
return QDF_STATUS_SUCCESS;
}
- sme_info("Start auto_ps_timer for %d ms", timeout);
+ sme_debug("Start auto_ps_timer for %d ms", timeout);
qdf_status = qdf_mc_timer_start(&ps_param->auto_ps_enable_timer,
timeout);
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 3888513458a0..799b7552f597 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -2867,6 +2867,10 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pParam->nSelect5GHzMargin;
pMac->roam.configParam.ho_delay_for_rx =
pParam->ho_delay_for_rx;
+ pMac->roam.configParam.roam_preauth_retry_count =
+ pParam->roam_preauth_retry_count;
+ pMac->roam.configParam.roam_preauth_no_ack_timeout =
+ pParam->roam_preauth_no_ack_timeout;
pMac->roam.configParam.min_delay_btw_roam_scans =
pParam->min_delay_btw_roam_scans;
pMac->roam.configParam.roam_trigger_reason_bitmask =
@@ -3236,6 +3240,9 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->max_amsdu_num = cfg_params->max_amsdu_num;
pParam->nSelect5GHzMargin = cfg_params->nSelect5GHzMargin;
pParam->ho_delay_for_rx = cfg_params->ho_delay_for_rx;
+ pParam->roam_preauth_no_ack_timeout =
+ cfg_params->roam_preauth_no_ack_timeout;
+ pParam->roam_preauth_retry_count = cfg_params->roam_preauth_retry_count;
pParam->min_delay_btw_roam_scans = cfg_params->min_delay_btw_roam_scans;
pParam->roam_trigger_reason_bitmask =
cfg_params->roam_trigger_reason_bitmask;
@@ -13641,15 +13648,15 @@ bool csr_roam_is_channel_valid(tpAniSirGlobal pMac, uint8_t channel)
/* This function check and validate whether the NIC can do CB (40MHz) */
static ePhyChanBondState csr_get_cb_mode_from_ies(tpAniSirGlobal pMac,
- uint8_t primaryChn,
+ uint8_t chan,
tDot11fBeaconIEs *pIes)
{
ePhyChanBondState eRet = PHY_SINGLE_CHANNEL_CENTERED;
- uint8_t centerChn;
+ uint8_t sec_ch = 0;
uint32_t ChannelBondingMode;
struct ch_params_s ch_params = {0};
- if (CDS_IS_CHANNEL_24GHZ(primaryChn)) {
+ if (CDS_IS_CHANNEL_24GHZ(chan)) {
ChannelBondingMode =
pMac->roam.configParam.channelBondingMode24GHz;
} else {
@@ -13689,7 +13696,7 @@ static ePhyChanBondState csr_get_cb_mode_from_ies(tpAniSirGlobal pMac,
* value of supported channel width and recommended tx width as per
* standard
*/
- sme_debug("scws %u rtws %u sco %u",
+ sme_debug("chan %d scws %u rtws %u sco %u", chan,
pIes->HTCaps.supportedChannelWidthSet,
pIes->HTInfo.recommendedTxWidthSet,
pIes->HTInfo.secondaryChannelOffset);
@@ -13701,26 +13708,28 @@ static ePhyChanBondState csr_get_cb_mode_from_ies(tpAniSirGlobal pMac,
switch (eRet) {
case PHY_DOUBLE_CHANNEL_LOW_PRIMARY:
- centerChn = primaryChn + CSR_CB_CENTER_CHANNEL_OFFSET;
+ sec_ch = chan + CSR_SEC_CHANNEL_OFFSET;
break;
case PHY_DOUBLE_CHANNEL_HIGH_PRIMARY:
- centerChn = primaryChn - CSR_CB_CENTER_CHANNEL_OFFSET;
+ sec_ch = chan - CSR_SEC_CHANNEL_OFFSET;
break;
- case PHY_SINGLE_CHANNEL_CENTERED:
default:
- centerChn = primaryChn;
break;
}
- if (PHY_SINGLE_CHANNEL_CENTERED != eRet) {
- ch_params.ch_width = CH_WIDTH_MAX;
- cds_set_channel_params(primaryChn, 0, &ch_params);
- if (ch_params.ch_width == CH_WIDTH_20MHZ) {
- sme_err("40Mhz not supported for channel %d, continue with 20Mhz",
- primaryChn);
+ if (eRet != PHY_SINGLE_CHANNEL_CENTERED) {
+ ch_params.ch_width = CH_WIDTH_40MHZ;
+ cds_set_channel_params(chan, sec_ch, &ch_params);
+ if (ch_params.ch_width == CH_WIDTH_20MHZ ||
+ ch_params.sec_ch_offset != eRet) {
+ sme_err("chan %d :: Supported HT BW %d and cbmode %d, APs HT BW %d and cbmode %d, so switch to 20Mhz",
+ chan, ch_params.ch_width,
+ ch_params.sec_ch_offset,
+ pIes->HTInfo.recommendedTxWidthSet, eRet);
eRet = PHY_SINGLE_CHANNEL_CENTERED;
}
}
+
return eRet;
}
@@ -19111,6 +19120,10 @@ csr_update_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
req_buf->RoamRssiCatGap = mac_ctx->roam.configParam.bCatRssiOffset;
req_buf->Select5GHzMargin = mac_ctx->roam.configParam.nSelect5GHzMargin;
req_buf->ho_delay_for_rx = mac_ctx->roam.configParam.ho_delay_for_rx;
+ req_buf->roam_preauth_retry_count =
+ mac_ctx->roam.configParam.roam_preauth_retry_count;
+ req_buf->roam_preauth_no_ack_timeout =
+ mac_ctx->roam.configParam.roam_preauth_no_ack_timeout;
req_buf->min_delay_btw_roam_scans =
mac_ctx->roam.configParam.min_delay_btw_roam_scans;
req_buf->roam_trigger_reason_bitmask =
diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c
index 49a5316d19c1..9e24f7668e36 100644
--- a/core/sme/src/csr/csr_util.c
+++ b/core/sme/src/csr/csr_util.c
@@ -4417,28 +4417,8 @@ uint8_t csr_retrieve_rsn_ie(tHalHandle hHal, uint32_t sessionId,
break;
}
- if (csr_roam_is_fast_roam_enabled(pMac, sessionId)) {
- /* If "Legacy Fast Roaming" is enabled ALWAYS rebuild
- * the RSN IE from scratch. So it contains the current
- * PMK-IDs
- */
- cbRsnIe =
- csr_construct_rsn_ie(pMac, sessionId, pProfile,
- pSirBssDesc, pIes, pRsnIe);
- } else if (pProfile->nRSNReqIELength && pProfile->pRSNReqIE) {
- /* If you have one started away, re-use it. */
- if (pProfile->nRSNReqIELength <=
- DOT11F_IE_RSN_MAX_LEN) {
- cbRsnIe = (uint8_t) pProfile->nRSNReqIELength;
- qdf_mem_copy(pRsnIe, pProfile->pRSNReqIE,
- cbRsnIe);
- } else
- sme_warn("csr_retrieve_rsn_ie detect invalid RSN IE length (%d)",
- pProfile->nRSNReqIELength);
- } else
- cbRsnIe = csr_construct_rsn_ie(pMac, sessionId,
- pProfile,
- pSirBssDesc, pIes, pRsnIe);
+ cbRsnIe = csr_construct_rsn_ie(pMac, sessionId, pProfile,
+ pSirBssDesc, pIes, pRsnIe);
} while (0);
return cbRsnIe;
diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h
index 196768f433cb..12bf424ba43a 100644
--- a/core/wma/inc/wma.h
+++ b/core/wma/inc/wma.h
@@ -266,7 +266,7 @@ enum ds_mode {
#define WMA_CHAN_START_RESP 0
#define WMA_CHAN_END_RESP 1
-#define WMA_BCN_BUF_MAX_SIZE 2500
+#define WMA_BCN_BUF_MAX_SIZE 512
#define WMA_NOA_IE_SIZE(num_desc) (2 + (13 * (num_desc)))
#define WMA_MAX_NOA_DESCRIPTORS 4
diff --git a/core/wma/inc/wma_api.h b/core/wma/inc/wma_api.h
index 2de08c97638f..172c332de9b2 100644
--- a/core/wma/inc/wma_api.h
+++ b/core/wma/inc/wma_api.h
@@ -429,6 +429,18 @@ QDF_STATUS wma_set_sar_limit(WMA_HANDLE handle,
struct sar_limit_cmd_params *sar_limit_params);
/**
+ * wma_send_coex_config_cmd() - Send coex config params
+ * @wma_handle: wma handle
+ * @coex_cfg_params: struct to coex cofig params
+ *
+ * This function sends WMI command to send coex cofig params
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wma_send_coex_config_cmd(WMA_HANDLE wma_handle,
+ struct coex_config_params *coex_cfg_params);
+
+/**
* wma_set_qpower_config() - update qpower config in wma
* @vdev_id: the Id of the vdev to configure
* @qpower: new qpower value
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 6727fedcc2dd..ea5775030382 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -770,7 +770,7 @@ static void wma_vdev_start_rsp(tp_wma_handle wma,
add_bss->status = QDF_STATUS_E_NOMEM;
goto send_fail_resp;
}
- bcn->buf = qdf_nbuf_alloc(NULL, WMA_BCN_BUF_MAX_SIZE, 0,
+ bcn->buf = qdf_nbuf_alloc(NULL, SIR_MAX_BEACON_SIZE, 0,
sizeof(uint32_t), 0);
if (!bcn->buf) {
WMA_LOGE("%s: No memory allocated for beacon buffer",
@@ -2235,6 +2235,7 @@ ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
status = QDF_STATUS_E_FAILURE;
wmi_unified_vdev_delete_send(wma_handle->wmi_handle,
self_sta_req->session_id);
+ goto end;
}
}
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index bd6d0357581c..44c4c6a154e8 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -10839,6 +10839,26 @@ QDF_STATUS wma_set_sar_limit(WMA_HANDLE handle,
return ret;
}
+QDF_STATUS wma_send_coex_config_cmd(WMA_HANDLE wma_handle,
+ struct coex_config_params *coex_cfg_params)
+{
+ tp_wma_handle wma = (tp_wma_handle)wma_handle;
+
+ if (!wma || !wma->wmi_handle) {
+ WMA_LOGE("%s: WMA is closed, can not issue coex config command",
+ __func__);
+ return QDF_STATUS_E_INVAL;
+ }
+
+ if (!coex_cfg_params) {
+ WMA_LOGE("%s: coex cfg params ptr NULL", __func__);
+ return QDF_STATUS_E_INVAL;
+ }
+
+ return wmi_unified_send_coex_config_cmd(wma->wmi_handle,
+ coex_cfg_params);
+}
+
#ifdef WLAN_FEATURE_DISA
/**
* wma_encrypt_decrypt_msg() -
@@ -11388,21 +11408,25 @@ int wma_pdev_div_info_evt_handler(void *handle, u_int8_t *event_buf,
return -EINVAL;
}
+ if (event->num_chains_valid > CHAIN_MAX_NUM) {
+ WMA_LOGE(FL("Invalid num of chains"));
+ return -EINVAL;
+ }
+
WMI_MAC_ADDR_TO_CHAR_ARRAY(&event->macaddr, macaddr);
WMA_LOGD(FL("macaddr: " MAC_ADDRESS_STR), MAC_ADDR_ARRAY(macaddr));
WMA_LOGD(FL("num_chains_valid: %d"), event->num_chains_valid);
chain_rssi_result.num_chains_valid = event->num_chains_valid;
- for (i = 0; i < CHAIN_MAX_NUM; i++)
- WMA_LOGD(FL("chain_rssi: %d"), event->chain_rssi[i]);
qdf_mem_copy(chain_rssi_result.chain_rssi, event->chain_rssi,
sizeof(event->chain_rssi));
- for (i = 0; i < event->num_chains_valid; i++)
+ for (i = 0; i < event->num_chains_valid; i++) {
+ WMA_LOGD(FL("chain_rssi: %d, ant_id: %d"),
+ event->chain_rssi[i], event->ant_id[i]);
chain_rssi_result.chain_rssi[i] += WMA_TGT_NOISE_FLOOR_DBM;
+ }
- for (i = 0; i < CHAIN_MAX_NUM; i++)
- WMA_LOGD(FL("ant_id: %d"), event->ant_id[i]);
qdf_mem_copy(chain_rssi_result.ant_id, event->ant_id,
sizeof(event->ant_id));
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index dd6e19c7cbe1..e1dfe94532ca 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -1924,6 +1924,7 @@ static void wma_shutdown_notifier_cb(void *priv)
QDF_STATUS status;
qdf_event_set(&wma_handle->wma_resume_event);
+ wmi_stop(wma_handle->wmi_handle);
sys_build_message_header(SYS_MSG_ID_CLEAN_VDEV_RSP_QUEUE, &msg);
msg.bodyptr = priv;
@@ -2475,7 +2476,6 @@ QDF_STATUS wma_open(void *cds_context,
}
WMA_LOGD("WMA --> wmi_unified_attach - success");
- wmi_register_tgt_ready_cb(wmi_handle, cds_is_target_ready);
wmi_unified_register_event_handler(wmi_handle,
WMI_SERVICE_AVAILABLE_EVENTID,
wma_rx_service_available_event,
diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c
index 64fec8cb3412..156ef068750a 100644
--- a/core/wma/src/wma_mgmt.c
+++ b/core/wma/src/wma_mgmt.c
@@ -2423,9 +2423,9 @@ static QDF_STATUS wma_store_bcn_tmpl(tp_wma_handle wma, uint8_t vdev_id,
}
len = *(u32 *) &bcn_info->beacon[0];
- if (len > WMA_BCN_BUF_MAX_SIZE) {
+ if (len > SIR_MAX_BEACON_SIZE) {
WMA_LOGE("%s: Received beacon len %d exceeding max limit %d",
- __func__, len, WMA_BCN_BUF_MAX_SIZE);
+ __func__, len, SIR_MAX_BEACON_SIZE);
return QDF_STATUS_E_INVAL;
}
WMA_LOGD("%s: Storing received beacon template buf to local buffer",
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 2d13ecee93e7..c695d71dcdd3 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -968,6 +968,10 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle,
params->roam_offload_enabled = roam_req->RoamOffloadEnabled;
params->roam_offload_params.ho_delay_for_rx =
roam_req->ho_delay_for_rx;
+ params->roam_offload_params.roam_preauth_retry_count =
+ roam_req->roam_preauth_retry_count;
+ params->roam_offload_params.roam_preauth_no_ack_timeout =
+ roam_req->roam_preauth_no_ack_timeout;
params->prefer_5ghz = roam_req->Prefer5GHz;
params->roam_rssi_cat_gap = roam_req->RoamRssiCatGap;
params->select_5ghz_margin = roam_req->Select5GHzMargin;
@@ -1012,13 +1016,17 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle,
params->min_delay_btw_roam_scans,
params->roam_trigger_reason_bitmask);
+ WMA_LOGD(FL("roam_preauth_retry_count: %d, roam_preauth_no_ack_timeout: %d"),
+ params->roam_offload_params.roam_preauth_retry_count,
+ params->roam_offload_params.roam_preauth_no_ack_timeout);
+
status = wmi_unified_roam_scan_offload_mode_cmd(wma_handle->wmi_handle,
scan_cmd_fp, params);
+ qdf_mem_free(params);
if (QDF_IS_STATUS_ERROR(status))
return status;
WMA_LOGD("%s: WMA --> WMI_ROAM_SCAN_MODE", __func__);
- qdf_mem_free(params);
return status;
}
@@ -3217,6 +3225,22 @@ int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event,
return status;
}
+ if (synch_frame_event->bcn_probe_rsp_len >
+ param_buf->num_bcn_probe_rsp_frame ||
+ synch_frame_event->reassoc_req_len >
+ param_buf->num_reassoc_req_frame ||
+ synch_frame_event->reassoc_rsp_len >
+ param_buf->num_reassoc_rsp_frame) {
+ WMA_LOGE("fixed/actual len err: bcn:%d/%d req:%d/%d rsp:%d/%d",
+ synch_frame_event->bcn_probe_rsp_len,
+ param_buf->num_bcn_probe_rsp_frame,
+ synch_frame_event->reassoc_req_len,
+ param_buf->num_reassoc_req_frame,
+ synch_frame_event->reassoc_rsp_len,
+ param_buf->num_reassoc_rsp_frame);
+ return status;
+ }
+
vdev_id = synch_frame_event->vdev_id;
iface = &wma->interfaces[vdev_id];