summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-08-30 00:30:48 -0600
committerLinux Build Service Account <lnxbuild@localhost>2016-08-30 00:30:48 -0600
commita02dd4d657444c08297e6f861a0dc92f0b76e7ce (patch)
tree511a543a30330509f4009e47692d2fe43c823872
parentdcde4cda3c8189eb672bf4273dd2485e7ce87214 (diff)
parent11d498557276e141a543bb53c9979375123efcc5 (diff)
Promotion of wlan-cld3.driver.lnx.1.1-00088.
CRs Change ID Subject -------------------------------------------------------------------------------------------------------------- 688141 Iada37702891f6cbe8ea2b5c4293ee44d5b442c1b Release 5.1.0.24A 688141 If2f132a97f0fa37b50c442fc1f4782f5e8cbbf75 Release 5.1.0.24P 1058342 Icf8464906b3520b5b873b6d0ad93e1edb9564953 qcacld-3.0: Revert Disable gEnableRXLDPC in INI file 688141 Ib83a7ae78f6e87715b09568abd87de67d1846b53 Release 5.1.0.24M 688141 I395608033225e98f6f18bc0a8c302ddef729454d Release 5.1.0.24J 1048394 Id7cc1e6f3c31df8a8c8955eb3ff48cb60e5b5ab2 qcacld-3.0: Fix scan failure issue due to stale PE sessi 1059065 I1b3a3099c395dcf050e0c1c42677686c2c4911ef qcacld-3.0: Remove duplicate wake up reason logging 1057261 I50974232db034029747e0af8c8b5b70959c4dcb7 qcacld-3.0: Fix incorrect memory comparison in cds_is_mm 1056197 Icb7af85bfc25a59961030980a5dc8d79a097b70f qcacld-3.0: Correct HAL PWR CMD SIR param value 1060356 I55cf956dc6dca68790d2ff69ad5c3e5cacd0f6ae qcacld-3.0: Fix mac address copy issue in active scan 1055648 I01bf0e8110a2519a2e11da398be3c98f9ca4db8f qcacld-3.0: Allocate memory for cds config only once 1052039 I352104058143224d2555d3323747719bd14066e5 qcacld-3.0: Validate the hif_ctx before dereferencing 688141 I483941db2e46f80641f383546be491559a4b1586 Release 5.1.0.24N 1059088 Ie7b2b902b646375f21467211f1a4a61361144f3f qcacld-3.0: Avoid TLV check for non WMI wake up reasons 989984 I877dd7af9a58ebc02d73461cc2a29e86a3945dec qcacld-3.0: Add support to mark first packet after wow w 688141 I5da266d9a85c6ddb48372f0094fbb76bc8f7887e Release 5.1.0.24I 688141 I5f5b88d2dc8abdca3aacf84a862cedda686dcbe8 Release 5.1.0.24L 954880 I1151c8af3bbc815216c4ffd9668dd0b6561f222e qcacld-3.0: Send anycast addresses for NS offload 1057742 Iaa51a6eb22c6970d294f503159f98d50ca7a0000 qcacld-3.0: Update incorrect condition in hdd_set_fw_par 688141 I04e11e18cb0c76284e516183344e89244b19c034 Release 5.1.0.24G 1056787 I844903225ec178de7b88cf63b92531e46bdd9fe3 qcacld-3.0: Update default value of gtraffic_threshold 1011976 I40faf63df4e95b367d66e9b51ff165759989a1d1 qcacld-3.0: Drop connect if MFPEnabled is set but AP is 1050438 Ib7b2a67305ddec991fe94016cea09a834e5b4cb5 qcacld-3.0: Map internal PCL weight to the FW weight rep 1058211 I4d5f7c6c69b1a9a527aace1677050373065af213 qcacld-3.0: Set initial dense status in case of dense ro 1001733 I5923a5fc642dd722bf6cc9f5496c7cedcf75e1a5 qcacld-3.0: Move buckets_scanned mask for extscan get ca 688141 I9a96e8df96d37e3a24a6c88722ef728e77c46d9f Release 5.1.0.24Q 954880 Iffaaa9be2e62ea03fcbe3e32d2cc654d3e7334f5 qcacld-3.0: Add HAL command support to set NS offload 688141 I293e525cd22d5c46308c909f0645ddd96e0b62be Release 5.1.0.24E 1039969 I6580b646c97b409453eade527285c97ed8cf86e4 qcacld-3.0: Add Association disallowed functionality for 1032578 I631fb202fba6bc129d03ff21cff2adef328abff2 qcacld-3.0: Do not reset short preamble support and beac 688141 Ibec659ae068b3fffcc23e56113d75059e04466e1 Release 5.1.0.24F 688141 Ic53fb621c6478af190ed14c0597db9813739cc19 Release 5.1.0.24O 1021382 I3d41f5425e3a170c046941a439d17e06df0c6bef qcacld-3.0: Add capability based logic to mark first pac 688141 Id99d09b3b19905f537f8e669e4624123d2381929 Release 5.1.0.24C 1010596 Ie56b86e5c54910648cb2ae8bf2a7dac2ee873e00 qcacld-3.0: Update RRM scan results to user space 1059077 Ic9607179aa5b7dd517f3187716279d0c02199117 qcacld-3.0: Do not try to free if wmi tlv is null after 1010596 I97886b1dbd63fbca21fa410252df572f819df207 qcacld-3.0: Use BSSID for active scan if provided by sup 1010596 Ia5c5a1c2c765d13611b901742910325954ce3d8a qcacld-3.0: Start the scan right away for RRM beacon req 688141 If54e537f33f177e3c53c70bcea03d1cd69d05f53 Release 5.1.0.24H 688141 I5fe51286b1397b113df1e892ccc9da7374e30024 Release 5.1.0.24K 1058745 I3cfa7f74bb121ab74fa18f2237069f41bf3fe736 qcacld-3.0: Start pre cac adapter after opening it 688141 I38d042ee1b8f77290e302fb8279adf7c34f3fb44 Release 5.1.0.24B 1005714 Iffa5d463ae4e807bb30ff6eec5f3949735663fd5 qcacld-3.0: Do not call pr_info while using spin_lock_ir 1058267 I2df6aff0874f37ec934dd9071daf305d8289492c qcacld-3.0: Send adapter status only for valid session 688141 Id20d5cea38015a1a59147c3f70a51cf4a2b5d662 Release 5.1.0.24D Change-Id: I0a36e28286b5aa3e58791668843f2f149f6eb364 CRs-Fixed: 1057261, 1058342, 1060356, 989984, 1058267, 1055648, 1052039, 1059077, 1059088, 1011976, 1058745, 1021382, 1010596, 954880, 1056197, 1059065, 1050438, 1058211, 688141, 1056787, 1039969, 1001733, 1032578, 1005714, 1048394, 1057742
-rw-r--r--config/WCNSS_qcom_cfg.ini2
-rw-r--r--core/cds/inc/cds_concurrency.h1
-rw-r--r--core/cds/src/cds_api.c3
-rw-r--r--core/cds/src/cds_concurrency.c41
-rw-r--r--core/cds/src/cds_utils.c4
-rw-r--r--core/dp/htt/htt.c20
-rw-r--r--core/dp/htt/htt_internal.h1
-rw-r--r--core/dp/htt/htt_rx.c10
-rw-r--r--core/dp/htt/htt_types.h1
-rw-r--r--core/dp/ol/inc/ol_htt_api.h1
-rw-r--r--core/dp/ol/inc/ol_txrx_ctrl_api.h2
-rw-r--r--core/dp/txrx/ol_txrx.c20
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h6
-rw-r--r--core/hdd/inc/wlan_hdd_main.h6
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c15
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c130
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.h26
-rw-r--r--core/hdd/src/wlan_hdd_ext_scan.c16
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c4
-rw-r--r--core/hdd/src/wlan_hdd_lpass.c4
-rw-r--r--core/hdd/src/wlan_hdd_main.c94
-rw-r--r--core/hdd/src/wlan_hdd_power.c186
-rw-r--r--core/hdd/src/wlan_hdd_scan.c25
-rw-r--r--core/mac/inc/qwlan_version.h4
-rw-r--r--core/mac/inc/sir_api.h5
-rw-r--r--core/mac/inc/sir_mac_prot_def.h2
-rw-r--r--core/mac/src/cfg/cfgUtil/dot11f.frms9
-rw-r--r--core/mac/src/include/dot11f.h52
-rw-r--r--core/mac/src/include/parser_api.h5
-rw-r--r--core/mac/src/include/sir_params.h2
-rw-r--r--core/mac/src/pe/lim/lim_process_beacon_frame.c10
-rw-r--r--core/mac/src/pe/lim/lim_process_probe_rsp_frame.c20
-rw-r--r--core/mac/src/pe/lim/lim_session.c14
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/dot11f.c251
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/parser_api.c39
-rw-r--r--core/sme/inc/csr_api.h1
-rw-r--r--core/sme/inc/csr_internal.h1
-rw-r--r--core/sme/src/csr/csr_api_roam.c7
-rw-r--r--core/sme/src/csr/csr_api_scan.c28
-rw-r--r--core/sme/src/rrm/sme_rrm.c42
-rw-r--r--core/utils/logging/src/wlan_logging_sock_svc.c19
-rw-r--r--core/wma/src/wma_features.c17
-rw-r--r--core/wma/src/wma_main.c37
-rw-r--r--core/wma/src/wma_scan_roam.c14
-rw-r--r--target/inc/wal_rx_desc.h3
45 files changed, 947 insertions, 253 deletions
diff --git a/config/WCNSS_qcom_cfg.ini b/config/WCNSS_qcom_cfg.ini
index d5b761b6ae7e..4edcf8088799 100644
--- a/config/WCNSS_qcom_cfg.ini
+++ b/config/WCNSS_qcom_cfg.ini
@@ -378,7 +378,7 @@ gEnableRXSTBC=1
gEnableTXSTBC=1
# 1=enable rx LDPC; 0=disable
-gEnableRXLDPC=0
+gEnableRXLDPC=1
#Enable/Disable Tx beamforming
gTxBFEnable=1
diff --git a/core/cds/inc/cds_concurrency.h b/core/cds/inc/cds_concurrency.h
index 997af35553ee..756ea15d760e 100644
--- a/core/cds/inc/cds_concurrency.h
+++ b/core/cds/inc/cds_concurrency.h
@@ -64,6 +64,7 @@
(WEIGHT_OF_GROUP2_PCL_CHANNELS - PCL_GROUPS_WEIGHT_DIFFERENCE)
#define WEIGHT_OF_NON_PCL_CHANNELS 1
+#define WEIGHT_OF_DISALLOWED_CHANNELS 0
/**
* enum hw_mode_ss_config - Possible spatial stream configuration
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c
index 998853eec11b..acfae2518ce4 100644
--- a/core/cds/src/cds_api.c
+++ b/core/cds/src/cds_api.c
@@ -268,7 +268,6 @@ QDF_STATUS cds_open(void)
goto err_sched_close;
}
- hdd_update_config(pHddCtx);
cds_cfg = cds_get_ini_config();
if (!cds_cfg) {
cds_err("Cds config is NULL");
@@ -2191,7 +2190,7 @@ void cds_deinit_ini_config(void)
return;
}
- if (!cds_ctx->cds_cfg)
+ if (cds_ctx->cds_cfg)
qdf_mem_free(cds_ctx->cds_cfg);
cds_ctx->cds_cfg = NULL;
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index c4a61b468ca3..da86a9454a65 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -8699,6 +8699,14 @@ QDF_STATUS cds_get_sap_mandatory_channel(uint32_t *chan)
QDF_STATUS cds_get_valid_chan_weights(struct sir_pcl_chan_weights *weight)
{
uint32_t i, j;
+ cds_context_type *cds_ctx;
+ struct cds_conc_connection_info info;
+
+ cds_ctx = cds_get_context(QDF_MODULE_ID_QDF);
+ if (!cds_ctx) {
+ cds_err("Invalid CDS Context");
+ return QDF_STATUS_E_FAILURE;
+ }
if (!weight->pcl_list) {
cds_err("Invalid pcl");
@@ -8715,8 +8723,39 @@ QDF_STATUS cds_get_valid_chan_weights(struct sir_pcl_chan_weights *weight)
return QDF_STATUS_E_FAILURE;
}
+ qdf_mem_set(weight->weighed_valid_list, QDF_MAX_NUM_CHAN,
+ WEIGHT_OF_DISALLOWED_CHANNELS);
+
+ qdf_mutex_acquire(&cds_ctx->qdf_conc_list_lock);
+ if (cds_mode_specific_connection_count(CDS_STA_MODE, NULL) > 0) {
+ /*
+ * Store the STA mode's parameter and temporarily delete it
+ * from the concurrency table. This way the allow concurrency
+ * check can be used as though a new connection is coming up,
+ * allowing to detect the disallowed channels.
+ */
+ cds_store_and_del_conn_info(CDS_STA_MODE, &info);
+ qdf_mutex_release(&cds_ctx->qdf_conc_list_lock);
+ /*
+ * There is a small window between releasing the above lock
+ * and acquiring the same in cds_allow_concurrency, below!
+ */
+ for (i = 0; i < weight->saved_num_chan; i++) {
+ if (cds_allow_concurrency(CDS_STA_MODE,
+ weight->saved_chan_list[i],
+ HW_MODE_20_MHZ)) {
+ weight->weighed_valid_list[i] =
+ WEIGHT_OF_NON_PCL_CHANNELS;
+ }
+ }
+
+ qdf_mutex_acquire(&cds_ctx->qdf_conc_list_lock);
+ /* Restore the connection info */
+ cds_restore_deleted_conn_info(&info);
+ }
+ qdf_mutex_release(&cds_ctx->qdf_conc_list_lock);
+
for (i = 0; i < weight->saved_num_chan; i++) {
- weight->weighed_valid_list[i] = WEIGHT_OF_NON_PCL_CHANNELS;
for (j = 0; j < weight->pcl_len; j++) {
if (weight->saved_chan_list[i] == weight->pcl_list[j]) {
weight->weighed_valid_list[i] =
diff --git a/core/cds/src/cds_utils.c b/core/cds/src/cds_utils.c
index 68726fdee775..67d6d3f2494f 100644
--- a/core/cds/src/cds_utils.c
+++ b/core/cds/src/cds_utils.c
@@ -483,7 +483,7 @@ cds_is_mmie_valid(uint8_t *igtk, uint8_t *ipn, uint8_t *frm, uint8_t *efrm)
/* Validate IPN */
rx_ipn = mmie->sequence_number;
- if (OS_MEMCMP(rx_ipn, ipn, CMAC_IPN_LEN) > 0) {
+ if (OS_MEMCMP(rx_ipn, ipn, CMAC_IPN_LEN) <= 0) {
/* Replay error */
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
"Replay error mmie ipn %02X %02X %02X %02X %02X %02X"
@@ -546,7 +546,7 @@ cds_is_mmie_valid(uint8_t *igtk, uint8_t *ipn, uint8_t *frm, uint8_t *efrm)
mic[0], mic[1], mic[2], mic[3],
mic[4], mic[5], mic[6], mic[7]);
- if (OS_MEMCMP(mic, mmie->mic, CMAC_TLEN) == 0) {
+ if (OS_MEMCMP(mic, mmie->mic, CMAC_TLEN) != 0) {
/* MMIE MIC mismatch */
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
"BC/MC MGMT frame MMIE MIC check Failed"
diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c
index 857b25cd4a34..4664a42fcbea 100644
--- a/core/dp/htt/htt.c
+++ b/core/dp/htt/htt.c
@@ -813,3 +813,23 @@ htt_ipa_uc_set_doorbell_paddr(htt_pdev_handle pdev,
return 0;
}
#endif /* IPA_OFFLOAD */
+
+/**
+ * htt_mark_first_wakeup_packet() - set flag to indicate that
+ * fw is compatible for marking first packet after wow wakeup
+ * @pdev: pointer to htt pdev
+ * @value: 1 for enabled/ 0 for disabled
+ *
+ * Return: None
+ */
+void htt_mark_first_wakeup_packet(htt_pdev_handle pdev,
+ uint8_t value)
+{
+ if (!pdev) {
+ qdf_print("%s: htt pdev is NULL", __func__);
+ return;
+ }
+
+ pdev->cfg.is_first_wakeup_packet = value;
+}
+
diff --git a/core/dp/htt/htt_internal.h b/core/dp/htt/htt_internal.h
index 98b129c4efb6..e5d009dc587b 100644
--- a/core/dp/htt/htt_internal.h
+++ b/core/dp/htt/htt_internal.h
@@ -58,6 +58,7 @@ struct htt_host_fw_desc_base {
} u;
};
+
/*
* This struct defines the basic descriptor information used by host,
* which is written either by the 11ac HW MAC into the host Rx data
diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c
index 3462c827dec9..161b27505a68 100644
--- a/core/dp/htt/htt_rx.c
+++ b/core/dp/htt/htt_rx.c
@@ -1448,6 +1448,16 @@ htt_rx_offload_paddr_msdu_pop_ll(htt_pdev_handle pdev,
#else
qdf_nbuf_unmap(pdev->osdev, buf, QDF_DMA_FROM_DEVICE);
#endif
+
+ if (pdev->cfg.is_first_wakeup_packet) {
+ if (HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_GET(*(curr_msdu + 1)) &
+ FW_MSDU_INFO_FIRST_WAKEUP_M) {
+ qdf_nbuf_mark_wakeup_frame(buf);
+ qdf_print("%s: First packet after WOW Wakeup rcvd\n",
+ __func__);
+ }
+ }
+
msdu_hdr = (uint32_t *) qdf_nbuf_data(buf);
/* First dword */
diff --git a/core/dp/htt/htt_types.h b/core/dp/htt/htt_types.h
index 074b4b039f96..65c4777f59c2 100644
--- a/core/dp/htt/htt_types.h
+++ b/core/dp/htt/htt_types.h
@@ -252,6 +252,7 @@ struct htt_pdev_t {
int is_full_reorder_offload;
int default_tx_comp_req;
int ce_classify_enabled;
+ uint8_t is_first_wakeup_packet;
} cfg;
struct {
uint8_t major;
diff --git a/core/dp/ol/inc/ol_htt_api.h b/core/dp/ol/inc/ol_htt_api.h
index e97ffb55826a..21da2649125c 100644
--- a/core/dp/ol/inc/ol_htt_api.h
+++ b/core/dp/ol/inc/ol_htt_api.h
@@ -383,5 +383,6 @@ static inline void htt_clear_bundle_stats(struct htt_pdev_t *pdev)
}
#endif
+void htt_mark_first_wakeup_packet(htt_pdev_handle pdev, uint8_t value);
#endif /* _OL_HTT_API__H_ */
diff --git a/core/dp/ol/inc/ol_txrx_ctrl_api.h b/core/dp/ol/inc/ol_txrx_ctrl_api.h
index 602d31a7b82c..a5dbcacbf3ec 100644
--- a/core/dp/ol/inc/ol_txrx_ctrl_api.h
+++ b/core/dp/ol/inc/ol_txrx_ctrl_api.h
@@ -668,4 +668,6 @@ static inline int ol_tx_delete_flow_pool(struct ol_tx_flow_pool_t *pool,
}
#endif
+void ol_tx_mark_first_wakeup_packet(uint8_t value);
+
#endif /* _OL_TXRX_CTRL_API__H_ */
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c
index 0592b158fa3f..e4f6c5554100 100644
--- a/core/dp/txrx/ol_txrx.c
+++ b/core/dp/txrx/ol_txrx.c
@@ -169,6 +169,26 @@ ol_txrx_update_last_real_peer(
}
#endif
+/**
+ * ol_tx_mark_first_wakeup_packet() - set flag to indicate that
+ * fw is compatible for marking first packet after wow wakeup
+ * @value: 1 for enabled/ 0 for disabled
+ *
+ * Return: None
+ */
+void ol_tx_mark_first_wakeup_packet(uint8_t value)
+{
+ struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
+
+ if (!pdev) {
+ TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
+ "%s: pdev is NULL\n", __func__);
+ return;
+ }
+
+ htt_mark_first_wakeup_packet(pdev->htt_pdev, value);
+}
+
u_int16_t
ol_tx_desc_pool_size_hl(ol_pdev_handle ctrl_pdev)
{
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 2d51b340304c..7e6fca126714 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -3124,12 +3124,12 @@ enum dot11p_mode {
/*
* Dense traffic threshold
* traffic threshold required for dense roam scan
- * not used currently
+ * Measured in kbps
*/
#define CFG_ROAM_DENSE_TRAFFIC_THRESHOLD "gtraffic_threshold"
#define CFG_ROAM_DENSE_TRAFFIC_THRESHOLD_MIN (0)
-#define CFG_ROAM_DENSE_TRAFFIC_THRESHOLD_MAX (100)
-#define CFG_ROAM_DENSE_TRAFFIC_THRESHOLD_DEFAULT (55)
+#define CFG_ROAM_DENSE_TRAFFIC_THRESHOLD_MAX (0xffffffff)
+#define CFG_ROAM_DENSE_TRAFFIC_THRESHOLD_DEFAULT (400)
/*
* Dense Roam RSSI Threshold diff
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index ab0ea8af9f10..c40aaa33336b 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -113,9 +113,9 @@
/** Maximum time(ms)to wait for disconnect to complete **/
#ifdef QCA_WIFI_3_0_EMU
-#define WLAN_WAIT_TIME_DISCONNECT 3000
+#define WLAN_WAIT_TIME_DISCONNECT 5000
#else
-#define WLAN_WAIT_TIME_DISCONNECT 2000
+#define WLAN_WAIT_TIME_DISCONNECT 5000
#endif
#define WLAN_WAIT_TIME_STATS 800
#define WLAN_WAIT_TIME_POWER 800
@@ -1415,10 +1415,12 @@ struct hdd_context_s {
qdf_spinlock_t hdd_scan_req_q_lock;
qdf_list_t hdd_scan_req_q;
uint8_t miracast_value;
+
#ifdef WLAN_NS_OFFLOAD
/* IPv6 notifier callback for handling NS offload on change in IP */
struct notifier_block ipv6_notifier;
#endif
+ bool ns_offload_enable;
/* IPv4 notifier callback for handling ARP offload on change in IP */
struct notifier_block ipv4_notifier;
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index bed513cd29ae..9c64dd789caa 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -4605,6 +4605,7 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId,
QDF_STATUS status = QDF_STATUS_SUCCESS;
hdd_context_t *pHddCtx = NULL;
struct hdd_chan_change_params chan_change;
+ struct cfg80211_bss *bss_status;
hddLog(LOG2,
"CSR Callback: status= %d result= %d roamID=%d",
@@ -4966,6 +4967,20 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId,
if (QDF_IS_STATUS_ERROR(status))
hdd_info("set hw mode change not done");
break;
+ case eCSR_ROAM_UPDATE_SCAN_RESULT:
+ if ((NULL != pRoamInfo) && (NULL != pRoamInfo->pBssDesc)) {
+ bss_status = wlan_hdd_cfg80211_inform_bss_frame(
+ pAdapter, pRoamInfo->pBssDesc);
+ if (NULL == bss_status)
+ hdd_info("UPDATE_SCAN_RESULT returned NULL");
+ else
+ cfg80211_put_bss(
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)) || defined(WITH_BACKPORTS)
+ (WLAN_HDD_GET_CTX(pAdapter))->wiphy,
+#endif
+ bss_status);
+ }
+ break;
case eCSR_ROAM_NDP_STATUS_UPDATE:
hdd_ndp_event_handler(pAdapter, pRoamInfo, roamId, roamStatus,
roamResult);
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 821e88cd3910..cf517223652e 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -4817,6 +4817,79 @@ fail:
return;
}
+static const struct nla_policy
+ns_offload_set_policy[QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_MAX + 1] = {
+ [QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_FLAG] = {.type = NLA_U8},
+};
+
+/**
+ * __wlan_hdd_cfg80211_set_ns_offload() - enable/disable NS offload
+ * @wiphy: Pointer to wireless phy
+ * @wdev: Pointer to wireless device
+ * @data: Pointer to data
+ * @data_len: Length of @data
+ *
+ * Return: 0 on success, negative errno on failure
+ */
+static int
+__wlan_hdd_cfg80211_set_ns_offload(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data, int data_len)
+{
+ int status;
+ struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_MAX + 1];
+ hdd_context_t *pHddCtx = wiphy_priv(wiphy);
+
+ ENTER_DEV(wdev->netdev);
+
+ status = wlan_hdd_validate_context(pHddCtx);
+ if (0 != status)
+ return status;
+ if (!pHddCtx->config->fhostNSOffload) {
+ hdd_err("ND Offload not supported");
+ return -EINVAL;
+ }
+
+ if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_MAX,
+ (struct nlattr *)data,
+ data_len, ns_offload_set_policy)) {
+ hdd_err("nla_parse failed");
+ return -EINVAL;
+ }
+
+ if (!tb[QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_FLAG]) {
+ hdd_err("ND Offload flag attribute not present");
+ return -EINVAL;
+ }
+
+ pHddCtx->ns_offload_enable =
+ nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_FLAG]);
+
+ return 0;
+}
+
+/**
+ * wlan_hdd_cfg80211_set_ns_offload() - enable/disable NS offload
+ * @wiphy: pointer to wireless wiphy structure.
+ * @wdev: pointer to wireless_dev structure.
+ * @data: Pointer to the data to be passed via vendor interface
+ * @data_len:Length of the data to be passed
+ *
+ * Return: Return the Success or Failure code.
+ */
+static int wlan_hdd_cfg80211_set_ns_offload(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data, int data_len)
+{
+ int ret;
+
+ cds_ssr_protect(__func__);
+ ret = __wlan_hdd_cfg80211_set_ns_offload(wiphy, wdev, data, data_len);
+ cds_ssr_unprotect(__func__);
+
+ return ret;
+}
+
/** __wlan_hdd_cfg80211_get_preferred_freq_list() - get preferred frequency list
* @wiphy: Pointer to wireless phy
* @wdev: Pointer to wireless device
@@ -6562,10 +6635,20 @@ int wlan_hdd_request_pre_cac(uint8_t channel)
wlan_hdd_get_intf_addr(hdd_ctx),
NET_NAME_UNKNOWN, true);
if (!pre_cac_adapter) {
- hdd_err("error starting pre cac adapter");
+ hdd_err("error opening the pre cac adapter");
return -EINVAL;
}
+ /*
+ * This interface is internally created by the driver. So, no interface
+ * up comes for this interface from user space and hence starting
+ * the adapter internally.
+ */
+ if (hdd_start_adapter(pre_cac_adapter)) {
+ hdd_err("error starting the pre cac adapter");
+ goto close_pre_cac_adapter;
+ }
+
hdd_debug("preparing for start ap/bss on the pre cac adapter");
wiphy = hdd_ctx->wiphy;
@@ -6579,7 +6662,7 @@ int wlan_hdd_request_pre_cac(uint8_t channel)
sizeof(*ap_adapter->sessionCtx.ap.beacon));
if (!pre_cac_adapter->sessionCtx.ap.beacon) {
hdd_err("failed to alloc mem for beacon");
- goto close_pre_cac_adapter;
+ goto stop_close_pre_cac_adapter;
}
qdf_mem_copy(pre_cac_adapter->sessionCtx.ap.beacon,
ap_adapter->sessionCtx.ap.beacon,
@@ -6613,7 +6696,7 @@ int wlan_hdd_request_pre_cac(uint8_t channel)
chan = __ieee80211_get_channel(wiphy, freq);
if (!chan) {
hdd_err("channel converion failed");
- goto close_pre_cac_adapter;
+ goto stop_close_pre_cac_adapter;
}
cfg80211_chandef_create(&chandef, chan, channel_type);
@@ -6625,7 +6708,7 @@ int wlan_hdd_request_pre_cac(uint8_t channel)
ret = wlan_hdd_set_channel(wiphy, dev, &chandef, channel_type);
if (0 != ret) {
hdd_err("failed to set channel");
- goto close_pre_cac_adapter;
+ goto stop_close_pre_cac_adapter;
}
status = wlan_hdd_cfg80211_start_bss(pre_cac_adapter, NULL,
@@ -6633,7 +6716,7 @@ int wlan_hdd_request_pre_cac(uint8_t channel)
eHIDDEN_SSID_NOT_IN_USE, false);
if (QDF_IS_STATUS_ERROR(status)) {
hdd_err("start bss failed");
- goto close_pre_cac_adapter;
+ goto stop_close_pre_cac_adapter;
}
/*
@@ -6644,25 +6727,25 @@ int wlan_hdd_request_pre_cac(uint8_t channel)
ret = wlan_hdd_set_pre_cac_status(pre_cac_adapter, true, handle);
if (0 != ret) {
hdd_err("failed to set pre cac status");
- goto stop_pre_cac_adapter;
+ goto stop_close_pre_cac_adapter;
}
ret = wlan_hdd_set_chan_before_pre_cac(ap_adapter,
hdd_ap_ctx->operatingChannel);
if (0 != ret) {
hdd_err("failed to set channel before pre cac");
- goto stop_pre_cac_adapter;
+ goto stop_close_pre_cac_adapter;
}
ap_adapter->pre_cac_chan = pre_cac_chan;
return 0;
-stop_pre_cac_adapter:
- hdd_stop_adapter(hdd_ctx, pre_cac_adapter, false);
-close_pre_cac_adapter:
+stop_close_pre_cac_adapter:
+ hdd_stop_adapter(hdd_ctx, pre_cac_adapter, true);
qdf_mem_free(pre_cac_adapter->sessionCtx.ap.beacon);
pre_cac_adapter->sessionCtx.ap.beacon = NULL;
+close_pre_cac_adapter:
hdd_close_adapter(hdd_ctx, pre_cac_adapter, false);
return -EINVAL;
}
@@ -7404,6 +7487,14 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = {
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
+ .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_ND_OFFLOAD,
+ .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
+ WIPHY_VENDOR_CMD_NEED_NETDEV |
+ WIPHY_VENDOR_CMD_NEED_RUNNING,
+ .doit = wlan_hdd_cfg80211_set_ns_offload
+ },
+ {
+ .info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_LOGGER_FEATURE_SET,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
@@ -9612,9 +9703,8 @@ struct cfg80211_bss *wlan_hdd_cfg80211_update_bss_list(hdd_adapter_t *pAdapter,
*
* Return: struct cfg80211_bss pointer
*/
-static struct cfg80211_bss *
-wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
- tSirBssDescription *bss_desc)
+struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
+ tSirBssDescription *bss_desc)
{
/*
* cfg80211_inform_bss() is not updating ie field of bss entry, if entry
@@ -10413,6 +10503,20 @@ static int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter,
}
hdd_select_cbmode(pAdapter, operatingChannel);
}
+ /*
+ * if MFPEnabled is set but the peer AP is non-PMF i.e 80211w=2
+ * or pmf=2 is an explicit configuration in the supplicant
+ * configuration, drop the connection request.
+ */
+ if (pWextState->roamProfile.MFPEnabled &&
+ !(pWextState->roamProfile.MFPRequired ||
+ pWextState->roamProfile.MFPCapable)) {
+ hdd_err("Drop connect req as supplicant has indicated PMF req for a non-PMF peer. MFPEnabled %d MFPRequired %d MFPCapable %d",
+ pWextState->roamProfile.MFPEnabled,
+ pWextState->roamProfile.MFPRequired,
+ pWextState->roamProfile.MFPCapable);
+ return -EINVAL;
+ }
if (true == cds_is_connection_in_progress()) {
hdd_err("Connection refused: conn in progress");
diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h
index 3edf6cbceda9..ba117961a7d2 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.h
+++ b/core/hdd/src/wlan_hdd_cfg80211.h
@@ -373,6 +373,9 @@ enum qca_nl80211_vendor_subcmds {
QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI = 80,
QCA_NL80211_VENDOR_SUBCMD_NDP = 81,
+ /* NS Offload enable/disable cmd */
+ QCA_NL80211_VENDOR_SUBCMD_ND_OFFLOAD = 82,
+
QCA_NL80211_VENDOR_SUBCMD_PACKET_FILTER = 83,
QCA_NL80211_VENDOR_SUBCMD_GET_WAKE_REASON_STATS = 85,
@@ -2080,6 +2083,27 @@ enum qca_wlan_vendor_attr_link_properties {
};
/**
+ * enum qca_wlan_vendor_attr_nd_offload - vendor NS offload support
+ *
+ * @QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_INVALID - Invalid
+ * @QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_FLAG - Flag to set NS offload
+ * @QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_AFTER_LAST - To keep track of the last enum
+ * @QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_MAX - max value possible for this type
+ *
+ * enum values are used for NL attributes for data used by
+ * QCA_NL80211_VENDOR_SUBCMD_ND_OFFLOAD sub command.
+ */
+enum qca_wlan_vendor_attr_nd_offload {
+ QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_INVALID = 0,
+ QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_FLAG,
+
+ /* Keep last */
+ QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_AFTER_LAST,
+ QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_MAX =
+ QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_AFTER_LAST - 1,
+};
+
+/**
* enum qca_wlan_vendor_features - vendor device/driver features
* @QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD: Device supports key
* management offload, a mechanism where the station's firmware
@@ -2900,4 +2924,6 @@ static inline void wlan_hdd_cfg80211_indicate_disconnect(struct net_device *dev,
GFP_KERNEL);
}
#endif
+struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
+ tSirBssDescription *bss_desc);
#endif
diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c
index 6d99b958331d..51111af70f79 100644
--- a/core/hdd/src/wlan_hdd_ext_scan.c
+++ b/core/hdd/src/wlan_hdd_ext_scan.c
@@ -316,12 +316,12 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
#define EXTSCAN_CACHED_NL_FIXED_TLV \
((sizeof(data->request_id) + NLA_HDRLEN) + \
(sizeof(data->num_scan_ids) + NLA_HDRLEN) + \
- (sizeof(data->buckets_scanned) + NLA_HDRLEN)+ \
(sizeof(data->more_data) + NLA_HDRLEN))
#define EXTSCAN_CACHED_NL_SCAN_ID_TLV \
((sizeof(result->scan_id) + NLA_HDRLEN) + \
(sizeof(result->flags) + NLA_HDRLEN) + \
- (sizeof(result->num_results) + NLA_HDRLEN))
+ (sizeof(result->num_results) + NLA_HDRLEN))+ \
+ (sizeof(result->buckets_scanned) + NLA_HDRLEN)
#define EXTSCAN_CACHED_NL_SCAN_RESULTS_TLV \
((sizeof(ap->ts) + NLA_HDRLEN) + \
(sizeof(ap->ssid) + NLA_HDRLEN) + \
@@ -368,14 +368,14 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
hdd_err("cfg80211_vendor_cmd_alloc_reply_skb failed");
goto fail;
}
- hdd_notice("Req Id %u Num_scan_ids %u More Data %u buckets_scanned %u",
- data->request_id, data->num_scan_ids, data->more_data,
- data->buckets_scanned);
+ hdd_notice("Req Id %u Num_scan_ids %u More Data %u",
+ data->request_id, data->num_scan_ids, data->more_data);
result = &data->result[0];
for (i = 0; i < data->num_scan_ids; i++) {
- hdd_notice("[i=%d] scan_id %u flags %u num_results %u",
- i, result->scan_id, result->flags, result->num_results);
+ hdd_notice("[i=%d] scan_id %u flags %u num_results %u buckets scanned %u",
+ i, result->scan_id, result->flags, result->num_results,
+ result->buckets_scanned);
ap = &result->ap[0];
for (j = 0; j < result->num_results; j++) {
@@ -455,7 +455,7 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
result->flags) ||
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_BUCKETS_SCANNED,
- data->buckets_scanned) ||
+ result->buckets_scanned) ||
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_NUM_RESULTS_AVAILABLE,
result->num_results)) {
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 22f74ef1ef36..9ea29f4b5d53 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -898,7 +898,7 @@ void wlan_hdd_sap_pre_cac_failure(void *data)
}
cds_ssr_protect(__func__);
- hdd_stop_adapter(hdd_ctx, pHostapdAdapter, false);
+ hdd_stop_adapter(hdd_ctx, pHostapdAdapter, true);
hdd_close_adapter(hdd_ctx, pHostapdAdapter, false);
cds_ssr_unprotect(__func__);
}
@@ -934,7 +934,7 @@ static void wlan_hdd_sap_pre_cac_success(void *data)
}
cds_ssr_protect(__func__);
- hdd_stop_adapter(hdd_ctx, pHostapdAdapter, false);
+ hdd_stop_adapter(hdd_ctx, pHostapdAdapter, true);
hdd_close_adapter(hdd_ctx, pHostapdAdapter, false);
cds_ssr_unprotect(__func__);
diff --git a/core/hdd/src/wlan_hdd_lpass.c b/core/hdd/src/wlan_hdd_lpass.c
index 34f97eb862cc..38a149e223c3 100644
--- a/core/hdd/src/wlan_hdd_lpass.c
+++ b/core/hdd/src/wlan_hdd_lpass.c
@@ -77,6 +77,9 @@ static int wlan_hdd_gen_wlan_status_pack(struct wlan_status_data *data,
return -EINVAL;
}
+ if (adapter->sessionId == HDD_SESSION_ID_INVALID)
+ return -EINVAL;
+
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
if (hdd_ctx->lpss_support && hdd_ctx->config->enable_lpass_support)
data->lpss_support = 1;
@@ -171,6 +174,7 @@ void wlan_hdd_send_status_pkg(hdd_adapter_t *adapter,
if (is_on)
ret = wlan_hdd_gen_wlan_status_pack(&data, adapter, sta_ctx,
is_on, is_connected);
+
if (!ret)
wlan_hdd_send_svc_nlink_msg(WLAN_SVC_WLAN_STATUS_IND,
&data, sizeof(data));
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 19f1099c3bce..c9251c4a7c0b 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -1720,12 +1720,23 @@ int hdd_wlan_start_modules(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
}
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
+ if (!hif_ctx) {
+ hdd_err("hif context is null!!");
+ goto power_down;
+ }
+
status = ol_cds_init(qdf_dev, hif_ctx);
if (status != QDF_STATUS_SUCCESS) {
hdd_err("No Memory to Create BMI Context :%d", status);
goto hif_close;
}
+ ret = hdd_update_config(hdd_ctx);
+ if (ret) {
+ hdd_err("Failed to update configuration :%d", ret);
+ goto ol_cds_free;
+ }
+
status = cds_open();
if (!QDF_IS_STATUS_SUCCESS(status)) {
hdd_err("Failed to Open CDS: %d", status);
@@ -2924,51 +2935,51 @@ int hdd_set_fw_params(hdd_adapter_t *adapter)
if (!hdd_ctx)
return -EINVAL;
- if ((cds_get_conparam() != QDF_GLOBAL_FTM_MODE) ||
+ if ((cds_get_conparam() != QDF_GLOBAL_FTM_MODE) &&
(!hdd_ctx->config->enable2x2)) {
- hdd_info("enable2x2 not enabled in INI or in FTM mode return");
- return 0;
- }
#define HDD_DTIM_1CHAIN_RX_ID 0x5
#define HDD_SMPS_PARAM_VALUE_S 29
+ /*
+ * Disable DTIM 1 chain Rx when in 1x1,
+ * we are passing two value
+ * as param_id << 29 | param_value.
+ * Below param_value = 0(disable)
+ */
+ ret = wma_cli_set_command(adapter->sessionId,
+ WMI_STA_SMPS_PARAM_CMDID,
+ HDD_DTIM_1CHAIN_RX_ID <<
+ HDD_SMPS_PARAM_VALUE_S,
+ VDEV_CMD);
+ if (ret) {
+ hdd_err("DTIM 1 chain set failed %d", ret);
+ goto error;
+ }
- /*
- * Disable DTIM 1 chain Rx when in 1x1,
- * we are passing two value
- * as param_id << 29 | param_value.
- * Below param_value = 0(disable)
- */
- ret = wma_cli_set_command(adapter->sessionId,
- WMI_STA_SMPS_PARAM_CMDID,
- HDD_DTIM_1CHAIN_RX_ID <<
- HDD_SMPS_PARAM_VALUE_S,
- VDEV_CMD);
- if (ret) {
- hdd_err("DTIM 1 chain set failed %d", ret);
- goto error;
- }
-
- ret = wma_cli_set_command(adapter->sessionId,
- WMI_PDEV_PARAM_TX_CHAIN_MASK,
- hdd_ctx->config->txchainmask1x1,
- PDEV_CMD);
- if (ret) {
- hdd_err("WMI_PDEV_PARAM_TX_CHAIN_MASK set failed %d",
- ret);
- goto error;
- }
+ ret = wma_cli_set_command(adapter->sessionId,
+ WMI_PDEV_PARAM_TX_CHAIN_MASK,
+ hdd_ctx->config->txchainmask1x1,
+ PDEV_CMD);
+ if (ret) {
+ hdd_err("WMI_PDEV_PARAM_TX_CHAIN_MASK set failed %d",
+ ret);
+ goto error;
+ }
- ret = wma_cli_set_command(adapter->sessionId,
- WMI_PDEV_PARAM_RX_CHAIN_MASK,
- hdd_ctx->config->rxchainmask1x1,
- PDEV_CMD);
- if (ret) {
- hdd_err("WMI_PDEV_PARAM_RX_CHAIN_MASK set failed %d",
- ret);
- goto error;
- }
+ ret = wma_cli_set_command(adapter->sessionId,
+ WMI_PDEV_PARAM_RX_CHAIN_MASK,
+ hdd_ctx->config->rxchainmask1x1,
+ PDEV_CMD);
+ if (ret) {
+ hdd_err("WMI_PDEV_PARAM_RX_CHAIN_MASK set failed %d",
+ ret);
+ goto error;
+ }
#undef HDD_DTIM_1CHAIN_RX_ID
#undef HDD_SMPS_PARAM_VALUE_S
+ } else {
+ hdd_info("FTM Mode or 2x2 mode - Do not set 1x1 params");
+ }
+
if (QDF_GLOBAL_FTM_MODE != cds_get_conparam()) {
ret = wma_cli_set_command(adapter->sessionId,
WMI_PDEV_PARAM_HYST_EN,
@@ -6055,6 +6066,9 @@ hdd_context_t *hdd_context_create(struct device *dev)
hdd_notice("Setting configuredMcastBcastFilter: %d",
hdd_ctx->config->mcastBcastFilterSetting);
+ if (hdd_ctx->config->fhostNSOffload)
+ hdd_ctx->ns_offload_enable = true;
+
cds_set_fatal_event(hdd_ctx->config->enable_fatal_event);
hdd_override_ini_config(hdd_ctx);
@@ -7376,10 +7390,6 @@ int hdd_wlan_startup(struct device *dev)
hdd_wlan_green_ap_init(hdd_ctx);
- ret = hdd_update_config(hdd_ctx);
- if (ret)
- goto err_exit_nl_srv;
-
ret = hdd_wlan_start_modules(hdd_ctx, adapter, false);
if (ret) {
hdd_alert("Failed to start modules: %d", ret);
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index dde5cbbeba17..45783e98c5d1 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -287,6 +287,91 @@ int wlan_hdd_ipv6_changed(struct notifier_block *nb,
}
/**
+ * hdd_fill_ipv6_uc_addr() - fill IPv6 unicast addresses
+ * @idev: pointer to net device
+ * @ipv6addr: destination array to fill IPv6 addresses
+ * @ipv6addr_type: IPv6 Address type
+ * @count: number of IPv6 addresses
+ *
+ * This is the IPv6 utility function to populate unicast addresses.
+ *
+ * Return: 0 on success, error number otherwise.
+ */
+static int hdd_fill_ipv6_uc_addr(struct inet6_dev *idev,
+ uint8_t ipv6_uc_addr[][SIR_MAC_IPV6_ADDR_LEN],
+ uint8_t *ipv6addr_type, uint32_t *count)
+{
+ struct inet6_ifaddr *ifa;
+ struct list_head *p;
+ uint32_t scope;
+
+ list_for_each(p, &idev->addr_list) {
+ if (*count >= SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA)
+ return -EINVAL;
+ ifa = list_entry(p, struct inet6_ifaddr, if_list);
+ if (ifa->flags & IFA_F_DADFAILED)
+ continue;
+ scope = ipv6_addr_src_scope(&ifa->addr);
+ switch (scope) {
+ case IPV6_ADDR_SCOPE_GLOBAL:
+ case IPV6_ADDR_SCOPE_LINKLOCAL:
+ qdf_mem_copy(ipv6_uc_addr[*count], &ifa->addr.s6_addr,
+ sizeof(ifa->addr.s6_addr));
+ ipv6addr_type[*count] = SIR_IPV6_ADDR_UC_TYPE;
+ hdd_info("Index %d scope = %s UC-Address: %pI6",
+ *count, (scope == IPV6_ADDR_SCOPE_LINKLOCAL) ?
+ "LINK LOCAL" : "GLOBAL", ipv6_uc_addr[*count]);
+ *count += 1;
+ break;
+ default:
+ hdd_err("The Scope %d is not supported", scope);
+ }
+ }
+ return 0;
+}
+
+/**
+ * hdd_fill_ipv6_ac_addr() - fill IPv6 anycast addresses
+ * @idev: pointer to net device
+ * @ipv6addr: destination array to fill IPv6 addresses
+ * @ipv6addr_type: IPv6 Address type
+ * @count: number of IPv6 addresses
+ *
+ * This is the IPv6 utility function to populate anycast addresses.
+ *
+ * Return: 0 on success, error number otherwise.
+ */
+static int hdd_fill_ipv6_ac_addr(struct inet6_dev *idev,
+ uint8_t ipv6_ac_addr[][SIR_MAC_IPV6_ADDR_LEN],
+ uint8_t *ipv6addr_type, uint32_t *count)
+{
+ struct ifacaddr6 *ifaca;
+ uint32_t scope;
+
+ for (ifaca = idev->ac_list; ifaca; ifaca = ifaca->aca_next) {
+ if (*count >= SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA)
+ return -EINVAL;
+ /* For anycast addr no DAD */
+ scope = ipv6_addr_src_scope(&ifaca->aca_addr);
+ switch (scope) {
+ case IPV6_ADDR_SCOPE_GLOBAL:
+ case IPV6_ADDR_SCOPE_LINKLOCAL:
+ qdf_mem_copy(ipv6_ac_addr[*count], &ifaca->aca_addr,
+ sizeof(ifaca->aca_addr));
+ ipv6addr_type[*count] = SIR_IPV6_ADDR_AC_TYPE;
+ hdd_info("Index %d scope = %s AC-Address: %pI6",
+ *count, (scope == IPV6_ADDR_SCOPE_LINKLOCAL) ?
+ "LINK LOCAL" : "GLOBAL", ipv6_ac_addr[*count]);
+ *count += 1;
+ break;
+ default:
+ hdd_err("The Scope %d is not supported", scope);
+ }
+ }
+ return 0;
+}
+
+/**
* hdd_conf_ns_offload() - Configure NS offload
* @pAdapter: pointer to the adapter
* @fenable: flag to enable or disable
@@ -298,18 +383,15 @@ int wlan_hdd_ipv6_changed(struct notifier_block *nb,
static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable)
{
struct inet6_dev *in6_dev;
- struct inet6_ifaddr *ifp;
- struct list_head *p;
- uint8_t
- selfIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]
- [SIR_MAC_IPV6_ADDR_LEN] = { {0,} };
- bool selfIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA] = { 0 };
+ uint8_t ipv6_addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]
+ [SIR_MAC_IPV6_ADDR_LEN] = { {0,} };
+ uint8_t ipv6_addr_type[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA] = { 0 };
tSirHostOffloadReq offLoadRequest;
hdd_context_t *pHddCtx;
- int i = 0;
+ int i = 0, ret;
QDF_STATUS returnStatus;
- uint32_t count = 0, scope;
+ uint32_t count = 0;
ENTER();
hdd_notice(" fenable = %d", fenable);
@@ -330,38 +412,26 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable)
if (fenable) {
in6_dev = __in6_dev_get(pAdapter->dev);
if (NULL != in6_dev) {
- /* read_lock_bh(&in6_dev->lock); */
- list_for_each(p, &in6_dev->addr_list) {
- if (count >=
- SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA) {
- hdd_err("Reached max supported NS Offload addresses");
- break;
- }
- ifp =
- list_entry(p, struct inet6_ifaddr, if_list);
- scope = ipv6_addr_src_scope(&ifp->addr);
-
- switch (scope) {
- case IPV6_ADDR_SCOPE_GLOBAL:
- case IPV6_ADDR_SCOPE_LINKLOCAL:
- qdf_mem_copy(&selfIPv6Addr[count],
- &ifp->addr.s6_addr,
- sizeof(ifp->addr.s6_addr));
- selfIPv6AddrValid[count] =
- SIR_IPV6_ADDR_VALID;
- hdd_info("Index %d scope = %s Address : %pI6",
- count,
- (scope == IPV6_ADDR_SCOPE_LINKLOCAL) ?
- "LINK LOCAL" : "GLOBAL",
- selfIPv6Addr[count]);
- count += 1;
- break;
- default:
- hdd_err("The Scope %d is not supported",
- scope);
- }
+ /* Unicast Addresses */
+ ret = hdd_fill_ipv6_uc_addr(in6_dev, ipv6_addr,
+ ipv6_addr_type, &count);
+
+ if (0 > ret) {
+ hdd_notice(
+ "Reached max supported addresses and not enabling NS offload");
+ return;
+ }
+
+ /* Anycast Addresses */
+ ret = hdd_fill_ipv6_ac_addr(in6_dev, ipv6_addr,
+ ipv6_addr_type, &count);
+
+ if (0 > ret) {
+ hdd_notice(
+ "Reached max supported addresses and not enabling NS offload");
+ return;
}
- /* read_unlock_bh(&in6_dev->lock); */
+
qdf_mem_zero(&offLoadRequest, sizeof(offLoadRequest));
for (i = 0; i < count; i++) {
/* Filling up the request structure
@@ -379,30 +449,21 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable)
offLoadRequest.nsOffloadInfo.selfIPv6Addr[i][11] = 0x01;
offLoadRequest.nsOffloadInfo.selfIPv6Addr[i][12] = 0xFF;
offLoadRequest.nsOffloadInfo.selfIPv6Addr[i][13] =
- selfIPv6Addr[i][13];
+ ipv6_addr[i][13];
offLoadRequest.nsOffloadInfo.selfIPv6Addr[i][14] =
- selfIPv6Addr[i][14];
+ ipv6_addr[i][14];
offLoadRequest.nsOffloadInfo.selfIPv6Addr[i][15] =
- selfIPv6Addr[i][15];
+ ipv6_addr[i][15];
offLoadRequest.nsOffloadInfo.slotIdx = i;
- qdf_mem_copy(&offLoadRequest.nsOffloadInfo.targetIPv6Addr[i],
- &selfIPv6Addr[i][0], SIR_MAC_IPV6_ADDR_LEN);
+ qdf_mem_copy(&offLoadRequest.nsOffloadInfo.
+ targetIPv6Addr[i], &ipv6_addr[i][0],
+ SIR_MAC_IPV6_ADDR_LEN);
offLoadRequest.nsOffloadInfo.targetIPv6AddrValid[i] =
- SIR_IPV6_ADDR_VALID;
-
- hdd_info("configuredMcastBcastFilter: %d",
- pHddCtx->configuredMcastBcastFilter);
-
- if ((true == pHddCtx->sus_res_mcastbcast_filter_valid)
- && ((HDD_MCASTBCASTFILTER_FILTER_ALL_MULTICAST ==
- pHddCtx->sus_res_mcastbcast_filter) ||
- (HDD_MCASTBCASTFILTER_FILTER_ALL_MULTICAST_BROADCAST ==
- pHddCtx->sus_res_mcastbcast_filter))) {
- hdd_info("Set offLoadRequest with SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE");
- offLoadRequest.enableOrDisable =
- SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE;
- }
+ SIR_IPV6_ADDR_VALID;
+ offLoadRequest.nsOffloadInfo.
+ target_ipv6_addr_ac_type[i] =
+ ipv6_addr_type[i];
qdf_mem_copy(&offLoadRequest.params.hostIpv6Addr,
&offLoadRequest.nsOffloadInfo.targetIPv6Addr[i],
@@ -412,6 +473,9 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable)
&offLoadRequest.nsOffloadInfo.selfIPv6Addr[i],
&offLoadRequest.nsOffloadInfo.targetIPv6Addr[i], i);
}
+
+ hdd_info("configuredMcastBcastFilter: %d",
+ pHddCtx->configuredMcastBcastFilter);
hdd_wlan_offload_event(SIR_IPV6_NS_OFFLOAD,
SIR_OFFLOAD_ENABLE);
offLoadRequest.offloadType = SIR_IPV6_NS_OFFLOAD;
@@ -492,7 +556,8 @@ void __hdd_ipv6_notifier_work_queue(struct work_struct *work)
if (eConnectionState_Associated ==
(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState ||
ndi_connected)
- if (pHddCtx->config->fhostNSOffload)
+ if (pHddCtx->config->fhostNSOffload &&
+ pHddCtx->ns_offload_enable)
hdd_conf_ns_offload(pAdapter, true);
EXIT();
}
@@ -557,7 +622,8 @@ void hdd_conf_hostoffload(hdd_adapter_t *pAdapter, bool fenable)
hdd_conf_arp_offload(pAdapter, fenable);
wlan_hdd_set_mc_addr_list(pAdapter, fenable);
- if (pHddCtx->config->fhostNSOffload)
+ if (pHddCtx->config->fhostNSOffload &&
+ pHddCtx->ns_offload_enable)
hdd_conf_ns_offload(pAdapter, fenable);
}
EXIT();
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index b053817ca89a..74a19c16788e 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -1237,6 +1237,29 @@ static void wlan_hdd_cfg80211_scan_block_cb(struct work_struct *work)
}
/**
+ * wlan_hdd_copy_bssid_scan_request() - API to copy the bssid to Scan request
+ * @scan_req: Pointer to CSR Scan Request
+ * @request: scan request from Supplicant
+ *
+ * This API copies the BSSID in scan request from Supplicant and copies it to
+ * the CSR Scan request
+ *
+ * Return: None
+ */
+#ifdef CFG80211_SCAN_BSSID
+static inline void wlan_hdd_copy_bssid_scan_request(tCsrScanRequest *scan_req,
+ struct cfg80211_scan_request *request)
+{
+ qdf_mem_copy(scan_req->bssid.bytes, request->bssid, QDF_MAC_ADDR_SIZE);
+}
+#else
+static inline void wlan_hdd_copy_bssid_scan_request(tCsrScanRequest *scan_req,
+ struct cfg80211_scan_request *request)
+{
+}
+#endif
+
+/**
* __wlan_hdd_cfg80211_scan() - API to process cfg80211 scan request
* @wiphy: Pointer to wiphy
* @dev: Pointer to net device
@@ -1423,6 +1446,8 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
scan_req.minChnTime = cfg_param->nActiveMinChnTime;
scan_req.maxChnTime = cfg_param->nActiveMaxChnTime;
+ wlan_hdd_copy_bssid_scan_request(&scan_req, request);
+
/* set BSSType to default type */
scan_req.BSSType = eCSR_BSS_TYPE_ANY;
diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h
index b8731b5e5bf2..28f767719f11 100644
--- a/core/mac/inc/qwlan_version.h
+++ b/core/mac/inc/qwlan_version.h
@@ -41,9 +41,9 @@
#define QWLAN_VERSION_MAJOR 5
#define QWLAN_VERSION_MINOR 1
#define QWLAN_VERSION_PATCH 0
-#define QWLAN_VERSION_EXTRA ""
+#define QWLAN_VERSION_EXTRA "Q"
#define QWLAN_VERSION_BUILD 24
-#define QWLAN_VERSIONSTR "5.1.0.24"
+#define QWLAN_VERSIONSTR "5.1.0.24Q"
#endif /* QWLAN_VERSION_H */
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index e294a02668fe..5c6df204f7ca 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -2612,6 +2612,7 @@ typedef struct sSirNsOffloadReq {
struct qdf_mac_addr self_macaddr;
uint8_t srcIPv6AddrValid;
uint8_t targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
+ uint8_t target_ipv6_addr_ac_type[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
uint8_t slotIdx;
} tSirNsOffloadReq, *tpSirNsOffloadReq;
#endif /* WLAN_NS_OFFLOAD */
@@ -4337,12 +4338,14 @@ struct extscan_hotlist_match {
* @scan_id: a unique identifier for the scan unit
* @flags: a bitmask with additional information about scan
* @num_results: number of bssids retrieved by the scan
+ * @buckets_scanned: bitmask of buckets scanned in current extscan cycle
* @ap: wifi scan bssid results info
*/
struct extscan_cached_scan_result {
uint32_t scan_id;
uint32_t flags;
uint32_t num_results;
+ uint32_t buckets_scanned;
tSirWifiScanResult *ap;
};
@@ -4371,14 +4374,12 @@ typedef struct {
* @more_data: 0 - for last fragment
* 1 - still more fragment(s) coming
* @num_scan_ids: number of scan ids
- * @buckets_scanned: bitmask of buckets scanned in current extscan cycle
* @result: wifi scan result
*/
struct extscan_cached_scan_results {
uint32_t request_id;
bool more_data;
uint32_t num_scan_ids;
- uint32_t buckets_scanned;
struct extscan_cached_scan_result *result;
};
diff --git a/core/mac/inc/sir_mac_prot_def.h b/core/mac/inc/sir_mac_prot_def.h
index 4aaac567966b..1389661ea45c 100644
--- a/core/mac/inc/sir_mac_prot_def.h
+++ b/core/mac/inc/sir_mac_prot_def.h
@@ -497,6 +497,8 @@
#define SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA 16
#define SIR_MAC_IPV6_ADDR_LEN 16
#define SIR_IPV6_ADDR_VALID 1
+#define SIR_IPV6_ADDR_UC_TYPE 0
+#define SIR_IPV6_ADDR_AC_TYPE 1
#endif /* WLAN_NS_OFFLOAD */
/* ----------------------------------------------------------------------------- */
diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms
index eb7e29c2f771..567492f58582 100644
--- a/core/mac/src/cfg/cfgUtil/dot11f.frms
+++ b/core/mac/src/cfg/cfgUtil/dot11f.frms
@@ -2413,6 +2413,12 @@ IE TimeAdvertisement (EID_TIME_ADVERTISEMENT) // 8.4.2.63
time_error[5];
}
+IE MBO_IE (EID_VENDOR_SPECIFIC) OUI ( 0x50, 0x6F, 0x9A, 0x16 )
+{
+ mbo_cap[3];
+ assoc_disallowed[0..3];
+}
+
const EID_RRM_BEACON_REPORTING = 1;
const EID_RRM_BCN_REPORTING_DETAIL = 2;
@@ -2951,6 +2957,7 @@ FRAME Beacon // C.f. Sec. 7.2.3.1
OPTIE ChannelSwitchWrapper;
OPTIE QComVendorIE;
OPTIE ESEVersion;
+ OPTIE MBO_IE;
} // End frame Beacon.
// Ok, here's the story on Beacon1 & Beacon2. We presumably beacon a lot
@@ -3103,6 +3110,7 @@ FRAME BeaconIEs
OPTIE hs20vendor_ie;
OPTIE ChannelSwitchWrapper;
OPTIE QComVendorIE;
+ OPTIE MBO_IE;
} // End frame BeaconIEs.
FRAME Disassociation // 7.3.3.3
@@ -3320,6 +3328,7 @@ FRAME ProbeResponse // 7.2.3.9
OPTIE ChannelSwitchWrapper;
OPTIE QComVendorIE;
OPTIE ESEVersion;
+ OPTIE MBO_IE;
} // End frame ProbeResponse.
FRAME Authentication // 7.2.3.10
diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h
index ef886c502495..f57f4cedc1be 100644
--- a/core/mac/src/include/dot11f.h
+++ b/core/mac/src/include/dot11f.h
@@ -20,9 +20,9 @@
*/
/*
- * This file was originally distributed by Qualcomm Atheros, Inc.
- * under proprietary terms before Copyright ownership was assigned
- * to the Linux Foundation.
+ * Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
+ * All Rights Reserved.
+ * Qualcomm Atheros Confidential and Proprietary.
*/
#ifndef DOT11F_H
@@ -35,7 +35,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Thu May 26 13:06:28 2016 from the following file(s):
+ * Wed Jul 13 14:24:06 2016 from the following file(s):
*
* dot11f.frms
*
@@ -45,6 +45,7 @@
* 'framesc' For more information on 'framesc' & the
* frames language, run 'framesc --help'.
*
+ *
*/
typedef uint32_t tDOT11F_U64[2];
@@ -4668,6 +4669,46 @@ uint32_t dot11f_get_packed_ie_LinkIdentifier(
}; /* End extern "C". */
#endif /* C++ */
+/* EID 221 (0xdd) {OUI 0x50, 0x6f, 0x9a, 0x16} */
+typedef struct sDot11fIEMBO_IE {
+ uint8_t present;
+ uint8_t mbo_cap[3];
+ uint8_t num_assoc_disallowed;
+ uint8_t assoc_disallowed[3];
+} tDot11fIEMBO_IE;
+
+#define DOT11F_EID_MBO_IE (221)
+
+/* N.B. These #defines do *not* include the EID & length */
+#define DOT11F_IE_MBO_IE_MIN_LEN (7)
+
+#define DOT11F_IE_MBO_IE_MAX_LEN (10)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+uint32_t dot11f_unpack_ie_MBO_IE(
+ tpAniSirGlobal,
+ uint8_t *,
+ uint8_t,
+ tDot11fIEMBO_IE*);
+
+uint32_t dot11f_pack_ie_MBO_IE(
+ tpAniSirGlobal,
+ tDot11fIEMBO_IE *,
+ uint8_t *,
+ uint32_t,
+ uint32_t*);
+
+uint32_t dot11f_get_packed_ie_MBO_IE(
+ tpAniSirGlobal,
+ tDot11fIEMBO_IE *,
+ uint32_t*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
+
/* EID 39 (0x27) */
typedef struct sDot11fIEMeasurementReport {
uint8_t present;
@@ -7846,6 +7887,7 @@ typedef struct sDot11fBeacon{
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
tDot11fIEQComVendorIE QComVendorIE;
tDot11fIEESEVersion ESEVersion;
+ tDot11fIEMBO_IE MBO_IE;
} tDot11fBeacon;
#define DOT11F_BEACON (6)
@@ -8015,6 +8057,7 @@ typedef struct sDot11fBeaconIEs{
tDot11fIEhs20vendor_ie hs20vendor_ie;
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
tDot11fIEQComVendorIE QComVendorIE;
+ tDot11fIEMBO_IE MBO_IE;
} tDot11fBeaconIEs;
#define DOT11F_BEACONIES (9)
@@ -8426,6 +8469,7 @@ typedef struct sDot11fProbeResponse{
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
tDot11fIEQComVendorIE QComVendorIE;
tDot11fIEESEVersion ESEVersion;
+ tDot11fIEMBO_IE MBO_IE;
} tDot11fProbeResponse;
#define DOT11F_PROBERESPONSE (22)
diff --git a/core/mac/src/include/parser_api.h b/core/mac/src/include/parser_api.h
index 7019d99d319a..495e86a38872 100644
--- a/core/mac/src/include/parser_api.h
+++ b/core/mac/src/include/parser_api.h
@@ -57,6 +57,7 @@
#define NSS_1x1_MODE 1
#define NSS_2x2_MODE 2
+#define MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID 0x04
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
#define QCOM_VENDOR_IE_MCC_AVOID_CH 0x01
@@ -167,6 +168,10 @@ typedef struct sSirProbeRespBeacon {
uint8_t is_ese_ver_ie_present;
#endif
tDot11fIEOBSSScanParameters obss_scanparams;
+ bool MBO_IE_present;
+ uint8_t MBO_capability;
+ bool assoc_disallowed;
+ uint8_t assoc_disallowed_reason;
} tSirProbeRespBeacon, *tpSirProbeRespBeacon;
/* probe Request structure */
diff --git a/core/mac/src/include/sir_params.h b/core/mac/src/include/sir_params.h
index 650c2aab942e..4ca99522c42d 100644
--- a/core/mac/src/include/sir_params.h
+++ b/core/mac/src/include/sir_params.h
@@ -630,7 +630,7 @@ typedef struct sSirMbMsgP2p {
#define SIR_HAL_NDP_END_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 357)
#define SIR_HAL_UPDATE_WEP_DEFAULT_KEY (SIR_HAL_ITC_MSG_TYPES_BEGIN + 358)
-#define SIR_HAL_POWER_DBG_CMD (SIR_HAL_ITC_MSG_TYPES_BEGIN + 347)
+#define SIR_HAL_POWER_DBG_CMD (SIR_HAL_ITC_MSG_TYPES_BEGIN + 362)
#define SIR_HAL_MSG_TYPES_END (SIR_HAL_MSG_TYPES_BEGIN + 0x1FF)
diff --git a/core/mac/src/pe/lim/lim_process_beacon_frame.c b/core/mac/src/pe/lim/lim_process_beacon_frame.c
index 114e56337969..74220499024e 100644
--- a/core/mac/src/pe/lim/lim_process_beacon_frame.c
+++ b/core/mac/src/pe/lim/lim_process_beacon_frame.c
@@ -105,6 +105,16 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
qdf_mem_free(bcn_ptr);
return;
}
+
+ if (bcn_ptr->assoc_disallowed) {
+ lim_log(mac_ctx, LOG1,
+ FL("Association disallowed in AP "MAC_ADDRESS_STR " Reason code %d"),
+ MAC_ADDR_ARRAY(mac_hdr->sa),
+ bcn_ptr->assoc_disallowed_reason);
+ qdf_mem_free(bcn_ptr);
+ return;
+ }
+
/*
* during scanning, when any session is active, and
* beacon/Pr belongs to one of the session, fill up the
diff --git a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c
index 7904cf6e7115..19978be54461 100644
--- a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c
+++ b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c
@@ -141,6 +141,16 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info,
qdf_mem_free(probe_rsp);
return;
}
+
+ if (probe_rsp->assoc_disallowed) {
+ lim_log(mac_ctx, LOG1,
+ FL("Association disallowed by AP "MAC_ADDRESS_STR " Reason code %d"),
+ MAC_ADDR_ARRAY(header->bssId),
+ probe_rsp->assoc_disallowed_reason);
+ qdf_mem_free(probe_rsp);
+ return;
+ }
+
lim_check_and_add_bss_description(mac_ctx, probe_rsp,
rx_Packet_info, false, true);
/* To Support BT-AMP */
@@ -363,6 +373,16 @@ lim_process_probe_rsp_frame_no_session(tpAniSirGlobal mac_ctx,
qdf_mem_free(probe_rsp);
return;
}
+
+ if (probe_rsp->assoc_disallowed) {
+ lim_log(mac_ctx, LOG1,
+ FL("Association disallowed by AP "MAC_ADDRESS_STR " Reason code %d"),
+ MAC_ADDR_ARRAY(header->bssId),
+ probe_rsp->assoc_disallowed_reason);
+ qdf_mem_free(probe_rsp);
+ return;
+ }
+
lim_log(mac_ctx, LOG2, FL("Save this probe rsp in LFR cache"));
lim_check_and_add_bss_description(mac_ctx, probe_rsp,
rx_packet_info, false, true);
diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c
index 7e7b7330c1c0..f3336544be64 100644
--- a/core/mac/src/pe/lim/lim_session.c
+++ b/core/mac/src/pe/lim/lim_session.c
@@ -157,8 +157,18 @@ void pe_reset_protection_callback(void *ptr)
qdf_mem_zero(&pe_session_entry->gLimOlbcParams,
sizeof(pe_session_entry->gLimOlbcParams));
- qdf_mem_zero(&pe_session_entry->beaconParams,
- sizeof(pe_session_entry->beaconParams));
+ /*
+ * Do not reset fShortPreamble and beaconInterval, as they
+ * are not updated.
+ */
+ pe_session_entry->beaconParams.llaCoexist = 0;
+ pe_session_entry->beaconParams.llbCoexist = 0;
+ pe_session_entry->beaconParams.llgCoexist = 0;
+ pe_session_entry->beaconParams.ht20Coexist = 0;
+ pe_session_entry->beaconParams.llnNonGFCoexist = 0;
+ pe_session_entry->beaconParams.fRIFSMode = 0;
+ pe_session_entry->beaconParams.fLsigTXOPProtectionFullSupport = 0;
+ pe_session_entry->beaconParams.gHTObssMode = 0;
qdf_mem_zero(&mac_ctx->lim.gLimOverlap11gParams,
sizeof(mac_ctx->lim.gLimOverlap11gParams));
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 c5e1bf89cdb8..430a562a802e 100644
--- a/core/mac/src/sys/legacy/src/utils/src/dot11f.c
+++ b/core/mac/src/sys/legacy/src/utils/src/dot11f.c
@@ -20,12 +20,12 @@
*/
/*
- * This file was originally distributed by Qualcomm Atheros, Inc.
- * under proprietary terms before Copyright ownership was assigned
- * to the Linux Foundation.
+ * Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
+ * All Rights Reserved.
+ * Qualcomm Atheros Confidential and Proprietary.
*/
- /*
+/*
* \file dot11f.c
*
* \brief Structures, functions & definitions for
@@ -33,12 +33,13 @@
*
*
* This file was automatically generated by 'framesc'
- * Thu May 26 13:06:28 2016 from the following file(s):
+ * Wed Jul 13 14:24:06 2016 from the following file(s):
*
* dot11f.frms
*
* PLEASE DON'T EDIT THIS FILE BY HAND!
*
+ *
*/
#if !defined ANI_OS_TYPE_OSX && !defined ANI_OS_TYPE_LINUX && !defined ANI_OS_TYPE_ANDROID
@@ -3336,6 +3337,33 @@ uint32_t dot11f_unpack_ie_link_identifier(tpAniSirGlobal pCtx,
#define SigIeLinkIdentifier (0x003c)
+uint32_t dot11f_unpack_ie_MBO_IE(tpAniSirGlobal pCtx,
+ uint8_t *pBuf,
+ uint8_t ielen,
+ tDot11fIEMBO_IE *pDst)
+{
+ uint32_t status = DOT11F_PARSE_SUCCESS;
+ (void) pBuf; (void)ielen; /* Shutup the compiler */
+ if (pDst->present)
+ status = DOT11F_DUPLICATE_IE;
+ pDst->present = 1;
+ DOT11F_MEMCPY(pCtx, pDst->mbo_cap, pBuf, 3);
+ pBuf += 3;
+ ielen -= (uint8_t)3;
+ pDst->num_assoc_disallowed = (uint8_t)(ielen);
+ if (ielen > 3) {
+ pDst->present = 0;
+ return DOT11F_SKIPPED_BAD_IE;
+ }
+
+ DOT11F_MEMCPY(pCtx, pDst->assoc_disallowed, pBuf, (ielen));
+ (void)pCtx;
+ return status;
+} /* End dot11f_unpack_ie_MBO_IE. */
+
+#define SigIeMBO_IE (0x003d)
+
+
static const tFFDefn FFS_reportBeacon[] = {
{ NULL, 0, 0, 0,},
};
@@ -3495,7 +3523,7 @@ uint32_t dot11f_unpack_ie_measurement_report(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_measurement_report. */
-#define SigIeMeasurementReport (0x003d)
+#define SigIeMeasurementReport (0x003e)
static const tFFDefn FFS_measurement_requestBeacon[] = {
@@ -3687,7 +3715,7 @@ uint32_t dot11f_unpack_ie_measurement_request(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_measurement_request. */
-#define SigIeMeasurementRequest (0x003e)
+#define SigIeMeasurementRequest (0x003f)
uint32_t dot11f_unpack_ie_mobility_domain(tpAniSirGlobal pCtx,
@@ -3712,7 +3740,7 @@ uint32_t dot11f_unpack_ie_mobility_domain(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_mobility_domain. */
-#define SigIeMobilityDomain (0x003f)
+#define SigIeMobilityDomain (0x0040)
static const tFFDefn FFS_NeighborReport[] = {
@@ -3797,7 +3825,7 @@ uint32_t dot11f_unpack_ie_neighbor_report(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_neighbor_report. */
-#define SigIeNeighborReport (0x0040)
+#define SigIeNeighborReport (0x0041)
uint32_t dot11f_unpack_ie_obss_scan_parameters(tpAniSirGlobal pCtx,
@@ -3833,7 +3861,7 @@ uint32_t dot11f_unpack_ie_obss_scan_parameters(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_obss_scan_parameters. */
-#define SigIeOBSSScanParameters (0x0041)
+#define SigIeOBSSScanParameters (0x0042)
uint32_t dot11f_unpack_ie_operating_mode(tpAniSirGlobal pCtx,
@@ -3856,7 +3884,7 @@ uint32_t dot11f_unpack_ie_operating_mode(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_operating_mode. */
-#define SigIeOperatingMode (0x0042)
+#define SigIeOperatingMode (0x0043)
static const tTLVDefn TLVS_P2PAssocReq[] = {
@@ -3887,7 +3915,7 @@ uint32_t dot11f_unpack_ie_p2_p_assoc_req(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_p2_p_assoc_req. */
-#define SigIeP2PAssocReq (0x0043)
+#define SigIeP2PAssocReq (0x0044)
static const tTLVDefn TLVS_P2PAssocRes[] = {
@@ -3915,7 +3943,7 @@ uint32_t dot11f_unpack_ie_p2_p_assoc_res(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_p2_p_assoc_res. */
-#define SigIeP2PAssocRes (0x0044)
+#define SigIeP2PAssocRes (0x0045)
static const tTLVDefn TLVS_P2PBeacon[] = {
@@ -3946,7 +3974,7 @@ uint32_t dot11f_unpack_ie_p2_p_beacon(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_p2_p_beacon. */
-#define SigIeP2PBeacon (0x0045)
+#define SigIeP2PBeacon (0x0046)
static const tTLVDefn TLVS_P2PBeaconProbeRes[] = {
@@ -3987,7 +4015,7 @@ uint32_t dot11f_unpack_ie_p2_p_beacon_probe_res(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_p2_p_beacon_probe_res. */
-#define SigIeP2PBeaconProbeRes (0x0046)
+#define SigIeP2PBeaconProbeRes (0x0047)
static const tTLVDefn TLVS_P2PDeAuth[] = {
@@ -4012,7 +4040,7 @@ uint32_t dot11f_unpack_ie_p2_p_de_auth(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_p2_p_de_auth. */
-#define SigIeP2PDeAuth (0x0047)
+#define SigIeP2PDeAuth (0x0048)
static const tTLVDefn TLVS_P2PDisAssoc[] = {
@@ -4037,7 +4065,7 @@ uint32_t dot11f_unpack_ie_p2_p_dis_assoc(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_p2_p_dis_assoc. */
-#define SigIeP2PDisAssoc (0x0048)
+#define SigIeP2PDisAssoc (0x0049)
uint32_t dot11f_unpack_ie_p2_pie_opaque(tpAniSirGlobal pCtx,
@@ -4061,7 +4089,7 @@ uint32_t dot11f_unpack_ie_p2_pie_opaque(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_p2_pie_opaque. */
-#define SigIeP2PIEOpaque (0x0049)
+#define SigIeP2PIEOpaque (0x004a)
static const tTLVDefn TLVS_P2PProbeReq[] = {
@@ -4099,7 +4127,7 @@ uint32_t dot11f_unpack_ie_p2_p_probe_req(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_p2_p_probe_req. */
-#define SigIeP2PProbeReq (0x004a)
+#define SigIeP2PProbeReq (0x004b)
static const tTLVDefn TLVS_P2PProbeRes[] = {
@@ -4137,7 +4165,7 @@ uint32_t dot11f_unpack_ie_p2_p_probe_res(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_p2_p_probe_res. */
-#define SigIeP2PProbeRes (0x004b)
+#define SigIeP2PProbeRes (0x004c)
uint32_t dot11f_unpack_ie_pti_control(tpAniSirGlobal pCtx,
@@ -4158,7 +4186,7 @@ uint32_t dot11f_unpack_ie_pti_control(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_pti_control. */
-#define SigIePTIControl (0x004c)
+#define SigIePTIControl (0x004d)
uint32_t dot11f_unpack_ie_pu_buffer_status(tpAniSirGlobal pCtx,
@@ -4182,7 +4210,7 @@ uint32_t dot11f_unpack_ie_pu_buffer_status(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_pu_buffer_status. */
-#define SigIePUBufferStatus (0x004d)
+#define SigIePUBufferStatus (0x004e)
uint32_t dot11f_unpack_ie_power_caps(tpAniSirGlobal pCtx,
@@ -4203,7 +4231,7 @@ uint32_t dot11f_unpack_ie_power_caps(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_power_caps. */
-#define SigIePowerCaps (0x004e)
+#define SigIePowerCaps (0x004f)
uint32_t dot11f_unpack_ie_power_constraints(tpAniSirGlobal pCtx,
@@ -4221,7 +4249,7 @@ uint32_t dot11f_unpack_ie_power_constraints(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_power_constraints. */
-#define SigIePowerConstraints (0x004f)
+#define SigIePowerConstraints (0x0050)
uint32_t dot11f_unpack_ie_qbss_load(tpAniSirGlobal pCtx,
@@ -4245,7 +4273,7 @@ uint32_t dot11f_unpack_ie_qbss_load(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_qbss_load. */
-#define SigIeQBSSLoad (0x0050)
+#define SigIeQBSSLoad (0x0051)
uint32_t dot11f_unpack_ie_QComVendorIE(tpAniSirGlobal pCtx,
@@ -4266,7 +4294,7 @@ uint32_t dot11f_unpack_ie_QComVendorIE(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_QComVendorIE. */
-#define SigIeQComVendorIE (0x0051)
+#define SigIeQComVendorIE (0x0052)
uint32_t dot11f_unpack_ie_qos_caps_ap(tpAniSirGlobal pCtx,
@@ -4290,7 +4318,7 @@ uint32_t dot11f_unpack_ie_qos_caps_ap(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_qos_caps_ap. */
-#define SigIeQOSCapsAp (0x0052)
+#define SigIeQOSCapsAp (0x0053)
uint32_t dot11f_unpack_ie_qos_caps_station(tpAniSirGlobal pCtx,
@@ -4316,7 +4344,7 @@ uint32_t dot11f_unpack_ie_qos_caps_station(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_qos_caps_station. */
-#define SigIeQOSCapsStation (0x0053)
+#define SigIeQOSCapsStation (0x0054)
uint32_t dot11f_unpack_ie_qos_map_set(tpAniSirGlobal pCtx,
@@ -4340,7 +4368,7 @@ uint32_t dot11f_unpack_ie_qos_map_set(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_qos_map_set. */
-#define SigIeQosMapSet (0x0054)
+#define SigIeQosMapSet (0x0055)
uint32_t dot11f_unpack_ie_quiet(tpAniSirGlobal pCtx,
@@ -4367,7 +4395,7 @@ uint32_t dot11f_unpack_ie_quiet(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_quiet. */
-#define SigIeQuiet (0x0055)
+#define SigIeQuiet (0x0056)
uint32_t dot11f_unpack_ie_rcpiie(tpAniSirGlobal pCtx,
@@ -4385,7 +4413,7 @@ uint32_t dot11f_unpack_ie_rcpiie(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_rcpiie. */
-#define SigIeRCPIIE (0x0056)
+#define SigIeRCPIIE (0x0057)
static const tFFDefn FFS_RICDataDesc[] = {
@@ -4459,7 +4487,7 @@ uint32_t dot11f_unpack_ie_ric_data_desc(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_ric_data_desc. */
-#define SigIeRICDataDesc (0x0057)
+#define SigIeRICDataDesc (0x0058)
uint32_t dot11f_unpack_ie_rsn(tpAniSirGlobal pCtx,
@@ -4550,7 +4578,7 @@ uint32_t dot11f_unpack_ie_rsn(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_rsn. */
-#define SigIeRSN (0x0058)
+#define SigIeRSN (0x0059)
uint32_t dot11f_unpack_ie_rsniie(tpAniSirGlobal pCtx,
@@ -4568,7 +4596,7 @@ uint32_t dot11f_unpack_ie_rsniie(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_rsniie. */
-#define SigIeRSNIIE (0x0059)
+#define SigIeRSNIIE (0x005a)
uint32_t dot11f_unpack_ie_rsn_opaque(tpAniSirGlobal pCtx,
@@ -4592,7 +4620,7 @@ uint32_t dot11f_unpack_ie_rsn_opaque(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_rsn_opaque. */
-#define SigIeRSNOpaque (0x005a)
+#define SigIeRSNOpaque (0x005b)
uint32_t dot11f_unpack_ie_supp_channels(tpAniSirGlobal pCtx,
@@ -4616,7 +4644,7 @@ uint32_t dot11f_unpack_ie_supp_channels(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_supp_channels. */
-#define SigIeSuppChannels (0x005b)
+#define SigIeSuppChannels (0x005c)
uint32_t dot11f_unpack_ie_supp_operating_classes(tpAniSirGlobal pCtx,
@@ -4640,7 +4668,7 @@ uint32_t dot11f_unpack_ie_supp_operating_classes(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_supp_operating_classes. */
-#define SigIeSuppOperatingClasses (0x005c)
+#define SigIeSuppOperatingClasses (0x005d)
uint32_t dot11f_unpack_ie_supp_rates(tpAniSirGlobal pCtx,
@@ -4672,7 +4700,7 @@ uint32_t dot11f_unpack_ie_supp_rates(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_supp_rates. */
-#define SigIeSuppRates (0x005d)
+#define SigIeSuppRates (0x005e)
uint32_t dot11f_unpack_ie_tim(tpAniSirGlobal pCtx,
@@ -4705,7 +4733,7 @@ uint32_t dot11f_unpack_ie_tim(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_tim. */
-#define SigIeTIM (0x005e)
+#define SigIeTIM (0x005f)
uint32_t dot11f_unpack_ie_tpc_report(tpAniSirGlobal pCtx,
@@ -4726,7 +4754,7 @@ uint32_t dot11f_unpack_ie_tpc_report(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_tpc_report. */
-#define SigIeTPCReport (0x005f)
+#define SigIeTPCReport (0x0060)
uint32_t dot11f_unpack_ie_tpc_request(tpAniSirGlobal pCtx,
@@ -4743,7 +4771,7 @@ uint32_t dot11f_unpack_ie_tpc_request(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_tpc_request. */
-#define SigIeTPCRequest (0x0060)
+#define SigIeTPCRequest (0x0061)
uint32_t dot11f_unpack_ie_time_advertisement(tpAniSirGlobal pCtx,
@@ -4767,7 +4795,7 @@ uint32_t dot11f_unpack_ie_time_advertisement(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_time_advertisement. */
-#define SigIeTimeAdvertisement (0x0061)
+#define SigIeTimeAdvertisement (0x0062)
uint32_t dot11f_unpack_ie_timeout_interval(tpAniSirGlobal pCtx,
@@ -4788,7 +4816,7 @@ uint32_t dot11f_unpack_ie_timeout_interval(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_timeout_interval. */
-#define SigIeTimeoutInterval (0x0062)
+#define SigIeTimeoutInterval (0x0063)
uint32_t dot11f_unpack_ie_vht_ext_bss_load(tpAniSirGlobal pCtx,
@@ -4818,7 +4846,7 @@ uint32_t dot11f_unpack_ie_vht_ext_bss_load(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_vht_ext_bss_load. */
-#define SigIeVHTExtBssLoad (0x0063)
+#define SigIeVHTExtBssLoad (0x0064)
uint32_t dot11f_unpack_ie_vendor1_ie(tpAniSirGlobal pCtx,
@@ -4835,7 +4863,7 @@ uint32_t dot11f_unpack_ie_vendor1_ie(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_vendor1_ie. */
-#define SigIeVendor1IE (0x0064)
+#define SigIeVendor1IE (0x0065)
uint32_t dot11f_unpack_ie_vendor3_ie(tpAniSirGlobal pCtx,
@@ -4852,7 +4880,7 @@ uint32_t dot11f_unpack_ie_vendor3_ie(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_vendor3_ie. */
-#define SigIeVendor3IE (0x0065)
+#define SigIeVendor3IE (0x0066)
uint32_t dot11f_unpack_ie_wapi(tpAniSirGlobal pCtx,
@@ -4921,7 +4949,7 @@ uint32_t dot11f_unpack_ie_wapi(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wapi. */
-#define SigIeWAPI (0x0066)
+#define SigIeWAPI (0x0067)
uint32_t dot11f_unpack_ie_wapi_opaque(tpAniSirGlobal pCtx,
@@ -4945,7 +4973,7 @@ uint32_t dot11f_unpack_ie_wapi_opaque(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wapi_opaque. */
-#define SigIeWAPIOpaque (0x0067)
+#define SigIeWAPIOpaque (0x0068)
uint32_t dot11f_unpack_ie_wfatpc(tpAniSirGlobal pCtx,
@@ -4966,7 +4994,7 @@ uint32_t dot11f_unpack_ie_wfatpc(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wfatpc. */
-#define SigIeWFATPC (0x0068)
+#define SigIeWFATPC (0x0069)
uint32_t dot11f_unpack_ie_wfdie_opaque(tpAniSirGlobal pCtx,
@@ -4990,7 +5018,7 @@ uint32_t dot11f_unpack_ie_wfdie_opaque(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wfdie_opaque. */
-#define SigIeWFDIEOpaque (0x0069)
+#define SigIeWFDIEOpaque (0x006a)
uint32_t dot11f_unpack_ie_wmm_caps(tpAniSirGlobal pCtx,
@@ -5021,7 +5049,7 @@ uint32_t dot11f_unpack_ie_wmm_caps(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wmm_caps. */
-#define SigIeWMMCaps (0x006a)
+#define SigIeWMMCaps (0x006b)
uint32_t dot11f_unpack_ie_wmm_info_ap(tpAniSirGlobal pCtx,
@@ -5046,7 +5074,7 @@ uint32_t dot11f_unpack_ie_wmm_info_ap(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wmm_info_ap. */
-#define SigIeWMMInfoAp (0x006b)
+#define SigIeWMMInfoAp (0x006c)
uint32_t dot11f_unpack_ie_wmm_info_station(tpAniSirGlobal pCtx,
@@ -5075,7 +5103,7 @@ uint32_t dot11f_unpack_ie_wmm_info_station(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wmm_info_station. */
-#define SigIeWMMInfoStation (0x006c)
+#define SigIeWMMInfoStation (0x006d)
uint32_t dot11f_unpack_ie_wmm_params(tpAniSirGlobal pCtx,
@@ -5171,7 +5199,7 @@ uint32_t dot11f_unpack_ie_wmm_params(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wmm_params. */
-#define SigIeWMMParams (0x006d)
+#define SigIeWMMParams (0x006e)
uint32_t dot11f_unpack_ie_wpa(tpAniSirGlobal pCtx,
@@ -5244,7 +5272,7 @@ uint32_t dot11f_unpack_ie_wpa(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wpa. */
-#define SigIeWPA (0x006e)
+#define SigIeWPA (0x006f)
uint32_t dot11f_unpack_ie_wpa_opaque(tpAniSirGlobal pCtx,
@@ -5268,7 +5296,7 @@ uint32_t dot11f_unpack_ie_wpa_opaque(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wpa_opaque. */
-#define SigIeWPAOpaque (0x006f)
+#define SigIeWPAOpaque (0x0070)
static const tTLVDefn TLVS_WSC[] = {
@@ -5358,7 +5386,7 @@ uint32_t dot11f_unpack_ie_wsc(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wsc. */
-#define SigIeWSC (0x0070)
+#define SigIeWSC (0x0071)
static const tTLVDefn TLVS_WscAssocReq[] = {
@@ -5389,7 +5417,7 @@ uint32_t dot11f_unpack_ie_wsc_assoc_req(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wsc_assoc_req. */
-#define SigIeWscAssocReq (0x0071)
+#define SigIeWscAssocReq (0x0072)
static const tTLVDefn TLVS_WscAssocRes[] = {
@@ -5420,7 +5448,7 @@ uint32_t dot11f_unpack_ie_wsc_assoc_res(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wsc_assoc_res. */
-#define SigIeWscAssocRes (0x0072)
+#define SigIeWscAssocRes (0x0073)
static const tTLVDefn TLVS_WscBeacon[] = {
@@ -5472,7 +5500,7 @@ uint32_t dot11f_unpack_ie_wsc_beacon(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wsc_beacon. */
-#define SigIeWscBeacon (0x0073)
+#define SigIeWscBeacon (0x0074)
static const tTLVDefn TLVS_WscBeaconProbeRes[] = {
@@ -5549,7 +5577,7 @@ uint32_t dot11f_unpack_ie_wsc_beacon_probe_res(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wsc_beacon_probe_res. */
-#define SigIeWscBeaconProbeRes (0x0074)
+#define SigIeWscBeaconProbeRes (0x0075)
uint32_t dot11f_unpack_ie_wsc_ie_opaque(tpAniSirGlobal pCtx,
@@ -5573,7 +5601,7 @@ uint32_t dot11f_unpack_ie_wsc_ie_opaque(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wsc_ie_opaque. */
-#define SigIeWscIEOpaque (0x0075)
+#define SigIeWscIEOpaque (0x0076)
static const tTLVDefn TLVS_WscProbeReq[] = {
@@ -5645,7 +5673,7 @@ uint32_t dot11f_unpack_ie_wsc_probe_req(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wsc_probe_req. */
-#define SigIeWscProbeReq (0x0076)
+#define SigIeWscProbeReq (0x0077)
static const tTLVDefn TLVS_WscProbeRes[] = {
@@ -5722,7 +5750,7 @@ uint32_t dot11f_unpack_ie_wsc_probe_res(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wsc_probe_res. */
-#define SigIeWscProbeRes (0x0077)
+#define SigIeWscProbeRes (0x0078)
static const tTLVDefn TLVS_WscReassocRes[] = {
@@ -5753,7 +5781,7 @@ uint32_t dot11f_unpack_ie_wsc_reassoc_res(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_wsc_reassoc_res. */
-#define SigIeWscReassocRes (0x0078)
+#define SigIeWscReassocRes (0x0079)
uint32_t dot11f_unpack_ie_ext_chan_switch_ann(tpAniSirGlobal pCtx,
@@ -5780,7 +5808,7 @@ uint32_t dot11f_unpack_ie_ext_chan_switch_ann(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_ext_chan_switch_ann. */
-#define SigIeext_chan_switch_ann (0x0079)
+#define SigIeext_chan_switch_ann (0x007a)
uint32_t dot11f_unpack_ie_hs20vendor_ie(tpAniSirGlobal pCtx,
@@ -5809,14 +5837,12 @@ uint32_t dot11f_unpack_ie_hs20vendor_ie(tpAniSirGlobal pCtx,
} else {
switch (pDst->hs_id_present) {
case 1:
- framesntohs(pCtx, &pDst->hs_id.pps_mo.pps_mo_id,
- pBuf, 0);
+ framesntohs(pCtx, &pDst->hs_id.pps_mo.pps_mo_id, pBuf, 0);
pBuf += 2;
ielen -= (uint8_t)2;
break;
case 2:
- framesntohs(pCtx,
- &pDst->hs_id.anqp_domain.anqp_domain_id, pBuf, 0);
+ framesntohs(pCtx, &pDst->hs_id.anqp_domain.anqp_domain_id, pBuf, 0);
pBuf += 2;
ielen -= (uint8_t)2;
break;
@@ -5826,7 +5852,7 @@ uint32_t dot11f_unpack_ie_hs20vendor_ie(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_hs20vendor_ie. */
-#define SigIehs20vendor_ie (0x007a)
+#define SigIehs20vendor_ie (0x007b)
uint32_t dot11f_unpack_ie_ht2040_bss_coexistence(tpAniSirGlobal pCtx,
@@ -5851,7 +5877,7 @@ uint32_t dot11f_unpack_ie_ht2040_bss_coexistence(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_ht2040_bss_coexistence. */
-#define SigIeht2040_bss_coexistence (0x007b)
+#define SigIeht2040_bss_coexistence (0x007c)
uint32_t dot11f_unpack_ie_ht2040_bss_intolerant_report(tpAniSirGlobal pCtx,
@@ -5878,7 +5904,7 @@ uint32_t dot11f_unpack_ie_ht2040_bss_intolerant_report(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_ht2040_bss_intolerant_report. */
-#define SigIeht2040_bss_intolerant_report (0x007c)
+#define SigIeht2040_bss_intolerant_report (0x007d)
uint32_t dot11f_unpack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx,
@@ -5896,7 +5922,7 @@ uint32_t dot11f_unpack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_sec_chan_offset_ele. */
-#define SigIesec_chan_offset_ele (0x007d)
+#define SigIesec_chan_offset_ele (0x007e)
static const tFFDefn FFS_vendor2_ie[] = {
@@ -5941,7 +5967,7 @@ uint32_t dot11f_unpack_ie_vendor2_ie(tpAniSirGlobal pCtx,
return status;
} /* End dot11f_unpack_ie_vendor2_ie. */
-#define SigIevendor2_ie (0x007e)
+#define SigIevendor2_ie (0x007f)
static const tFFDefn FFS_AddTSRequest[] = {
@@ -6537,6 +6563,9 @@ static const tIEDefn IES_Beacon[] = {
{ offsetof(tDot11fBeacon, ESEVersion), offsetof(tDot11fIEESEVersion,
present), 0, "ESEVersion", 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0},
4, DOT11F_EID_ESEVERSION, 0, },
+ { offsetof(tDot11fBeacon, MBO_IE), offsetof(tDot11fIEMBO_IE, present), 0,
+ "MBO_IE", 0, 9, 12, SigIeMBO_IE, {80, 111, 154, 22, 0},
+ 4, DOT11F_EID_MBO_IE, 0, },
{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },};
uint32_t dot11f_unpack_beacon(tpAniSirGlobal pCtx,
@@ -6930,6 +6959,9 @@ static const tIEDefn IES_BeaconIEs[] = {
offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE",
0, 7, 7, SigIeQComVendorIE, {0, 160, 198, 0, 0},
3, DOT11F_EID_QCOMVENDORIE, 0, },
+ { offsetof(tDot11fBeaconIEs, MBO_IE), offsetof(tDot11fIEMBO_IE, present),
+ 0, "MBO_IE", 0, 9, 12, SigIeMBO_IE, {80, 111, 154, 22, 0},
+ 4, DOT11F_EID_MBO_IE, 0, },
{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },};
uint32_t dot11f_unpack_beacon_i_es(tpAniSirGlobal pCtx,
@@ -7540,6 +7572,9 @@ static const tIEDefn IES_ProbeResponse[] = {
offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion",
0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0},
4, DOT11F_EID_ESEVERSION, 0, },
+ { offsetof(tDot11fProbeResponse, MBO_IE), offsetof(tDot11fIEMBO_IE,
+ present), 0, "MBO_IE", 0, 9, 12, SigIeMBO_IE, {80, 111, 154, 22, 0},
+ 4, DOT11F_EID_MBO_IE, 0, },
{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },};
uint32_t dot11f_unpack_probe_response(tpAniSirGlobal pCtx,
@@ -9597,6 +9632,15 @@ static uint32_t unpack_core(tpAniSirGlobal pCtx,
sizeof(tDot11fIELinkIdentifier) *
countOffset));
break;
+ case SigIeMBO_IE:
+ status |=
+ dot11f_unpack_ie_MBO_IE(
+ pCtx, pBufRemaining, len,
+ (tDot11fIEMBO_IE *)
+ (pFrm + pIe->offset +
+ sizeof(tDot11fIEMBO_IE) *
+ countOffset));
+ break;
case SigIeMeasurementReport:
status |=
dot11f_unpack_ie_measurement_report(
@@ -12351,6 +12395,15 @@ static uint32_t get_packed_size_core(tpAniSirGlobal pCtx,
(pFrm + pIe->offset + offset * i))->
present;
break;
+ case SigIeMBO_IE:
+ offset = sizeof(tDot11fIEMBO_IE);
+ byteCount = ((tDot11fIEMBO_IE *)
+ (pFrm + pIe->offset + offset * i))->
+ num_assoc_disallowed + 3;
+ pIePresent = ((tDot11fIEMBO_IE *)
+ (pFrm + pIe->offset + offset * i))->
+ present;
+ break;
case SigIeMeasurementReport:
offset = sizeof(tDot11fIEMeasurementReport);
status |=
@@ -17253,6 +17306,46 @@ uint32_t dot11f_pack_ie_link_identifier(tpAniSirGlobal pCtx,
return DOT11F_PARSE_SUCCESS;
} /* End dot11f_pack_ie_link_identifier. */
+uint32_t dot11f_pack_ie_MBO_IE(tpAniSirGlobal pCtx,
+ tDot11fIEMBO_IE *pSrc,
+ uint8_t *pBuf,
+ uint32_t nBuf,
+ uint32_t *pnConsumed)
+{
+ uint8_t *pIeLen = 0;
+ uint32_t nConsumedOnEntry = *pnConsumed;
+ uint32_t nNeeded = 0U;
+ nNeeded += (pSrc->num_assoc_disallowed + 3);
+ while (pSrc->present) {
+ if (nNeeded > nBuf)
+ return DOT11F_BUFFER_OVERFLOW;
+ *pBuf = 221;
+ ++pBuf; ++(*pnConsumed);
+ pIeLen = pBuf;
+ ++pBuf; ++(*pnConsumed);
+ *pBuf = 0x50;
+ ++pBuf; ++(*pnConsumed);
+ *pBuf = 0x6f;
+ ++pBuf; ++(*pnConsumed);
+ *pBuf = 0x9a;
+ ++pBuf; ++(*pnConsumed);
+ *pBuf = 0x16;
+ ++pBuf; ++(*pnConsumed);
+ DOT11F_MEMCPY(pCtx, pBuf, pSrc->mbo_cap, 3);
+ *pnConsumed += 3;
+ pBuf += 3;
+ DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->assoc_disallowed), pSrc->num_assoc_disallowed);
+ *pnConsumed += pSrc->num_assoc_disallowed;
+ /* fieldsEndFlag = 1 */
+ break;
+ }
+ (void)pCtx;
+ if (pIeLen) {
+ *pIeLen = *pnConsumed - nConsumedOnEntry - 2;
+ }
+ return DOT11F_PARSE_SUCCESS;
+} /* End dot11f_pack_ie_MBO_IE. */
+
uint32_t dot11f_pack_ie_measurement_report(tpAniSirGlobal pCtx,
tDot11fIEMeasurementReport *pSrc,
uint8_t *pBuf,
@@ -21704,6 +21797,14 @@ static uint32_t pack_core(tpAniSirGlobal pCtx,
sizeof(tDot11fIELinkIdentifier) * i),
pBufRemaining, nBufRemaining, &len);
break;
+ case SigIeMBO_IE:
+ status |=
+ dot11f_pack_ie_MBO_IE(
+ pCtx, (tDot11fIEMBO_IE *)
+ (pSrc + pIe->offset +
+ sizeof(tDot11fIEMBO_IE) * i),
+ pBufRemaining, nBufRemaining, &len);
+ break;
case SigIeMeasurementReport:
status |=
dot11f_pack_ie_measurement_report(
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index b586c0f3308e..927216ae268c 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -2518,6 +2518,19 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac,
&pr->hs20vendor_ie.hs_id,
sizeof(pr->hs20vendor_ie.hs_id));
}
+ if (pr->MBO_IE.present) {
+ pProbeResp->MBO_IE_present = true;
+ pProbeResp->MBO_capability = pr->MBO_IE.mbo_cap[2];
+
+ if (pr->MBO_IE.num_assoc_disallowed &&
+ (pr->MBO_IE.assoc_disallowed[0] ==
+ MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID)) {
+ pProbeResp->assoc_disallowed = true;
+ pProbeResp->assoc_disallowed_reason =
+ pr->MBO_IE.assoc_disallowed[2];
+ }
+ }
+
qdf_mem_free(pr);
return eSIR_SUCCESS;
@@ -3695,6 +3708,20 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac,
&pBies->hs20vendor_ie.hs_id,
sizeof(pBies->hs20vendor_ie.hs_id));
}
+
+ if (pBies->MBO_IE.present) {
+ pBeaconStruct->MBO_IE_present = true;
+ pBeaconStruct->MBO_capability = pBies->MBO_IE.mbo_cap[2];
+
+ if (pBies->MBO_IE.num_assoc_disallowed &&
+ (pBies->MBO_IE.assoc_disallowed[0] ==
+ MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID)) {
+ pBeaconStruct->assoc_disallowed = true;
+ pBeaconStruct->assoc_disallowed_reason =
+ pBies->MBO_IE.assoc_disallowed[2];
+ }
+ }
+
qdf_mem_free(pBies);
return eSIR_SUCCESS;
} /* End sir_parse_beacon_ie. */
@@ -4055,6 +4082,18 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac,
&pBeacon->OBSSScanParameters,
sizeof(struct sDot11fIEOBSSScanParameters));
}
+ if (pBeacon->MBO_IE.present) {
+ pBeaconStruct->MBO_IE_present = true;
+ pBeaconStruct->MBO_capability = pBeacon->MBO_IE.mbo_cap[2];
+
+ if (pBeacon->MBO_IE.num_assoc_disallowed &&
+ (pBeacon->MBO_IE.assoc_disallowed[0] ==
+ MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID)) {
+ pBeaconStruct->assoc_disallowed = true;
+ pBeaconStruct->assoc_disallowed_reason =
+ pBeacon->MBO_IE.assoc_disallowed[2];
+ }
+ }
qdf_mem_free(pBeacon);
return eSIR_SUCCESS;
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index 668b3700db8e..9c0e6d0fc329 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -512,6 +512,7 @@ typedef enum {
eCSR_ROAM_ENABLE_QUEUES,
eCSR_ROAM_STA_CHANNEL_SWITCH,
eCSR_ROAM_NDP_STATUS_UPDATE,
+ eCSR_ROAM_UPDATE_SCAN_RESULT,
} eRoamCmdStatus;
/* comment inside indicates what roaming callback gets */
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index 2dd264655bdc..ac27ea7e039e 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -775,6 +775,7 @@ typedef struct tagCsrScanStruct {
#endif
/* This includes all channels on which candidate APs are found */
tCsrChannel occupiedChannels[CSR_ROAM_SESSION_MAX];
+ int8_t roam_candidate_count[CSR_ROAM_SESSION_MAX];
int8_t inScanResultBestAPRssi;
csr_scan_completeCallback callback11dScanDone;
bool fcc_constraint;
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index da177d66d690..327e612edcc6 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -17343,10 +17343,15 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id,
roam_params_dst->traffic_threshold);
/* Set initial dense roam status */
- if (req_buf->ConnectedNetwork.ChannelCount >
+ if (mac_ctx->scan.roam_candidate_count[session_id] >
roam_params_dst->dense_min_aps_cnt)
roam_params_dst->initial_dense_status = true;
+ QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
+ "initial_dense_status:%d, candidate count:%d",
+ roam_params_dst->initial_dense_status,
+ mac_ctx->scan.roam_candidate_count[session_id]);
+
for (i = 0; i < roam_params_dst->num_bssid_avoid_list; i++) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
"Blacklist Bssid: ("MAC_ADDRESS_STR")",
diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c
index 6f960e26be16..7c70213b2d54 100644
--- a/core/sme/src/csr/csr_api_scan.c
+++ b/core/sme/src/csr/csr_api_scan.c
@@ -1602,10 +1602,11 @@ static bool csr_is_better_bss(tpAniSirGlobal mac_ctx,
/* Add the channel to the occupiedChannels array */
static void csr_scan_add_to_occupied_channels(tpAniSirGlobal pMac,
- tCsrScanResult *pResult,
- uint8_t sessionId,
- tCsrChannel *occupied_ch,
- tDot11fBeaconIEs *pIes)
+ tCsrScanResult *pResult,
+ uint8_t sessionId,
+ tCsrChannel *occupied_ch,
+ tDot11fBeaconIEs *pIes,
+ bool is_init_list)
{
QDF_STATUS status;
uint8_t ch;
@@ -1613,9 +1614,15 @@ static void csr_scan_add_to_occupied_channels(tpAniSirGlobal pMac,
uint8_t *occupied_ch_lst = occupied_ch->channelList;
ch = pResult->Result.BssDescriptor.channelId;
- if (csr_is_channel_present_in_list(occupied_ch_lst, num_occupied_ch, ch)
- || !csr_neighbor_roam_connected_profile_match(pMac, sessionId,
- pResult, pIes))
+ if (!csr_neighbor_roam_connected_profile_match(pMac,
+ sessionId, pResult, pIes))
+ return;
+
+ if (is_init_list)
+ pMac->scan.roam_candidate_count[sessionId]++;
+
+ if (csr_is_channel_present_in_list(occupied_ch_lst,
+ num_occupied_ch, ch))
return;
status = csr_add_to_channel_list_front(occupied_ch_lst,
@@ -1658,7 +1665,8 @@ static void csr_scan_add_result(tpAniSirGlobal pMac, tCsrScanResult *pResult,
* "gNeighborScanChannelList" is NOT set in the cfg.ini file
*/
csr_scan_add_to_occupied_channels(pMac, pResult, sessionId,
- &pMac->scan.occupiedChannels[sessionId], pIes);
+ &pMac->scan.occupiedChannels[sessionId], pIes,
+ false);
}
}
@@ -7021,6 +7029,7 @@ void csr_init_occupied_channels_list(tpAniSirGlobal pMac, uint8_t sessionId)
/* Empty occupied channels here */
pMac->scan.occupiedChannels[sessionId].numChannels = 0;
+ pMac->scan.roam_candidate_count[sessionId] = 0;
csr_ll_lock(&pMac->scan.scanResultList);
pEntry = csr_ll_peek_head(&pMac->scan.scanResultList, LL_ACCESS_NOLOCK);
@@ -7033,7 +7042,8 @@ void csr_init_occupied_channels_list(tpAniSirGlobal pMac, uint8_t sessionId)
&pBssDesc->Result.BssDescriptor, &pIes)))
continue;
csr_scan_add_to_occupied_channels(pMac, pBssDesc, sessionId,
- &pMac->scan.occupiedChannels[sessionId], pIes);
+ &pMac->scan.occupiedChannels[sessionId], pIes,
+ true);
/*
* Free the memory allocated for pIes in
* csr_get_parsed_bss_description_ies
diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c
index 9c25f5898228..83809cc7cbc0 100644
--- a/core/sme/src/rrm/sme_rrm.c
+++ b/core/sme/src/rrm/sme_rrm.c
@@ -429,6 +429,7 @@ static QDF_STATUS sme_rrm_send_scan_result(tpAniSirGlobal mac_ctx,
uint8_t counter = 0;
tpRrmSMEContext rrm_ctx = &mac_ctx->rrm.rrmSmeContext;
uint32_t session_id;
+ tCsrRoamInfo *roam_info;
qdf_mem_zero(&filter, sizeof(filter));
qdf_mem_zero(scanresults_arr,
@@ -519,16 +520,31 @@ static QDF_STATUS sme_rrm_send_scan_result(tpAniSirGlobal mac_ctx,
NULL, measurementdone, 0);
}
counter = 0;
+
+ roam_info = qdf_mem_malloc(sizeof(*roam_info));
+ if (NULL == roam_info) {
+ sms_log(mac_ctx, LOGP, FL("vos_mem_malloc failed"));
+ status = QDF_STATUS_E_NOMEM;
+ goto rrm_send_scan_results_done;
+ }
+
while (scan_results) {
next_result = sme_scan_result_get_next(mac_ctx, result_handle);
sms_log(mac_ctx, LOG1, "Scan res timer:%lu, rrm scan timer:%lu",
scan_results->timer, rrm_scan_timer);
- if (scan_results->timer >= rrm_scan_timer)
+ if (scan_results->timer >= rrm_scan_timer) {
+ qdf_mem_zero(roam_info, sizeof(*roam_info));
+ roam_info->pBssDesc = &scan_results->BssDescriptor;
+ csr_roam_call_callback(mac_ctx, session_id, roam_info,
+ 0, eCSR_ROAM_UPDATE_SCAN_RESULT,
+ eCSR_ROAM_RESULT_NONE);
scanresults_arr[counter++] = scan_results;
+ }
scan_results = next_result;
if (counter >= SIR_BCN_REPORT_MAX_BSS_DESC)
break;
}
+ qdf_mem_free(roam_info);
/*
* The beacon report should be sent whether the counter is zero or
* non-zero. There might be a few scan results in the cache but not
@@ -554,6 +570,8 @@ static QDF_STATUS sme_rrm_send_scan_result(tpAniSirGlobal mac_ctx,
scanresults_arr, measurementdone,
counter);
}
+
+rrm_send_scan_results_done:
sme_scan_result_purge(mac_ctx, result_handle);
return status;
}
@@ -635,6 +653,7 @@ QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
tpRrmSMEContext sme_rrm_ctx = &mac_ctx->rrm.rrmSmeContext;
uint32_t session_id;
tSirScanType scan_type;
+ unsigned long current_time;
status = csr_roam_get_session_id_from_bssid(mac_ctx,
&sme_rrm_ctx->sessionBssId, &session_id);
@@ -695,6 +714,27 @@ QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
sms_log(mac_ctx, LOG1, FL("Scan Type(%d) Max Dwell Time(%d)"),
scan_req.scanType, scan_req.maxChnTime);
+ /*
+ * For RRM scans timing is very important especially when the
+ * request is for limited channels. There is no need for
+ * firmware to rest for about 100-200 ms on the home channel.
+ * Instead, it can start the scan right away which will make the
+ * host to respond with the beacon report as quickly as
+ * possible. Ensure that the scan requests are not back to back
+ * and hence there is a check to see if the requests are atleast
+ * 1 second apart.
+ */
+ current_time = qdf_mc_timer_get_system_time();
+ sms_log(mac_ctx, LOG1, "prev scan triggered before %ld ms, totalchannels %d",
+ current_time - rrm_scan_timer,
+ sme_rrm_ctx->channelList.numOfChannels);
+ if ((abs(current_time - rrm_scan_timer) > 1000) &&
+ (sme_rrm_ctx->channelList.numOfChannels == 1)) {
+ scan_req.restTime = 1;
+ scan_req.min_rest_time = 1;
+ scan_req.idle_time = 1;
+ }
+
rrm_scan_timer = qdf_mc_timer_get_system_time();
/* set BSSType to default type */
diff --git a/core/utils/logging/src/wlan_logging_sock_svc.c b/core/utils/logging/src/wlan_logging_sock_svc.c
index b11a6ca38357..aedbd3dd3ce6 100644
--- a/core/utils/logging/src/wlan_logging_sock_svc.c
+++ b/core/utils/logging/src/wlan_logging_sock_svc.c
@@ -233,15 +233,6 @@ static int wlan_queue_logmsg_for_app(void)
gwlan_logging.pcur_node =
(struct log_msg *)(gwlan_logging.filled_list.next);
++gwlan_logging.drop_count;
- /* print every 64th drop count */
- if (cds_is_multicast_logging() &&
- (!(gwlan_logging.drop_count % 0x40))) {
- pr_info
- ("%s: drop_count = %u index = %d filled_length = %d\n",
- __func__, gwlan_logging.drop_count,
- gwlan_logging.pcur_node->index,
- gwlan_logging.pcur_node->filled_length);
- }
list_del_init(gwlan_logging.filled_list.next);
ret = 1;
}
@@ -315,6 +306,7 @@ int wlan_log_to_user(QDF_TRACE_LEVEL log_level, char *to_be_sent, int length)
unsigned long flags;
uint64_t ts;
int radio;
+ bool log_overflow = false;
radio = cds_get_radio_index();
@@ -369,13 +361,11 @@ int wlan_log_to_user(QDF_TRACE_LEVEL log_level, char *to_be_sent, int length)
/* Assumption here is that we receive logs which is always less than
* MAX_LOGMSG_LENGTH, where we can accomodate the
* tAniNlHdr + [context][timestamp] + log
- * QDF_ASSERT if we cannot accomodate the the complete log into
- * the available buffer.
*
* Continue and copy logs to the available length and discard the rest.
*/
if (MAX_LOGMSG_LENGTH < (sizeof(tAniNlHdr) + total_log_len)) {
- QDF_ASSERT(0);
+ log_overflow = true;
total_log_len = MAX_LOGMSG_LENGTH - sizeof(tAniNlHdr) - 2;
}
@@ -387,6 +377,11 @@ int wlan_log_to_user(QDF_TRACE_LEVEL log_level, char *to_be_sent, int length)
*pfilled_length += 1;
spin_unlock_irqrestore(&gwlan_logging.spin_lock, flags);
+ /*
+ * QDF_ASSERT if complete log was not accomodated into
+ * the available buffer.
+ */
+ QDF_ASSERT(!log_overflow);
/* Wakeup logger thread */
if ((true == wake_up_thread)) {
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 54c1937bce7c..dfcd72302f9c 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -2639,6 +2639,16 @@ static bool tlv_check_required(int32_t reason)
{
switch (reason) {
case WOW_REASON_PATTERN_MATCH_FOUND:
+ case WOW_REASON_BPF_ALLOW:
+ case WOW_REASON_AUTH_REQ_RECV:
+ case WOW_REASON_ASSOC_REQ_RECV:
+ case WOW_REASON_DEAUTH_RECVD:
+ case WOW_REASON_DISASSOC_RECVD:
+ case WOW_REASON_ASSOC_RES_RECV:
+ case WOW_REASON_REASSOC_REQ_RECV:
+ case WOW_REASON_REASSOC_RES_RECV:
+ case WOW_REASON_BEACON_RECV:
+ case WOW_REASON_ACTION_FRAME_RECV:
return false;
default:
return true;
@@ -3344,9 +3354,6 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
WMA_LOGD(FL("Host woken up for OEM Response event"));
break;
default:
- WMA_LOGE(FL("WOW reason %s(%d)- not handled"),
- wma_wow_wake_reason_str(wake_info->wake_reason),
- wake_info->wake_reason);
break;
}
@@ -3357,7 +3364,9 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
WMA_LOGA("Holding %d msec wake_lock", wake_lock_duration);
}
- wmitlv_free_allocated_event_tlvs(event_id, &wmi_cmd_struct_ptr);
+ if (wmi_cmd_struct_ptr)
+ wmitlv_free_allocated_event_tlvs(event_id, &wmi_cmd_struct_ptr);
+
return 0;
}
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index 19628077f81a..6146ac63c76c 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -4393,6 +4393,10 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
return -EINVAL;
}
+ ol_tx_mark_first_wakeup_packet(
+ WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
+ WMI_SERVICE_MARK_FIRST_WAKEUP_PACKET));
+
wma_handle->nan_datapath_enabled =
WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
WMI_SERVICE_NAN_DATA);
@@ -6223,6 +6227,30 @@ void wma_log_completion_timeout(void *data)
}
/**
+ * wma_map_pcl_weights() - Map PCL weights
+ * @pcl_weight: Internal PCL weights
+ *
+ * Maps the internal weights of PCL to the weights needed by FW
+ *
+ * Return: Mapped channel weight of type wmi_pcl_chan_weight
+ */
+static wmi_pcl_chan_weight wma_map_pcl_weights(uint32_t pcl_weight)
+{
+ switch (pcl_weight) {
+ case WEIGHT_OF_GROUP1_PCL_CHANNELS:
+ return WMI_PCL_WEIGHT_VERY_HIGH;
+ case WEIGHT_OF_GROUP2_PCL_CHANNELS:
+ return WMI_PCL_WEIGHT_HIGH;
+ case WEIGHT_OF_GROUP3_PCL_CHANNELS:
+ return WMI_PCL_WEIGHT_MEDIUM;
+ case WEIGHT_OF_NON_PCL_CHANNELS:
+ return WMI_PCL_WEIGHT_LOW;
+ default:
+ return WMI_PCL_WEIGHT_DISALLOW;
+ }
+}
+
+/**
* wma_send_pdev_set_pcl_cmd() - Send WMI_SOC_SET_PCL_CMDID to FW
* @wma_handle: WMA handle
* @msg: PCL structure containing the PCL and the number of channels
@@ -6260,6 +6288,15 @@ QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
msg->saved_num_chan = wma_handle->saved_chan.num_channels;
status = cds_get_valid_chan_weights((struct sir_pcl_chan_weights *)msg);
+
+ for (i = 0; i < msg->saved_num_chan; i++) {
+ msg->weighed_valid_list[i] =
+ wma_map_pcl_weights(msg->weighed_valid_list[i]);
+ WMA_LOGD("%s: chan:%d weight[%d]=%d", __func__,
+ msg->saved_chan_list[i], i,
+ msg->weighed_valid_list[i]);
+ }
+
if (!QDF_IS_STATUS_SUCCESS(status)) {
WMA_LOGE("%s: Error in creating weighed pcl", __func__);
return status;
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 6b21e356ef1d..c825f1dcf153 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -206,6 +206,9 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
cmd->scan_priority = WMI_SCAN_PRIORITY_LOW;
cmd->scan_req_id = scan_req->scan_requestor_id;
+ if (PREAUTH_REQUESTOR_ID == cmd->scan_req_id)
+ cmd->scan_priority = WMI_SCAN_PRIORITY_VERY_HIGH;
+
/* Set the scan events which the driver is intereseted to receive */
/* TODO: handle all the other flags also */
cmd->notify_scan_events = WMI_SCAN_EVENT_STARTED |
@@ -834,7 +837,7 @@ QDF_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
params.dense_min_aps_cnt = roam_params->dense_min_aps_cnt;
params.traffic_threshold =
roam_params->traffic_threshold;
- params.initial_dense_status = 0; /* reserved */
+ params.initial_dense_status = roam_params->initial_dense_status;
/*
@@ -900,10 +903,11 @@ QDF_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
FL("hirssi_scan max_count=%d, delta=%d, hirssi_upper_bound=%d"),
hirssi_scan_max_count, hirssi_scan_delta, hirssi_upper_bound);
WMA_LOGI(
- FL("dense_rssi_thresh_offset=%d, dense_min_aps_cnt=%d, traffic_threshold=%d"),
+ FL("dense_rssi_thresh_offset=%d, dense_min_aps_cnt=%d, traffic_threshold=%d initial_dense_status=%d"),
roam_params->dense_rssi_thresh_offset,
roam_params->dense_min_aps_cnt,
- roam_params->traffic_threshold);
+ roam_params->traffic_threshold,
+ roam_params->initial_dense_status);
return status;
}
@@ -4027,6 +4031,7 @@ static int wma_fill_num_results_per_scan_id(const u_int8_t *cmd_param_info,
t_scan_id_grp->scan_id = src_rssi->scan_cycle_id;
t_scan_id_grp->flags = src_rssi->flags;
+ t_scan_id_grp->buckets_scanned = src_rssi->buckets_scanned;
t_scan_id_grp->num_results = 1;
for (i = 1; i < event->num_entries_in_page; i++) {
src_rssi++;
@@ -4037,6 +4042,8 @@ static int wma_fill_num_results_per_scan_id(const u_int8_t *cmd_param_info,
prev_scan_id = t_scan_id_grp->scan_id =
src_rssi->scan_cycle_id;
t_scan_id_grp->flags = src_rssi->flags;
+ t_scan_id_grp->buckets_scanned =
+ src_rssi->buckets_scanned;
t_scan_id_grp->num_results = 1;
}
}
@@ -4193,7 +4200,6 @@ int wma_extscan_cached_results_event_handler(void *handle,
qdf_mem_zero(dest_cachelist, sizeof(*dest_cachelist));
dest_cachelist->request_id = event->request_id;
dest_cachelist->more_data = moredata;
- dest_cachelist->buckets_scanned = event->buckets_scanned;
scan_ids_cnt = wma_extscan_find_unique_scan_ids(cmd_param_info);
WMA_LOGI("%s: scan_ids_cnt %d", __func__, scan_ids_cnt);
diff --git a/target/inc/wal_rx_desc.h b/target/inc/wal_rx_desc.h
index 408075567354..cb4be58b9d99 100644
--- a/target/inc/wal_rx_desc.h
+++ b/target/inc/wal_rx_desc.h
@@ -83,6 +83,9 @@ struct hw_rx_desc_base {
};
#endif
+#define FW_MSDU_INFO_FIRST_WAKEUP_M 0x40
+#define FW_MSDU_INFO_FIRST_WAKEUP_S 6
+
/*
* This struct defines the basic MSDU rx descriptor created by FW.
*/