summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/dp/txrx/ol_txrx.c63
-rw-r--r--core/dp/txrx/ol_txrx.h18
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c26
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c14
-rw-r--r--core/hdd/src/wlan_hdd_main.c77
-rw-r--r--core/mac/inc/qwlan_version.h4
-rw-r--r--core/mac/inc/sir_mac_prot_def.h7
-rw-r--r--core/mac/src/cfg/cfgUtil/cfg.txt8
-rw-r--r--core/mac/src/pe/lim/lim_ft.c53
-rw-r--r--core/mac/src/pe/lim/lim_process_action_frame.c11
-rw-r--r--core/mac/src/pe/lim/lim_prop_exts_utils.c18
-rw-r--r--core/mac/src/pe/lim/lim_send_management_frames.c10
-rw-r--r--core/mac/src/pe/lim/lim_send_sme_rsp_messages.c8
-rw-r--r--core/mac/src/pe/rrm/rrm_api.c2
-rw-r--r--core/mac/src/pe/sch/sch_beacon_process.c21
-rw-r--r--core/sme/src/csr/csr_api_roam.c7
-rw-r--r--core/sme/src/csr/csr_neighbor_roam.c13
-rw-r--r--core/wma/src/wma_scan_roam.c13
18 files changed, 267 insertions, 106 deletions
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c
index 5fdd4219b784..49ca04fccdbd 100644
--- a/core/dp/txrx/ol_txrx.c
+++ b/core/dp/txrx/ol_txrx.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -5467,6 +5467,42 @@ static inline int ol_txrx_drop_nbuf_list(qdf_nbuf_t buf_list)
}
/**
+ * ol_txrx_mon() - Wrapper function to invoke mon cb
+ * @data_rx: mon callback function
+ * @msdu: mon packet
+ * @pdev: handle to the physical device
+ * @chan: monitor channel
+ *
+ * Return: None
+ */
+static void ol_txrx_mon(ol_txrx_mon_callback_fp data_rx, qdf_nbuf_t msdu,
+ struct ol_txrx_pdev_t *pdev, uint16_t chan)
+{
+ struct radiotap_header *rthdr;
+ struct ieee80211_hdr_3addr *hdr;
+ void *mon_osif_dev = pdev->mon_osif_dev;
+
+ rthdr = (struct radiotap_header *)qdf_nbuf_data(msdu);
+ hdr = (struct ieee80211_hdr_3addr *)(qdf_nbuf_data(msdu) +
+ rthdr->it_len);
+
+ if (ieee80211_is_qos_nullfunc(hdr->frame_control)) {
+ qdf_nbuf_free(msdu);
+ return;
+ }
+
+ if (ieee80211_is_assoc_resp(hdr->frame_control) ||
+ ieee80211_is_reassoc_resp(hdr->frame_control)) {
+ ol_htt_mon_note_chan(pdev, chan);
+ }
+
+ if (data_rx(mon_osif_dev, msdu) != QDF_STATUS_SUCCESS) {
+ ol_txrx_err("Frame Rx to HDD failed");
+ qdf_nbuf_free(msdu);
+ }
+}
+
+/**
* ol_txrx_mon_mgmt_cb(): callback to process management packets
* for pkt capture mode
* @ppdev: device handler
@@ -5503,10 +5539,7 @@ ol_txrx_mon_mgmt_cb(void *ppdev, void *nbuf_list, uint8_t vdev_id,
while (msdu) {
next_buf = qdf_nbuf_queue_next(msdu);
qdf_nbuf_set_next(msdu, NULL); /* Add NULL terminator */
- if (QDF_STATUS_SUCCESS != data_rx(mon_osif_dev, msdu)) {
- ol_txrx_err("Frame Rx to HDD failed");
- qdf_nbuf_free(msdu);
- }
+ ol_txrx_mon(data_rx, msdu, pdev, pkt_tx_status.chan_num);
msdu = next_buf;
}
@@ -5548,6 +5581,7 @@ bool ol_txrx_mon_mgmt_process(struct mon_rx_status *txrx_status,
headroom = qdf_nbuf_headroom(nbuf);
qdf_nbuf_push_head(nbuf, headroom);
qdf_nbuf_update_radiotap(txrx_status, nbuf, headroom);
+ pkt_tx_status.chan_num = txrx_status->chan_num;
pkt = cds_alloc_ol_mon_pkt(sched_ctx);
if (!pkt)
@@ -6043,7 +6077,8 @@ ol_txrx_mon_tx_data_cb(void *ppdev, void *nbuf_list, uint8_t vdev_id,
/*
* Get the channel info and update the rx status
*/
- if (vdev_id != HTT_INVALID_VDEV) {
+ if (vdev_id != HTT_INVALID_VDEV &&
+ (!pdev->htt_pdev->mon_ch_info.ch_num)) {
cds_get_chan_by_session_id(vdev_id, &chan);
ol_htt_mon_note_chan(pdev, chan);
}
@@ -6057,12 +6092,7 @@ ol_txrx_mon_tx_data_cb(void *ppdev, void *nbuf_list, uint8_t vdev_id,
headroom = qdf_nbuf_headroom(msdu);
qdf_nbuf_push_head(msdu, headroom);
qdf_nbuf_update_radiotap(&tx_status, msdu, headroom);
-
- if (QDF_STATUS_SUCCESS != data_rx(mon_osif_dev, msdu)) {
- ol_txrx_err("Frame Tx to HDD failed");
- qdf_nbuf_free(msdu);
- }
-
+ ol_txrx_mon(data_rx, msdu, pdev, 0);
msdu = next_buf;
}
@@ -6172,7 +6202,8 @@ ol_txrx_mon_rx_data_cb(void *ppdev, void *nbuf_list, uint8_t vdev_id,
/*
* Get the channel info and update the rx status
*/
- if (vdev_id != HTT_INVALID_VDEV) {
+ if (vdev_id != HTT_INVALID_VDEV &&
+ (!pdev->htt_pdev->mon_ch_info.ch_num)) {
cds_get_chan_by_session_id(vdev_id, &chan);
ol_htt_mon_note_chan(pdev, chan);
}
@@ -6204,11 +6235,7 @@ ol_txrx_mon_rx_data_cb(void *ppdev, void *nbuf_list, uint8_t vdev_id,
headroom = qdf_nbuf_headroom(msdu);
qdf_nbuf_push_head(msdu, headroom);
qdf_nbuf_update_radiotap(&rx_status, msdu, headroom);
-
- if (QDF_STATUS_SUCCESS != data_rx(mon_osif_dev, msdu)) {
- ol_txrx_err("Frame Rx to HDD failed");
- qdf_nbuf_free(msdu);
- }
+ ol_txrx_mon(data_rx, msdu, pdev, 0);
msdu = next_buf;
}
diff --git a/core/dp/txrx/ol_txrx.h b/core/dp/txrx/ol_txrx.h
index a4498059c839..5b790479afc0 100644
--- a/core/dp/txrx/ol_txrx.h
+++ b/core/dp/txrx/ol_txrx.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -236,5 +236,21 @@ enum pktcapture_tx_status {
struct ol_mon_tx_status {
uint8_t status;
uint8_t tx_retry_cnt;
+ uint16_t chan_num;
};
+
+/**
+ * struct radiotap_header - base radiotap header
+ * @it_version: radiotap version, always 0
+ * @it_pad: padding (or alignment)
+ * @it_len: overall radiotap header length
+ * @it_present: (first) present word
+ */
+struct radiotap_header {
+ uint8_t it_version;
+ uint8_t it_pad;
+ __le16 it_len;
+ __le32 it_present;
+} __packed;
+
#endif /* _OL_TXRX__H_ */
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 0da2e57c8d53..6d077856b24c 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -14147,6 +14147,12 @@ static void wlan_hdd_update_band_cap(hdd_context_t *hdd_ctx)
uint16_t val16;
tSirMacHTCapabilityInfo *ht_cap_info;
QDF_STATUS status;
+ struct ieee80211_supported_band *band_2g;
+ struct ieee80211_supported_band *band_5g;
+ uint8_t i;
+
+ band_2g = hdd_ctx->wiphy->bands[HDD_NL80211_BAND_2GHZ];
+ band_5g = hdd_ctx->wiphy->bands[HDD_NL80211_BAND_5GHZ];
status = sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_HT_CAP_INFO, &val32);
if (QDF_STATUS_SUCCESS != status) {
@@ -14173,6 +14179,26 @@ static void wlan_hdd_update_band_cap(hdd_context_t *hdd_ctx)
vht_cap.vht_supported = 0;
hdd_ctx->wiphy->bands[HDD_NL80211_BAND_5GHZ]->vht_cap.cap = 0;
}
+ if (band_2g) {
+ for (i = 0; i < hdd_ctx->num_rf_chains; i++)
+ band_2g->ht_cap.mcs.rx_mask[i] = 0xff;
+ /*
+ * According to mcs_nss HT MCS parameters highest data
+ * rate for Nss = 1 is 150 Mbps
+ */
+ band_2g->ht_cap.mcs.rx_highest =
+ cpu_to_le16(150 * hdd_ctx->num_rf_chains);
+ }
+ if (band_5g) {
+ for (i = 0; i < hdd_ctx->num_rf_chains; i++)
+ band_5g->ht_cap.mcs.rx_mask[i] = 0xff;
+ /*
+ * According to mcs_nss HT MCS parameters highest data
+ * rate for Nss = 1 is 150 Mbps
+ */
+ band_5g->ht_cap.mcs.rx_highest =
+ cpu_to_le16(150 * hdd_ctx->num_rf_chains);
+ }
}
/*
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 77088b08230b..f232d18428a7 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -8037,18 +8037,6 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
hdd_abort_ongoing_sta_connection(pHddCtx);
/*
- * Reject start bss if reassoc in progress on any adapter.
- * sme_is_any_session_in_middle_of_roaming is for LFR2 and
- * hdd_is_roaming_in_progress is for LFR3
- */
- if (sme_is_any_session_in_middle_of_roaming(hHal) ||
- hdd_is_roaming_in_progress(pHddCtx)) {
- hdd_info("Reassociation in progress");
- ret = -EINVAL;
- goto ret_status;
- }
-
- /*
* Disable Roaming on all adapters before starting bss
*/
wlan_hdd_disable_roaming(pHostapdAdapter);
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 8a4591825f7a..4aa922e2b903 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -1133,6 +1133,7 @@ static void hdd_update_wiphy_vhtcap(hdd_context_t *hdd_ctx)
struct ieee80211_supported_band *band_5g =
hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ];
uint32_t val;
+ uint32_t value1;
if (!band_5g) {
hdd_debug("5GHz band disabled, skipping capability population");
@@ -1148,6 +1149,13 @@ static void hdd_update_wiphy_vhtcap(hdd_context_t *hdd_ctx)
hdd_debug("Updated wiphy vhtcap:0x%x, CSNAntSupp:%d, NumSoundDim:%d",
band_5g->vht_cap.cap, hdd_ctx->config->txBFCsnValue, val);
+
+ sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_VHT_RX_MCS_MAP, &value1);
+ band_5g->vht_cap.vht_mcs.rx_mcs_map = value1;
+
+ sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_VHT_TX_MCS_MAP, &value1);
+ band_5g->vht_cap.vht_mcs.tx_mcs_map = value1;
+
}
/**
@@ -1234,30 +1242,9 @@ static void hdd_update_tgt_ht_cap(hdd_context_t *hdd_ctx,
enable_tx_stbc = pconfig->enableTxSTBC;
- if (pconfig->enable2x2 && (cfg->num_rf_chains == 2)) {
+ if (pconfig->enable2x2 && (cfg->num_rf_chains == 2))
pconfig->enable2x2 = 1;
- } else {
- pconfig->enable2x2 = 0;
- enable_tx_stbc = 0;
- /* 1x1 */
- /* Update Rx Highest Long GI data Rate */
- if (sme_cfg_set_int(hdd_ctx->hHal,
- WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
- VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1)
- == QDF_STATUS_E_FAILURE) {
- hdd_err("Could not pass on WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE to CCM");
- }
-
- /* Update Tx Highest Long GI data Rate */
- if (sme_cfg_set_int
- (hdd_ctx->hHal,
- WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
- VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1) ==
- QDF_STATUS_E_FAILURE) {
- hdd_err("VHT_TX_HIGHEST_SUPP_RATE_1_1 to CCM fail");
- }
- }
if (!(cfg->ht_tx_stbc && pconfig->enable2x2))
enable_tx_stbc = 0;
phtCapInfo->txSTBC = enable_tx_stbc;
@@ -1303,12 +1290,54 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
uint32_t ch_width = eHT_CHANNEL_WIDTH_80MHZ;
uint32_t hw_rx_ldpc_enabled;
struct wma_caps_per_phy caps_per_phy;
+ uint32_t tx_highest_data_rate;
+ uint32_t rx_highest_data_rate;
if (!band_5g) {
hdd_debug("5GHz band disabled, skipping capability population");
return;
}
+ if (pconfig->enable2x2) {
+ if (cfg->vht_short_gi_80 & WMI_VHT_CAP_SGI_80MHZ) {
+ /* Update 2x2 Highest Short GI data rate */
+ tx_highest_data_rate =
+ VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_2_2_SGI80;
+ rx_highest_data_rate =
+ VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_2_2_SGI80;
+ } else {
+ /* Update 2x2 Rx Highest Long GI data Rate */
+ tx_highest_data_rate =
+ VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_2_2;
+ rx_highest_data_rate =
+ VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_2_2;
+ }
+ } else if (cfg->vht_short_gi_80 & WMI_VHT_CAP_SGI_80MHZ) {
+ /* Update 1x1 Highest Short GI data rate */
+ tx_highest_data_rate =
+ VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1_SGI80;
+ rx_highest_data_rate =
+ VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1_SGI80;
+ } else {
+ /* Update 1x1 Highest Long GI data rate */
+ tx_highest_data_rate = VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
+ rx_highest_data_rate = VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
+ }
+
+ status = sme_cfg_set_int(hdd_ctx->hHal,
+ WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
+ rx_highest_data_rate);
+
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("Failed to set rx_supp_data_rate");
+
+ status = sme_cfg_set_int(hdd_ctx->hHal,
+ WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
+ tx_highest_data_rate);
+
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("Failed to set tx_supp_data_rate");
+
/* Get the current MPDU length */
status =
sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_VHT_MAX_MPDU_LENGTH,
@@ -1654,6 +1683,8 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
if (cfg->vht_txop_ps & WMI_VHT_CAP_TXOP_PS)
band_5g->vht_cap.cap |= IEEE80211_VHT_CAP_VHT_TXOP_PS;
+ band_5g->vht_cap.vht_mcs.rx_highest = cpu_to_le16(rx_highest_data_rate);
+ band_5g->vht_cap.vht_mcs.tx_highest = cpu_to_le16(tx_highest_data_rate);
}
/**
diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h
index 3bc4886f0a0b..7cea62f543b2 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 "F"
+#define QWLAN_VERSION_EXTRA "R"
#define QWLAN_VERSION_BUILD 76
-#define QWLAN_VERSIONSTR "5.1.1.76F"
+#define QWLAN_VERSIONSTR "5.1.1.76R"
#endif /* QWLAN_VERSION_H */
diff --git a/core/mac/inc/sir_mac_prot_def.h b/core/mac/inc/sir_mac_prot_def.h
index 724ac8e9ad3c..5f23432ec24b 100644
--- a/core/mac/inc/sir_mac_prot_def.h
+++ b/core/mac/inc/sir_mac_prot_def.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -399,6 +399,11 @@
#define VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_2_2 780
#define VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_2_2 780
+#define VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1_SGI80 433
+#define VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1_SGI80 433
+#define VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_2_2_SGI80 866
+#define VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_2_2_SGI80 866
+
#define VHT_CAP_80_SUPP 0
#define VHT_CAP_160_SUPP 1
#define VHT_CAP_160_AND_80P80_SUPP 2
diff --git a/core/mac/src/cfg/cfgUtil/cfg.txt b/core/mac/src/cfg/cfgUtil/cfg.txt
index 24aef950d09c..e6b312ea2fed 100644
--- a/core/mac/src/cfg/cfgUtil/cfg.txt
+++ b/core/mac/src/cfg/cfgUtil/cfg.txt
@@ -2754,10 +2754,10 @@ LIM
WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE I 4 19
V RW NP
LIM
-0 780 780
+0 866 866
V RW NP
LIM
-0 780 780
+0 866 866
*
* Tx Highest supported data rate.
@@ -2765,10 +2765,10 @@ LIM
WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE I 4 19
V RW NP
LIM
-0 780 780
+0 866 866
V RW NP
LIM
-0 780 780
+0 866 866
*
* Channel center freq Seg1
diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c
index 73eb4be4110b..1e60e69f7bb8 100644
--- a/core/mac/src/pe/lim/lim_ft.c
+++ b/core/mac/src/pe/lim/lim_ft.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018, 2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -467,8 +467,9 @@ void lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac,
/**
* lim_fill_dot11mode() - to fill 802.11 mode in FT session
* @mac_ctx: pointer to mac ctx
- * @pftSessionEntry: FT session
+ * @ft_session: FT session
* @psessionEntry: PE session
+ * @bcn: AP beacon pointer
*
* This API fills FT session's dot11mode either from pe session or
* from CFG depending on the condition.
@@ -476,18 +477,40 @@ void lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac,
* Return: none
*/
static void lim_fill_dot11mode(tpAniSirGlobal mac_ctx,
- tpPESession pftSessionEntry, tpPESession psessionEntry)
+ tpPESession ft_session,
+ tpPESession psessionEntry,
+ tSchBeaconStruct *bcn)
{
uint32_t self_dot11_mode;
if (psessionEntry->ftPEContext.pFTPreAuthReq &&
!mac_ctx->roam.configParam.isRoamOffloadEnabled) {
- pftSessionEntry->dot11mode =
+ ft_session->dot11mode =
psessionEntry->ftPEContext.pFTPreAuthReq->dot11mode;
- } else {
- wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &self_dot11_mode);
- pe_debug("selfDot11Mode: %d", self_dot11_mode);
- pftSessionEntry->dot11mode = self_dot11_mode;
+ return;
+ }
+
+ wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &self_dot11_mode);
+ pe_debug("selfDot11Mode: %d", self_dot11_mode);
+
+ if (ft_session->limRFBand == SIR_BAND_2_4_GHZ)
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11G;
+ else
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11A;
+
+ switch (self_dot11_mode) {
+ case WNI_CFG_DOT11_MODE_11AC:
+ case WNI_CFG_DOT11_MODE_11AC_ONLY:
+ if (bcn->VHTCaps.present)
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11AC;
+ else if (bcn->HTCaps.present)
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11N;
+ break;
+ case WNI_CFG_DOT11_MODE_11N:
+ case WNI_CFG_DOT11_MODE_11N_ONLY:
+ if (bcn->HTCaps.present)
+ ft_session->dot11mode = WNI_CFG_DOT11_MODE_11N;
+ break;
}
}
#else
@@ -496,13 +519,16 @@ static void lim_fill_dot11mode(tpAniSirGlobal mac_ctx,
* @mac_ctx: pointer to mac ctx
* @pftSessionEntry: FT session
* @psessionEntry: PE session
+ * @bcn: AP beacon pointer
*
* This API fills FT session's dot11mode either from pe session.
*
* Return: none
*/
static void lim_fill_dot11mode(tpAniSirGlobal mac_ctx,
- tpPESession pftSessionEntry, tpPESession psessionEntry)
+ tpPESession pftSessionEntry,
+ tpPESession psessionEntry,
+ tSchBeaconStruct *bcn)
{
pftSessionEntry->dot11mode =
psessionEntry->ftPEContext.pFTPreAuthReq->dot11mode;
@@ -563,7 +589,14 @@ void lim_fill_ft_session(tpAniSirGlobal pMac,
pftSessionEntry->ssId.length = pBeaconStruct->ssId.length;
qdf_mem_copy(pftSessionEntry->ssId.ssId, pBeaconStruct->ssId.ssId,
pftSessionEntry->ssId.length);
- lim_fill_dot11mode(pMac, pftSessionEntry, psessionEntry);
+
+ /* Copy The channel Id to the session Table */
+ pftSessionEntry->limReassocChannelId = pbssDescription->channelId;
+ pftSessionEntry->currentOperChannel = pbssDescription->channelId;
+
+ pftSessionEntry->limRFBand = lim_get_rf_band(
+ pftSessionEntry->currentOperChannel);
+ lim_fill_dot11mode(pMac, pftSessionEntry, psessionEntry, pBeaconStruct);
pe_debug("dot11mode: %d", pftSessionEntry->dot11mode);
pftSessionEntry->vhtCapability =
diff --git a/core/mac/src/pe/lim/lim_process_action_frame.c b/core/mac/src/pe/lim/lim_process_action_frame.c
index 2153e605690f..402f42b04e46 100644
--- a/core/mac/src/pe/lim/lim_process_action_frame.c
+++ b/core/mac/src/pe/lim/lim_process_action_frame.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018, 2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -455,6 +455,15 @@ static void __lim_process_operating_mode_action_frame(tpAniSirGlobal mac_ctx,
frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
pe_debug("Received Operating Mode action frame");
+
+ /*
+ * Ignore opmode change during channel change The opmode will be updated
+ * with the beacons on new channel once the AP move to new channel.
+ */
+ if (session->ch_switch_in_progress) {
+ pe_debug("Ignore opmode change as channel switch is in progress");
+ return;
+ }
operating_mode_frm = qdf_mem_malloc(sizeof(*operating_mode_frm));
if (NULL == operating_mode_frm) {
pe_err("AllocateMemory failed");
diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c
index 01dd4d88298a..e4b82a1bf8bf 100644
--- a/core/mac/src/pe/lim/lim_prop_exts_utils.c
+++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018, 2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -215,6 +215,9 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
else if (center_freq_diff > 16)
ap_bcon_ch_width =
WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ;
+ else
+ ap_bcon_ch_width =
+ WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ;
}
fw_vht_ch_wd = wma_get_vht_ch_width();
@@ -267,18 +270,15 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
*/
vht_ch_wd = WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ;
session->ch_center_freq_seg1 = 0;
+ session->ch_center_freq_seg0 =
+ lim_get_80Mhz_center_channel(
+ beacon_struct->channelNumber);
}
} else if (vht_ch_wd == WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ) {
- /* DUT or AP supports only 80MHz */
- if (ap_bcon_ch_width ==
- WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ &&
- !new_ch_width_dfn)
- /* AP is in 160MHz mode */
- session->ch_center_freq_seg0 =
+ session->ch_center_freq_seg0 =
lim_get_80Mhz_center_channel(
beacon_struct->channelNumber);
- else
- session->ch_center_freq_seg1 = 0;
+ session->ch_center_freq_seg1 = 0;
}
session->ch_width = vht_ch_wd + 1;
pe_debug("cntr_freq0: %d cntr_freq1: %d width: %d",
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index c43755649217..87b5598c03de 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -1953,7 +1953,7 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
mbo_ie, DOT11F_IE_MBO_IE_MAX_LEN);
if (sir_status != eSIR_SUCCESS) {
pe_err("Failed to strip MBO IE");
- goto free_mbo_ie;
+ goto end;
}
/* Include the EID and length fields */
@@ -2103,12 +2103,8 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
/* Pkt will be freed up by the callback */
goto end;
}
-
-free_mbo_ie:
- if (mbo_ie)
- qdf_mem_free(mbo_ie);
-
end:
+ qdf_mem_free(mbo_ie);
/* Free up buffer allocated for mlm_assoc_req */
qdf_mem_free(mlm_assoc_req);
mlm_assoc_req = NULL;
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 7958083003ea..6f080d8adafd 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -916,11 +916,7 @@ lim_send_sme_disassoc_ntf(tpAniSirGlobal pMac,
break;
}
}
- if (sta_ds
-#ifdef WLAN_FEATURE_11W
- && (!sta_ds->rmfEnabled)
-#endif
- ) {
+ if (sta_ds) {
if (lim_add_sta(pMac, sta_ds, false, session) !=
eSIR_SUCCESS)
pe_err("could not Add STA with assocId: %d",
diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c
index fe196f7d9a90..66fef4583226 100644
--- a/core/mac/src/pe/rrm/rrm_api.c
+++ b/core/mac/src/pe/rrm/rrm_api.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c
index be88a0a11551..37cec83f8ca8 100644
--- a/core/mac/src/pe/sch/sch_beacon_process.c
+++ b/core/mac/src/pe/sch/sch_beacon_process.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -377,6 +377,16 @@ sch_bcn_process_sta(tpAniSirGlobal mac_ctx,
bcn->channelNumber);
return false;
}
+
+ /*
+ * Ignore bcn as channel switch IE present and csa offload is enabled,
+ * as in CSA offload enabled case FW will send Event to switch channel
+ */
+ if (bcn->channelSwitchPresent && wma_is_csa_offload_enabled()) {
+ pe_debug("Ignore bcn as channel switch IE present and csa offload is enabled");
+ return false;
+ }
+
lim_detect_change_in_ap_capabilities(mac_ctx, bcn, session);
if (lim_get_sta_hash_bssidx(mac_ctx, DPH_STA_HASH_INDEX_PEER, bssIdx,
session) != eSIR_SUCCESS)
@@ -540,6 +550,15 @@ sch_bcn_process_sta_ibss(tpAniSirGlobal mac_ctx,
(STA_INVALID_IDX == pStaDs->staIndex)))
return;
+ /*
+ * Ignore opmode change during channel change The opmode will be updated
+ * with the beacons on new channel once the AP move to new channel.
+ */
+ if (session->ch_switch_in_progress) {
+ pe_debug("Ignore opmode change as channel switch is in progress");
+ return;
+ }
+
if (session->vhtCapability && bcn->OperatingMode.present) {
update_nss(mac_ctx, pStaDs, bcn, session, pMh);
operMode = get_operating_channel_width(pStaDs);
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 8d20580c7734..52560b37b560 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -20175,7 +20175,7 @@ static void csr_add_rssi_reject_ap_list(tpAniSirGlobal mac_ctx,
#define RSO_RESTART_BIT (1<<ROAM_SCAN_OFFLOAD_RESTART)
#define RSO_UPDATE_CFG_BIT (1<<ROAM_SCAN_OFFLOAD_UPDATE_CFG)
#define RSO_ABORT_SCAN_BIT (1<<ROAM_SCAN_OFFLOAD_ABORT_SCAN)
-#define RSO_START_ALLOW_MASK (RSO_STOP_BIT | RSO_UPDATE_CFG_BIT)
+#define RSO_START_ALLOW_MASK (RSO_START_BIT |RSO_STOP_BIT | RSO_UPDATE_CFG_BIT)
#define RSO_STOP_ALLOW_MASK (RSO_UPDATE_CFG_BIT | RSO_RESTART_BIT | \
RSO_STOP_BIT | RSO_START_BIT | RSO_ABORT_SCAN_BIT)
#define RSO_RESTART_ALLOW_MASK (RSO_UPDATE_CFG_BIT | RSO_START_BIT | \
@@ -22872,6 +22872,8 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx,
tSirSmeHTProfile *src_profile = NULL;
tCsrRoamHTProfile *dst_profile = NULL;
#endif
+ tpCsrNeighborRoamControlInfo neigh_roam_info =
+ &mac_ctx->roam.neighborRoamInfo[session_id];
if (!session) {
sme_err("LFR3: Session not found");
@@ -22888,6 +22890,7 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx,
csr_roam_roaming_offload_timer_action(mac_ctx,
0, session_id, ROAMING_OFFLOAD_TIMER_STOP);
if (session->discon_in_progress ||
+ neigh_roam_info->last_sent_cmd == ROAM_SCAN_OFFLOAD_STOP ||
!CSR_IS_ROAM_JOINED(mac_ctx, session_id)) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
FL("LFR3: Session not in connected state or disconnect is in progress %d"),
@@ -23084,6 +23087,8 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx,
eCSR_ROAM_SUBSTATE_NONE,
session_id);
}
+ csr_neighbor_roam_state_transition(mac_ctx,
+ eCSR_NEIGHBOR_ROAM_STATE_INIT, session_id);
}
roam_info->nBeaconLength = 0;
roam_info->nAssocReqLength = roam_synch_data->reassoc_req_length -
diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c
index 5449d5d98115..4cc5e5abf68b 100644
--- a/core/sme/src/csr/csr_neighbor_roam.c
+++ b/core/sme/src/csr/csr_neighbor_roam.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -1049,9 +1049,14 @@ static void csr_neighbor_roam_info_ctx_init(
} else
#endif
{
- csr_roam_offload_scan(pMac, session_id,
- ROAM_SCAN_OFFLOAD_START,
- REASON_CTX_INIT);
+ if (!ngbr_roam_info->b_roam_scan_offload_started)
+ csr_roam_offload_scan(pMac, session_id,
+ ROAM_SCAN_OFFLOAD_START,
+ REASON_CTX_INIT);
+ else
+ csr_roam_offload_scan(pMac, session_id,
+ ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_CONNECT);
if (roam_profile &&
roam_profile->supplicant_disabled_roaming) {
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index f365b8b71a6c..f418459a0a3d 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -3296,9 +3296,14 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
* firmware assert.
*/
channel = cds_freq_to_chan(wma->interfaces[synch_event->vdev_id].mhz);
- wma_get_phy_mode(channel,
- wma->interfaces[synch_event->vdev_id].chan_width,
- &wma->interfaces[synch_event->vdev_id].chanmode);
+ if (param_buf->chan) {
+ wma->interfaces[synch_event->vdev_id].chanmode =
+ WMI_GET_CHANNEL_MODE(param_buf->chan);
+ } else {
+ wma_get_phy_mode(channel,
+ wma->interfaces[synch_event->vdev_id].chan_width,
+ &wma->interfaces[synch_event->vdev_id].chanmode);
+ }
wma->csr_roam_synch_cb(wma->mac_context, roam_synch_ind_ptr,
bss_desc_ptr, SIR_ROAM_SYNCH_COMPLETE);