summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-10-27 07:17:02 -0600
committerLinux Build Service Account <lnxbuild@localhost>2016-10-27 07:17:02 -0600
commit373bde37f5b8198968969df1c2286cdeded79576 (patch)
treed0af8df2f8b57e3096042d6f37075b1d9490a0ba
parent692add428968b4b7d361a05a1cca399a798359e7 (diff)
parentaca9912cc3352bff1f97803707322f4b4975973f (diff)
Promotion of wlan-cld3.driver.lnx.1.1-00109.
CRs Change ID Subject -------------------------------------------------------------------------------------------------------------- 688141 I40b358130eacdb586291097679a8565cb566078e Release 5.1.0.32Q 1079851 I9ad600eda2e507312a3016aa6d1fe6fdc41724f2 qcacld-3.0: Disable non-20 mhz 2G world regulatory chann 1079679 Icdf64ffbf858201dfa315ab3c75bb32d5eca5fa8 qcacld-3.0: Remove redundant mem zero after malloc in MA 688141 I744567b176917d158bc06c71c86630e60f4dac13 Release 5.1.0.32R 688141 Ic895a5c33c0c4e9cbc8a18001183be46a866ac53 Release 5.1.0.32V 688141 I08bd05b5b5bf005a2e772b27538840f1dba77d98 Release 5.1.0.32P 1018460 Ia14b84f1039dc4ffec6ad63550fed21e932f8012 qcacld-3.0: Use system time instead of jiffies for BSS r 1049765 Ib5b3e1235ad36cf0594291f33e84758261e4d422 qcacld-3.0: Remove unwanted error messages 1078405 Id14ebef7b5bbafaa799752620973ce03ab0bdd8c qcacld-3.0: Protect con mode change with possible race c 1079691 I385afd98a134c2d79189090ce4c84c4b3adcc94e qcacld-3.0: Remove redundant mem zero after malloc in DP 688141 I6f77d6d63b9df530ab730303092e670b6b4c53b7 Release 5.1.0.32Y 1079440 Ifd950d7d629750afd526db56de2f4b656f1f87de qcacld-3.0: Fix offload enable status checking after int 688141 Iaba7d1003fe4f6b692a7058658693721d3f753d5 Release 5.1.0.32W 688141 I49bd8286d6989dd3b0af6368cb1e85e2adda7f38 Release 5.1.0.33A 1075406 Ie22b70cb5050c2646e3c2c12fcbdf66255c1284b qcacld-3.0: Fix memory leak issue 688141 I0cb887a7005338fbabf723c38e965b20a38089b8 Release 5.1.0.32U 1079684 I15e16bbe8caa8c03ffd1fefdabd415619393e117 qcacld-3.0: Remove redundant mem zero after malloc in SM 688141 I6ab1adcfc117c9572bdfc8607e03224e587db476 Release 5.1.0.33 1078863 I3c3f14c16bd6a004670b6105231e591a13039fdc qcacld-3.0: Fix SAP 'Channel Avoid' Build Issues 688141 I0fcf961f46cb83356c6f0a170cc90b130db4f517 Release 5.1.0.32X 688141 I01f93a142506296e8f0f58cc0f54cc0df5d9e31c Release 5.1.0.32O 1063245 I346ea186ad26c5f5a0fd4c3dee4a39b102570de7 qcacld-3.0: Fix tcp chksum can't be enabled for sap 688141 I6fcb0e323415a22144c23eadf65c2e1f48646bae Release 5.1.0.32N 688141 I71a53ca2b97fa21572f5e79e9e05211276221b44 Release 5.1.0.33C 1081234 I1fbdc10256b59d7ca49256461244566e04a52df5 qcacld-3.0: Use connected AP channel during reassoc to s 1049206 Iff0933842b13482e9949473a4c8a48bf83230cc1 qcacld-3.0: Modify CFG_INFRA_STA_KEEP_ALIVE_PERIOD_DEFAU 1072584 Ifa27916667198c3fdc1c51d0e38564869405e041 qcacld-3.0: Add iwpriv pktlog command to alter pktlog bu 1079970 I9a22bd542aea32c7cbac11107fe8b6c9785a2ac1 qcacld-3.0: Report correct TX ack status to supplicant 1035577 Icdcb0e83432299014fb46507bdd5978b76919ab5 qcacld-3.0: Extend cfg80211 configure API 688141 Id024ebd4acdc9a6d1ab2d9b083bd48154459ab88 Release 5.1.0.32Z 688141 I055388a8fc8b890aad48dc978e8d25ce1decd6ce Release 5.1.0.33B 1081198 I9cb0b6f6a49b25c2bd74c5e2140e8fe8919f3f44 qcacld-3.0: Send ASSOC_IEs only in connected state 1081073 I5f07ab5eba0d24512a06c5426427ad67ee6f798d qcacld-3.0: Abort cds_deinit_policy_mgr if context is nu 1031468 I52d8575960e4d5bac5aa509df41c20fb846a96e6 qcacld-3.0: Reset the parameters which overrides the ACS 1079196 Ia43ca4f95c5b40aeb14976b523008e650ba26e10 qcacld-3.0: Un-initialize modules after closing cds sche 688141 I1350cc6aab024fc46bc207f8c5a1b048e581b147 Release 5.1.0.32T 1081177 I1a89e509068ecb85a6c5655dd43e01a39d660b2e qcacld-3.0: Fix to respond to SA query req only in-case 1077315 I90d110af370842fcd2bc8cc11008d1524c99332e qcacld-3.0: Trigger BUG ON only if recovery is disabled 908252 I652979cb26fd7fff36ee54f9ec60132453ac7913 qcacld-3.0: Avoid buffer overflow 1079659 I3190e56ad7b8c12c4dc8357b1e1238e04f651d6a qcacld-3.0: Remove redundant mem zero after malloc in HD 688141 I71d35cd8fbba38231d8905a806bf44aff29a21db Release 5.1.0.32S Change-Id: Ide3f8b160eabbea7c3f57765effaf9df0fe38c23 CRs-Fixed: 1035577, 1079684, 1079440, 1075406, 1079196, 1079659, 1063245, 1081198, 1072584, 1078863, 1077315, 1049206, 908252, 1079679, 1081177, 1081073, 688141, 1018460, 1079691, 1078405, 1079970, 1079851, 1049765, 1031468, 1081234
-rw-r--r--core/cds/inc/cds_api.h1
-rw-r--r--core/cds/inc/cds_config.h1
-rw-r--r--core/cds/src/cds_api.c33
-rw-r--r--core/cds/src/cds_concurrency.c3
-rw-r--r--core/cds/src/cds_sched.c1
-rw-r--r--core/cds/src/cds_utils.c2
-rw-r--r--core/dp/htt/htt.c1
-rw-r--r--core/dp/htt/htt_tx.c6
-rw-r--r--core/dp/txrx/ol_rx_reorder.c1
-rw-r--r--core/dp/txrx/ol_tx_sched.c2
-rw-r--r--core/dp/txrx/ol_txrx.c2
-rw-r--r--core/dp/txrx/ol_txrx_peer_find.c9
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h2
-rw-r--r--core/hdd/inc/wlan_hdd_main.h17
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c1
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c74
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.h30
-rw-r--r--core/hdd/src/wlan_hdd_driver_ops.c13
-rw-r--r--core/hdd/src/wlan_hdd_ext_scan.c1
-rw-r--r--core/hdd/src/wlan_hdd_green_ap.c1
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c15
-rw-r--r--core/hdd/src/wlan_hdd_ioctl.c22
-rw-r--r--core/hdd/src/wlan_hdd_ipa.c114
-rw-r--r--core/hdd/src/wlan_hdd_main.c95
-rw-r--r--core/hdd/src/wlan_hdd_ocb.c3
-rw-r--r--core/hdd/src/wlan_hdd_p2p.c11
-rw-r--r--core/hdd/src/wlan_hdd_power.c3
-rw-r--r--core/hdd/src/wlan_hdd_regulatory.c13
-rw-r--r--core/hdd/src/wlan_hdd_scan.c8
-rw-r--r--core/hdd/src/wlan_hdd_tdls.c3
-rw-r--r--core/hdd/src/wlan_hdd_wext.c23
-rw-r--r--core/mac/inc/qwlan_version.h6
-rw-r--r--core/mac/inc/sir_api.h6
-rw-r--r--core/mac/src/pe/lim/lim_admit_control.c2
-rw-r--r--core/mac/src/pe/lim/lim_api.c8
-rw-r--r--core/mac/src/pe/lim/lim_assoc_utils.c13
-rw-r--r--core/mac/src/pe/lim/lim_ft.c4
-rw-r--r--core/mac/src/pe/lim/lim_ft_preauth.c3
-rw-r--r--core/mac/src/pe/lim/lim_ibss_peer_mgmt.c4
-rw-r--r--core/mac/src/pe/lim/lim_p2p.c17
-rw-r--r--core/mac/src/pe/lim/lim_process_action_frame.c7
-rw-r--r--core/mac/src/pe/lim/lim_process_assoc_req_frame.c2
-rw-r--r--core/mac/src/pe/lim/lim_process_message_queue.c2
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_host_roam.c4
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_req_messages.c1
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c3
-rw-r--r--core/mac/src/pe/lim/lim_process_sme_req_messages.c18
-rw-r--r--core/mac/src/pe/lim/lim_process_tdls.c3
-rw-r--r--core/mac/src/pe/lim/lim_prop_exts_utils.c1
-rw-r--r--core/mac/src/pe/lim/lim_scan_result_utils.c8
-rw-r--r--core/mac/src/pe/lim/lim_security_utils.c8
-rw-r--r--core/mac/src/pe/lim/lim_send_frames_host_roam.c1
-rw-r--r--core/mac/src/pe/lim/lim_send_management_frames.c5
-rw-r--r--core/mac/src/pe/lim/lim_send_messages.c5
-rw-r--r--core/mac/src/pe/lim/lim_send_sme_rsp_messages.c20
-rw-r--r--core/mac/src/pe/lim/lim_session.c3
-rw-r--r--core/mac/src/pe/lim/lim_timer_utils.c2
-rw-r--r--core/mac/src/pe/lim/lim_utils.c4
-rw-r--r--core/mac/src/pe/nan/nan_datapath.c1
-rw-r--r--core/mac/src/pe/rrm/rrm_api.c14
-rw-r--r--core/mac/src/pe/sch/sch_api.c1
-rw-r--r--core/mac/src/pe/sch/sch_beacon_gen.c5
-rw-r--r--core/mac/src/sys/legacy/src/system/src/mac_init_api.c3
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/parser_api.c5
-rw-r--r--core/sap/src/sap_ch_select.c38
-rw-r--r--core/sap/src/sap_fsm.c2
-rw-r--r--core/sme/src/common/sme_api.c27
-rw-r--r--core/sme/src/common/sme_ft_api.c1
-rw-r--r--core/sme/src/common/sme_power_save.c3
-rw-r--r--core/sme/src/csr/csr_api_roam.c76
-rw-r--r--core/sme/src/csr/csr_api_scan.c67
-rw-r--r--core/sme/src/csr/csr_host_scan_roam.c11
-rw-r--r--core/sme/src/csr/csr_inside_api.h1
-rw-r--r--core/sme/src/csr/csr_neighbor_roam.c9
-rw-r--r--core/sme/src/csr/csr_roam_preauth.c1
-rw-r--r--core/sme/src/csr/csr_util.c2
-rw-r--r--core/sme/src/nan/nan_api.c2
-rw-r--r--core/sme/src/nan/nan_datapath_api.c2
-rw-r--r--core/sme/src/p2p/p2p_api.c3
-rw-r--r--core/sme/src/qos/sme_qos.c4
-rw-r--r--core/sme/src/rrm/sme_rrm.c23
-rw-r--r--core/utils/epping/src/epping_helper.c3
-rw-r--r--core/utils/host_diag_log/src/host_diag_log.c2
-rw-r--r--core/utils/host_diag_log/src/i_host_diag_core_log.h1
-rw-r--r--core/utils/pktlog/linux_ac.c1
-rw-r--r--core/utils/pktlog/pktlog_ac.c13
-rw-r--r--core/wma/src/wma_data.c1
-rw-r--r--core/wma/src/wma_dev_if.c3
-rw-r--r--core/wma/src/wma_features.c65
-rw-r--r--core/wma/src/wma_main.c7
90 files changed, 492 insertions, 576 deletions
diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h
index 4a94baeee1af..fa048f1d72ea 100644
--- a/core/cds/inc/cds_api.h
+++ b/core/cds/inc/cds_api.h
@@ -291,4 +291,5 @@ struct cds_config_info *cds_get_ini_config(void);
bool cds_is_5_mhz_enabled(void);
bool cds_is_10_mhz_enabled(void);
bool cds_is_sub_20_mhz_enabled(void);
+bool cds_is_self_recovery_enabled(void);
#endif /* if !defined __CDS_API_H */
diff --git a/core/cds/inc/cds_config.h b/core/cds/inc/cds_config.h
index 892181b9fc43..c6e969196d27 100644
--- a/core/cds/inc/cds_config.h
+++ b/core/cds/inc/cds_config.h
@@ -147,5 +147,6 @@ struct cds_config_info {
uint16_t self_gen_frm_pwr;
enum cfg_sub_20_channel_width sub_20_channel_width;
bool flow_steering_enabled;
+ bool self_recovery_enabled;
};
#endif /* !defined( __CDS_CONFIG_H ) */
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c
index 9f49466926b1..7de4ad52b976 100644
--- a/core/cds/src/cds_api.c
+++ b/core/cds/src/cds_api.c
@@ -520,7 +520,14 @@ QDF_STATUS cds_pre_enable(v_CONTEXT_t cds_context)
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
"Failed to get ready event from target firmware");
- QDF_BUG(0);
+ /*
+ * Panic only if recovery is disabled, else return failure so
+ * that driver load can fail gracefully. We cannot trigger self
+ * recovery here because driver is not fully loaded yet.
+ */
+ if (!cds_is_self_recovery_enabled())
+ QDF_BUG(0);
+
htc_stop(gp_cds_context->htc_ctx);
return QDF_STATUS_E_FAILURE;
}
@@ -1123,9 +1130,6 @@ QDF_STATUS cds_alloc_context(void *p_cds_context, QDF_MODULE_ID moduleID,
return QDF_STATUS_E_NOMEM;
}
- if (moduleID == QDF_MODULE_ID_TLSHIM)
- qdf_mem_zero(*ppModuleContext, size);
-
*pGpModContext = *ppModuleContext;
return QDF_STATUS_SUCCESS;
@@ -2255,6 +2259,27 @@ bool cds_is_sub_20_mhz_enabled(void)
}
/**
+ * cds_is_self_recovery_enabled() - API to get self recovery enabled
+ *
+ * Return: true if self recovery enabled, false otherwise
+ */
+bool cds_is_self_recovery_enabled(void)
+{
+ p_cds_contextType p_cds_context;
+
+ p_cds_context = cds_get_context(QDF_MODULE_ID_QDF);
+ if (!p_cds_context) {
+ cds_err("%s: cds context is invalid", __func__);
+ return false;
+ }
+
+ if (p_cds_context->cds_cfg)
+ return p_cds_context->cds_cfg->self_recovery_enabled;
+
+ return false;
+}
+
+/**
* cds_svc_fw_shutdown_ind() - API to send userspace about FW crash
*
* @dev: Device Pointer
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index a23a56b51ef7..562daefdad2d 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -3963,8 +3963,7 @@ QDF_STATUS cds_deinit_policy_mgr(void)
cds_ctx = cds_get_context(QDF_MODULE_ID_QDF);
if (!cds_ctx) {
cds_err("Invalid CDS Context");
- status = QDF_STATUS_E_FAILURE;
- QDF_ASSERT(0);
+ return QDF_STATUS_E_FAILURE;
}
if (!QDF_IS_STATUS_SUCCESS(qdf_event_destroy
diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c
index 46b76761bb94..bc5827993843 100644
--- a/core/cds/src/cds_sched.c
+++ b/core/cds/src/cds_sched.c
@@ -880,7 +880,6 @@ static QDF_STATUS cds_alloc_ol_rx_pkt_freeq(p_cds_sched_context pSchedContext)
__func__);
goto free;
}
- memset(pkt, 0, sizeof(*pkt));
spin_lock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock);
list_add_tail(&pkt->list, &pSchedContext->cds_ol_rx_pkt_freeq);
spin_unlock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock);
diff --git a/core/cds/src/cds_utils.c b/core/cds/src/cds_utils.c
index 5ae79e495d9e..da331dd8d7ca 100644
--- a/core/cds/src/cds_utils.c
+++ b/core/cds/src/cds_utils.c
@@ -426,7 +426,6 @@ cds_attach_mmie(uint8_t *igtk, uint8_t *ipn, uint16_t key_id,
* Copy the AAD, Management frame body, and
* MMIE with 8 bit MIC zeroed out
*/
- qdf_mem_zero(input, nBytes);
qdf_mem_copy(input, aad, AAD_LEN);
/* Copy Management Frame Body and MMIE without MIC */
qdf_mem_copy(input + AAD_LEN,
@@ -533,7 +532,6 @@ cds_is_mmie_valid(uint8_t *igtk, uint8_t *ipn, uint8_t *frm, uint8_t *efrm)
}
/* Copy the AAD, MMIE with 8 bit MIC zeroed out */
- qdf_mem_zero(input, nBytes);
qdf_mem_copy(input, aad, AAD_LEN);
qdf_mem_copy(input + AAD_LEN, (uint8_t *) (wh + 1),
nBytes - AAD_LEN - CMAC_TLEN);
diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c
index 987eeecc7d38..80fb269b7dbb 100644
--- a/core/dp/htt/htt.c
+++ b/core/dp/htt/htt.c
@@ -294,7 +294,6 @@ htt_pdev_alloc(ol_txrx_pdev_handle txrx_pdev,
pdev->txrx_pdev = txrx_pdev;
pdev->htc_pdev = htc_pdev;
- qdf_mem_set(&pdev->stats, sizeof(pdev->stats), 0);
pdev->htt_htc_pkt_freelist = NULL;
#ifdef ATH_11AC_TXCOMPACT
pdev->htt_htc_pkt_misclist = NULL;
diff --git a/core/dp/htt/htt_tx.c b/core/dp/htt/htt_tx.c
index a3246eeaa3f5..b647ceca6d1f 100644
--- a/core/dp/htt/htt_tx.c
+++ b/core/dp/htt/htt_tx.c
@@ -1240,9 +1240,6 @@ int htt_tx_ipa_uc_attach(struct htt_pdev_t *pdev,
return_code = -ENOBUFS;
goto free_tx_comp_base;
}
- qdf_mem_zero(pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg,
- uc_tx_buf_cnt *
- sizeof(*pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg));
pdev->ipa_uc_tx_rsc.paddr_strg =
qdf_mem_malloc(uc_tx_buf_cnt *
@@ -1252,9 +1249,6 @@ int htt_tx_ipa_uc_attach(struct htt_pdev_t *pdev,
return_code = -ENOBUFS;
goto free_tx_comp_base;
}
- qdf_mem_zero(pdev->ipa_uc_tx_rsc.paddr_strg,
- uc_tx_buf_cnt *
- sizeof(*pdev->ipa_uc_tx_rsc.paddr_strg));
pdev->ipa_uc_tx_rsc.alloc_tx_buf_cnt = htt_tx_ipa_uc_wdi_tx_buf_alloc(
pdev, uc_tx_buf_sz, uc_tx_buf_cnt, uc_tx_partition_base);
diff --git a/core/dp/txrx/ol_rx_reorder.c b/core/dp/txrx/ol_rx_reorder.c
index 2572ccdc34d0..5116cf0c0a6f 100644
--- a/core/dp/txrx/ol_rx_reorder.c
+++ b/core/dp/txrx/ol_rx_reorder.c
@@ -492,7 +492,6 @@ ol_rx_addba_handler(ol_txrx_pdev_handle pdev,
round_pwr2_win_sz * sizeof(struct ol_rx_reorder_array_elem_t);
rx_reorder->array = qdf_mem_malloc(array_size);
TXRX_ASSERT1(rx_reorder->array);
- qdf_mem_set(rx_reorder->array, array_size, 0x0);
rx_reorder->win_sz_mask = round_pwr2_win_sz - 1;
rx_reorder->num_mpdus = 0;
diff --git a/core/dp/txrx/ol_tx_sched.c b/core/dp/txrx/ol_tx_sched.c
index bafd83c661eb..b14966d8abef 100644
--- a/core/dp/txrx/ol_tx_sched.c
+++ b/core/dp/txrx/ol_tx_sched.c
@@ -991,8 +991,6 @@ ol_tx_sched_init_wrr_adv(
if (scheduler == NULL)
return scheduler;
- qdf_mem_zero(scheduler, sizeof(*scheduler));
-
OL_TX_SCHED_WRR_ADV_CAT_CFG_STORE(VO, scheduler);
OL_TX_SCHED_WRR_ADV_CAT_CFG_STORE(VI, scheduler);
OL_TX_SCHED_WRR_ADV_CAT_CFG_STORE(BE, scheduler);
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c
index 5ea86231b7e9..f08e60c0e87e 100644
--- a/core/dp/txrx/ol_txrx.c
+++ b/core/dp/txrx/ol_txrx.c
@@ -975,7 +975,6 @@ ol_txrx_pdev_attach(ol_pdev_handle ctrl_pdev,
pdev = qdf_mem_malloc(sizeof(*pdev));
if (!pdev)
goto fail0;
- qdf_mem_zero(pdev, sizeof(*pdev));
/* init LL/HL cfg here */
pdev->cfg.is_high_latency = ol_cfg_is_high_latency(ctrl_pdev);
@@ -2134,7 +2133,6 @@ ol_txrx_peer_attach(ol_txrx_vdev_handle vdev, uint8_t *peer_mac_addr)
peer = qdf_mem_malloc(sizeof(*peer));
if (!peer)
return NULL; /* failure */
- qdf_mem_zero(peer, sizeof(*peer));
/* store provided params */
peer->vdev = vdev;
diff --git a/core/dp/txrx/ol_txrx_peer_find.c b/core/dp/txrx/ol_txrx_peer_find.c
index f43670155242..12638b04c858 100644
--- a/core/dp/txrx/ol_txrx_peer_find.c
+++ b/core/dp/txrx/ol_txrx_peer_find.c
@@ -310,15 +310,6 @@ static int ol_txrx_peer_find_map_attach(struct ol_txrx_pdev_t *pdev)
if (!pdev->peer_id_to_obj_map)
return 1; /* failure */
- /*
- * The peer_id_to_obj_map doesn't really need to be initialized,
- * since elements are only used after they have been individually
- * initialized.
- * However, it is convenient for debugging to have all elements
- * that are not in use set to 0.
- */
- qdf_mem_set(pdev->peer_id_to_obj_map, peer_map_size, 0);
-
return 0; /* success */
}
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 63b2b0f5c05a..9ad137ddbba2 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -582,7 +582,7 @@ typedef enum {
#define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_NAME "gStaKeepAlivePeriod"
#define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_MIN (0)
#define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_MAX (65535)
-#define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_DEFAULT (0)
+#define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_DEFAULT (30)
/* WMM configuration */
#define CFG_QOS_WMM_MODE_NAME "WmmIsEnabled"
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index ec6e5990dc08..398e7c2f592e 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1070,10 +1070,10 @@ struct hdd_adapter_s {
int temperature;
/* Time stamp for last completed RoC request */
- unsigned long last_roc_ts;
+ uint64_t last_roc_ts;
/* Time stamp for start RoC request */
- unsigned long start_roc_ts;
+ uint64_t start_roc_ts;
/* State for synchronous OCB requests to WMI */
struct sir_ocb_set_config_response ocb_set_config_resp;
@@ -1802,14 +1802,19 @@ static inline QDF_STATUS hdd_register_for_sap_restart_with_channel_switch(void)
#endif
#if !defined(REMOVE_PKT_LOG)
-int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value);
-int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable, uint8_t);
+int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value,
+ int set_value2);
+int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable,
+ uint8_t user_triggered, int size);
+
#else
-int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable, uint8_t)
+static inline int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable,
+ uint8_t user_triggered, int size)
{
return 0;
}
-int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value)
+static inline int hdd_process_pktlog_command(hdd_context_t *hdd_ctx,
+ uint32_t set_value, int set_value2)
{
return 0;
}
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 584830a1d62d..b92c3c74e6a5 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -6876,7 +6876,6 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
"%s: unable to allocate smeConfig", __func__);
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(smeConfig, sizeof(*smeConfig));
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO_HIGH,
"%s bWmmIsEnabled=%d 802_11e_enabled=%d dot11Mode=%d",
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index ac58c814d1b3..2e9494a6182b 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -3889,6 +3889,11 @@ wlan_hdd_wifi_config_policy[QCA_WLAN_VENDOR_ATTR_CONFIG_MAX + 1] = {
[QCA_WLAN_VENDOR_ATTR_CONFIG_CHANNEL_AVOIDANCE_IND] = {.type = NLA_U8 },
[QCA_WLAN_VENDOR_ATTR_CONFIG_TX_MPDU_AGGREGATION] = {.type = NLA_U8 },
[QCA_WLAN_VENDOR_ATTR_CONFIG_RX_MPDU_AGGREGATION] = {.type = NLA_U8 },
+ [QCA_WLAN_VENDOR_ATTR_CONFIG_NON_AGG_RETRY] = {.type = NLA_U8 },
+ [QCA_WLAN_VENDOR_ATTR_CONFIG_AGG_RETRY] = {.type = NLA_U8 },
+ [QCA_WLAN_VENDOR_ATTR_CONFIG_MGMT_RETRY] = {.type = NLA_U8 },
+ [QCA_WLAN_VENDOR_ATTR_CONFIG_CTRL_RETRY] = {.type = NLA_U8 },
+ [QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY] = {.type = NLA_U8 },
};
/**
@@ -3959,6 +3964,8 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
uint8_t *scan_ie;
struct sir_set_tx_rx_aggregation_size request;
QDF_STATUS qdf_status;
+ uint8_t retry, delay;
+ int param_id;
ENTER_DEV(dev);
@@ -4068,6 +4075,57 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
access_policy);
}
+ if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_NON_AGG_RETRY]) {
+ retry = nla_get_u8(tb[
+ QCA_WLAN_VENDOR_ATTR_CONFIG_NON_AGG_RETRY]);
+ retry = retry > CFG_NON_AGG_RETRY_MAX ?
+ CFG_NON_AGG_RETRY_MAX : retry;
+ param_id = WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH;
+ ret_val = wma_cli_set_command(adapter->sessionId, param_id,
+ retry, PDEV_CMD);
+ }
+
+ if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_AGG_RETRY]) {
+ retry = nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_CONFIG_AGG_RETRY]);
+ retry = retry > CFG_AGG_RETRY_MAX ?
+ CFG_AGG_RETRY_MAX : retry;
+
+ /* Value less than CFG_AGG_RETRY_MIN has side effect to t-put */
+ retry = ((retry > 0) && (retry < CFG_AGG_RETRY_MIN)) ?
+ CFG_AGG_RETRY_MIN : retry;
+ param_id = WMI_PDEV_PARAM_AGG_SW_RETRY_TH;
+ ret_val = wma_cli_set_command(adapter->sessionId, param_id,
+ retry, PDEV_CMD);
+ }
+
+ if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_MGMT_RETRY]) {
+ retry = nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_CONFIG_MGMT_RETRY]);
+ retry = retry > CFG_MGMT_RETRY_MAX ?
+ CFG_MGMT_RETRY_MAX : retry;
+ param_id = WMI_PDEV_PARAM_MGMT_RETRY_LIMIT;
+ ret_val = wma_cli_set_command(adapter->sessionId, param_id,
+ retry, PDEV_CMD);
+ }
+
+ if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_CTRL_RETRY]) {
+ retry = nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_CONFIG_CTRL_RETRY]);
+ retry = retry > CFG_CTRL_RETRY_MAX ?
+ CFG_CTRL_RETRY_MAX : retry;
+ param_id = WMI_PDEV_PARAM_CTRL_RETRY_LIMIT;
+ ret_val = wma_cli_set_command(adapter->sessionId, param_id,
+ retry, PDEV_CMD);
+ }
+
+ if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY]) {
+ delay = nla_get_u8(tb[
+ QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY]);
+ delay = delay > CFG_PROPAGATION_DELAY_MAX ?
+ CFG_PROPAGATION_DELAY_MAX : delay;
+ param_id = WMI_PDEV_PARAM_PROPAGATION_DELAY;
+ ret_val = wma_cli_set_command(adapter->sessionId, param_id,
+ delay, PDEV_CMD);
+ }
+
if (vendor_ie_present && access_policy_present) {
if (access_policy == QCA_ACCESS_POLICY_DENY_UNLESS_LISTED) {
access_policy =
@@ -4287,6 +4345,9 @@ static int __wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy,
tb[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_FLAGS]);
hdd_info("is_iwpriv_command =%d", start_log.is_iwpriv_command);
+ /* size is buff size which can be set using iwpriv command*/
+ start_log.size = 0;
+
cds_set_ring_log_level(start_log.ring_id, start_log.verbose_level);
if (start_log.ring_id == RING_ID_WAKELOCK) {
@@ -6404,7 +6465,6 @@ static int hdd_set_reset_bpf_offload(hdd_context_t *hdd_ctx,
hdd_err("qdf_mem_malloc failed for bpf_set_offload");
return -ENOMEM;
}
- qdf_mem_zero(bpf_set_offload, sizeof(*bpf_set_offload));
/* Parse and fetch bpf packet size */
if (!tb[BPF_PACKET_SIZE]) {
@@ -9154,7 +9214,6 @@ static void wlan_hdd_set_dhcp_server_offload(hdd_adapter_t *pHostapdAdapter)
hdd_err("could not allocate tDhcpSrvOffloadInfo!");
return;
}
- qdf_mem_zero(pDhcpSrvInfo, sizeof(*pDhcpSrvInfo));
pDhcpSrvInfo->vdev_id = pHostapdAdapter->sessionId;
pDhcpSrvInfo->dhcpSrvOffloadEnabled = true;
pDhcpSrvInfo->dhcpClientNum = pHddCtx->config->dhcpMaxNumClients;
@@ -10594,8 +10653,14 @@ struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
qie_age->oui_2 = QCOM_OUI2;
qie_age->oui_3 = QCOM_OUI3;
qie_age->type = QCOM_VENDOR_IE_AGE_TYPE;
+ /*
+ * Lowi expects the timestamp of bss in units of 1/10 ms. In driver
+ * all bss related timestamp is in units of ms. Due to this when scan
+ * results are sent to lowi the scan age is high.To address this,
+ * send age in units of 1/10 ms.
+ */
qie_age->age =
- qdf_mc_timer_get_system_ticks() - bss_desc->nReceivedTime;
+ (qdf_mc_timer_get_system_time() - bss_desc->received_time)/10;
qie_age->tsf_delta = bss_desc->tsf_delta;
memcpy(&qie_age->beacon_tsf, bss_desc->timeStamp,
sizeof(qie_age->beacon_tsf));
@@ -10769,7 +10834,7 @@ int wlan_hdd_cfg80211_update_bss(struct wiphy *wiphy,
*/
if ((scan_time == 0) ||
(scan_time <
- pScanResult->BssDescriptor.nReceivedTime)) {
+ pScanResult->BssDescriptor.received_time)) {
bss_status =
wlan_hdd_cfg80211_inform_bss_frame(pAdapter,
&pScanResult->BssDescriptor);
@@ -11415,7 +11480,6 @@ static int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter,
eConnectionState_NotConnected);
return -ENOMEM;
}
- qdf_mem_zero(sme_config, sizeof(*sme_config));
sme_get_config_param(pHddCtx->hHal, sme_config);
/* These values are not sessionized. So, any change in these SME
* configs on an older or parallel interface will affect the
diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h
index 2c9a81cfed79..602bef0c651c 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.h
+++ b/core/hdd/src/wlan_hdd_cfg80211.h
@@ -2325,6 +2325,13 @@ enum qca_wlan_vendor_acs_hw_mode {
QCA_ACS_MODE_IEEE80211ANY,
};
+#define CFG_NON_AGG_RETRY_MAX (31)
+#define CFG_AGG_RETRY_MAX (31)
+#define CFG_MGMT_RETRY_MAX (31)
+#define CFG_CTRL_RETRY_MAX (31)
+#define CFG_PROPAGATION_DELAY_MAX (63)
+#define CFG_AGG_RETRY_MIN (5)
+
/**
* enum qca_access_policy - access control policy
*
@@ -2370,6 +2377,13 @@ enum qca_ignore_assoc_disallowed {
* Tx aggregation size (8-bit unsigned value)
* @QCA_WLAN_VENDOR_ATTR_CONFIG_RX_MPDU_AGGREGATION:
* Rx aggregation size (8-bit unsigned value)
+ * @QCA_WLAN_VENDOR_ATTR_CONFIG_NON_AGG_RETRY:
+ * Non aggregrate/11g sw retry threshold
+ * @QCA_WLAN_VENDOR_ATTR_CONFIG_AGG_RETRY: aggregrate sw retry threshold
+ * @QCA_WLAN_VENDOR_ATTR_CONFIG_MGMT_RETRY: management frame sw retry threshold
+ * @QCA_WLAN_VENDOR_ATTR_CONFIG_CTRL_RETRY: control frame sw retry threshold
+ * @QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY:
+ * propagation delay for 2G/5G band (units in us)
* @QCA_WLAN_VENDOR_ATTR_CONFIG_SCAN_DEFAULT_IES: Update the default scan IEs
* @QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_COMMAND:
* Unsigned 32-bit value attribute for generic commands
@@ -2406,6 +2420,22 @@ enum qca_wlan_vendor_config {
QCA_WLAN_VENDOR_ATTR_CONFIG_TX_MPDU_AGGREGATION,
QCA_WLAN_VENDOR_ATTR_CONFIG_RX_MPDU_AGGREGATION,
+ /* 8-bit unsigned value to configure the Non aggregrate/11g sw
+ * retry threshold (0 disable, 31 max). */
+ QCA_WLAN_VENDOR_ATTR_CONFIG_NON_AGG_RETRY,
+ /* 8-bit unsigned value to configure the aggregrate sw
+ * retry threshold (0 disable, 31 max). */
+ QCA_WLAN_VENDOR_ATTR_CONFIG_AGG_RETRY,
+ /* 8-bit unsigned value to configure the MGMT frame
+ * retry threshold (0 disable, 31 max). */
+ QCA_WLAN_VENDOR_ATTR_CONFIG_MGMT_RETRY,
+ /* 8-bit unsigned value to configure the CTRL frame
+ * retry threshold (0 disable, 31 max). */
+ QCA_WLAN_VENDOR_ATTR_CONFIG_CTRL_RETRY,
+ /* 8-bit unsigned value to configure the propagation delay for
+ * 2G/5G band (0~63, units in us) */
+ QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY,
+
/* Attribute used to set scan default IEs to the driver.
*
* These IEs can be used by scan operations that will be initiated by
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c
index 57b1ce695434..7861b503b4c5 100644
--- a/core/hdd/src/wlan_hdd_driver_ops.c
+++ b/core/hdd/src/wlan_hdd_driver_ops.c
@@ -351,15 +351,10 @@ static int wlan_hdd_probe(struct device *dev, void *bdev, const hif_bus_id *bid,
*/
hdd_request_pm_qos(dev, DISABLE_KRAIT_IDLE_PS_VAL);
- if (reinit) {
+ if (reinit)
cds_set_recovery_in_progress(true);
- } else {
- ret = hdd_init();
-
- if (ret)
- goto out;
+ else
cds_set_load_in_progress(true);
- }
hdd_init_qdf_ctx(dev, bdev, bus_type, (const struct hif_bus_id *)bid);
@@ -390,8 +385,6 @@ err_hdd_deinit:
cds_set_recovery_in_progress(false);
else
cds_set_load_in_progress(false);
- hdd_deinit();
-out:
hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_DRIVER_INIT);
hdd_remove_pm_qos(dev);
return ret;
@@ -431,8 +424,6 @@ static void wlan_hdd_remove(struct device *dev)
__hdd_wlan_exit();
}
- hdd_deinit();
-
pr_info("%s: Driver De-initialized\n", WLAN_MODULE_NAME);
}
diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c
index b81bab3665de..d0a968daf69c 100644
--- a/core/hdd/src/wlan_hdd_ext_scan.c
+++ b/core/hdd/src/wlan_hdd_ext_scan.c
@@ -3894,7 +3894,6 @@ static int __wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy,
hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
- qdf_mem_zero(req_msg, len);
req_msg->num_networks = num_networks;
/* Parse and fetch request Id */
diff --git a/core/hdd/src/wlan_hdd_green_ap.c b/core/hdd/src/wlan_hdd_green_ap.c
index 1dccc70ae1c6..01afbd5a178a 100644
--- a/core/hdd/src/wlan_hdd_green_ap.c
+++ b/core/hdd/src/wlan_hdd_green_ap.c
@@ -315,7 +315,6 @@ static QDF_STATUS hdd_green_ap_attach(struct hdd_context_s *hdd_ctx)
goto error;
}
- qdf_mem_zero(green_ap, sizeof(*green_ap));
green_ap->ps_state = GREEN_AP_PS_OFF_STATE;
green_ap->ps_event = 0;
green_ap->num_nodes = 0;
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 35e96c32627e..c3dd96c240fe 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -1532,7 +1532,6 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
hdd_err("Failed to allocate station info");
return QDF_STATUS_E_FAILURE;
}
- memset(sta_info, 0, sizeof(*sta_info));
if (iesLen <= MAX_ASSOC_IND_IE_LEN) {
sta_info->assoc_req_ies =
(const u8 *)&pSapEvent->sapevt.
@@ -3603,8 +3602,13 @@ static __iw_softap_set_pktlog(struct net_device *dev,
if (NULL == value)
return -ENOMEM;
+ if (wrqu->data.length < 1 || wrqu->data.length > 2) {
+ hdd_err("pktlog: either 1 or 2 parameters are required");
+ return -EINVAL;
+ }
+
hdd_ctx = WLAN_HDD_GET_CTX(pHostapdAdapter);
- return hdd_process_pktlog_command(hdd_ctx, value[0]);
+ return hdd_process_pktlog_command(hdd_ctx, value[0], value[1]);
}
int
@@ -5488,7 +5492,7 @@ static const struct iw_priv_args hostapd_private_args[] = {
,
{
QCSAP_IOCTL_SET_PKTLOG,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ IW_PRIV_TYPE_INT | MAX_VAR_ARGS,
0, "pktlog"
}
,
@@ -5818,6 +5822,11 @@ hdd_adapter_t *hdd_wlan_create_ap_dev(hdd_context_t *pHddCtx,
pWlanHostapdDev->mtu = HDD_DEFAULT_MTU;
pWlanHostapdDev->tx_queue_len = HDD_NETDEV_TX_QUEUE_LEN;
+ if (pHddCtx->config->enable_ip_tcp_udp_checksum_offload)
+ pWlanHostapdDev->features |=
+ NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
+ pWlanHostapdDev->features |= NETIF_F_RXCSUM;
+
qdf_mem_copy(pWlanHostapdDev->dev_addr, (void *)macAddr,
sizeof(tSirMacAddr));
qdf_mem_copy(pHostapdAdapter->macAddressCurrent.bytes,
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index e08879e1a6f8..b12f4cba749c 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -1162,7 +1162,6 @@ hdd_sendactionframe(hdd_adapter_t *adapter, const uint8_t *bssid,
ret = -ENOMEM;
goto exit;
}
- qdf_mem_zero(frame, frame_len);
hdr = (struct ieee80211_hdr_3addr *)frame;
hdr->frame_control =
@@ -2819,7 +2818,6 @@ static int hdd_parse_get_cckm_ie(uint8_t *pValue, uint8_t **pCckmIe,
hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
- qdf_mem_zero(*pCckmIe, (*pCckmIeLen + 1) / 2);
/*
* the buffer received from the upper layer is character buffer,
* we need to prepare the buffer taking 2 characters in to a U8 hex
@@ -3530,7 +3528,7 @@ static int drv_cmd_get_roam_scan_channels(hdd_adapter_t *adapter,
*/
len = scnprintf(extra, sizeof(extra), "%s %d", command,
numChannels);
- for (j = 0; (j < numChannels); j++)
+ for (j = 0; (j < numChannels) && len <= sizeof(extra); j++)
len += scnprintf(extra + len, sizeof(extra) - len,
" %d", ChannelList[j]);
@@ -4445,13 +4443,6 @@ static int drv_cmd_fast_reassoc(hdd_adapter_t *adapter,
goto exit;
}
- /* Check channel number is a valid channel number */
- if (QDF_STATUS_SUCCESS !=
- wlan_hdd_validate_operation_channel(adapter, channel)) {
- hdd_err("Invalid Channel [%d]", channel);
- return -EINVAL;
- }
-
/*
* if the target bssid is same as currently associated AP,
* issue reassoc to same AP
@@ -4462,7 +4453,8 @@ static int drv_cmd_fast_reassoc(hdd_adapter_t *adapter,
hdd_info("Reassoc BSSID is same as currently associated AP bssid");
if (roaming_offload_enabled(hdd_ctx)) {
hdd_wma_send_fastreassoc_cmd((int)adapter->sessionId,
- targetApBssid, (int)channel);
+ targetApBssid,
+ pHddStaCtx->conn_info.operationChannel);
} else {
sme_get_modify_profile_fields(hdd_ctx->hHal,
adapter->sessionId,
@@ -4473,6 +4465,13 @@ static int drv_cmd_fast_reassoc(hdd_adapter_t *adapter,
return 0;
}
+ /* Check channel number is a valid channel number */
+ if (QDF_STATUS_SUCCESS !=
+ wlan_hdd_validate_operation_channel(adapter, channel)) {
+ hdd_err("Invalid Channel [%d]", channel);
+ return -EINVAL;
+ }
+
if (roaming_offload_enabled(hdd_ctx)) {
hdd_wma_send_fastreassoc_cmd((int)adapter->sessionId,
targetApBssid, (int)channel);
@@ -4854,7 +4853,6 @@ static int drv_cmd_set_ibss_beacon_oui_data(hdd_adapter_t *adapter,
ret = -ENOMEM;
goto exit;
}
- qdf_mem_zero(ibss_ie, command_len);
ibss_ie_length = hdd_parse_set_ibss_oui_data_command(value, ibss_ie,
&oui_length,
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 8cdf2eb68eaf..7576c5702caa 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -362,7 +362,7 @@ static uint8_t vdev_to_iface[CSR_ROAM_SESSION_MAX];
* @rx_destructor_call: IPA Rx packet destructor count
*/
struct uc_rt_debug_info {
- unsigned long time;
+ uint64_t time;
uint64_t ipa_excep_count;
uint64_t rx_drop_count;
uint64_t net_sent_count;
@@ -726,7 +726,7 @@ static void hdd_ipa_uc_rt_debug_host_fill(void *ctext)
dump_info = &hdd_ipa->rt_bug_buffer[
hdd_ipa->rt_buf_fill_index % HDD_IPA_UC_RT_DEBUG_BUF_COUNT];
- dump_info->time = qdf_mc_timer_get_system_time();
+ dump_info->time = (uint64_t)qdf_mc_timer_get_system_time();
dump_info->ipa_excep_count = hdd_ipa->stats.num_rx_excep;
dump_info->rx_drop_count = hdd_ipa->ipa_rx_internel_drop_count;
dump_info->net_sent_count = hdd_ipa->ipa_rx_net_send_count;
@@ -779,7 +779,7 @@ void hdd_ipa_uc_rt_debug_host_dump(hdd_context_t *hdd_ctx)
HDD_IPA_UC_RT_DEBUG_BUF_COUNT;
dump_info = &hdd_ipa->rt_bug_buffer[dump_index];
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
- "%12lu:%10llu:%10llu:%10llu:%10llu:%10llu:%10llu:%10llu\n",
+ "%12llu:%10llu:%10llu:%10llu:%10llu:%10llu:%10llu:%10llu\n",
dump_info->time, dump_info->ipa_excep_count,
dump_info->rx_drop_count, dump_info->net_sent_count,
dump_info->tx_mcbc_count, dump_info->tx_fwd_count,
@@ -987,7 +987,7 @@ void hdd_ipa_uc_stat_request(hdd_adapter_t *adapter, uint8_t reason)
return;
}
- HDD_IPA_LOG(LOG1, "STAT REQ Reason %d", reason);
+ HDD_IPA_LOG(LOGOFF, "STAT REQ Reason %d", reason);
qdf_mutex_acquire(&hdd_ipa->ipa_lock);
if ((HDD_IPA_UC_NUM_WDI_PIPE == hdd_ipa->activated_fw_pipe) &&
(false == hdd_ipa->resource_loading)) {
@@ -1603,20 +1603,12 @@ static void hdd_ipa_uc_offload_enable_disable(hdd_adapter_t *adapter,
if (!iface_context || (enable == iface_context->offload_enabled)) {
/* IPA offload status is already set as desired */
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
- "offload_type=%d, vdev_id=%d, enable=%d",
+ "IPA offload status is already set: \
+ (offload_type=%d, vdev_id=%d, enable=%d)",
offload_type, adapter->sessionId, enable);
- WARN_ON(1);
return;
}
- /* Lower layer may send multiple START_BSS_EVENT in DFS mode or during
- * channel change indication. Since these indications are sent by lower
- * layer as SAP updates and IPA doesn't have to do anything for these
- * updates so ignoring!
- */
- if (QDF_SAP_MODE == adapter->device_mode && adapter->ipa_context)
- return;
-
qdf_mem_zero(&ipa_offload_enable_disable,
sizeof(ipa_offload_enable_disable));
ipa_offload_enable_disable.offload_type = offload_type;
@@ -2290,10 +2282,10 @@ int hdd_ipa_set_perf_level(hdd_context_t *hdd_ctx, uint64_t tx_packets,
else
next_prod_bw = hdd_ctx->config->IpaLowBandwidthMbps;
- HDD_IPA_LOG(LOG1,
+ HDD_IPA_LOG(LOGOFF,
"CONS perf curr: %d, next: %d",
hdd_ipa->curr_cons_bw, next_cons_bw);
- HDD_IPA_LOG(LOG1,
+ HDD_IPA_LOG(LOGOFF,
"PROD perf curr: %d, next: %d",
hdd_ipa->curr_prod_bw, next_prod_bw);
@@ -3793,55 +3785,52 @@ static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
meta.msg_type = type;
switch (type) {
case WLAN_STA_CONNECT:
+ qdf_mutex_acquire(&hdd_ipa->event_lock);
+
/* STA already connected and without disconnect, connect again
* This is Roaming scenario
*/
if (hdd_ipa->sta_connected)
hdd_ipa_cleanup_iface(adapter->ipa_context);
- if (hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx) &&
- (hdd_ipa->sap_num_connected_sta > 0) &&
- !hdd_ipa->sta_connected)
- hdd_ipa_uc_offload_enable_disable(adapter,
- SIR_STA_RX_DATA_OFFLOAD, 1);
-
- qdf_mutex_acquire(&hdd_ipa->event_lock);
-
ret = hdd_ipa_setup_iface(hdd_ipa, adapter, sta_id);
if (ret) {
qdf_mutex_release(&hdd_ipa->event_lock);
- if (hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx) &&
- (hdd_ipa->sap_num_connected_sta > 0) &&
- !hdd_ipa->sta_connected)
- hdd_ipa_uc_offload_enable_disable(adapter,
- SIR_STA_RX_DATA_OFFLOAD, 0);
goto end;
}
+ if (hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx) &&
+ (hdd_ipa->sap_num_connected_sta > 0) &&
+ !hdd_ipa->sta_connected) {
+ qdf_mutex_release(&hdd_ipa->event_lock);
+ hdd_ipa_uc_offload_enable_disable(adapter,
+ SIR_STA_RX_DATA_OFFLOAD, 1);
+ qdf_mutex_acquire(&hdd_ipa->event_lock);
+ }
+
vdev_to_iface[adapter->sessionId] =
((struct hdd_ipa_iface_context *)
(adapter->ipa_context))->iface_id;
- qdf_mutex_release(&hdd_ipa->event_lock);
-
hdd_ipa->sta_connected = 1;
+
+ qdf_mutex_release(&hdd_ipa->event_lock);
break;
case WLAN_AP_CONNECT:
+ qdf_mutex_acquire(&hdd_ipa->event_lock);
+
/* For DFS channel we get two start_bss event (before and after
* CAC). Also when ACS range includes both DFS and non DFS
* channels, we could possibly change channel many times due to
* RADAR detection and chosen channel may not be a DFS channels.
* So dont return error here. Just discard the event.
*/
- if (adapter->ipa_context)
+ if (adapter->ipa_context) {
+ qdf_mutex_release(&hdd_ipa->event_lock);
return 0;
+ }
- if (hdd_ipa_uc_is_enabled(hdd_ipa->hdd_ctx))
- hdd_ipa_uc_offload_enable_disable(adapter,
- SIR_AP_RX_DATA_OFFLOAD, 1);
-
- qdf_mutex_acquire(&hdd_ipa->event_lock);
ret = hdd_ipa_setup_iface(hdd_ipa, adapter, sta_id);
if (ret) {
HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO,
@@ -3851,6 +3840,13 @@ static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
goto end;
}
+ if (hdd_ipa_uc_is_enabled(hdd_ipa->hdd_ctx)) {
+ qdf_mutex_release(&hdd_ipa->event_lock);
+ hdd_ipa_uc_offload_enable_disable(adapter,
+ SIR_AP_RX_DATA_OFFLOAD, 1);
+ qdf_mutex_acquire(&hdd_ipa->event_lock);
+ }
+
vdev_to_iface[adapter->sessionId] =
((struct hdd_ipa_iface_context *)
(adapter->ipa_context))->iface_id;
@@ -3860,7 +3856,6 @@ static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
case WLAN_STA_DISCONNECT:
qdf_mutex_acquire(&hdd_ipa->event_lock);
- hdd_ipa_cleanup_iface(adapter->ipa_context);
if (!hdd_ipa->sta_connected) {
HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO,
@@ -3886,24 +3881,29 @@ static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
if (hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx) &&
(hdd_ipa->sap_num_connected_sta > 0)) {
+ qdf_mutex_release(&hdd_ipa->event_lock);
hdd_ipa_uc_offload_enable_disable(adapter,
SIR_STA_RX_DATA_OFFLOAD, 0);
- vdev_to_iface[adapter->sessionId] = HDD_IPA_MAX_IFACE;
+ qdf_mutex_acquire(&hdd_ipa->event_lock);
+ vdev_to_iface[adapter->sessionId] = CSR_ROAM_SESSION_MAX;
}
+ hdd_ipa_cleanup_iface(adapter->ipa_context);
+
qdf_mutex_release(&hdd_ipa->event_lock);
break;
case WLAN_AP_DISCONNECT:
+ qdf_mutex_acquire(&hdd_ipa->event_lock);
+
if (!adapter->ipa_context) {
HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO,
"%s: Evt: %d, SAP already disconnected",
msg_ex->name, meta.msg_type);
+ qdf_mutex_release(&hdd_ipa->event_lock);
return -EINVAL;
}
- qdf_mutex_acquire(&hdd_ipa->event_lock);
- hdd_ipa_cleanup_iface(adapter->ipa_context);
if ((!hdd_ipa->num_iface) &&
(HDD_IPA_UC_NUM_WDI_PIPE ==
hdd_ipa->activated_fw_pipe)) {
@@ -3923,18 +3923,19 @@ static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
}
if (hdd_ipa_uc_is_enabled(hdd_ipa->hdd_ctx)) {
+ qdf_mutex_release(&hdd_ipa->event_lock);
hdd_ipa_uc_offload_enable_disable(adapter,
SIR_AP_RX_DATA_OFFLOAD, 0);
- vdev_to_iface[adapter->sessionId] = HDD_IPA_MAX_IFACE;
+ qdf_mutex_acquire(&hdd_ipa->event_lock);
+ vdev_to_iface[adapter->sessionId] = CSR_ROAM_SESSION_MAX;
}
+ hdd_ipa_cleanup_iface(adapter->ipa_context);
+
qdf_mutex_release(&hdd_ipa->event_lock);
break;
case WLAN_CLIENT_CONNECT_EX:
- HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO, "%d %d",
- adapter->dev->ifindex, sta_id);
-
if (!hdd_ipa_uc_is_enabled(hdd_ipa->hdd_ctx)) {
HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO,
"%s: Evt: %d, IPA UC OFFLOAD NOT ENABLED",
@@ -3945,37 +3946,43 @@ static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
qdf_mutex_acquire(&hdd_ipa->event_lock);
if (hdd_ipa_uc_find_add_assoc_sta(hdd_ipa,
true, sta_id)) {
+ qdf_mutex_release(&hdd_ipa->event_lock);
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
"%s: STA ID %d found, not valid",
adapter->dev->name, sta_id);
- qdf_mutex_release(&hdd_ipa->event_lock);
return 0;
}
/* Enable IPA UC Data PIPEs when first STA connected */
if (0 == hdd_ipa->sap_num_connected_sta) {
if (hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx) &&
- hdd_ipa->sta_connected)
+ hdd_ipa->sta_connected) {
+ qdf_mutex_release(&hdd_ipa->event_lock);
hdd_ipa_uc_offload_enable_disable(
hdd_get_adapter(hdd_ipa->hdd_ctx,
QDF_STA_MODE),
SIR_STA_RX_DATA_OFFLOAD, 1);
+ qdf_mutex_acquire(&hdd_ipa->event_lock);
+ }
ret = hdd_ipa_uc_handle_first_con(hdd_ipa);
if (ret) {
- qdf_mutex_release(&hdd_ipa->event_lock);
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
"%s: handle 1st con ret %d",
adapter->dev->name, ret);
if (hdd_ipa_uc_sta_is_enabled(
hdd_ipa->hdd_ctx) &&
- hdd_ipa->sta_connected)
+ hdd_ipa->sta_connected) {
+ qdf_mutex_release(&hdd_ipa->event_lock);
hdd_ipa_uc_offload_enable_disable(
hdd_get_adapter(
hdd_ipa->hdd_ctx,
QDF_STA_MODE),
SIR_STA_RX_DATA_OFFLOAD, 0);
+ } else {
+ qdf_mutex_release(&hdd_ipa->event_lock);
+ }
return ret;
}
@@ -4045,13 +4052,15 @@ static int __hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
hdd_ipa_uc_handle_last_discon(hdd_ipa);
if (hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx) &&
- hdd_ipa->sta_connected)
+ hdd_ipa->sta_connected) {
+ qdf_mutex_release(&hdd_ipa->event_lock);
hdd_ipa_uc_offload_enable_disable(
hdd_get_adapter(hdd_ipa->hdd_ctx,
QDF_STA_MODE),
SIR_STA_RX_DATA_OFFLOAD, 0);
-
- qdf_mutex_release(&hdd_ipa->event_lock);
+ } else {
+ qdf_mutex_release(&hdd_ipa->event_lock);
+ }
break;
default:
@@ -4222,6 +4231,7 @@ QDF_STATUS hdd_ipa_init(hdd_context_t *hdd_ctx)
iface_context->adapter = NULL;
iface_context->offload_enabled = 0;
qdf_spinlock_create(&iface_context->interface_lock);
+ vdev_to_iface[i] = CSR_ROAM_SESSION_MAX;
}
INIT_WORK(&hdd_ipa->pm_work, hdd_ipa_pm_flush);
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 203eddfb7781..3897c1252c62 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -4873,7 +4873,6 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx)
hdd_stop_all_adapters(hdd_ctx);
}
- hdd_wlan_stop_modules(hdd_ctx);
/*
* Close the scheduler before calling cds_close to make sure no thread
* is scheduled after the each module close is called i.e after all the
@@ -4885,6 +4884,8 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx)
QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
}
+ hdd_wlan_stop_modules(hdd_ctx);
+
qdf_spinlock_destroy(&hdd_ctx->hdd_adapter_lock);
qdf_spinlock_destroy(&hdd_ctx->sta_update_info_lock);
qdf_spinlock_destroy(&hdd_ctx->connection_status_lock);
@@ -6023,6 +6024,14 @@ void hdd_unsafe_channel_restart_sap(hdd_context_t *hdd_ctxt)
if (!restart_chan) {
hdd_alert("fail to restart SAP");
} else {
+ /* SAP restart due to unsafe channel. While restarting
+ * the SAP, make sure to clear acs_channel, channel to
+ * reset to 0. Otherwise these settings will override
+ * the ACS while restart.
+ */
+ hdd_ctxt->acs_policy.acs_channel = AUTO_CHANNEL_SELECT;
+ adapter_temp->sessionCtx.ap.sapConfig.channel =
+ AUTO_CHANNEL_SELECT;
hdd_info("sending coex indication");
wlan_hdd_send_svc_nlink_msg(hdd_ctxt->radio_index,
WLAN_SVC_LTE_COEX_IND, NULL, 0);
@@ -6894,8 +6903,6 @@ static int hdd_update_cds_config(hdd_context_t *hdd_ctx)
return -ENOMEM;
}
- qdf_mem_zero(cds_cfg, sizeof(*cds_cfg));
-
/* UMA is supported in hardware for performing the
* frame translation 802.11 <-> 802.3
*/
@@ -6964,6 +6971,7 @@ static int hdd_update_cds_config(hdd_context_t *hdd_ctx)
cds_cfg->max_station = hdd_ctx->config->maxNumberOfPeers;
cds_cfg->sub_20_channel_width = WLAN_SUB_20_CH_WIDTH_NONE;
cds_cfg->flow_steering_enabled = hdd_ctx->config->flow_steering_enable;
+ cds_cfg->self_recovery_enabled = hdd_ctx->config->enableSelfRecovery;
hdd_ra_populate_cds_config(cds_cfg, hdd_ctx);
hdd_txrx_populate_cds_config(cds_cfg, hdd_ctx);
@@ -7061,14 +7069,53 @@ static inline void hdd_release_rtnl_lock(void) { }
#if !defined(REMOVE_PKT_LOG)
+/* MAX iwpriv command support */
+#define PKTLOG_SET_BUFF_SIZE 3
+#define MAX_PKTLOG_SIZE 16
+
+/**
+ * hdd_pktlog_set_buff_size() - set pktlog buffer size
+ * @hdd_ctx: hdd context
+ * @set_value2: pktlog buffer size value
+ *
+ *
+ * Return: 0 for success or error.
+ */
+static int hdd_pktlog_set_buff_size(hdd_context_t *hdd_ctx, int set_value2)
+{
+ struct sir_wifi_start_log start_log = { 0 };
+ QDF_STATUS status;
+
+ start_log.ring_id = RING_ID_PER_PACKET_STATS;
+ start_log.verbose_level = WLAN_LOG_LEVEL_OFF;
+ start_log.ini_triggered = cds_is_packet_log_enabled();
+ start_log.user_triggered = 1;
+ start_log.size = set_value2;
+
+ status = sme_wifi_start_logger(hdd_ctx->hHal, start_log);
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
+ hdd_err("sme_wifi_start_logger failed(err=%d)", status);
+ EXIT();
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
/**
* hdd_process_pktlog_command() - process pktlog command
* @hdd_ctx: hdd context
* @set_value: value set by user
+ * @set_value2: pktlog buffer size value
+ *
+ * This function process pktlog command.
+ * set_value2 only matters when set_value is 3 (set buff size)
+ * otherwise we ignore it.
*
* Return: 0 for success or error.
*/
-int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value)
+int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value,
+ int set_value2)
{
int ret;
bool enable;
@@ -7078,13 +7125,24 @@ int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value)
if (0 != ret)
return ret;
- hdd_info("set pktlog %d", set_value);
+ hdd_info("set pktlog %d, set size %d", set_value, set_value2);
- if (set_value > 2) {
+ if (set_value > PKTLOG_SET_BUFF_SIZE) {
hdd_err("invalid pktlog value %d", set_value);
return -EINVAL;
}
+ if (set_value == PKTLOG_SET_BUFF_SIZE) {
+ if (set_value2 <= 0) {
+ hdd_err("invalid pktlog size %d", set_value2);
+ return -EINVAL;
+ } else if (set_value2 > MAX_PKTLOG_SIZE) {
+ hdd_err("Pktlog buff size is too large. max value is 16MB.\n");
+ return -EINVAL;
+ }
+ return hdd_pktlog_set_buff_size(hdd_ctx, set_value2);
+ }
+
/*
* set_value = 0 then disable packetlog
* set_value = 1 enable packetlog forcefully
@@ -7099,17 +7157,19 @@ int hdd_process_pktlog_command(hdd_context_t *hdd_ctx, uint32_t set_value)
user_triggered = 1;
}
- return hdd_pktlog_enable_disable(hdd_ctx, enable, user_triggered);
+ return hdd_pktlog_enable_disable(hdd_ctx, enable, user_triggered, 0);
}
/**
* hdd_pktlog_enable_disable() - Enable/Disable packet logging
* @hdd_ctx: HDD context
* @enable: Flag to enable/disable
+ * @user_triggered: triggered through iwpriv
+ * @size: buffer size to be used for packetlog
*
* Return: 0 on success; error number otherwise
*/
int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable,
- uint8_t user_triggered)
+ uint8_t user_triggered, int size)
{
struct sir_wifi_start_log start_log;
QDF_STATUS status;
@@ -7119,6 +7179,7 @@ int hdd_pktlog_enable_disable(hdd_context_t *hdd_ctx, bool enable,
enable ? WLAN_LOG_LEVEL_ACTIVE : WLAN_LOG_LEVEL_OFF;
start_log.ini_triggered = cds_is_packet_log_enabled();
start_log.user_triggered = user_triggered;
+ start_log.size = size;
/*
* Use "is_iwpriv_command" flag to distinguish iwpriv command from other
* commands. Host uses this flag to decide whether to send pktlog
@@ -8047,7 +8108,7 @@ int hdd_wlan_startup(struct device *dev)
if (cds_is_packet_log_enabled())
- hdd_pktlog_enable_disable(hdd_ctx, true, 0);
+ hdd_pktlog_enable_disable(hdd_ctx, true, 0, 0);
ret = hdd_register_notifiers(hdd_ctx);
if (ret)
@@ -9049,6 +9110,12 @@ static int __hdd_module_init(void)
pld_init();
+ ret = hdd_init();
+ if (ret) {
+ pr_err("hdd_init failed %x\n", ret);
+ goto err_hdd_init;
+ }
+
qdf_wake_lock_create(&wlan_wake_lock, "wlan");
hdd_set_conparam((uint32_t) con_mode);
@@ -9065,6 +9132,8 @@ static int __hdd_module_init(void)
return 0;
out:
qdf_wake_lock_destroy(&wlan_wake_lock);
+ hdd_deinit();
+err_hdd_init:
pld_deinit();
return ret;
}
@@ -9107,6 +9176,7 @@ static void __hdd_module_exit(void)
qdf_wake_lock_destroy(&wlan_wake_lock);
+ hdd_deinit();
pld_deinit();
return;
@@ -9424,9 +9494,10 @@ static int hdd_register_req_mode(hdd_context_t *hdd_ctx,
}
/**
- * con_mode_handler() - Handles module param con_mode change
+ * __con_mode_handler() - Handles module param con_mode change
* @kmessage: con mode name on which driver to be bring up
* @kp: The associated kernel parameter
+ * @hdd_ctx: Pointer to the global HDD context
*
* This function is invoked when user updates con mode using sys entry,
* to initialize and bring-up driver in that specific mode.
@@ -9441,6 +9512,10 @@ static int __con_mode_handler(const char *kmessage, struct kernel_param *kp,
enum tQDF_GLOBAL_CON_MODE curr_mode;
enum tQDF_ADAPTER_MODE adapter_mode;
+ ret = wlan_hdd_validate_context(hdd_ctx);
+ if (ret)
+ return ret;
+
cds_set_load_in_progress(true);
hdd_info("con_mode handler: %s", kmessage);
diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c
index 9b435ce7dac3..f86a6f11f6dc 100644
--- a/core/hdd/src/wlan_hdd_ocb.c
+++ b/core/hdd/src/wlan_hdd_ocb.c
@@ -325,7 +325,6 @@ static struct sir_ocb_config *hdd_ocb_config_new(int num_channels,
if (!cursor)
goto fail;
- qdf_mem_zero(cursor, len);
ret = cursor;
cursor += sizeof(*ret);
@@ -1121,7 +1120,6 @@ __wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy *wiphy,
hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
- qdf_mem_zero(timing_advert, sizeof(*timing_advert));
timing_advert->vdev_id = adapter->sessionId;
/* Parse the netlink message */
@@ -1239,7 +1237,6 @@ __wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy *wiphy,
hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
- qdf_mem_zero(timing_advert, sizeof(sizeof(*timing_advert)));
timing_advert->vdev_id = adapter->sessionId;
/* Parse the netlink message */
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index 729fcd676ade..f74f14243399 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -215,7 +215,8 @@ QDF_STATUS wlan_hdd_remain_on_channel_callback(tHalHandle hHal, void *pCtx,
cookie,
&pRemainChanCtx->chan,
GFP_KERNEL);
- pAdapter->last_roc_ts = qdf_mc_timer_get_system_time();
+ pAdapter->last_roc_ts =
+ (uint64_t)qdf_mc_timer_get_system_time();
}
/* Schedule any pending RoC: Any new roc request during this time
@@ -822,7 +823,6 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy,
return -ENOMEM;
}
- qdf_mem_zero(pRemainChanCtx, sizeof(*pRemainChanCtx));
qdf_mem_copy(&pRemainChanCtx->chan, chan,
sizeof(struct ieee80211_channel));
pRemainChanCtx->duration = duration;
@@ -840,7 +840,7 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy,
hdd_conn_is_connected(
WLAN_HDD_GET_STATION_CTX_PTR(sta_adapter))) {
if (pAdapter->last_roc_ts != 0 &&
- ((qdf_mc_timer_get_system_time() -
+ (((uint64_t)qdf_mc_timer_get_system_time() -
pAdapter->last_roc_ts) <
pHddCtx->config->p2p_listen_defer_interval)) {
if (pRemainChanCtx->duration > HDD_P2P_MAX_ROC_DURATION)
@@ -961,7 +961,7 @@ void hdd_remain_chan_ready_handler(hdd_adapter_t *pAdapter,
cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
hdd_notice("Ready on chan ind %d", scan_id);
- pAdapter->start_roc_ts = qdf_mc_timer_get_system_time();
+ pAdapter->start_roc_ts = (uint64_t)qdf_mc_timer_get_system_time();
mutex_lock(&cfgState->remain_on_chan_ctx_lock);
pRemainChanCtx = cfgState->remain_on_chan_ctx;
if (pRemainChanCtx != NULL) {
@@ -1270,7 +1270,8 @@ static int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
mutex_lock(&cfgState->remain_on_chan_ctx_lock);
if (cfgState->remain_on_chan_ctx) {
- uint32_t current_time = qdf_mc_timer_get_system_time();
+ uint64_t current_time =
+ (uint64_t)qdf_mc_timer_get_system_time();
int remaining_roc_time =
((int) cfgState->remain_on_chan_ctx->duration -
(current_time - pAdapter->start_roc_ts));
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index 7e6e0bd5571f..380083814306 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -1057,7 +1057,6 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set)
hdd_err("Could not allocate Memory");
return;
}
- qdf_mem_zero(pMulticastAddrs, sizeof(tSirRcvFltMcAddrList));
pMulticastAddrs->action = set;
if (set) {
@@ -1586,7 +1585,7 @@ QDF_STATUS hdd_wlan_re_init(void)
goto err_cds_disable;
if (cds_is_packet_log_enabled())
- hdd_pktlog_enable_disable(pHddCtx, true, 0);
+ hdd_pktlog_enable_disable(pHddCtx, true, 0, 0);
hdd_err("WLAN host driver reinitiation completed!");
goto success;
diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c
index 4487d5dd2500..2c237469c234 100644
--- a/core/hdd/src/wlan_hdd_regulatory.c
+++ b/core/hdd/src/wlan_hdd_regulatory.c
@@ -230,6 +230,8 @@ static void hdd_regulatory_wiphy_init(hdd_context_t *hdd_ctx,
struct wiphy *wiphy)
{
const struct ieee80211_regdomain *reg_rules;
+ int chan_num;
+ struct ieee80211_channel chan;
if (hdd_is_world_regdomain(reg->reg_domain)) {
reg_rules = hdd_get_world_regrules(reg);
@@ -249,6 +251,17 @@ static void hdd_regulatory_wiphy_init(hdd_context_t *hdd_ctx,
wiphy_apply_custom_regulatory(wiphy, reg_rules);
/*
+ * disable 2.4 Ghz channels that dont have 20 mhz bw
+ */
+ for (chan_num = 0;
+ chan_num < wiphy->bands[IEEE80211_BAND_2GHZ]->n_channels;
+ chan_num++) {
+ chan = wiphy->bands[IEEE80211_BAND_2GHZ]->channels[chan_num];
+ if (chan.flags & IEEE80211_CHAN_NO_20MHZ)
+ chan.flags |= IEEE80211_CHAN_DISABLED;
+ }
+
+ /*
* restore the driver regulatory flags since
* wiphy_apply_custom_regulatory may have
* changed them
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index 441ba7ccc18f..a52f9ae6b0aa 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -482,9 +482,9 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo,
/* AGE */
event.cmd = IWEVCUSTOM;
p = custom;
- p += scnprintf(p, MAX_CUSTOM_LEN, " Age: %lu",
- qdf_mc_timer_get_system_ticks() -
- descriptor->nReceivedTime);
+ p += scnprintf(p, MAX_CUSTOM_LEN, " Age: %llu",
+ qdf_mc_timer_get_system_time() -
+ descriptor->received_time);
event.u.data.length = p - custom;
current_event = iwe_stream_add_point(scanInfo->info, current_event, end,
&event, custom);
@@ -2263,7 +2263,6 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
return -ENOMEM;
}
- memset(pPnoRequest, 0, sizeof(tSirPNOScanReq));
pPnoRequest->enable = 1; /*Enable PNO */
pPnoRequest->ucNetworksCount = request->n_match_sets;
@@ -2534,7 +2533,6 @@ static int __wlan_hdd_cfg80211_sched_scan_stop(struct wiphy *wiphy,
return -ENOMEM;
}
- memset(pPnoRequest, 0, sizeof(tSirPNOScanReq));
pPnoRequest->enable = 0; /* Disable PNO */
pPnoRequest->ucNetworksCount = 0;
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c
index a433ab503abf..0227bd10d69e 100644
--- a/core/hdd/src/wlan_hdd_tdls.c
+++ b/core/hdd/src/wlan_hdd_tdls.c
@@ -741,8 +741,6 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
hdd_err("malloc failed!");
return -ENOMEM;
}
- /* initialize TDLS pAdater context */
- qdf_mem_zero(pHddTdlsCtx, sizeof(tdlsCtx_t));
/* Initialize connection tracker timer */
qdf_mc_timer_init(&pHddTdlsCtx->peer_update_timer,
@@ -1023,7 +1021,6 @@ hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, const u8 *mac,
key = wlan_hdd_tdls_hash_key(mac);
head = &pHddTdlsCtx->peer_list[key];
- qdf_mem_zero(peer, sizeof(hddTdlsPeer_t));
qdf_mem_copy(peer->peerMac, mac, sizeof(peer->peerMac));
peer->pHddTdlsCtx = pHddTdlsCtx;
peer->pref_off_chan_num = pHddCtx->config->fTDLSPrefOffChanNum;
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index f4af8b1e7619..2761f9e7b65d 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -5382,11 +5382,6 @@ static int __iw_setint_getnone(struct net_device *dev,
break;
}
- case WE_SET_PKTLOG:
- {
- hdd_process_pktlog_command(hdd_ctx, set_value);
- break;
- }
case WE_SET_HIGHER_DTIM_TRANSITION:
{
if (!((set_value == false) || (set_value == true))) {
@@ -8236,6 +8231,22 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
}
break;
#endif
+ case WE_SET_PKTLOG:
+ {
+ int ret;
+
+ if (num_args < 1 || num_args > 2) {
+ hdd_err("pktlog: either 1 or 2 parameters are required");
+ return -EINVAL;
+ }
+
+ ret = hdd_process_pktlog_command(hdd_ctx, apps_args[0],
+ apps_args[1]);
+ if (ret)
+ return ret;
+ break;
+ }
+
case WE_MAC_PWR_DEBUG_CMD:
{
struct sir_mac_pwr_dbg_cmd mac_pwr_dbg_args;
@@ -10065,7 +10076,7 @@ static const struct iw_priv_args we_private_args[] = {
"setTxMaxPower5G"},
{WE_SET_PKTLOG,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ IW_PRIV_TYPE_INT | MAX_VAR_ARGS,
0,
"pktlog"},
diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h
index 8d0041991f98..cacfdfb530d5 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 "M"
-#define QWLAN_VERSION_BUILD 32
+#define QWLAN_VERSION_EXTRA "C"
+#define QWLAN_VERSION_BUILD 33
-#define QWLAN_VERSIONSTR "5.1.0.32M"
+#define QWLAN_VERSIONSTR "5.1.0.33C"
#endif /* QWLAN_VERSION_H */
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index c673d402d074..4e43c6dd3f19 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -724,8 +724,8 @@ typedef struct sSirBssDescription {
/* used only in scan case. */
uint8_t channelIdSelf;
uint8_t sSirBssDescriptionRsvd[3];
- /* base on a tick count. It is a time stamp, not a relative time. */
- uint32_t nReceivedTime;
+ /* Based on system time, not a relative time. */
+ uint64_t received_time;
uint32_t parentTSF;
uint32_t startTSF[2];
uint8_t mdiePresent;
@@ -3226,6 +3226,7 @@ typedef struct {
* @is_iwpriv_command: Set 1 for iwpriv command
* @ini_triggered: triggered using ini
* @user_triggered: triggered by user
+ * @size: pktlog buffer size
*/
struct sir_wifi_start_log {
uint32_t ring_id;
@@ -3233,6 +3234,7 @@ struct sir_wifi_start_log {
uint32_t is_iwpriv_command;
bool ini_triggered;
uint8_t user_triggered;
+ int size;
};
diff --git a/core/mac/src/pe/lim/lim_admit_control.c b/core/mac/src/pe/lim/lim_admit_control.c
index 2ed47a0ab019..7c361f37ece2 100644
--- a/core/mac/src/pe/lim/lim_admit_control.c
+++ b/core/mac/src/pe/lim/lim_admit_control.c
@@ -933,7 +933,6 @@ lim_send_hal_msg_add_ts(tpAniSirGlobal pMac,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pAddTsParam, sizeof(tAddTsParams), 0);
pAddTsParam->staIdx = staIdx;
pAddTsParam->tspecIdx = tspecIdx;
qdf_mem_copy(&pAddTsParam->tspec, &tspecIE, sizeof(tSirMacTspecIE));
@@ -997,7 +996,6 @@ lim_send_hal_msg_del_ts(tpAniSirGlobal pMac,
msg.type = WMA_DEL_TS_REQ;
msg.bodyptr = pDelTsParam;
msg.bodyval = 0;
- qdf_mem_set((uint8_t *) pDelTsParam, sizeof(tDelTsParams), 0);
/* filling message parameters. */
pDelTsParam->staIdx = staIdx;
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c
index 52615df03b3c..901c564df9da 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -779,9 +779,6 @@ tSirRetStatus pe_open(tpAniSirGlobal pMac, struct cds_config_info *cds_cfg)
goto pe_open_psession_fail;
}
- qdf_mem_set(pMac->lim.gpSession,
- sizeof(tPESession) * pMac->lim.maxBssId, 0);
-
pMac->lim.mgmtFrameSessionId = 0xff;
pMac->lim.tdls_frm_session_id = NO_SESSION;
pMac->lim.deferredMsgCnt = 0;
@@ -1871,8 +1868,8 @@ lim_roam_fill_bss_descr(tpAniSirGlobal pMac,
qdf_mem_copy((uint8_t *) &bss_desc_ptr->bssId,
(uint8_t *) mac_hdr->bssId,
sizeof(tSirMacAddr));
- bss_desc_ptr->nReceivedTime =
- (uint32_t)qdf_mc_timer_get_system_ticks();
+ bss_desc_ptr->received_time =
+ (uint64_t)qdf_mc_timer_get_system_time();
if (parsed_frm_ptr->mdiePresent) {
bss_desc_ptr->mdiePresent = parsed_frm_ptr->mdiePresent;
qdf_mem_copy((uint8_t *)bss_desc_ptr->mdie,
@@ -2045,7 +2042,6 @@ QDF_STATUS pe_roam_synch_callback(tpAniSirGlobal mac_ctx,
mac_ctx->roam.pReassocResp = NULL;
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(roam_sync_ind_ptr->join_rsp, join_rsp_len);
lim_log(mac_ctx, LOG1, FL("Session RicLength = %d"),
ft_session_ptr->RICDataLen);
diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c
index 8d914ee6e11c..266f9afcf607 100644
--- a/core/mac/src/pe/lim/lim_assoc_utils.c
+++ b/core/mac/src/pe/lim/lim_assoc_utils.c
@@ -2148,7 +2148,6 @@ lim_add_sta(tpAniSirGlobal mac_ctx,
FL("Unable to allocate memory during ADD_STA"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) add_sta_params, sizeof(tAddStaParams), 0);
if (LIM_IS_AP_ROLE(session_entry) || LIM_IS_IBSS_ROLE(session_entry) ||
LIM_IS_NDI_ROLE(session_entry))
@@ -2558,8 +2557,6 @@ lim_del_sta(tpAniSirGlobal pMac,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pDelStaParams, sizeof(tDeleteStaParams), 0);
-
/* */
/* DPH contains the STA index only for "peer" STA entries. */
/* LIM global contains "self" STA index */
@@ -2703,7 +2700,6 @@ lim_add_sta_self(tpAniSirGlobal pMac, uint16_t staIdx, uint8_t updateSta,
FL("Unable to allocate memory during ADD_STA"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0);
/* / Add STA context at MAC HW (BMU, RHP & TFP) */
qdf_mem_copy((uint8_t *) pAddStaParams->staMac,
@@ -3361,7 +3357,6 @@ lim_del_bss(tpAniSirGlobal pMac, tpDphHashNode pStaDs, uint16_t bssIdx,
FL("Unable to allocate memory during ADD_BSS"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pDelBssParams, sizeof(tDeleteBssParams), 0);
pDelBssParams->sessionId = psessionEntry->peSessionId; /* update PE session Id */
@@ -3559,9 +3554,7 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
FL("Unable to allocate memory during ADD_BSS"));
retCode = eSIR_MEM_ALLOC_FAILED;
goto returnFailure;
- } else
- qdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams),
- 0);
+ }
qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,
sizeof(tSirMacAddr));
@@ -4101,8 +4094,6 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update
goto returnFailure;
}
- qdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), 0);
-
lim_extract_ap_capabilities(pMac, (uint8_t *) bssDescription->ieFields,
lim_get_ielen_from_bss_description(bssDescription),
pBeaconStruct);
@@ -4804,7 +4795,6 @@ void lim_send_sme_unprotected_mgmt_frame_ind(tpAniSirGlobal pMac, uint8_t frameT
("AllocateMemory failed for tSirSmeUnprotectedMgmtFrameInd"));
return;
}
- qdf_mem_set((void *)pSirSmeMgmtFrame, length, 0);
pSirSmeMgmtFrame->sessionId = sessionId;
pSirSmeMgmtFrame->frameType = frameType;
@@ -4847,7 +4837,6 @@ void lim_send_sme_tsm_ie_ind(tpAniSirGlobal pMac, tpPESession psessionEntry,
FL("AllocateMemory failed for tSirSmeTsmIEInd"));
return;
}
- qdf_mem_set((void *)pSirSmeTsmIeInd, sizeof(tSirSmeTsmIEInd), 0);
pSirSmeTsmIeInd->sessionId = psessionEntry->smeSessionId;
pSirSmeTsmIeInd->tsmIe.tsid = tid;
diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c
index d4e02035613d..80bfec84cfef 100644
--- a/core/mac/src/pe/lim/lim_ft.c
+++ b/core/mac/src/pe/lim/lim_ft.c
@@ -157,8 +157,6 @@ void lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac,
return;
}
- qdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), 0);
-
lim_extract_ap_capabilities(pMac, (uint8_t *) bssDescription->ieFields,
lim_get_ielen_from_bss_description(bssDescription),
pBeaconStruct);
@@ -862,7 +860,6 @@ lim_ft_send_aggr_qos_rsp(tpAniSirGlobal pMac, uint8_t rspReqd,
FL("AllocateMemory failed for tSirAggrQosRsp"));
return;
}
- qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
rsp->messageType = eWNI_SME_FT_AGGR_QOS_RSP;
rsp->sessionId = smesessionId;
rsp->length = sizeof(*rsp);
@@ -991,7 +988,6 @@ tSirRetStatus lim_process_ft_aggr_qos_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf
return eSIR_FAILURE;
}
- qdf_mem_set((uint8_t *) pAggrAddTsParam, sizeof(tAggrAddTsParams), 0);
pAggrAddTsParam->staIdx = psessionEntry->staId;
/* Fill in the sessionId specific to PE */
pAggrAddTsParam->sessionId = sessionId;
diff --git a/core/mac/src/pe/lim/lim_ft_preauth.c b/core/mac/src/pe/lim/lim_ft_preauth.c
index 6195a041f3c0..cca7f81fa040 100644
--- a/core/mac/src/pe/lim/lim_ft_preauth.c
+++ b/core/mac/src/pe/lim/lim_ft_preauth.c
@@ -597,7 +597,6 @@ void lim_post_ft_pre_auth_rsp(tpAniSirGlobal mac_ctx,
QDF_ASSERT(ft_pre_auth_rsp != NULL);
return;
}
- qdf_mem_zero(ft_pre_auth_rsp, rsp_len);
lim_log(mac_ctx, LOG1, FL("Auth Rsp = %p"), ft_pre_auth_rsp);
if (session) {
@@ -679,8 +678,6 @@ QDF_STATUS lim_send_preauth_scan_offload(tpAniSirGlobal mac_ctx,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(scan_offload_req, sizeof(tSirScanOffloadReq));
-
msg.type = WMA_START_SCAN_OFFLOAD_REQ;
msg.bodyptr = scan_offload_req;
msg.bodyval = 0;
diff --git a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c
index fe04d3f6b952..4e5f6fe96c4a 100644
--- a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c
+++ b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c
@@ -1123,6 +1123,8 @@ __lim_ibss_search_and_delete_peer(tpAniSirGlobal mac_ptr,
mac_ptr->lim.gLimIbssPeerList;
} else
prev_node->next = temp_node->next;
+ if (temp_node->beacon)
+ qdf_mem_free(temp_node->beacon);
qdf_mem_free(temp_node);
mac_ptr->lim.gLimNumIbssPeers--;
@@ -1667,6 +1669,8 @@ void lim_ibss_heart_beat_handle(tpAniSirGlobal mac_ctx, tpPESession session)
prevnode->next = tempnode->next;
}
+ if (tempnode->beacon)
+ qdf_mem_free(tempnode->beacon);
qdf_mem_free(tempnode);
mac_ctx->lim.gLimNumIbssPeers--;
diff --git a/core/mac/src/pe/lim/lim_p2p.c b/core/mac/src/pe/lim/lim_p2p.c
index 096f78a16581..41098542cfc7 100644
--- a/core/mac/src/pe/lim/lim_p2p.c
+++ b/core/mac/src/pe/lim/lim_p2p.c
@@ -90,8 +90,6 @@ static QDF_STATUS lim_send_hal_req_remain_on_chan_offload(tpAniSirGlobal pMac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(pScanOffloadReq, sizeof(tSirScanOffloadReq));
-
msg.type = WMA_START_SCAN_OFFLOAD_REQ;
msg.bodyptr = pScanOffloadReq;
msg.bodyval = 0;
@@ -175,11 +173,11 @@ void lim_process_insert_single_shot_noa_timeout(tpAniSirGlobal pMac)
*------------------------------------------------------------------*/
void lim_convert_active_channel_to_passive_channel(tpAniSirGlobal pMac)
{
- uint32_t currentTime;
- uint32_t lastTime = 0;
- uint32_t timeDiff;
+ uint64_t currentTime;
+ uint64_t lastTime = 0;
+ uint64_t timeDiff;
uint8_t i;
- currentTime = qdf_mc_timer_get_system_time();
+ currentTime = (uint64_t)qdf_mc_timer_get_system_time();
for (i = 1; i < SIR_MAX_24G_5G_CHANNEL_RANGE; i++) {
if ((pMac->lim.dfschannelList.timeStamp[i]) != 0) {
lastTime = pMac->lim.dfschannelList.timeStamp[i];
@@ -390,7 +388,6 @@ void lim_send_sme_mgmt_frame_ind(tpAniSirGlobal pMac, uint8_t frameType,
FL("AllocateMemory failed for eWNI_SME_LISTEN_RSP"));
return;
}
- qdf_mem_set((void *)pSirSmeMgmtFrame, length, 0);
pSirSmeMgmtFrame->frame_len = frameLen;
pSirSmeMgmtFrame->sessionId = sessionId;
@@ -410,10 +407,11 @@ void lim_send_sme_mgmt_frame_ind(tpAniSirGlobal pMac, uint8_t frameType,
return;
}
-QDF_STATUS lim_p2p_action_cnf(tpAniSirGlobal pMac, uint32_t txCompleteSuccess)
+QDF_STATUS lim_p2p_action_cnf(tpAniSirGlobal pMac, uint32_t tx_status)
{
QDF_STATUS status;
uint32_t mgmt_frame_sessionId;
+ bool tx_complete_ack = (tx_status) ? false : true;
status = pe_acquire_global_lock(&pMac->lim);
if (QDF_IS_STATUS_SUCCESS(status)) {
@@ -432,7 +430,7 @@ QDF_STATUS lim_p2p_action_cnf(tpAniSirGlobal pMac, uint32_t txCompleteSuccess)
mgmt_frame_sessionId);
if (pMac->p2p_ack_ind_cb)
pMac->p2p_ack_ind_cb(mgmt_frame_sessionId,
- txCompleteSuccess);
+ tx_complete_ack);
}
}
@@ -754,7 +752,6 @@ tSirRetStatus __lim_process_sme_no_a_update(tpAniSirGlobal pMac, uint32_t *pMsgB
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pMsgNoA, sizeof(tP2pPsConfig), 0);
pMsgNoA->opp_ps = pNoA->opp_ps;
pMsgNoA->ctWindow = pNoA->ctWindow;
pMsgNoA->duration = pNoA->duration;
diff --git a/core/mac/src/pe/lim/lim_process_action_frame.c b/core/mac/src/pe/lim/lim_process_action_frame.c
index df4b83cd9299..455828a6b04f 100644
--- a/core/mac/src/pe/lim/lim_process_action_frame.c
+++ b/core/mac/src/pe/lim/lim_process_action_frame.c
@@ -422,8 +422,6 @@ lim_process_ext_channel_switch_action_frame(tpAniSirGlobal mac_ctx,
return;
}
- qdf_mem_zero(ext_cng_chan_ind,
- sizeof(*ext_cng_chan_ind));
ext_cng_chan_ind->session_id =
session_entry->smeSessionId;
@@ -1546,10 +1544,9 @@ static void __lim_process_sa_query_request_action_frame(tpAniSirGlobal pMac,
return;
/* 11w offload is enabled then firmware should not fwd this frame */
- if (pMac->pmf_offload) {
+ if (LIM_IS_STA_ROLE(psessionEntry) && pMac->pmf_offload) {
lim_log(pMac, LOGE,
- FL("11w offload is enabled, SA Query request is not expected ")
- );
+ FL("11w offload enabled, SA Query req isn't expected"));
return;
}
diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
index c1d77bfb5f9c..5d7fe2487091 100644
--- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
+++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
@@ -1863,7 +1863,6 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
FL("Allocate Memory failed in assoc_req"));
return;
}
- qdf_mem_set((void *)assoc_req, sizeof(*assoc_req), 0);
/* Parse Assoc Request frame */
if (false == lim_chk_assoc_req_parse_error(mac_ctx, hdr, session,
@@ -2198,7 +2197,6 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
FL("AllocateMemory failed for assoc_ind"));
return;
}
- qdf_mem_set(assoc_ind, temp, 0);
qdf_mem_copy((uint8_t *) assoc_ind->peerMacAddr,
(uint8_t *) sta_ds->staAddr, sizeof(tSirMacAddr));
assoc_ind->aid = sta_ds->assocId;
diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c
index 2229f7f9bae7..381e186d5bb8 100644
--- a/core/mac/src/pe/lim/lim_process_message_queue.c
+++ b/core/mac/src/pe/lim/lim_process_message_queue.c
@@ -521,7 +521,6 @@ __lim_pno_match_fwd_bcn_probepsp(tpAniSirGlobal pmac, uint8_t *rx_pkt_info,
}
hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
body = WMA_GET_RX_MPDU_DATA(rx_pkt_info);
- qdf_mem_zero(result, sizeof(*result) + ie_len);
/* Received frame does not have request id, hence set 0 */
result->request_id = 0;
@@ -574,7 +573,6 @@ __lim_ext_scan_forward_bcn_probe_rsp(tpAniSirGlobal pmac, uint8_t *rx_pkt_info,
}
hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
body = WMA_GET_RX_MPDU_DATA(rx_pkt_info);
- qdf_mem_zero(result, sizeof(*result) + ie_len);
/* Received frame does not have request id, hence set 0 */
result->requestId = 0;
diff --git a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c
index cb16a1e43ca5..00e22ecef258 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c
@@ -425,9 +425,6 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac,
if (NULL ==
pMac->lim.pSessionEntry->pLimMlmReassocRetryReq)
goto end;
- qdf_mem_set(pMac->lim.pSessionEntry->
- pLimMlmReassocRetryReq,
- sizeof(tLimMlmReassocReq), 0);
qdf_mem_copy(pMac->lim.pSessionEntry->
pLimMlmReassocRetryReq,
psessionEntry->pLimMlmReassocReq,
@@ -472,7 +469,6 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac,
FL("Unable to allocate memory during ADD_STA"));
goto end;
}
- qdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0);
/* / Add STA context at MAC HW (BMU, RHP & TFP) */
qdf_mem_copy((uint8_t *) pAddStaParams->staMac,
diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
index 6819abd894a8..7cf6c5eef08e 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
@@ -491,7 +491,6 @@ lim_mlm_add_bss(tpAniSirGlobal mac_ctx,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(addbss_param, sizeof(tAddBssParams), 0);
/* Fill in tAddBssParams members */
qdf_mem_copy(addbss_param->bssId, mlm_start_req->bssId,
sizeof(tSirMacAddr));
diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
index 668b63696bb2..bd61bb43c4a0 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
@@ -586,8 +586,6 @@ void lim_process_mlm_auth_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg)
FL("mlmAuthReq :Memory alloc failed "));
return;
}
- qdf_mem_set((uint8_t *) auth_req,
- sizeof(tLimMlmAuthReq), 0);
if (session_entry->limSmeState ==
eLIM_SME_WT_AUTH_STATE) {
sir_copy_mac_addr(auth_req->peerMacAddr,
@@ -3197,7 +3195,6 @@ void lim_send_beacon_ind(tpAniSirGlobal pMac, tpPESession psessionEntry)
)
return;
}
- qdf_mem_set(pBeaconGenParams, sizeof(*pBeaconGenParams), 0);
qdf_mem_copy((void *)pBeaconGenParams->bssId,
(void *)psessionEntry->bssId, QDF_MAC_ADDR_SIZE);
limMsg.bodyptr = pBeaconGenParams;
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index 8528b912e356..e488b5f6cead 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -157,8 +157,6 @@ static QDF_STATUS lim_process_set_hw_mode(tpAniSirGlobal mac, uint32_t *msg)
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(req_msg, len);
-
req_msg->hw_mode_index = buf->set_hw.hw_mode_index;
req_msg->reason = buf->set_hw.reason;
/* Other parameters are not needed for WMA */
@@ -230,8 +228,6 @@ static QDF_STATUS lim_process_set_dual_mac_cfg_req(tpAniSirGlobal mac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(req_msg, len);
-
req_msg->scan_config = buf->set_dual_mac.scan_config;
req_msg->fw_mode_config = buf->set_dual_mac.fw_mode_config;
/* Other parameters are not needed for WMA */
@@ -676,7 +672,6 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
goto end;
}
- qdf_mem_set((void *)sme_start_bss_req, size, 0);
qdf_mem_copy(sme_start_bss_req, msg_buf,
sizeof(tSirSmeStartBssReq));
if (!lim_is_sme_start_bss_req_valid(mac_ctx,
@@ -880,9 +875,6 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto free;
}
- qdf_mem_set(session->parsedAssocReq,
- (session->dph.dphHashTable.size *
- sizeof(tpSirAssocReq)), 0);
}
if (!sme_start_bss_req->channelId &&
@@ -975,8 +967,6 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
goto free;
}
- qdf_mem_set((void *)mlm_start_req, sizeof(tLimMlmStartReq), 0);
-
/* Copy SSID to the MLM start structure */
qdf_mem_copy((uint8_t *) &mlm_start_req->ssId,
(uint8_t *) &sme_start_bss_req->ssId,
@@ -1288,8 +1278,6 @@ static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set((uint8_t *) pScanOffloadReq, len, 0);
-
msg.type = WMA_START_SCAN_OFFLOAD_REQ;
msg.bodyptr = pScanOffloadReq;
msg.bodyval = 0;
@@ -1584,7 +1572,6 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
- (void)qdf_mem_set((void *)sme_join_req, n_size, 0);
(void)qdf_mem_copy((void *)sme_join_req, (void *)msg_buf,
n_size);
@@ -1872,7 +1859,6 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
- (void)qdf_mem_set((void *)mlm_join_req, val, 0);
/* PE SessionId is stored as a part of JoinReq */
mlm_join_req->sessionId = session->peSessionId;
@@ -2097,7 +2083,6 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx,
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
- (void)qdf_mem_set((void *)reassoc_req, size, 0);
(void)qdf_mem_copy((void *)reassoc_req, (void *)msg_buf, size);
if (!lim_is_sme_join_req_valid(mac_ctx,
@@ -4660,9 +4645,6 @@ skip_match:
qdf_mem_malloc(sizeof(struct mgmt_frm_reg_info) +
sme_req->matchLen);
if (lim_mgmt_regn != NULL) {
- qdf_mem_set((void *)lim_mgmt_regn,
- sizeof(struct mgmt_frm_reg_info) +
- sme_req->matchLen, 0);
lim_mgmt_regn->frameType = sme_req->frameType;
lim_mgmt_regn->matchLen = sme_req->matchLen;
lim_mgmt_regn->sessionId = sme_req->sessionId;
diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c
index 7b2e5cae97a3..6c16ae4b4dbb 100644
--- a/core/mac/src/pe/lim/lim_process_tdls.c
+++ b/core/mac/src/pe/lim/lim_process_tdls.c
@@ -3316,9 +3316,6 @@ tSirRetStatus lim_process_sme_tdls_link_establish_req(tpAniSirGlobal mac_ctx,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) tdls_req_params,
- sizeof(tTdlsLinkEstablishParams), 0);
-
tdls_req_params->staIdx = stads->staIndex;
tdls_req_params->isResponder = tdls_req->isResponder;
tdls_req_params->uapsdQueues = tdls_req->uapsdQueues;
diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c
index c263b366d36e..629f32b8a002 100644
--- a/core/mac/src/pe/lim/lim_prop_exts_utils.c
+++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c
@@ -127,7 +127,6 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
return;
}
- qdf_mem_set((uint8_t *) beacon_struct, sizeof(tSirProbeRespBeacon), 0);
*qos_cap = 0;
*prop_cap = 0;
*uapsd = 0;
diff --git a/core/mac/src/pe/lim/lim_scan_result_utils.c b/core/mac/src/pe/lim/lim_scan_result_utils.c
index 58b43db3e6b6..6b19f0c3a107 100644
--- a/core/mac/src/pe/lim/lim_scan_result_utils.c
+++ b/core/mac/src/pe/lim/lim_scan_result_utils.c
@@ -177,14 +177,14 @@ lim_collect_bss_description(tpAniSirGlobal pMac,
MAC_ADDR_ARRAY(pHdr->bssId), pBssDescr->rssi,
pBssDescr->rssi_raw);
- pBssDescr->nReceivedTime = (uint32_t) qdf_mc_timer_get_system_ticks();
+ pBssDescr->received_time = (uint64_t)qdf_mc_timer_get_system_time();
pBssDescr->tsf_delta = WMA_GET_RX_TSF_DELTA(pRxPacketInfo);
pBssDescr->seq_ctrl = pHdr->seqControl;
lim_log(pMac, LOG1,
- FL("BSSID: "MAC_ADDRESS_STR " tsf_delta = %u ReceivedTime = %u ssid = %s"),
+ FL("BSSID: "MAC_ADDRESS_STR " tsf_delta = %u ReceivedTime = %llu ssid = %s"),
MAC_ADDR_ARRAY(pHdr->bssId), pBssDescr->tsf_delta,
- pBssDescr->nReceivedTime,
+ pBssDescr->received_time,
((pBPR->ssidPresent) ? (char *)pBPR->ssId.ssId : ""));
lim_log(pMac, LOG1, FL("Seq Ctrl: Frag Num: %d, Seq Num: LO:%02x HI:%02x"),
@@ -389,8 +389,6 @@ lim_check_and_add_bss_description(tpAniSirGlobal mac_ctx,
return;
}
- qdf_mem_zero(bssdescr, frame_len);
-
/* In scan state, store scan result. */
lim_collect_bss_description(mac_ctx, bssdescr, bpr, rx_packet_info,
scanning);
diff --git a/core/mac/src/pe/lim/lim_security_utils.c b/core/mac/src/pe/lim/lim_security_utils.c
index a76eea60c45c..c5938c2b923d 100644
--- a/core/mac/src/pe/lim/lim_security_utils.c
+++ b/core/mac/src/pe/lim/lim_security_utils.c
@@ -842,9 +842,7 @@ void lim_send_set_bss_key_req(tpAniSirGlobal pMac,
/* Respond to SME with error code */
mlmSetKeysCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
- } else
- qdf_mem_set((void *)pSetBssKeyParams,
- sizeof(tSetBssKeyParams), 0);
+ }
/* Update the WMA_SET_BSSKEY_REQ parameters */
pSetBssKeyParams->bssIdx = psessionEntry->bssIdx;
@@ -943,9 +941,7 @@ void lim_send_set_sta_key_req(tpAniSirGlobal pMac,
lim_log(pMac, LOGP,
FL("Unable to allocate memory during SET_BSSKEY"));
return;
- } else
- qdf_mem_set((void *)pSetStaKeyParams, sizeof(tSetStaKeyParams),
- 0);
+ }
/* Update the WMA_SET_STAKEY_REQ parameters */
pSetStaKeyParams->staIdx = staIdx;
diff --git a/core/mac/src/pe/lim/lim_send_frames_host_roam.c b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
index 50c86a6ff657..2039955c7e17 100644
--- a/core/mac/src/pe/lim/lim_send_frames_host_roam.c
+++ b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
@@ -487,7 +487,6 @@ void lim_send_retry_reassoc_req_frame(tpAniSirGlobal pMac,
pTmpMlmReassocReq = qdf_mem_malloc(sizeof(tLimMlmReassocReq));
if (NULL == pTmpMlmReassocReq)
goto end;
- qdf_mem_set(pTmpMlmReassocReq, sizeof(tLimMlmReassocReq), 0);
qdf_mem_copy(pTmpMlmReassocReq, pMlmReassocReq,
sizeof(tLimMlmReassocReq));
}
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index 94248e13a9c4..2cd0f854db31 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -579,8 +579,6 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx,
return;
}
- qdf_mem_zero(&extracted_ext_cap, sizeof(extracted_ext_cap));
-
/*
* Fill out 'frm', after which we'll just hand the struct off to
* 'dot11f_pack_probe_response'.
@@ -1659,8 +1657,6 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
return;
}
- qdf_mem_set((uint8_t *) frm, sizeof(tDot11fAssocRequest), 0);
-
if (add_ie_len && pe_session->is_ext_caps_present) {
qdf_mem_set((uint8_t *) &extr_ext_cap, sizeof(tDot11fIEExtCap),
0);
@@ -4023,7 +4019,6 @@ lim_send_radio_measure_report_action_frame(tpAniSirGlobal pMac,
qdf_mem_free(frm);
return eSIR_FAILURE;
}
- qdf_mem_set((uint8_t *) frm, sizeof(*frm), 0);
frm->Category.category = SIR_MAC_ACTION_RRM;
frm->Action.action = SIR_MAC_RRM_RADIO_MEASURE_RPT;
diff --git a/core/mac/src/pe/lim/lim_send_messages.c b/core/mac/src/pe/lim/lim_send_messages.c
index 8233822f0284..3222cf08c613 100644
--- a/core/mac/src/pe/lim/lim_send_messages.c
+++ b/core/mac/src/pe/lim/lim_send_messages.c
@@ -103,7 +103,6 @@ tSirRetStatus lim_send_cf_params(tpAniSirGlobal pMac, uint8_t bssIdx,
retCode = eSIR_MEM_ALLOC_FAILED;
goto returnFailure;
}
- qdf_mem_set((uint8_t *) pCFParams, sizeof(tUpdateCFParams), 0);
pCFParams->cfpCount = cfpCount;
pCFParams->cfpPeriod = cfpPeriod;
pCFParams->bssIdx = bssIdx;
@@ -227,7 +226,6 @@ tSirRetStatus lim_send_switch_chnl_params(tpAniSirGlobal pMac,
"Unable to allocate memory for Switch Ch Params"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pChnlParams, sizeof(tSwitchChannelParams), 0);
pChnlParams->channelNumber = chnlNumber;
pChnlParams->ch_center_freq_seg0 = ch_center_freq_seg0;
pChnlParams->ch_center_freq_seg1 = ch_center_freq_seg1;
@@ -491,7 +489,6 @@ tSirRetStatus lim_set_link_state(tpAniSirGlobal pMac, tSirLinkState state,
retCode = eSIR_MEM_ALLOC_FAILED;
return retCode;
}
- qdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0);
pLinkStateParams->state = state;
pLinkStateParams->callback = callback;
pLinkStateParams->callbackArg = callbackArg;
@@ -534,7 +531,6 @@ extern tSirRetStatus lim_set_link_state_ft(tpAniSirGlobal pMac, tSirLinkState
retCode = eSIR_MEM_ALLOC_FAILED;
return retCode;
}
- qdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0);
pLinkStateParams->state = state;
/* Copy Mac address */
sir_copy_mac_addr(pLinkStateParams->bssid, bssId);
@@ -593,7 +589,6 @@ tSirRetStatus lim_send_beacon_filter_info(tpAniSirGlobal pMac,
retCode = eSIR_MEM_ALLOC_FAILED;
return retCode;
}
- qdf_mem_set((uint8_t *) pBeaconFilterMsg, msgSize, 0);
/* Fill in capability Info and mask */
/* Don't send this message if no active Infra session is found. */
pBeaconFilterMsg->capabilityInfo = psessionEntry->limCurrentBssCaps;
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index 6b524cfbb080..ab2fcb67c14c 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -462,7 +462,6 @@ lim_send_sme_join_reassoc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type,
return;
}
- qdf_mem_set((uint8_t *) sme_join_rsp, rsp_len, 0);
sme_join_rsp->beaconLength = 0;
sme_join_rsp->assocReqLength = 0;
sme_join_rsp->assocRspLength = 0;
@@ -480,7 +479,6 @@ lim_send_sme_join_reassoc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type,
FL("MemAlloc fail - JOIN/REASSOC_RSP"));
return;
}
- qdf_mem_set((uint8_t *) sme_join_rsp, rsp_len, 0);
if (result_code == eSIR_SME_SUCCESS) {
sta_ds = dph_get_hash_entry(mac_ctx,
DPH_STA_HASH_INDEX_PEER,
@@ -592,8 +590,6 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac,
("call to AllocateMemory failed for eWNI_SME_START_BSS_RSP"));
return;
}
- qdf_mem_set((uint8_t *) pSirSmeRsp, size, 0);
-
} else {
/* subtract size of beaconLength + Mac Hdr + Fixed Fields before SSID */
ieOffset = sizeof(tAniBeaconStruct) + SIR_MAC_B_PR_SSID_OFFSET;
@@ -611,7 +607,6 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac,
return;
}
- qdf_mem_set((uint8_t *) pSirSmeRsp, size, 0);
size = sizeof(tSirSmeStartBssRsp);
if (resultCode == eSIR_SME_SUCCESS) {
@@ -769,7 +764,6 @@ lim_post_sme_scan_rsp_message(tpAniSirGlobal pMac,
FL("AllocateMemory failed for eWNI_SME_SCAN_RSP"));
return;
}
- qdf_mem_set((void *)pSirSmeScanRsp, sizeof(tSirSmeScanRsp), 0);
pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP;
pSirSmeScanRsp->statusCode = resultCode;
@@ -1697,7 +1691,6 @@ lim_send_sme_addts_rsp(tpAniSirGlobal pMac, uint8_t rspReqd, uint32_t status,
return;
}
- qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
rsp->messageType = eWNI_SME_ADDTS_RSP;
rsp->rc = status;
rsp->rsp.status = (enum eSirMacStatusCodes)status;
@@ -1746,7 +1739,6 @@ lim_send_sme_delts_rsp(tpAniSirGlobal pMac, tpSirDeltsReq delts, uint32_t status
lim_log(pMac, LOGP, FL("AllocateMemory failed for DELTS_RSP"));
return;
}
- qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
if (psessionEntry != NULL) {
@@ -1797,7 +1789,6 @@ lim_send_sme_delts_ind(tpAniSirGlobal pMac, tpSirDeltsReqInfo delts, uint16_t ai
lim_log(pMac, LOGP, FL("AllocateMemory failed for DELTS_IND"));
return;
}
- qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
rsp->messageType = eWNI_SME_DELTS_IND;
rsp->rc = eSIR_SUCCESS;
@@ -1949,9 +1940,6 @@ lim_send_sme_ibss_peer_ind(tpAniSirGlobal pMac,
return;
}
- qdf_mem_set((void *)pNewPeerInd, (sizeof(tSmeIbssPeerInd) + beaconLen),
- 0);
-
qdf_mem_copy((uint8_t *) pNewPeerInd->peer_addr.bytes,
peerMacAddr, QDF_MAC_ADDR_SIZE);
pNewPeerInd->staId = staIndex;
@@ -2180,7 +2168,6 @@ void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx, tpSirMsgQ msg)
goto err;
}
- qdf_mem_set(csa_offload_ind, sizeof(tSmeCsaOffloadInd), 0);
csa_offload_ind->mesgType = eWNI_SME_CSA_OFFLOAD_EVENT;
csa_offload_ind->mesgLen = sizeof(tSmeCsaOffloadInd);
qdf_mem_copy(csa_offload_ind->bssid.bytes, session_entry->bssId,
@@ -2275,7 +2262,6 @@ void lim_send_sme_max_assoc_exceeded_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMa
PELOGE(lim_log(pMac, LOGE, FL("Failed to allocate memory"));)
return;
}
- qdf_mem_set((void *)pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd), 0);
qdf_mem_copy((uint8_t *) pSmeMaxAssocInd->peer_mac.bytes,
(uint8_t *) peerMacAddr, QDF_MAC_ADDR_SIZE);
pSmeMaxAssocInd->mesgType = eWNI_SME_MAX_ASSOC_EXCEEDED;
@@ -2378,9 +2364,6 @@ lim_send_sme_ap_channel_switch_resp(tpAniSirGlobal pMac,
return;
}
- qdf_mem_set((void *)pSmeSwithChnlParams,
- sizeof(tSwitchChannelParams), 0);
-
qdf_mem_copy(pSmeSwithChnlParams, pChnlParams,
sizeof(tSwitchChannelParams));
@@ -2501,7 +2484,6 @@ lim_process_beacon_tx_success_ind(tpAniSirGlobal pMac, uint16_t msgType, void *e
return;
}
- qdf_mem_set((void *)pChanSwTxResponse, length, 0);
pChanSwTxResponse->sessionId =
psessionEntry->smeSessionId;
pChanSwTxResponse->chanSwIeTxStatus =
@@ -2526,8 +2508,6 @@ lim_process_beacon_tx_success_ind(tpAniSirGlobal pMac, uint16_t msgType, void *e
("AllocateMemory failed for beacon_tx_comp_rsp_ptr"));
return;
}
- qdf_mem_set((void *)beacon_tx_comp_rsp_ptr,
- sizeof(*beacon_tx_comp_rsp_ptr), 0);
beacon_tx_comp_rsp_ptr->session_id =
psessionEntry->smeSessionId;
beacon_tx_comp_rsp_ptr->tx_status = QDF_STATUS_SUCCESS;
diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c
index 7498c075a6dd..1bd3a4025af7 100644
--- a/core/mac/src/pe/lim/lim_session.c
+++ b/core/mac/src/pe/lim/lim_session.c
@@ -314,9 +314,6 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId,
session_ptr->dph.dphHashTable.pDphNodeArray = NULL;
return NULL;
}
- qdf_mem_set(session_ptr->gpLimPeerIdxpool,
- sizeof(*session_ptr->gpLimPeerIdxpool) * (numSta + 1),
- 0);
session_ptr->freePeerIdxHead = 0;
session_ptr->freePeerIdxTail = 0;
session_ptr->gLimNumOfCurrentSTAs = 0;
diff --git a/core/mac/src/pe/lim/lim_timer_utils.c b/core/mac/src/pe/lim/lim_timer_utils.c
index bf4ad5968be6..cb244dd65d96 100644
--- a/core/mac/src/pe/lim/lim_timer_utils.c
+++ b/core/mac/src/pe/lim/lim_timer_utils.c
@@ -310,8 +310,6 @@ uint32_t lim_create_timers(tpAniSirGlobal pMac)
lim_log(pMac, LOGP, FL("AllocateMemory failed!"));
goto err_timer;
}
- qdf_mem_zero(pMac->lim.gLimPreAuthTimerTable.pTable,
- cfgValue * sizeof(tLimPreAuthNode *));
for (i = 0; i < cfgValue; i++) {
pMac->lim.gLimPreAuthTimerTable.pTable[i] =
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index f76cf455e1fc..0518ae8fe92d 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -4961,8 +4961,6 @@ void lim_process_del_ts_ind(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
goto error1;
}
- qdf_mem_set((uint8_t *) pDelTsReq, sizeof(tSirDeltsReq), 0);
-
if (pSta->wmeEnabled)
qdf_mem_copy(&(pDelTsReq->req.tspec), &(pTspecInfo->tspec),
sizeof(tSirMacTspecIE));
@@ -4993,7 +4991,6 @@ void lim_process_del_ts_ind(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
PELOGE(lim_log(pMac, LOGE, FL("AllocateMemory() failed"));)
goto error3;
}
- qdf_mem_set((uint8_t *) pDelTsReqInfo, sizeof(tSirDeltsReqInfo), 0);
if (pSta->wmeEnabled)
qdf_mem_copy(&(pDelTsReqInfo->tspec), &(pTspecInfo->tspec),
@@ -5248,7 +5245,6 @@ void lim_frame_transmission_control(tpAniSirGlobal pMac, tLimQuietTxMode type,
return;
}
- qdf_mem_set((void *)pTxCtrlMsg, (sizeof(*pTxCtrlMsg) + nBytes), 0);
status = __lim_fill_tx_control_params(pMac, pTxCtrlMsg, type, mode);
if (status != QDF_STATUS_SUCCESS) {
qdf_mem_free(pTxCtrlMsg);
diff --git a/core/mac/src/pe/nan/nan_datapath.c b/core/mac/src/pe/nan/nan_datapath.c
index 3bed714cdf2c..62ec69af98ec 100644
--- a/core/mac/src/pe/nan/nan_datapath.c
+++ b/core/mac/src/pe/nan/nan_datapath.c
@@ -286,7 +286,6 @@ static void lim_ndp_delete_peers(tpAniSirGlobal mac_ctx,
return;
}
- qdf_mem_zero(deleted_peers, num_peers * sizeof(*deleted_peers));
for (i = 0; i < num_peers; i++) {
lim_log(mac_ctx, LOG1,
FL("ndp_map[%d]: MAC: " MAC_ADDRESS_STR " num_active %d"),
diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c
index 51a2712141e9..c1a282e78946 100644
--- a/core/mac/src/pe/rrm/rrm_api.c
+++ b/core/mac/src/pe/rrm/rrm_api.c
@@ -386,7 +386,6 @@ rrm_process_neighbor_report_response(tpAniSirGlobal pMac,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(pSmeNeighborRpt, length, 0);
/* Allocated memory for pSmeNeighborRpt...will be freed by other module */
@@ -641,8 +640,6 @@ rrm_process_beacon_report_req(tpAniSirGlobal pMac,
}
- qdf_mem_set(pSmeBcnReportReq, sizeof(tSirBeaconReportReqInd), 0);
-
/* Allocated memory for pSmeBcnReportReq....will be freed by other modulea */
qdf_mem_copy(pSmeBcnReportReq->bssId, pSessionEntry->bssId,
sizeof(tSirMacAddr));
@@ -838,9 +835,6 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal mac_ctx,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_zero(report, beacon_xmit_ind->numBssDesc *
- sizeof(*report));
-
for (bss_desc_count = 0; bss_desc_count <
beacon_xmit_ind->numBssDesc; bss_desc_count++) {
beacon_report =
@@ -956,7 +950,6 @@ static void rrm_process_beacon_request_failure(tpAniSirGlobal pMac,
("Unable to allocate memory during RRM Req processing"));
return;
}
- qdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0);
pReport->token = pCurrentReq->token;
pReport->type = SIR_MAC_RRM_BEACON_TYPE;
@@ -1023,8 +1016,6 @@ tSirRetStatus rrm_process_beacon_req(tpAniSirGlobal mac_ctx, tSirMacAddr peer,
FL("Unable to allocate memory during RRM Req processing"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(report, sizeof(*report) *
- (rrm_req->num_MeasurementRequest - index), 0);
lim_log(mac_ctx, LOG3,
FL("rrm beacon type refused of %d report in beacon table"),
*num_report);
@@ -1044,7 +1035,6 @@ tSirRetStatus rrm_process_beacon_req(tpAniSirGlobal mac_ctx, tSirMacAddr peer,
return eSIR_MEM_ALLOC_FAILED;
}
lim_log(mac_ctx, LOG3, FL(" Processing Beacon Report request"));
- qdf_mem_set(curr_req, sizeof(*curr_req), 0);
curr_req->dialog_token = rrm_req->DialogToken.token;
curr_req->token = rrm_req->
MeasurementRequest[index].measurement_token;
@@ -1090,8 +1080,6 @@ tSirRetStatus update_rrm_report(tpAniSirGlobal mac_ctx,
lim_log(mac_ctx, LOGP, FL("Unable to allocate memory during RRM Req processing"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(report, sizeof(*report) *
- (rrm_req->num_MeasurementRequest - index), 0);
lim_log(mac_ctx, LOG3, FL("rrm beacon type incapable of %d report "),
*num_report);
}
@@ -1134,7 +1122,6 @@ rrm_process_radio_measurement_request(tpAniSirGlobal mac_ctx,
lim_log(mac_ctx, LOGP, FL("Unable to allocate memory during RRM Req processing"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(report, sizeof(tSirMacRadioMeasureReport), 0);
lim_log(mac_ctx, LOGE, FL("No requestIes in the measurement request, sending incapable report"));
report->incapable = 1;
num_report = 1;
@@ -1157,7 +1144,6 @@ rrm_process_radio_measurement_request(tpAniSirGlobal mac_ctx,
lim_log(mac_ctx, LOGP, FL("Unable to allocate memory during RRM Req processing"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(report, sizeof(tSirMacRadioMeasureReport), 0);
lim_log(mac_ctx, LOGE, FL("Allocated memory for report"));
report->incapable = 1;
report->type = rrm_req->MeasurementRequest[0].measurement_type;
diff --git a/core/mac/src/pe/sch/sch_api.c b/core/mac/src/pe/sch/sch_api.c
index 2eb27f8e73ec..1debe34dfa74 100644
--- a/core/mac/src/pe/sch/sch_api.c
+++ b/core/mac/src/pe/sch/sch_api.c
@@ -597,7 +597,6 @@ int sch_gen_timing_advert_frame(tpAniSirGlobal mac_ctx, tSirMacAddr self_addr,
sch_log(mac_ctx, LOGE, FL("Cannot allocate memory"));
return eSIR_FAILURE;
}
- qdf_mem_zero(*buf, buf_size);
payload_size = 0;
status = dot11f_pack_timing_advertisement_frame(mac_ctx, &frame,
diff --git a/core/mac/src/pe/sch/sch_beacon_gen.c b/core/mac/src/pe/sch/sch_beacon_gen.c
index 082834e5e71d..22c5738be6b4 100644
--- a/core/mac/src/pe/sch/sch_beacon_gen.c
+++ b/core/mac/src/pe/sch/sch_beacon_gen.c
@@ -219,9 +219,6 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session)
mac->fc.fromDS = 0;
mac->fc.toDS = 0;
- /* Now set the beacon body */
- qdf_mem_set((uint8_t *) bcn_1, sizeof(tDot11fBeacon1), 0);
-
/* Skip over the timestamp (it'll be updated later). */
bcn_1->BeaconInterval.interval =
session->beaconParams.beaconInterval;
@@ -279,8 +276,6 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session)
FL("Warnings while packing a tDot11fBeacon1(0x%08x.)."),
n_status);
}
- /*changed to correct beacon corruption */
- qdf_mem_set((uint8_t *) bcn_2, sizeof(tDot11fBeacon2), 0);
session->schBeaconOffsetBegin = offset + (uint16_t) n_bytes;
sch_log(mac_ctx, LOG1, FL("Initialized beacon begin, offset %d"),
offset);
diff --git a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
index 5e86c7e1f02e..8c0c432dae7e 100644
--- a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
+++ b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
@@ -124,9 +124,6 @@ tSirRetStatus mac_open(tHalHandle *pHalHandle, tHddHandle hHdd,
if (NULL == p_mac)
return eSIR_MEM_ALLOC_FAILED;
- /* Initialize the p_mac structure */
- qdf_mem_set(p_mac, sizeof(tAniSirGlobal), 0);
-
/*
* Set various global fields of p_mac here
* (Could be platform dependant as some variables in p_mac are platform
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 eea1199143ba..3a2751528b0f 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
@@ -2327,8 +2327,6 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pr, sizeof(tDot11fProbeResponse), 0);
-
/* delegate to the framesc-generated code, */
status = dot11f_unpack_probe_response(pMac, pFrame, nFrame, pr);
if (DOT11F_FAILED(status)) {
@@ -2624,7 +2622,6 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac,
}
/* Zero-init our [out] parameter, */
qdf_mem_set((uint8_t *) pAssocReq, sizeof(tSirAssocReq), 0);
- qdf_mem_set((uint8_t *) ar, sizeof(tDot11fAssocRequest), 0);
/* delegate to the framesc-generated code, */
status = dot11f_unpack_assoc_request(pMac, pFrame, nFrame, ar);
@@ -3829,8 +3826,6 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pBeacon, sizeof(tDot11fBeacon), 0);
-
/* get the MAC address out of the BD, */
qdf_mem_copy(pBeaconStruct->bssid, pHdr->sa, 6);
diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c
index fcf1b578b3b8..9c9683789d4d 100644
--- a/core/sap/src/sap_ch_select.c
+++ b/core/sap/src/sap_ch_select.c
@@ -574,9 +574,6 @@ static bool sap_chan_sel_init(tHalHandle halHandle,
return eSAP_FALSE;
}
- qdf_mem_zero(pSpectCh,
- (pSpectInfoParams->numSpectChans) * sizeof(*pSpectCh));
-
/* Initialize the pointers in the DfsParams to the allocated memory */
pSpectInfoParams->pSpectCh = pSpectCh;
@@ -1882,6 +1879,7 @@ static bool sap_filter_over_lap_ch(ptSapContext pSapCtx, uint16_t chNum)
return eSAP_FALSE;
}
+#ifdef FEATURE_WLAN_CH_AVOID
/**
* sap_select_channel_no_scan_result() - select SAP channel when no scan results
* are available.
@@ -1890,26 +1888,17 @@ static bool sap_filter_over_lap_ch(ptSapContext pSapCtx, uint16_t chNum)
* Returns: channel number if success, 0 otherwise
*/
static uint8_t sap_select_channel_no_scan_result(tHalHandle hal,
- ptSapContext sap_ctx)
+ ptSapContext sap_ctx)
{
- uint32_t start_ch_num, end_ch_num;
-#ifdef FEATURE_WLAN_CH_AVOID
enum channel_state ch_type;
uint8_t i, first_safe_ch_in_range = SAP_CHANNEL_NOT_SELECTED;
-#endif
uint32_t dfs_master_cap_enabled;
- start_ch_num = sap_ctx->acs_cfg->start_ch;
- end_ch_num = sap_ctx->acs_cfg->end_ch;
+ uint32_t start_ch_num = sap_ctx->acs_cfg->start_ch;
+ uint32_t end_ch_num = sap_ctx->acs_cfg->end_ch;
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
FL("start - end: %d - %d"), start_ch_num, end_ch_num);
-#ifndef FEATURE_WLAN_CH_AVOID
- sap_ctx->acs_cfg->pri_ch = start_ch_num;
- sap_ctx->acs_cfg->ht_sec_ch = 0;
- /* pick the first channel in configured range */
- return start_ch_num;
-#else
sme_cfg_get_int(hal, WNI_CFG_DFS_MASTER_ENABLED,
&dfs_master_cap_enabled);
@@ -1965,8 +1954,25 @@ static uint8_t sap_select_channel_no_scan_result(tHalHandle hal,
/* if no channel selected return SAP_CHANNEL_NOT_SELECTED */
return first_safe_ch_in_range;
-#endif /* !FEATURE_WLAN_CH_AVOID */
}
+#else
+static uint8_t sap_select_channel_no_scan_result(tHalHandle hal,
+ ptSapContext sap_ctx)
+{
+ uint32_t start_ch_num = sap_ctx->acs_cfg->start_ch;
+
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
+ FL("start - end: %d - %d"),
+ start_ch_num,
+ sap_ctx->acs_cfg->end_ch);
+
+ sap_ctx->acs_cfg->pri_ch = start_ch_num;
+ sap_ctx->acs_cfg->ht_sec_ch = 0;
+
+ /* pick the first channel in configured range */
+ return start_ch_num;
+}
+#endif /* FEATURE_WLAN_CH_AVOID */
/**
* sap_select_channel() - select SAP channel
diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c
index 25f2eb3886db..54a3dcedab60 100644
--- a/core/sap/src/sap_fsm.c
+++ b/core/sap/src/sap_fsm.c
@@ -4460,7 +4460,7 @@ static QDF_STATUS sap_get_channel_list(ptSapContext sap_ctx,
uint8_t end_ch_num, band_end_ch;
uint32_t en_lte_coex;
tHalHandle hal = CDS_GET_HAL_CB(sap_ctx->p_cds_gctx);
-#if defined(FEATURE_WLAN_CH_AVOID) || defined(SOFTAP_CHANNEL_RANGE)
+#ifdef FEATURE_WLAN_CH_AVOID
uint8_t i;
#endif
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 0c6cf0acc201..877fa62cf63e 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -352,7 +352,6 @@ static QDF_STATUS init_sme_cmd_list(tpAniSirGlobal pMac)
}
status = QDF_STATUS_SUCCESS;
- qdf_mem_set(pMac->sme.pSmeCmdBufAddr, sme_cmd_ptr_ary_sz, 0);
for (cmd_idx = 0; cmd_idx < pMac->sme.totalSmeCmd; cmd_idx++) {
/*
* Since total size of all commands together can be huge chunk
@@ -2249,7 +2248,6 @@ QDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId,
pSmeRrmContext->eseBcnReqInProgress = true;
sms_log(pMac, LOGE, "Sending Beacon Report Req to SME");
- qdf_mem_zero(pSmeBcnReportReq, sizeof(tSirBeaconReportReqInd));
pSmeBcnReportReq->messageType = eWNI_SME_BEACON_REPORT_REQ_IND;
pSmeBcnReportReq->length = sizeof(tSirBeaconReportReqInd);
@@ -3507,7 +3505,6 @@ QDF_STATUS sme_get_ap_channel_from_scan_cache(tHalHandle hal_handle,
FL("scan_filter mem alloc failed"));
return QDF_STATUS_E_FAILURE;
} else {
- qdf_mem_set(scan_filter, sizeof(tCsrScanResultFilter), 0);
qdf_mem_set(&first_ap_profile, sizeof(tSirBssDescription), 0);
if (NULL == profile) {
@@ -6662,7 +6659,6 @@ QDF_STATUS sme_register_p2p_ack_ind_callback(tHalHandle hal,
sme_release_global_lock(&mac_ctx->sme);
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(msg, sizeof(*msg));
msg->message_type = eWNI_SME_REGISTER_P2P_ACK_CB;
msg->length = sizeof(*msg);
@@ -6704,7 +6700,6 @@ QDF_STATUS sme_register_mgmt_frame_ind_callback(tHalHandle hal,
sme_release_global_lock(&mac_ctx->sme);
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set(msg, sizeof(*msg), 0);
msg->message_type = eWNI_SME_REGISTER_MGMT_FRAME_CB;
msg->length = sizeof(*msg);
@@ -6762,7 +6757,6 @@ QDF_STATUS sme_register_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
if (NULL == pMsg)
status = QDF_STATUS_E_NOMEM;
else {
- qdf_mem_set(pMsg, len, 0);
pMsg->messageType = eWNI_SME_REGISTER_MGMT_FRAME_REQ;
pMsg->length = len;
pMsg->sessionId = sessionId;
@@ -6824,7 +6818,6 @@ QDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
if (NULL == pMsg)
status = QDF_STATUS_E_NOMEM;
else {
- qdf_mem_set(pMsg, len, 0);
pMsg->messageType = eWNI_SME_REGISTER_MGMT_FRAME_REQ;
pMsg->length = len;
pMsg->registerFrame = false;
@@ -10407,7 +10400,6 @@ QDF_STATUS sme_update_tdls_peer_state(tHalHandle hHal,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(pTdlsPeerStateParams, sizeof(*pTdlsPeerStateParams));
qdf_mem_copy(&pTdlsPeerStateParams->peerMacAddr,
&peerStateParams->peerMacAddr, sizeof(tSirMacAddr));
pTdlsPeerStateParams->vdevId = peerStateParams->vdevId;
@@ -10551,7 +10543,6 @@ QDF_STATUS sme_send_tdls_chan_switch_req(tHalHandle hal,
sme_release_global_lock(&mac->sme);
return QDF_STATUS_E_FAILURE;
}
- qdf_mem_zero(chan_switch_params, sizeof(*chan_switch_params));
switch (ch_switch_params->tdls_off_ch_mode) {
case ENABLE_CHANSWITCH:
@@ -11623,7 +11614,6 @@ QDF_STATUS sme_dcc_clear_stats(tHalHandle hHal, uint32_t vdev_id,
goto end;
}
- qdf_mem_zero(request, sizeof(*request));
request->vdev_id = vdev_id;
request->dcc_stats_bitmap = dcc_stats_bitmap;
@@ -12245,7 +12235,6 @@ QDF_STATUS sme_update_access_policy_vendor_ie(tHalHandle hal,
return QDF_STATUS_E_FAILURE;
}
- qdf_mem_set(msg, msg_len, 0);
msg->msg_type = (uint16_t)eWNI_SME_UPDATE_ACCESS_POLICY_VENDOR_IE;
msg->length = (uint16_t)msg_len;
@@ -12697,8 +12686,6 @@ QDF_STATUS sme_init_thermal_info(tHalHandle hHal, tSmeThermalParams thermalParam
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero((void *)pWmaParam, sizeof(t_thermal_mgmt));
-
pWmaParam->thermalMgmtEnabled = thermalParam.smeThermalMgmtEnabled;
pWmaParam->throttlePeriod = thermalParam.smeThrottlePeriod;
@@ -12881,8 +12868,6 @@ QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(pSapDisableIntraFwd, sizeof(tDisableIntraBssFwd));
-
pSapDisableIntraFwd->sessionId = sessionId;
pSapDisableIntraFwd->disableintrabssfwd = disablefwd;
@@ -12967,8 +12952,6 @@ QDF_STATUS sme_stats_ext_request(uint8_t session_id, tpStatsExtRequestReq input)
if (data == NULL) {
return QDF_STATUS_E_NOMEM;
}
-
- qdf_mem_zero(data, data_len);
data->vdev_id = session_id;
data->request_data_len = input->request_data_len;
if (input->request_data_len) {
@@ -13705,7 +13688,6 @@ QDF_STATUS sme_set_epno_list(tHalHandle hal,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(req_msg, len);
req_msg->num_networks = input->num_networks;
req_msg->request_id = input->request_id;
req_msg->session_id = input->session_id;
@@ -13785,7 +13767,6 @@ QDF_STATUS sme_set_passpoint_list(tHalHandle hal,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(req_msg, len);
req_msg->num_networks = input->num_networks;
req_msg->request_id = input->request_id;
req_msg->session_id = input->session_id;
@@ -13849,7 +13830,6 @@ QDF_STATUS sme_reset_passpoint_list(tHalHandle hal,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(req_msg, sizeof(*req_msg));
req_msg->request_id = input->request_id;
req_msg->session_id = input->session_id;
@@ -14699,7 +14679,6 @@ QDF_STATUS sme_configure_modulated_dtim(tHalHandle h_hal, uint8_t session_id,
if (QDF_STATUS_SUCCESS == status) {
- qdf_mem_zero((void *)iwcmd, sizeof(*iwcmd));
iwcmd->param_value = modulated_dtim;
iwcmd->param_vdev_id = session_id;
iwcmd->param_id = GEN_PARAM_MODULATED_DTIM;
@@ -14753,13 +14732,12 @@ QDF_STATUS sme_wifi_start_logger(tHalHandle hal,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(req_msg, len);
-
req_msg->verbose_level = start_log.verbose_level;
req_msg->is_iwpriv_command = start_log.is_iwpriv_command;
req_msg->ring_id = start_log.ring_id;
req_msg->ini_triggered = start_log.ini_triggered;
req_msg->user_triggered = start_log.user_triggered;
+ req_msg->size = start_log.size;
status = sme_acquire_global_lock(&mac->sme);
if (status != QDF_STATUS_SUCCESS) {
@@ -15261,8 +15239,6 @@ QDF_STATUS sme_pdev_set_pcl(tHalHandle hal,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(req_msg, len);
-
for (i = 0; i < msg.pcl_len; i++) {
req_msg->pcl_list[i] = msg.pcl_list[i];
req_msg->weight_list[i] = msg.weight_list[i];
@@ -16061,7 +16037,6 @@ void sme_send_disassoc_req_frame(tHalHandle hal, uint8_t session_id,
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
return;
- qdf_mem_set(msg, sizeof(struct sme_send_disassoc_frm_req), 0);
msg->msg_type = (uint16_t) eWNI_SME_SEND_DISASSOC_FRAME;
msg->length = (uint16_t) sizeof(struct sme_send_disassoc_frm_req);
diff --git a/core/sme/src/common/sme_ft_api.c b/core/sme/src/common/sme_ft_api.c
index adbb1aa273c6..0ab104f00ea5 100644
--- a/core/sme/src/common/sme_ft_api.c
+++ b/core/sme/src/common/sme_ft_api.c
@@ -284,7 +284,6 @@ QDF_STATUS sme_ft_send_update_key_ind(tHalHandle hal, uint32_t session_id,
if (NULL == msg)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(msg, msglen, 0);
msg->messageType = eWNI_SME_FT_UPDATE_KEY;
msg->length = msglen;
diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c
index 48b298c653d6..915af516c2ea 100644
--- a/core/sme/src/common/sme_power_save.c
+++ b/core/sme/src/common/sme_power_save.c
@@ -313,7 +313,6 @@ static QDF_STATUS sme_ps_enter_wowl_req_params(tpAniSirGlobal mac_ctx,
FL("Fail to allocate memory for Enter Wowl Request"));
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set((uint8_t *) hal_wowl_params, sizeof(*hal_wowl_params), 0);
/* fill in the message field */
hal_wowl_params->ucMagicPktEnable = sme_wowl_params->ucMagicPktEnable;
@@ -421,8 +420,6 @@ static QDF_STATUS sme_ps_exit_wowl_req_params(tpAniSirGlobal mac_ctx,
FL("Fail to allocate memory for WoWLAN Add Bcast Pattern "));
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set((uint8_t *) hal_wowl_msg,
- sizeof(*hal_wowl_msg), 0);
hal_wowl_msg->sessionId = session_id;
if (QDF_STATUS_SUCCESS == sme_post_ps_msg_to_wma(WMA_WOWL_EXIT_REQ,
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 6c0f417ec805..547ae03fe3f7 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -572,8 +572,6 @@ static void csr_roam_sort_channel_for_early_stop(tpAniSirGlobal mac_ctx,
"Failed to allocate memory for tSirUpdateChanList");
return;
}
- qdf_mem_zero(chan_list_greedy, buf_size);
- qdf_mem_zero(chan_list_non_greedy, buf_size);
/*
* fixed_greedy_chan_list is an evaluated channel list based on most of
* the enterprise wifi deployments and the order of the channels
@@ -693,7 +691,6 @@ QDF_STATUS csr_update_channel_list(tpAniSirGlobal pMac)
"Failed to allocate memory for tSirUpdateChanList");
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(pChanList, bufLen);
for (i = 0; i < pScan->base_channels.numChannels; i++) {
/* Scan is not performed on DSRC channels*/
@@ -3048,10 +3045,6 @@ static QDF_STATUS csr_init11d_info(tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo)
qdf_mem_malloc(sizeof(tSirMacChanInfo) *
WNI_CFG_VALID_CHANNEL_LIST_LEN);
if (pChanInfo != NULL) {
- qdf_mem_set(pChanInfo,
- sizeof(tSirMacChanInfo) *
- WNI_CFG_VALID_CHANNEL_LIST_LEN, 0);
-
pChanInfoStart = pChanInfo;
for (index = 0; index < ps11dinfo->Channels.numChannels;
index++) {
@@ -3110,9 +3103,6 @@ QDF_STATUS csr_init_channel_power_list(tpAniSirGlobal pMac, tCsr11dinfo *ps11din
qdf_mem_malloc(sizeof(tSirMacChanInfo) *
WNI_CFG_VALID_CHANNEL_LIST_LEN);
if (pChanInfo != NULL) {
- qdf_mem_set(pChanInfo,
- sizeof(tSirMacChanInfo) *
- WNI_CFG_VALID_CHANNEL_LIST_LEN, 0);
pChanInfoStart = pChanInfo;
for (index = 0; index < ps11dinfo->Channels.numChannels;
@@ -3681,7 +3671,6 @@ csr_send_mb_tkip_counter_measures_req_msg(tpAniSirGlobal pMac,
status = QDF_STATUS_SUCCESS;
if (!QDF_IS_STATUS_SUCCESS(status))
break;
- qdf_mem_set(pMsg, sizeof(tSirSmeTkipCntrMeasReq), 0);
pMsg->messageType = eWNI_SME_TKIP_CNTR_MEAS_REQ;
pMsg->length = sizeof(tSirSmeTkipCntrMeasReq);
pMsg->sessionId = sessionId;
@@ -4805,7 +4794,6 @@ QDF_STATUS csr_roam_stop_network(tpAniSirGlobal pMac, uint32_t sessionId,
if (NULL == pBssConfig)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pBssConfig, sizeof(tBssConfigParam), 0);
status = csr_roam_prepare_bss_config(pMac, pProfile, pBssDesc,
pBssConfig, pIes);
if (QDF_IS_STATUS_SUCCESS(status)) {
@@ -5705,8 +5693,6 @@ QDF_STATUS csr_roam_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand)
pSession->pCurRoamProfile =
qdf_mem_malloc(sizeof(tCsrRoamProfile));
if (NULL != pSession->pCurRoamProfile) {
- qdf_mem_set(pSession->pCurRoamProfile,
- sizeof(tCsrRoamProfile), 0);
csr_roam_copy_profile(pMac,
pSession->pCurRoamProfile,
&pCommand->u.roamCmd.roamProfile);
@@ -5872,8 +5858,6 @@ static QDF_STATUS csr_roam_save_params(tpAniSirGlobal mac_ctx,
if (NULL == session_ptr->pWpaRsnRspIE)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(session_ptr->pWpaRsnRspIE,
- nIeLen + 2, 0);
session_ptr->pWpaRsnRspIE[0] = DOT11F_EID_RSN;
session_ptr->pWpaRsnRspIE[1] = (uint8_t) nIeLen;
/* copy upto akm_suites */
@@ -7684,8 +7668,6 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId,
goto end;
}
- qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter),
- 0);
/* Try to connect to any BSS */
if (NULL == pProfile) {
/* No encryption */
@@ -7921,7 +7903,6 @@ static QDF_STATUS csr_roam_join_last_profile(tpAniSirGlobal pMac,
status = QDF_STATUS_E_NOMEM;
goto end;
}
- qdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0);
status = csr_roam_copy_profile(pMac, pProfile,
pSession->pCurRoamProfile);
if (!QDF_IS_STATUS_SUCCESS(status))
@@ -7931,7 +7912,6 @@ static QDF_STATUS csr_roam_join_last_profile(tpAniSirGlobal pMac,
status = QDF_STATUS_E_NOMEM;
goto end;
}
- qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
status = csr_roam_prepare_filter_from_profile(pMac, pProfile,
pScanFilter);
if (!QDF_IS_STATUS_SUCCESS(status))
@@ -9200,7 +9180,6 @@ csr_check_profile_in_scan_cache(tpAniSirGlobal mac_ctx,
sms_log(mac_ctx, LOGE, FL("alloc for ScanFilter failed."));
return false;
}
- qdf_mem_set(*scan_filter, sizeof(tCsrScanResultFilter), 0);
(*scan_filter)->scan_filter_for_roam = 1;
status = csr_roam_prepare_filter_from_profile(mac_ctx,
&neighbor_roam_info->csrNeighborRoamProfile,
@@ -9308,8 +9287,6 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac,
sme_qos_csr_event_ind(pMac, sessionId,
SME_QOS_CSR_HANDOFF_ASSOC_REQ,
NULL);
- qdf_mem_set(pCurRoamProfile, sizeof(tCsrRoamProfile),
- 0);
csr_roam_copy_profile(pMac, pCurRoamProfile,
pSession->pCurRoamProfile);
/* make sure to put it at the head of the cmd queue */
@@ -10325,7 +10302,6 @@ static QDF_STATUS csr_send_reset_ap_caps_changed(tpAniSirGlobal pMac,
status = QDF_STATUS_SUCCESS;
if (QDF_IS_STATUS_SUCCESS(status)) {
- qdf_mem_set(pMsg, sizeof(tSirResetAPCapsChange), 0);
pMsg->messageType = eWNI_SME_RESET_AP_CAPS_CHANGED;
pMsg->length = len;
qdf_copy_macaddr(&pMsg->bssId, bssId);
@@ -10453,7 +10429,6 @@ csr_roam_chk_lnk_disassoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
* the WmStatusChange requests is pushed and processed
*/
pDisassocInd = (tSirSmeDisassocInd *) msg_ptr;
- qdf_mem_set(&roam_info, sizeof(roam_info), 0);
status = csr_roam_get_session_id_from_bssid(mac_ctx,
&pDisassocInd->bssid, &sessionId);
if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -12372,7 +12347,6 @@ bool csr_is_same_profile(tpAniSirGlobal pMac,
if (NULL == pScanFilter)
return fCheck;
- qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
status = csr_roam_prepare_filter_from_profile(pMac, pProfile2,
pScanFilter);
if (!(QDF_IS_STATUS_SUCCESS(status)))
@@ -13085,7 +13059,6 @@ static QDF_STATUS csr_roam_start_ibss(tpAniSirGlobal pMac, uint32_t sessionId,
else
status = QDF_STATUS_SUCCESS;
if (QDF_IS_STATUS_SUCCESS(status)) {
- qdf_mem_set(pBssConfig, sizeof(tBssConfigParam), 0);
/* there is no Bss description before we start an IBSS so we need to adopt */
/* all Bss configuration parameters from the Profile. */
status =
@@ -13519,7 +13492,6 @@ csr_roam_remove_connected_bss_from_scan_cache(tpAniSirGlobal pMac,
if (NULL == pScanFilter)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
pScanFilter->BSSIDs.bssid = qdf_mem_malloc(sizeof(struct qdf_mac_addr));
if (NULL == pScanFilter->BSSIDs.bssid) {
qdf_mem_free(pScanFilter);
@@ -13642,8 +13614,6 @@ static QDF_STATUS csr_roam_start_wds(tpAniSirGlobal pMac, uint32_t sessionId,
pSession->pCurRoamProfile =
qdf_mem_malloc(sizeof(tCsrRoamProfile));
if (pSession->pCurRoamProfile != NULL) {
- qdf_mem_set(pSession->pCurRoamProfile,
- sizeof(tCsrRoamProfile), 0);
csr_roam_copy_profile(pMac,
pSession->pCurRoamProfile,
pProfile);
@@ -13848,7 +13818,6 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
status = QDF_STATUS_SUCCESS;
if (!QDF_IS_STATUS_SUCCESS(status))
break;
- qdf_mem_set(csr_join_req, msgLen, 0);
csr_join_req->messageType = messageType;
csr_join_req->length = msgLen;
csr_join_req->sessionId = (uint8_t) sessionId;
@@ -14485,7 +14454,6 @@ QDF_STATUS csr_send_mb_disassoc_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
if (NULL == pMsg)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pMsg, sizeof(tSirSmeDisassocReq), 0);
pMsg->messageType = eWNI_SME_DISASSOC_REQ;
pMsg->length = sizeof(tSirSmeDisassocReq);
pMsg->sessionId = sessionId;
@@ -14602,7 +14570,6 @@ QDF_STATUS csr_send_chng_mcc_beacon_interval(tpAniSirGlobal pMac, uint32_t sessi
else
status = QDF_STATUS_SUCCESS;
if (QDF_IS_STATUS_SUCCESS(status)) {
- qdf_mem_set(pMsg, sizeof(tSirChangeBIParams), 0);
pMsg->messageType = eWNI_SME_CHNG_MCC_BEACON_INTERVAL;
pMsg->length = len;
@@ -14712,7 +14679,6 @@ QDF_STATUS csr_send_mb_disassoc_cnf_msg(tpAniSirGlobal pMac,
status = QDF_STATUS_SUCCESS;
if (!QDF_IS_STATUS_SUCCESS(status))
break;
- qdf_mem_set(pMsg, sizeof(tSirSmeDisassocCnf), 0);
pMsg->messageType = eWNI_SME_DISASSOC_CNF;
pMsg->statusCode = eSIR_SME_SUCCESS;
pMsg->length = sizeof(tSirSmeDisassocCnf);
@@ -14749,7 +14715,6 @@ QDF_STATUS csr_send_mb_deauth_cnf_msg(tpAniSirGlobal pMac,
status = QDF_STATUS_SUCCESS;
if (!QDF_IS_STATUS_SUCCESS(status))
break;
- qdf_mem_set(pMsg, sizeof(tSirSmeDeauthCnf), 0);
pMsg->messageType = eWNI_SME_DEAUTH_CNF;
pMsg->statusCode = eSIR_SME_SUCCESS;
pMsg->length = sizeof(tSirSmeDeauthCnf);
@@ -14784,7 +14749,6 @@ QDF_STATUS csr_send_assoc_cnf_msg(tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocIn
pMsg = qdf_mem_malloc(sizeof(tSirSmeAssocCnf));
if (NULL == pMsg)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pMsg, sizeof(tSirSmeAssocCnf), 0);
pMsg->messageType = eWNI_SME_ASSOC_CNF;
pMsg->length = sizeof(tSirSmeAssocCnf);
if (QDF_IS_STATUS_SUCCESS(Halstatus))
@@ -14824,7 +14788,6 @@ QDF_STATUS csr_send_assoc_ind_to_upper_layer_cnf_msg(tpAniSirGlobal pMac,
pMsg = qdf_mem_malloc(sizeof(tSirSmeAssocIndToUpperLayerCnf));
if (NULL == pMsg)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pMsg, sizeof(tSirSmeAssocIndToUpperLayerCnf), 0);
pMsg->messageType = eWNI_SME_UPPER_LAYER_ASSOC_CNF;
pMsg->length = sizeof(tSirSmeAssocIndToUpperLayerCnf);
@@ -14920,7 +14883,6 @@ QDF_STATUS csr_send_mb_set_context_req_msg(tpAniSirGlobal pMac,
pMsg = qdf_mem_malloc(msgLen);
if (NULL == pMsg)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pMsg, msgLen, 0);
pMsg->messageType = eWNI_SME_SETCONTEXT_REQ;
pMsg->length = msgLen;
pMsg->sessionId = (uint8_t) sessionId;
@@ -14986,7 +14948,6 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId
if (NULL == pMsg)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pMsg, sizeof(tSirSmeStartBssReq), 0);
pMsg->messageType = eWNI_SME_START_BSS_REQ;
pMsg->sessionId = sessionId;
pMsg->length = sizeof(tSirSmeStartBssReq);
@@ -15108,7 +15069,6 @@ QDF_STATUS csr_send_mb_stop_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId)
pMsg = qdf_mem_malloc(sizeof(tSirSmeStopBssReq));
if (NULL == pMsg)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pMsg, sizeof(tSirSmeStopBssReq), 0);
pMsg->messageType = eWNI_SME_STOP_BSS_REQ;
pMsg->sessionId = sessionId;
pMsg->length = sizeof(tSirSmeStopBssReq);
@@ -15194,7 +15154,6 @@ QDF_STATUS csr_process_add_sta_session_rsp(tpAniSirGlobal pMac, uint8_t *pMsg)
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set(msg, sizeof(*msg), 0);
msg->msg_type = eWNI_SME_SET_IE_REQ;
msg->session_id = rsp->session_id;
msg->length = sizeof(*msg);
@@ -17215,7 +17174,6 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
FL("Mem alloc for roam scan offload req failed."));
return NULL;
}
- qdf_mem_zero(req_buf, sizeof(tSirRoamOffloadScanReq));
req_buf->Command = command;
/*
* If command is STOP, then pass down ScanOffloadEnabled as Zero. This
@@ -17583,14 +17541,14 @@ static void csr_update_driver_assoc_ies(tpAniSirGlobal mac_ctx,
= (uint8_t *) &mac_ctx->rrm.rrmPEContext.rrmEnabledCaps;
uint8_t power_cap_ie_data[DOT11F_IE_POWERCAPS_MAX_LEN]
= {MIN_TX_PWR_CAP, MAX_TX_PWR_CAP};
- uint8_t max_tx_pwr_cap
- = csr_get_cfg_max_tx_power(mac_ctx,
- session->pConnectBssDesc->channelId);
-
+ uint8_t max_tx_pwr_cap = 0;
uint8_t supp_chan_ie[DOT11F_IE_SUPPCHANNELS_MAX_LEN], supp_chan_ie_len;
uint8_t ese_ie[DOT11F_IE_ESEVERSION_MAX_LEN]
= { 0x0, 0x40, 0x96, 0x3, ESE_VERSION_SUPPORTED};
+ if (session->pConnectBssDesc)
+ max_tx_pwr_cap = csr_get_cfg_max_tx_power(mac_ctx,
+ session->pConnectBssDesc->channelId);
if (max_tx_pwr_cap)
power_cap_ie_data[1] = max_tx_pwr_cap;
@@ -17703,11 +17661,13 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id,
/*
* The Dynamic Config Items Update may happen even if the state is in
* INIT. It is important to ensure that the command is passed down to
- * the FW only if the Infra Station is in a connected state.A connected
- * station could also be in a PREAUTH or REASSOC states.So, consider not
- * sending the command down in INIT state. We also have to ensure that
- * if there is a STOP command we always have to inform Riva,
- * irrespective of whichever state we are in
+ * the FW only if the Infra Station is in a connected state. A connected
+ * station could also be in a PREAUTH or REASSOC states.
+ * 1) Block all CMDs that are not STOP in INIT State. For STOP always
+ * inform firmware irrespective of state.
+ * 2) Block update cfg CMD if its for REASON_ROAM_SET_BLACKLIST_BSSID,
+ * because we need to inform firmware of blacklisted AP for PNO in
+ * all states.
*/
if ((roam_info->neighborRoamState ==
@@ -18364,7 +18324,6 @@ QDF_STATUS csr_roam_update_wparsni_es(tpAniSirGlobal pMac, uint32_t sessionId,
pMsg = qdf_mem_malloc(sizeof(tSirUpdateAPWPARSNIEsReq));
if (NULL == pMsg)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pMsg, sizeof(tSirUpdateAPWPARSNIEsReq), 0);
pMsg->messageType = eWNI_SME_SET_APWPARSNIEs_REQ;
pMsg->transactionId = 0;
qdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr);
@@ -18494,8 +18453,6 @@ QDF_STATUS csr_roam_channel_change_req(tpAniSirGlobal pMac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set((void *)pMsg, sizeof(tSirChanChangeRequest), 0);
-
pMsg->messageType = eWNI_SME_CHANNEL_CHANGE_REQ;
pMsg->messageLen = sizeof(tSirChanChangeRequest);
pMsg->targetChannel = profile->ChannelInfo.ChannelList[0];
@@ -18539,7 +18496,6 @@ QDF_STATUS csr_roam_start_beacon_req(tpAniSirGlobal pMac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set((void *)pMsg, sizeof(tSirStartBeaconIndication), 0);
pMsg->messageType = eWNI_SME_START_BEACON_REQ;
pMsg->messageLen = sizeof(tSirStartBeaconIndication);
pMsg->beaconStartStatus = dfsCacWaitStatus;
@@ -18651,8 +18607,6 @@ csr_roam_update_add_ies(tpAniSirGlobal pMac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(pUpdateAddIEs, sizeof(tSirUpdateIEsInd));
-
pUpdateAddIEs->msgType = eWNI_SME_UPDATE_ADDITIONAL_IES;
pUpdateAddIEs->msgLen = sizeof(tSirUpdateIEsInd);
@@ -18697,7 +18651,6 @@ QDF_STATUS csr_send_ext_change_channel(tpAniSirGlobal mac_ctx, uint32_t channel,
if (NULL == msg)
return QDF_STATUS_E_NOMEM;
- qdf_mem_zero(msg, sizeof(*msg));
msg->message_type = eWNI_SME_EXT_CHANGE_CHANNEL;
msg->length = sizeof(*msg);
msg->new_channel = channel;
@@ -18733,7 +18686,6 @@ QDF_STATUS csr_roam_send_chan_sw_ie_request(tpAniSirGlobal mac_ctx,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set((void *)msg, sizeof(tSirDfsCsaIeRequest), 0);
msg->msgType = eWNI_SME_DFS_BEACON_CHAN_SW_IE_REQ;
msg->msgLen = sizeof(tSirDfsCsaIeRequest);
@@ -19224,8 +19176,6 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command)
}
}
- qdf_mem_set(cmd, len, 0);
-
cmd->messageType = eWNI_SME_SET_HW_MODE_REQ;
cmd->length = len;
cmd->set_hw.hw_mode_index = command->u.set_hw_mode_cmd.hw_mode_index;
@@ -19448,7 +19398,6 @@ void csr_process_nss_update_req(tpAniSirGlobal mac, tSmeCmd *command)
goto fail;
}
- qdf_mem_set((void *)msg, sizeof(*msg), 0);
msg->msgType = eWNI_SME_NSS_UPDATE_REQ;
msg->msgLen = sizeof(*msg);
@@ -19623,7 +19572,6 @@ void csr_roam_synch_callback(tpAniSirGlobal mac_ctx,
}
csr_scan_save_roam_offload_ap_to_scan_cache(mac_ctx, roam_synch_data,
bss_desc);
- qdf_mem_zero(roam_info, sizeof(tCsrRoamInfo));
roam_info->sessionId = session_id;
csr_roam_call_callback(mac_ctx, roam_synch_data->roamedVdevId,
roam_info, 0, eCSR_ROAM_TDLS_STATUS_UPDATE,
@@ -19701,8 +19649,6 @@ void csr_roam_synch_callback(tpAniSirGlobal mac_ctx,
sme_release_global_lock(&mac_ctx->sme);
return;
}
- qdf_mem_zero(roam_info->pbFrames, roam_info->nBeaconLength +
- roam_info->nAssocReqLength + roam_info->nAssocRspLength);
qdf_mem_copy(roam_info->pbFrames,
(uint8_t *)roam_synch_data +
roam_synch_data->reassoc_req_offset +
diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c
index 3edaca4b8e9f..43fcab6b3652 100644
--- a/core/sme/src/csr/csr_api_scan.c
+++ b/core/sme/src/csr/csr_api_scan.c
@@ -671,7 +671,6 @@ static QDF_STATUS csr_issue_roam_after_lostlink_scan(tpAniSirGlobal pMac,
status = QDF_STATUS_E_NOMEM;
goto free_filter;
}
- qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
if (NULL == pSession->pCurRoamProfile) {
pScanFilter->EncryptionType.numEntries = 1;
pScanFilter->EncryptionType.encryptionType[0] =
@@ -686,7 +685,6 @@ static QDF_STATUS csr_issue_roam_after_lostlink_scan(tpAniSirGlobal pMac,
status = QDF_STATUS_E_NOMEM;
goto free_filter;
}
- qdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0);
status = csr_roam_copy_profile(pMac, pProfile,
pSession->pCurRoamProfile);
if (!QDF_IS_STATUS_SUCCESS(status))
@@ -838,7 +836,6 @@ csr_update_lost_link1_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *cmd,
if (NULL == scan_filter)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(scan_filter, sizeof(tCsrScanResultFilter), 0);
status = csr_roam_prepare_filter_from_profile(mac_ctx,
pSession->pCurRoamProfile, scan_filter);
if (!QDF_IS_STATUS_SUCCESS(status))
@@ -1177,7 +1174,6 @@ QDF_STATUS csr_scan_handle_search_for_ssid(tpAniSirGlobal pMac,
status = QDF_STATUS_E_NOMEM;
break;
}
- qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
status = csr_roam_prepare_filter_from_profile(pMac, pProfile,
pScanFilter);
if (!QDF_IS_STATUS_SUCCESS(status))
@@ -1930,7 +1926,6 @@ csr_save_scan_entry(tpAniSirGlobal pMac,
qdf_mem_free(pNewIes);
return status;
}
- qdf_mem_set(pResult, allocLen, 0);
pResult->capValue = pBssDesc->capValue;
pResult->preferValue = pBssDesc->preferValue;
pResult->ucEncryptionType = uc;
@@ -2121,7 +2116,6 @@ QDF_STATUS csr_scan_get_result(tpAniSirGlobal pMac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set(pRetList, sizeof(tScanResultList), 0);
csr_ll_open(pMac->hHdd, &pRetList->List);
pRetList->pCurEntry = NULL;
status = csr_parse_scan_results(pMac, pFilter, pRetList, &count);
@@ -2380,7 +2374,6 @@ QDF_STATUS csr_scan_copy_result_list(tpAniSirGlobal pMac, tScanResultHandle hIn,
if (NULL == pRetList)
status = QDF_STATUS_E_NOMEM;
else {
- qdf_mem_set(pRetList, sizeof(tScanResultList), 0);
csr_ll_open(pMac->hHdd, &pRetList->List);
pRetList->pCurEntry = NULL;
csr_ll_lock(&pMac->scan.scanResultList);
@@ -2858,8 +2851,8 @@ static void csr_purge_old_scan_results(tpAniSirGlobal mac_ctx)
{
tListElem *pentry, *tmp_entry;
tCsrScanResult *presult, *oldest_bss = NULL;
- uint32_t oldest_entry = 0;
- uint32_t curr_time = qdf_mc_timer_get_system_ticks();
+ uint64_t oldest_entry = 0;
+ uint64_t curr_time = (uint64_t)qdf_mc_timer_get_system_time();
csr_ll_unlock(&mac_ctx->scan.scanResultList);
pentry = csr_ll_peek_head(&mac_ctx->scan.scanResultList,
@@ -2868,10 +2861,10 @@ static void csr_purge_old_scan_results(tpAniSirGlobal mac_ctx)
tmp_entry = csr_ll_next(&mac_ctx->scan.scanResultList, pentry,
LL_ACCESS_NOLOCK);
presult = GET_BASE_ADDR(pentry, tCsrScanResult, Link);
- if ((curr_time - presult->Result.BssDescriptor.nReceivedTime) >
+ if ((curr_time - presult->Result.BssDescriptor.received_time) >
oldest_entry) {
oldest_entry = curr_time -
- presult->Result.BssDescriptor.nReceivedTime;
+ presult->Result.BssDescriptor.received_time;
oldest_bss = presult;
}
pentry = tmp_entry;
@@ -2881,9 +2874,9 @@ static void csr_purge_old_scan_results(tpAniSirGlobal mac_ctx)
if (csr_ll_remove_entry(&mac_ctx->scan.scanResultList,
&oldest_bss->Link, LL_ACCESS_NOLOCK)) {
sms_log(mac_ctx, LOG1,
- FL("Current time delta (%d) of BSSID to be removed" MAC_ADDRESS_STR),
+ FL("Current time delta (%llu) of BSSID to be removed" MAC_ADDRESS_STR),
(curr_time -
- oldest_bss->Result.BssDescriptor.nReceivedTime),
+ oldest_bss->Result.BssDescriptor.received_time),
MAC_ADDR_ARRAY(
oldest_bss->Result.BssDescriptor.bssId));
csr_free_scan_result_entry(mac_ctx, oldest_bss);
@@ -2961,8 +2954,9 @@ csr_remove_from_tmp_list(tpAniSirGlobal mac_ctx,
* hidden ssid from the profile i.e., forget the SSID
* via GUI that SSID shouldn't see in the profile
*/
- unsigned long time_gap = qdf_mc_timer_get_system_time() -
- timer;
+ uint64_t time_gap =
+ (uint64_t)qdf_mc_timer_get_system_time() -
+ timer;
if ((0 == bss_dscp->Result.ssId.length)
&& (time_gap <= HIDDEN_TIMER)
&& tmpSsid.length) {
@@ -3040,7 +3034,6 @@ static tCsrScanResult *csr_scan_save_bss_description(tpAniSirGlobal pMac,
pCsrBssDescription = qdf_mem_malloc(cbAllocated);
if (NULL != pCsrBssDescription) {
- qdf_mem_set(pCsrBssDescription, cbAllocated, 0);
pCsrBssDescription->AgingCount =
(int32_t) pMac->roam.configParam.agingCount;
sms_log(pMac, LOGW,
@@ -3097,7 +3090,7 @@ tCsrScanResult *csr_scan_append_bss_description(tpAniSirGlobal pMac,
* hidden ssid from the profile i.e., forget the SSID
* via GUI that SSID shouldn't see in the profile
*/
- if ((qdf_mc_timer_get_system_time() - timer) <=
+ if (((uint64_t)qdf_mc_timer_get_system_time() - timer) <=
HIDDEN_TIMER) {
pCsrBssDescription->Result.ssId = tmpSsid;
pCsrBssDescription->Result.timer = timer;
@@ -3151,7 +3144,6 @@ QDF_STATUS csr_save_to_channel_power2_g_5_g(tpAniSirGlobal pMac,
pChannelInfo++;
continue;
}
- qdf_mem_set(pChannelSet, sizeof(tCsrChannelPowerInfo), 0);
pChannelSet->firstChannel = pChannelInfo->firstChanNum;
pChannelSet->numChannels = pChannelInfo->numChannels;
/*
@@ -3234,7 +3226,6 @@ static void csr_clear_dfs_channel_list(tpAniSirGlobal pMac)
msgLen = (uint16_t) (sizeof(tSirMbMsg));
pMsg = qdf_mem_malloc(msgLen);
if (NULL != pMsg) {
- qdf_mem_set((void *)pMsg, msgLen, 0);
pMsg->type = eWNI_SME_CLEAR_DFS_CHANNEL_LIST;
pMsg->msgLen = msgLen;
cds_send_mb_message_to_mac(pMsg);
@@ -3623,8 +3614,6 @@ void csr_save_channel_power_for_band(tpAniSirGlobal pMac, bool fill_5f)
if (NULL == chan_info)
return;
- qdf_mem_set(chan_info, sizeof(tSirMacChanInfo) *
- WNI_CFG_VALID_CHANNEL_LIST_LEN, 0);
ch_info_start = chan_info;
for (idx = 0; idx < max_ch_idx; idx++) {
ch = pMac->scan.defaultPowerTable[idx].chan_num;
@@ -4360,7 +4349,6 @@ static tCsrScanResult *csr_scan_save_bss_description_to_interim_list(
cbAllocated, cbBSSDesc);
pCsrBssDescription = qdf_mem_malloc(cbAllocated);
if (NULL != pCsrBssDescription) {
- qdf_mem_set(pCsrBssDescription, cbAllocated, 0);
qdf_mem_copy(&pCsrBssDescription->Result.BssDescriptor,
pBSSDescription, cbBSSDesc);
pCsrBssDescription->AgingCount =
@@ -4887,8 +4875,8 @@ static bool csr_scan_age_out_bss(tpAniSirGlobal pMac, tCsrScanResult *pResult)
FL("Connected BSS, Set Aging Count=%d for BSS "
MAC_ADDRESS_STR), pResult->AgingCount,
MAC_ADDR_ARRAY(pResult->Result.BssDescriptor.bssId));
- pResult->Result.BssDescriptor.nReceivedTime =
- (uint32_t) qdf_mc_timer_get_system_ticks();
+ pResult->Result.BssDescriptor.received_time =
+ (uint64_t)qdf_mc_timer_get_system_time();
return fRet;
}
/*
@@ -4998,7 +4986,6 @@ static QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set(pMsg, msgLen, 0);
pMsg->messageType = eWNI_SME_SCAN_REQ;
pMsg->length = msgLen;
/* ToDO: Fill in session info when we need to do scan base on session */
@@ -5175,7 +5162,6 @@ QDF_STATUS csr_send_mb_scan_result_req(tpAniSirGlobal pMac,
if (NULL == pMsg)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pMsg, msgLen, 0);
pMsg->messageType = eWNI_SME_SCAN_REQ;
pMsg->length = msgLen;
pMsg->sessionId = sessionId;
@@ -5941,23 +5927,20 @@ static void csr_purge_scan_result_by_age(void *pv)
tpAniSirGlobal mac_ctx = PMAC_STRUCT(pv);
tListElem *entry, *tmp_entry;
tCsrScanResult *result;
- unsigned long ageout_time =
- mac_ctx->scan.scanResultCfgAgingTime * QDF_TICKS_PER_SECOND/10;
- unsigned long cur_time = qdf_mc_timer_get_system_ticks();
+ uint64_t ageout_time =
+ mac_ctx->scan.scanResultCfgAgingTime * SYSTEM_TIME_SEC_TO_MSEC;
+ uint64_t cur_time = qdf_mc_timer_get_system_time();
uint8_t *bssId;
csr_ll_lock(&mac_ctx->scan.scanResultList);
entry = csr_ll_peek_head(&mac_ctx->scan.scanResultList, LL_ACCESS_NOLOCK);
- sms_log(mac_ctx, LOG1, FL(" Ageout time=%ld"), ageout_time);
+ sms_log(mac_ctx, LOG1, FL(" Ageout time=%llu"), ageout_time);
while (entry) {
tmp_entry = csr_ll_next(&mac_ctx->scan.scanResultList, entry,
LL_ACCESS_NOLOCK);
result = GET_BASE_ADDR(entry, tCsrScanResult, Link);
- /*
- * qdf_mc_timer_get_system_ticks() returns in 10ms interval.
- * so ageout time value also updated to 10ms interval value.
- */
- if ((cur_time - result->Result.BssDescriptor.nReceivedTime) >
+
+ if ((cur_time - result->Result.BssDescriptor.received_time) >
ageout_time) {
bssId = result->Result.BssDescriptor.bssId;
sms_log(mac_ctx, LOGW,
@@ -6081,7 +6064,6 @@ QDF_STATUS csr_scan_get_pmkid_candidate_list(tpAniSirGlobal pMac,
if (NULL == pScanFilter)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
/* Here is the profile we need to connect to */
status = csr_roam_prepare_filter_from_profile(pMac,
pSession->pCurRoamProfile, pScanFilter);
@@ -6152,7 +6134,6 @@ QDF_STATUS csr_scan_get_bkid_candidate_list(tpAniSirGlobal pMac,
if (NULL == pScanFilter)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
/* Here is the profile we need to connect to */
status = csr_roam_prepare_filter_from_profile(pMac,
pSession->pCurRoamProfile, pScanFilter);
@@ -6317,9 +6298,6 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id,
else
status = QDF_STATUS_SUCCESS;
- qdf_mem_set(scan_req->pIEField,
- profile->nAddIEScanLength, 0);
-
if (QDF_IS_STATUS_SUCCESS(status)) {
qdf_mem_copy(scan_req->pIEField,
profile->pAddIEScan,
@@ -6473,7 +6451,6 @@ void csr_save_tx_power_to_cfg(tpAniSirGlobal pMac, tDblLinkList *pList,
if (pBuf == NULL)
return;
- qdf_mem_set(pBuf, dataLen, 0);
ch_pwr_set = (tSirMacChanInfo *) (pBuf);
pEntry = csr_ll_peek_head(pList, LL_ACCESS_LOCK);
/*
@@ -6615,8 +6592,6 @@ void csr_set_cfg_scan_control_list(tpAniSirGlobal pMac, uint8_t *countryCode,
pControlList = qdf_mem_malloc(WNI_CFG_SCAN_CONTROL_LIST_LEN);
if (pControlList != NULL) {
- qdf_mem_set((void *)pControlList, WNI_CFG_SCAN_CONTROL_LIST_LEN,
- 0);
if (IS_SIR_STATUS_SUCCESS(wlan_cfg_get_str(pMac,
WNI_CFG_SCAN_CONTROL_LIST,
pControlList, &len))) {
@@ -6849,7 +6824,6 @@ static void csr_send_scan_abort(tpAniSirGlobal mac_ctx,
FL("Failed to alloc memory for SmeScanAbortReq"));
return;
}
- qdf_mem_zero((void *)msg, msg_len);
msg->type = eWNI_SME_SCAN_ABORT_IND;
msg->msgLen = msg_len;
msg->sessionId = session_id;
@@ -6998,7 +6972,6 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac,
qdf_mem_free(parsed_frm);
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set(pScanResult, sizeof(tCsrScanResult) + uLen, 0);
pBssDescr = &pScanResult->Result.BssDescriptor;
/*
* Length of BSS desription is without length of length itself and
@@ -7055,7 +7028,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac,
pBssDescr->capabilityInfo = *((uint16_t *)&parsed_frm->capabilityInfo);
qdf_mem_copy((uint8_t *) &pBssDescr->bssId,
(uint8_t *) macHeader->bssId, sizeof(tSirMacAddr));
- pBssDescr->nReceivedTime = (uint32_t) qdf_mc_timer_get_system_ticks();
+ pBssDescr->received_time = (uint64_t)qdf_mc_timer_get_system_time();
sms_log(pMac, LOG2, FL("Bssid= "MAC_ADDRESS_STR" chan= %d, rssi = %d"),
MAC_ADDR_ARRAY(pBssDescr->bssId), pBssDescr->channelId,
pBssDescr->rssi);
@@ -7271,7 +7244,6 @@ QDF_STATUS csr_scan_save_roam_offload_ap_to_scan_cache(tpAniSirGlobal pMac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(scan_res_ptr, sizeof(tCsrScanResult) + length);
qdf_mem_copy(&scan_res_ptr->Result.BssDescriptor,
bss_desc_ptr,
(sizeof(tSirBssDescription) + length));
@@ -7384,7 +7356,6 @@ void csr_scan_active_list_timeout_handle(void *userData)
FL("Failed to alloc memory for SmeScanAbortReq"));
return;
}
- qdf_mem_zero((void *)msg, msg_len);
msg->type = eWNI_SME_SCAN_ABORT_IND;
msg->msgLen = msg_len;
msg->sessionId = scan_cmd->sessionId;
diff --git a/core/sme/src/csr/csr_host_scan_roam.c b/core/sme/src/csr/csr_host_scan_roam.c
index fcbd0400ac49..43ddcaf5f6a0 100644
--- a/core/sme/src/csr/csr_host_scan_roam.c
+++ b/core/sme/src/csr/csr_host_scan_roam.c
@@ -149,9 +149,7 @@ void csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx,
tpCsrNeighborRoamControlInfo n_roam_info =
&mac_ctx->roam.neighborRoamInfo[sessionid];
tpCsrNeighborRoamBSSInfo bss_info;
- uint32_t age_ticks = 0;
- uint32_t limit_ticks =
- qdf_system_msecs_to_ticks(ROAM_AP_AGE_LIMIT_MS);
+ uint64_t age = 0;
uint8_t num_candidates = 0;
uint8_t num_dropped = 0;
/*
@@ -296,9 +294,10 @@ void csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx,
}
/* check the age of the AP */
- age_ticks = (uint32_t) qdf_mc_timer_get_system_ticks() -
- descr->nReceivedTime;
- if (age_constraint == true && age_ticks > limit_ticks) {
+ age = (uint64_t) qdf_mc_timer_get_system_time() -
+ descr->received_time;
+ if (age_constraint == true &&
+ age > ROAM_AP_AGE_LIMIT_MS) {
num_dropped++;
QDF_TRACE(QDF_MODULE_ID_SME,
QDF_TRACE_LEVEL_WARN,
diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h
index 9c66909c0255..02e83995019f 100644
--- a/core/sme/src/csr/csr_inside_api.h
+++ b/core/sme/src/csr/csr_inside_api.h
@@ -66,6 +66,7 @@
#define CSR_MAX_BSS_SUPPORT 512
#define SYSTEM_TIME_MSEC_TO_USEC 1000
+#define SYSTEM_TIME_SEC_TO_MSEC 1000
/* This number minus 1 means the number of times a channel is scanned before a BSS is remvoed from */
/* cache scan result */
diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c
index 78d1d8661f4f..97cfb05f7d7b 100644
--- a/core/sme/src/csr/csr_neighbor_roam.c
+++ b/core/sme/src/csr/csr_neighbor_roam.c
@@ -385,10 +385,6 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(pScanFilter->BSSIDs.bssid,
- sizeof(tSirMacAddr) *
- pScanFilter->BSSIDs.numOfBSSIDs);
-
/* Populate the BSSID from handoff info received from HDD */
for (i = 0; i < pScanFilter->BSSIDs.numOfBSSIDs; i++) {
qdf_copy_macaddr(&pScanFilter->BSSIDs.bssid[i],
@@ -1516,7 +1512,6 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
sms_log(mac_ctx, LOGE, FL("Memory alloc failed"));
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set(profile, sizeof(tCsrRoamProfile), 0);
status =
csr_roam_copy_profile(mac_ctx, profile,
session->pCurRoamProfile);
@@ -1537,10 +1532,6 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
}
}
- qdf_mem_zero(profile->BSSIDs.bssid,
- sizeof(tSirMacAddr) *
- profile->BSSIDs.numOfBSSIDs);
-
/* Populate the BSSID from handoff info received from HDD */
for (i = 0; i < profile->BSSIDs.numOfBSSIDs; i++) {
qdf_copy_macaddr(&profile->BSSIDs.bssid[i],
diff --git a/core/sme/src/csr/csr_roam_preauth.c b/core/sme/src/csr/csr_roam_preauth.c
index 6b58af69afdc..9419514251a4 100644
--- a/core/sme/src/csr/csr_roam_preauth.c
+++ b/core/sme/src/csr/csr_roam_preauth.c
@@ -515,7 +515,6 @@ QDF_STATUS csr_roam_issue_ft_preauth_req(tHalHandle hal, uint32_t session_id,
}
/* Save the SME Session ID. We need it while processing preauth resp */
csr_session->ftSmeContext.smeSessionId = session_id;
- qdf_mem_zero(preauth_req, auth_req_len);
preauth_req->pbssDescription =
(tpSirBssDescription) qdf_mem_malloc(sizeof(bss_desc->length)
diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c
index b1766b31b769..42d8e07c6374 100644
--- a/core/sme/src/csr/csr_util.c
+++ b/core/sme/src/csr/csr_util.c
@@ -1289,8 +1289,6 @@ QDF_STATUS csr_get_parsed_bss_description_ies(tHalHandle hHal,
if (pBssDesc && ppIEStruct) {
*ppIEStruct = qdf_mem_malloc(sizeof(tDot11fBeaconIEs));
if ((*ppIEStruct) != NULL) {
- qdf_mem_set((void *)*ppIEStruct,
- sizeof(tDot11fBeaconIEs), 0);
status =
csr_parse_bss_description_ies(hHal, pBssDesc,
*ppIEStruct);
diff --git a/core/sme/src/nan/nan_api.c b/core/sme/src/nan/nan_api.c
index 4e2ec69ab6e6..854975790758 100644
--- a/core/sme/src/nan/nan_api.c
+++ b/core/sme/src/nan/nan_api.c
@@ -108,8 +108,6 @@ QDF_STATUS sme_nan_request(tpNanRequestReq input)
FL("Memory allocation failure"));
return QDF_STATUS_E_NOMEM;
}
-
- qdf_mem_zero(data, data_len);
data->request_data_len = input->request_data_len;
if (input->request_data_len) {
qdf_mem_copy(data->request_data,
diff --git a/core/sme/src/nan/nan_datapath_api.c b/core/sme/src/nan/nan_datapath_api.c
index bae1285b4be3..0703283d082f 100644
--- a/core/sme/src/nan/nan_datapath_api.c
+++ b/core/sme/src/nan/nan_datapath_api.c
@@ -419,7 +419,6 @@ QDF_STATUS csr_process_ndp_initiator_request(tpAniSirGlobal mac_ctx,
if (NULL == lim_msg)
return QDF_STATUS_E_NOMEM;
- qdf_mem_set(lim_msg, msg_len, 0);
lim_msg->msg_type = eWNI_SME_NDP_INITIATOR_REQ;
lim_msg->msg_len = msg_len;
/*
@@ -478,7 +477,6 @@ QDF_STATUS csr_process_ndp_responder_request(tpAniSirGlobal mac_ctx,
goto free_config;
}
- qdf_mem_set(lim_msg, msg_len, 0);
lim_msg->msg_type = eWNI_SME_NDP_RESPONDER_REQ;
lim_msg->msg_len = msg_len;
/*
diff --git a/core/sme/src/p2p/p2p_api.c b/core/sme/src/p2p/p2p_api.c
index 894f5cf31d47..60a7aff3d494 100644
--- a/core/sme/src/p2p/p2p_api.c
+++ b/core/sme/src/p2p/p2p_api.c
@@ -75,7 +75,6 @@ QDF_STATUS p2p_process_remain_on_channel_cmd(tpAniSirGlobal pMac,
else {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, "%s call",
__func__);
- qdf_mem_set(pMsg, sizeof(tSirRemainOnChnReq), 0);
pMsg->messageType = eWNI_SME_REMAIN_ON_CHANNEL_REQ;
pMsg->length = (uint16_t) len;
qdf_copy_macaddr(&pMsg->selfMacAddr, &pSession->selfMacAddr);
@@ -301,7 +300,6 @@ QDF_STATUS p2p_send_action(tHalHandle hHal, uint8_t sessionId,
if (NULL == pMsg)
status = QDF_STATUS_E_NOMEM;
else {
- qdf_mem_set((void *)pMsg, msgLen, 0);
pMsg->type = eWNI_SME_SEND_ACTION_FRAME_IND;
pMsg->msgLen = msgLen;
pMsg->sessionId = sessionId;
@@ -350,7 +348,6 @@ QDF_STATUS p2p_set_ps(tHalHandle hHal, tP2pPsConfig *pNoA)
if (NULL == pNoAParam)
status = QDF_STATUS_E_NOMEM;
else {
- qdf_mem_set(pNoAParam, sizeof(tP2pPsConfig), 0);
qdf_mem_copy(pNoAParam, pNoA, sizeof(tP2pPsConfig));
msg.type = eWNI_SME_UPDATE_NOA;
msg.bodyval = 0;
diff --git a/core/sme/src/qos/sme_qos.c b/core/sme/src/qos/sme_qos.c
index 6a097f9cbe74..5f8a2f172fc1 100644
--- a/core/sme/src/qos/sme_qos.c
+++ b/core/sme/src/qos/sme_qos.c
@@ -3493,8 +3493,6 @@ QDF_STATUS sme_qos_ft_aggr_qos_req(tpAniSirGlobal mac_ctx, uint8_t session_id)
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(aggr_req, sizeof(tSirAggrQosReq));
-
aggr_req->messageType = eWNI_SME_FT_AGGR_QOS_REQ;
aggr_req->length = sizeof(tSirAggrQosReq);
aggr_req->sessionId = session_id;
@@ -3942,7 +3940,6 @@ QDF_STATUS sme_qos_add_ts_req(tpAniSirGlobal pMac,
__func__, __LINE__);
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(pMsg, sizeof(tSirAddtsReq));
pMsg->messageType = eWNI_SME_ADDTS_REQ;
pMsg->length = sizeof(tSirAddtsReq);
pMsg->sessionId = sessionId;
@@ -4059,7 +4056,6 @@ QDF_STATUS sme_qos_del_ts_req(tpAniSirGlobal pMac,
__func__, __LINE__);
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(pMsg, sizeof(tSirDeltsReq));
/* get pointer to the TSPEC being deleted */
pSession = &sme_qos_cb.sessionInfo[sessionId];
pACInfo = &pSession->ac_info[ac];
diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c
index 9b86cf132557..11d3f69cb208 100644
--- a/core/sme/src/rrm/sme_rrm.c
+++ b/core/sme/src/rrm/sme_rrm.c
@@ -71,7 +71,7 @@
#define RRM_ROAM_SCORE_NEIGHBOR_IAPP_LIST 30
#endif
-unsigned long rrm_scan_timer;
+uint64_t rrm_scan_timer;
/**
* rrm_ll_purge_neighbor_cache() -Purges all the entries in the neighbor cache
@@ -195,7 +195,6 @@ sme_rrm_send_beacon_report_xmit_ind(tpAniSirGlobal mac_ctx,
"Unable to allocate memory for beacon report");
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(beacon_rep, length);
beacon_rep->messageType = eWNI_SME_BEACON_REPORT_RESP_XMIT_IND;
beacon_rep->length = length;
beacon_rep->uDialogToken = rrm_ctx->token;
@@ -216,7 +215,6 @@ sme_rrm_send_beacon_report_xmit_ind(tpAniSirGlobal mac_ctx,
if (NULL ==
beacon_rep->pBssDescription[i])
break;
- qdf_mem_zero(beacon_rep->pBssDescription[i], tot_len);
qdf_mem_copy(beacon_rep->pBssDescription[i],
bss_desc, sizeof(tSirBssDescription));
qdf_mem_copy(
@@ -446,7 +444,6 @@ static QDF_STATUS sme_rrm_send_scan_result(tpAniSirGlobal mac_ctx,
sms_log(mac_ctx, LOGP, FL("qdf_mem_malloc failed"));
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(filter.SSIDs.SSIDList, sizeof(tCsrSSIDInfo));
filter.SSIDs.SSIDList->SSID.length =
rrm_ctx->ssId.length;
@@ -532,10 +529,9 @@ static QDF_STATUS sme_rrm_send_scan_result(tpAniSirGlobal mac_ctx,
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",
+ sms_log(mac_ctx, LOG1, "Scan res timer:%lu, rrm scan timer:%llu",
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,
@@ -655,7 +651,7 @@ static 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;
+ uint64_t current_time;
status = csr_roam_get_session_id_from_bssid(mac_ctx,
&sme_rrm_ctx->sessionBssId, &session_id);
@@ -692,8 +688,6 @@ static QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
FL("qdf_mem_malloc failed"));
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(scan_req.SSIDs.SSIDList,
- sizeof(tCsrSSIDInfo));
scan_req.SSIDs.SSIDList->SSID.length =
sme_rrm_ctx->ssId.length;
qdf_mem_copy(scan_req.SSIDs.SSIDList->SSID.ssId,
@@ -726,8 +720,8 @@ static QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
* 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 = (uint64_t)qdf_mc_timer_get_system_time();
+ sms_log(mac_ctx, LOG1, "prev scan triggered before %llu ms, totalchannels %d",
current_time - rrm_scan_timer,
sme_rrm_ctx->channelList.numOfChannels);
if ((abs(current_time - rrm_scan_timer) > 1000) &&
@@ -737,7 +731,7 @@ static QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
scan_req.idle_time = 1;
}
- rrm_scan_timer = qdf_mc_timer_get_system_time();
+ rrm_scan_timer = (uint64_t)qdf_mc_timer_get_system_time();
/* set BSSType to default type */
scan_req.BSSType = eCSR_BSS_TYPE_ANY;
@@ -952,7 +946,6 @@ QDF_STATUS sme_rrm_neighbor_report_request(tpAniSirGlobal pMac, uint8_t sessionI
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(pMsg, sizeof(tSirNeighborReportReqInd));
rrm_ll_purge_neighbor_cache(pMac,
&pMac->rrm.rrmSmeContext.neighborReportCache);
@@ -1183,8 +1176,6 @@ static QDF_STATUS sme_rrm_process_neighbor_report(tpAniSirGlobal pMac,
}
- qdf_mem_zero(pNeighborReportDesc,
- sizeof(tRrmNeighborReportDesc));
pNeighborReportDesc->pNeighborBssDescription =
qdf_mem_malloc(sizeof(tSirNeighborBssDescription));
if (NULL == pNeighborReportDesc->pNeighborBssDescription) {
@@ -1194,8 +1185,6 @@ static QDF_STATUS sme_rrm_process_neighbor_report(tpAniSirGlobal pMac,
status = QDF_STATUS_E_NOMEM;
goto end;
}
- qdf_mem_zero(pNeighborReportDesc->pNeighborBssDescription,
- sizeof(tSirNeighborBssDescription));
qdf_mem_copy(pNeighborReportDesc->pNeighborBssDescription,
&pNeighborRpt->sNeighborBssDescription[i],
sizeof(tSirNeighborBssDescription));
diff --git a/core/utils/epping/src/epping_helper.c b/core/utils/epping/src/epping_helper.c
index 43575ea132a1..4e6b6257b126 100644
--- a/core/utils/epping/src/epping_helper.c
+++ b/core/utils/epping/src/epping_helper.c
@@ -68,9 +68,6 @@ int epping_cookie_init(epping_context_t *pEpping_ctx)
i);
goto error;
}
- qdf_mem_zero(pEpping_ctx->s_cookie_mem[i],
- sizeof(struct epping_cookie) *
- MAX_COOKIE_SLOT_SIZE);
}
qdf_spinlock_create(&pEpping_ctx->cookie_lock);
diff --git a/core/utils/host_diag_log/src/host_diag_log.c b/core/utils/host_diag_log/src/host_diag_log.c
index 2fd1b3566fc9..2e90f40a1dce 100644
--- a/core/utils/host_diag_log/src/host_diag_log.c
+++ b/core/utils/host_diag_log/src/host_diag_log.c
@@ -140,8 +140,6 @@ void host_diag_log_submit(void *plog_hdr_ptr)
return;
}
- qdf_mem_zero((void *)pBuf, total_len);
-
wmsg = (tAniHdr *) pBuf;
wmsg->type = PTT_MSG_DIAG_CMDS_TYPE;
wmsg->length = total_len;
diff --git a/core/utils/host_diag_log/src/i_host_diag_core_log.h b/core/utils/host_diag_log/src/i_host_diag_core_log.h
index 829ae193034e..9417837b8a34 100644
--- a/core/utils/host_diag_log/src/i_host_diag_core_log.h
+++ b/core/utils/host_diag_log/src/i_host_diag_core_log.h
@@ -85,7 +85,6 @@ void host_diag_log_submit(void *plog_hdr_ptr);
do { \
payload_ptr = (payload_type *)qdf_mem_malloc(sizeof(payload_type)); \
if (payload_ptr) { \
- qdf_mem_zero(payload_ptr, sizeof(payload_type)); \
host_diag_log_set_code(payload_ptr, log_code); \
host_diag_log_set_length(payload_ptr, sizeof(payload_type)); \
} \
diff --git a/core/utils/pktlog/linux_ac.c b/core/utils/pktlog/linux_ac.c
index f885d6672038..85d95568257f 100644
--- a/core/utils/pktlog/linux_ac.c
+++ b/core/utils/pktlog/linux_ac.c
@@ -603,7 +603,6 @@ int pktlog_send_per_pkt_stats_to_user(void)
return -ENOMEM;
}
- qdf_mem_zero(pktlog, VOS_LOG_PKT_LOG_SIZE);
host_diag_log_set_code(pktlog, LOG_WLAN_PKT_LOG_INFO_C);
pktlog->buf_len = 0;
diff --git a/core/utils/pktlog/pktlog_ac.c b/core/utils/pktlog/pktlog_ac.c
index dc7d0927fcb6..a4479ddef70d 100644
--- a/core/utils/pktlog/pktlog_ac.c
+++ b/core/utils/pktlog/pktlog_ac.c
@@ -484,12 +484,15 @@ int pktlog_setsize(struct hif_opaque_softc *scn, int32_t size)
if (size < 0)
return -EINVAL;
- if (size == pl_info->buf_size)
+ if (size == pl_info->buf_size) {
+ qdf_print("%s: Pktlog Buff Size is already of same size.",
+ __func__);
return 0;
+ }
if (pl_info->log_state) {
- printk
- ("Logging should be disabled before changing bufer size\n");
+ qdf_print("%s: Logging should be disabled before changing"
+ "buffer size.", __func__);
return -EINVAL;
}
@@ -505,8 +508,10 @@ int pktlog_setsize(struct hif_opaque_softc *scn, int32_t size)
pl_dev->tgt_pktlog_alloced = false;
}
- if (size != 0)
+ if (size != 0) {
+ qdf_print("%s: New Pktlog Buff Size is %d\n", __func__, size);
pl_info->buf_size = size;
+ }
return 0;
}
diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c
index abdf3633bef8..e0c76e7dfa9a 100644
--- a/core/wma/src/wma_data.c
+++ b/core/wma/src/wma_data.c
@@ -2974,7 +2974,6 @@ void ol_rx_err(ol_pdev_handle pdev, uint8_t vdev_id,
__func__);
return;
}
- qdf_mem_set((void *)mic_err_ind, sizeof(*mic_err_ind), 0);
mic_err_ind->messageType = eWNI_SME_MIC_FAILURE_IND;
mic_err_ind->length = sizeof(*mic_err_ind);
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 49a7a0993cfa..57f3ff49241c 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -696,7 +696,6 @@ static void wma_vdev_start_rsp(tp_wma_handle wma,
add_bss->status = QDF_STATUS_E_NOMEM;
goto send_fail_resp;
}
- qdf_mem_zero(bcn, sizeof(*bcn));
bcn->buf = qdf_nbuf_alloc(NULL, WMA_BCN_BUF_MAX_SIZE, 0,
sizeof(uint32_t), 0);
if (!bcn->buf) {
@@ -3641,7 +3640,6 @@ static void wma_add_tdls_sta(tp_wma_handle wma, tpAddStaParams add_sta)
goto send_rsp;
}
- qdf_mem_zero(peerStateParams, sizeof(*peerStateParams));
peerStateParams->peerState = WMI_TDLS_PEER_STATE_PEERING;
peerStateParams->vdevId = add_sta->smesessionId;
qdf_mem_copy(&peerStateParams->peerMacAddr,
@@ -4050,7 +4048,6 @@ static void wma_del_tdls_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
goto send_del_rsp;
}
- qdf_mem_zero(peerStateParams, sizeof(*peerStateParams));
peerStateParams->peerState = WMA_TDLS_PEER_STATE_TEARDOWN;
peerStateParams->vdevId = del_sta->smesessionId;
qdf_mem_copy(&peerStateParams->peerMacAddr,
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 05777be24c10..cf0deffae065 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -175,7 +175,6 @@ QDF_STATUS wma_send_snr_request(tp_wma_handle wma_handle,
wma_handle->pGetRssiReq = NULL;
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set(pRssiBkUp, sizeof(tAniGetRssiReq), 0);
pRssiBkUp->sessionId =
((tAniGetRssiReq *) pGetRssiReq)->sessionId;
pRssiBkUp->rssiCallback =
@@ -2746,22 +2745,20 @@ wma_wow_get_pkt_proto_subtype(uint8_t *data,
uint16_t ether_type = (uint16_t)(*(uint16_t *)(data +
QDF_NBUF_TRAC_ETH_TYPE_OFFSET));
- WMA_LOGE("Ether Type: 0x%04x",
+ WMA_LOGD("Ether Type: 0x%04x",
ani_cpu_to_be16(ether_type));
if (QDF_NBUF_TRAC_EAPOL_ETH_TYPE ==
ani_cpu_to_be16(ether_type)) {
if (len >= WMA_EAPOL_SUBTYPE_GET_MIN_LEN)
return qdf_nbuf_data_get_eapol_subtype(data);
- QDF_TRACE(QDF_MODULE_ID_WMA,
- QDF_TRACE_LEVEL_ERROR, "EAPOL Packet");
+ WMA_LOGD("EAPOL Packet");
return QDF_PROTO_INVALID;
} else if (QDF_NBUF_TRAC_ARP_ETH_TYPE ==
ani_cpu_to_be16(ether_type)) {
if (len >= WMA_ARP_SUBTYPE_GET_MIN_LEN)
return qdf_nbuf_data_get_arp_subtype(data);
- QDF_TRACE(QDF_MODULE_ID_WMA,
- QDF_TRACE_LEVEL_ERROR, "ARP Packet");
+ WMA_LOGD("ARP Packet");
return QDF_PROTO_INVALID;
} else if (QDF_NBUF_TRAC_IPV4_ETH_TYPE ==
ani_cpu_to_be16(ether_type)) {
@@ -2769,13 +2766,12 @@ wma_wow_get_pkt_proto_subtype(uint8_t *data,
uint8_t proto_type;
proto_type = qdf_nbuf_data_get_ipv4_proto(data);
- WMA_LOGE("IPV4_proto_type: %u", proto_type);
+ WMA_LOGD("IPV4_proto_type: %u", proto_type);
if (proto_type == QDF_NBUF_TRAC_ICMP_TYPE) {
if (len >= WMA_ICMP_SUBTYPE_GET_MIN_LEN)
return qdf_nbuf_data_get_icmp_subtype(
data);
- QDF_TRACE(QDF_MODULE_ID_WMA,
- QDF_TRACE_LEVEL_ERROR, "ICMP Packet");
+ WMA_LOGD("ICMP Packet");
return QDF_PROTO_INVALID;
} else if (proto_type == QDF_NBUF_TRAC_UDP_TYPE) {
if (len >= WMA_IS_DHCP_GET_MIN_LEN) {
@@ -2783,9 +2779,7 @@ wma_wow_get_pkt_proto_subtype(uint8_t *data,
if (len >=
WMA_DHCP_SUBTYPE_GET_MIN_LEN)
return qdf_nbuf_data_get_dhcp_subtype(data);
- QDF_TRACE(QDF_MODULE_ID_WMA,
- QDF_TRACE_LEVEL_ERROR,
- "DHCP Packet");
+ WMA_LOGD("DHCP Packet");
return QDF_PROTO_INVALID;
}
}
@@ -2794,8 +2788,7 @@ wma_wow_get_pkt_proto_subtype(uint8_t *data,
return QDF_PROTO_IPV4_TCP;
}
}
- QDF_TRACE(QDF_MODULE_ID_WMA,
- QDF_TRACE_LEVEL_ERROR, "IPV4 Packet");
+ WMA_LOGD("IPV4 Packet");
return QDF_PROTO_INVALID;
} else if (QDF_NBUF_TRAC_IPV6_ETH_TYPE ==
ani_cpu_to_be16(ether_type)) {
@@ -2803,13 +2796,12 @@ wma_wow_get_pkt_proto_subtype(uint8_t *data,
uint8_t proto_type;
proto_type = qdf_nbuf_data_get_ipv6_proto(data);
- WMA_LOGE("IPV6_proto_type: %u", proto_type);
+ WMA_LOGD("IPV6_proto_type: %u", proto_type);
if (proto_type == QDF_NBUF_TRAC_ICMPV6_TYPE) {
if (len >= WMA_ICMPV6_SUBTYPE_GET_MIN_LEN)
return qdf_nbuf_data_get_icmpv6_subtype(
data);
- QDF_TRACE(QDF_MODULE_ID_WMA,
- QDF_TRACE_LEVEL_ERROR, "ICMPV6 Packet");
+ WMA_LOGD("ICMPV6 Packet");
return QDF_PROTO_INVALID;
} else if (proto_type == QDF_NBUF_TRAC_UDP_TYPE) {
return QDF_PROTO_IPV6_UDP;
@@ -2817,8 +2809,7 @@ wma_wow_get_pkt_proto_subtype(uint8_t *data,
return QDF_PROTO_IPV6_TCP;
}
}
- QDF_TRACE(QDF_MODULE_ID_WMA,
- QDF_TRACE_LEVEL_ERROR, "IPV6 Packet");
+ WMA_LOGD("IPV6 Packet");
return QDF_PROTO_INVALID;
}
@@ -2847,7 +2838,7 @@ static void wma_wow_parse_data_pkt_buffer(uint8_t *data,
WMA_LOGD("wow_buf_pkt_len: %u", buf_len);
if (buf_len >= QDF_NBUF_TRAC_IPV4_OFFSET)
- WMA_LOGE("Src_mac: " MAC_ADDRESS_STR " Dst_mac: " MAC_ADDRESS_STR,
+ WMA_LOGD("Src_mac: " MAC_ADDRESS_STR " Dst_mac: " MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(data + QDF_NBUF_SRC_MAC_OFFSET),
MAC_ADDR_ARRAY(data + QDF_NBUF_DEST_MAC_OFFSET));
else
@@ -2859,14 +2850,14 @@ static void wma_wow_parse_data_pkt_buffer(uint8_t *data,
case QDF_PROTO_EAPOL_M2:
case QDF_PROTO_EAPOL_M3:
case QDF_PROTO_EAPOL_M4:
- WMA_LOGE("WOW Wakeup: %s rcvd",
+ WMA_LOGD("WOW Wakeup: %s rcvd",
wma_pkt_proto_subtype_to_string(proto_subtype));
if (buf_len >= WMA_EAPOL_INFO_GET_MIN_LEN) {
pkt_len = (uint16_t)(*(uint16_t *)(data +
EAPOL_PKT_LEN_OFFSET));
key_len = (uint16_t)(*(uint16_t *)(data +
EAPOL_KEY_LEN_OFFSET));
- WMA_LOGE("Pkt_len: %u, Key_len: %u",
+ WMA_LOGD("Pkt_len: %u, Key_len: %u",
ani_cpu_to_be16(pkt_len),
ani_cpu_to_be16(key_len));
}
@@ -2880,14 +2871,14 @@ static void wma_wow_parse_data_pkt_buffer(uint8_t *data,
case QDF_PROTO_DHCP_RELEASE:
case QDF_PROTO_DHCP_INFORM:
case QDF_PROTO_DHCP_DECLINE:
- WMA_LOGE("WOW Wakeup: %s rcvd",
+ WMA_LOGD("WOW Wakeup: %s rcvd",
wma_pkt_proto_subtype_to_string(proto_subtype));
if (buf_len >= WMA_DHCP_INFO_GET_MIN_LEN) {
pkt_len = (uint16_t)(*(uint16_t *)(data +
DHCP_PKT_LEN_OFFSET));
transaction_id = (uint32_t)(*(uint32_t *)(data +
DHCP_TRANSACTION_ID_OFFSET));
- WMA_LOGE("Pkt_len: %u, Transaction_id: %u",
+ WMA_LOGD("Pkt_len: %u, Transaction_id: %u",
ani_cpu_to_be16(pkt_len),
ani_cpu_to_be16(transaction_id));
}
@@ -2895,20 +2886,20 @@ static void wma_wow_parse_data_pkt_buffer(uint8_t *data,
case QDF_PROTO_ARP_REQ:
case QDF_PROTO_ARP_RES:
- WMA_LOGE("WOW Wakeup: %s rcvd",
+ WMA_LOGD("WOW Wakeup: %s rcvd",
wma_pkt_proto_subtype_to_string(proto_subtype));
break;
case QDF_PROTO_ICMP_REQ:
case QDF_PROTO_ICMP_RES:
- WMA_LOGE("WOW Wakeup: %s rcvd",
+ WMA_LOGD("WOW Wakeup: %s rcvd",
wma_pkt_proto_subtype_to_string(proto_subtype));
if (buf_len >= WMA_IPV4_PKT_INFO_GET_MIN_LEN) {
pkt_len = (uint16_t)(*(uint16_t *)(data +
IPV4_PKT_LEN_OFFSET));
seq_num = (uint16_t)(*(uint16_t *)(data +
ICMP_SEQ_NUM_OFFSET));
- WMA_LOGE("Pkt_len: %u, Seq_num: %u",
+ WMA_LOGD("Pkt_len: %u, Seq_num: %u",
ani_cpu_to_be16(pkt_len),
ani_cpu_to_be16(seq_num));
}
@@ -2916,14 +2907,14 @@ static void wma_wow_parse_data_pkt_buffer(uint8_t *data,
case QDF_PROTO_ICMPV6_REQ:
case QDF_PROTO_ICMPV6_RES:
- WMA_LOGE("WOW Wakeup: %s rcvd",
+ WMA_LOGD("WOW Wakeup: %s rcvd",
wma_pkt_proto_subtype_to_string(proto_subtype));
if (buf_len >= WMA_IPV6_PKT_INFO_GET_MIN_LEN) {
pkt_len = (uint16_t)(*(uint16_t *)(data +
IPV6_PKT_LEN_OFFSET));
seq_num = (uint16_t)(*(uint16_t *)(data +
ICMPV6_SEQ_NUM_OFFSET));
- WMA_LOGE("Pkt_len: %u, Seq_num: %u",
+ WMA_LOGD("Pkt_len: %u, Seq_num: %u",
ani_cpu_to_be16(pkt_len),
ani_cpu_to_be16(seq_num));
}
@@ -2931,7 +2922,7 @@ static void wma_wow_parse_data_pkt_buffer(uint8_t *data,
case QDF_PROTO_IPV4_UDP:
case QDF_PROTO_IPV4_TCP:
- WMA_LOGE("WOW Wakeup: %s rcvd",
+ WMA_LOGD("WOW Wakeup: %s rcvd",
wma_pkt_proto_subtype_to_string(proto_subtype));
if (buf_len >= WMA_IPV4_PKT_INFO_GET_MIN_LEN) {
pkt_len = (uint16_t)(*(uint16_t *)(data +
@@ -2940,15 +2931,15 @@ static void wma_wow_parse_data_pkt_buffer(uint8_t *data,
IPV4_SRC_PORT_OFFSET));
dst_port = (uint16_t)(*(uint16_t *)(data +
IPV4_DST_PORT_OFFSET));
- WMA_LOGE("Pkt_len: %u",
+ WMA_LOGD("Pkt_len: %u",
ani_cpu_to_be16(pkt_len));
- WMA_LOGE("src_port: %u, dst_port: %u",
+ WMA_LOGD("src_port: %u, dst_port: %u",
ani_cpu_to_be16(src_port),
ani_cpu_to_be16(dst_port));
if (proto_subtype == QDF_PROTO_IPV4_TCP) {
tcp_seq_num = (uint32_t)(*(uint32_t *)(data +
IPV4_TCP_SEQ_NUM_OFFSET));
- WMA_LOGE("TCP_seq_num: %u",
+ WMA_LOGD("TCP_seq_num: %u",
ani_cpu_to_be16(tcp_seq_num));
}
}
@@ -2956,7 +2947,7 @@ static void wma_wow_parse_data_pkt_buffer(uint8_t *data,
case QDF_PROTO_IPV6_UDP:
case QDF_PROTO_IPV6_TCP:
- WMA_LOGE("WOW Wakeup: %s rcvd",
+ WMA_LOGD("WOW Wakeup: %s rcvd",
wma_pkt_proto_subtype_to_string(proto_subtype));
if (buf_len >= WMA_IPV6_PKT_INFO_GET_MIN_LEN) {
pkt_len = (uint16_t)(*(uint16_t *)(data +
@@ -2965,15 +2956,15 @@ static void wma_wow_parse_data_pkt_buffer(uint8_t *data,
IPV6_SRC_PORT_OFFSET));
dst_port = (uint16_t)(*(uint16_t *)(data +
IPV6_DST_PORT_OFFSET));
- WMA_LOGE("Pkt_len: %u",
+ WMA_LOGD("Pkt_len: %u",
ani_cpu_to_be16(pkt_len));
- WMA_LOGE("src_port: %u, dst_port: %u",
+ WMA_LOGD("src_port: %u, dst_port: %u",
ani_cpu_to_be16(src_port),
ani_cpu_to_be16(dst_port));
if (proto_subtype == QDF_PROTO_IPV6_TCP) {
tcp_seq_num = (uint32_t)(*(uint32_t *)(data +
IPV6_TCP_SEQ_NUM_OFFSET));
- WMA_LOGE("TCP_seq_num: %u",
+ WMA_LOGD("TCP_seq_num: %u",
ani_cpu_to_be16(tcp_seq_num));
}
}
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index fa9198feb700..e2e7e1642b44 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -5778,6 +5778,8 @@ void wma_enable_specific_fw_logs(tp_wma_handle wma_handle,
}
#if !defined(REMOVE_PKT_LOG)
+
+#define MEGABYTE (1024 * 1024)
/**
* wma_set_wifi_start_packet_stats() - Start/stop packet stats
* @wma_handle: WMA handle
@@ -5821,6 +5823,11 @@ void wma_set_wifi_start_packet_stats(void *wma_handle,
ATH_PKTLOG_RX | ATH_PKTLOG_TX |
ATH_PKTLOG_TEXT | ATH_PKTLOG_SW_EVENT;
+ if (start_log->size != 0) {
+ pktlog_setsize(scn, start_log->size * MEGABYTE);
+ return;
+ }
+
if (start_log->verbose_level == WLAN_LOG_LEVEL_ACTIVE) {
pktlog_enable(scn, log_state, start_log->ini_triggered,
start_log->user_triggered,