Merge "qca-wifi: RCC cannot coexist with M_TX_ACK mode"
diff --git a/target_if/cfr/src/target_if_cfr.c b/target_if/cfr/src/target_if_cfr.c
index dd216eb..525b212 100644
--- a/target_if/cfr/src/target_if_cfr.c
+++ b/target_if/cfr/src/target_if_cfr.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -257,24 +257,25 @@
 
 	uint8_t def_mac[QDF_MAC_ADDR_SIZE] = {0xFF, 0xFF, 0xFF,
 		0xFF, 0xFF, 0xFF};
-	uint8_t null_mac[QDF_MAC_ADDR_SIZE] = {0, 0, 0, 0, 0, 0};
+	uint8_t null_mac[QDF_MAC_ADDR_SIZE] = {0x00, 0x00, 0x00,
+		0x00, 0x00, 0x00};
 
 	for (grp_id = 0; grp_id < MAX_TA_RA_ENTRIES; grp_id++) {
 		if (qdf_test_bit(grp_id, (unsigned long *)&reset_cfg)) {
 			curr_cfg = &rcc_info->curr[grp_id];
 			qdf_mem_copy(curr_cfg->tx_addr,
-				     def_mac, QDF_MAC_ADDR_SIZE);
+				     null_mac, QDF_MAC_ADDR_SIZE);
 			qdf_mem_copy(curr_cfg->tx_addr_mask,
-				     null_mac, QDF_MAC_ADDR_SIZE);
-			qdf_mem_copy(curr_cfg->rx_addr,
 				     def_mac, QDF_MAC_ADDR_SIZE);
-			qdf_mem_copy(curr_cfg->rx_addr_mask,
+			qdf_mem_copy(curr_cfg->rx_addr,
 				     null_mac, QDF_MAC_ADDR_SIZE);
+			qdf_mem_copy(curr_cfg->rx_addr_mask,
+				     def_mac, QDF_MAC_ADDR_SIZE);
 			curr_cfg->bw = 0xf;
 			curr_cfg->nss = 0xff;
-			curr_cfg->mgmt_subtype_filter = 0xffff;
-			curr_cfg->ctrl_subtype_filter = 0xffff;
-			curr_cfg->data_subtype_filter = 0xffff;
+			curr_cfg->mgmt_subtype_filter = 0;
+			curr_cfg->ctrl_subtype_filter = 0;
+			curr_cfg->data_subtype_filter = 0;
 			if (!allvalid) {
 				curr_cfg->valid_ta = 0;
 				curr_cfg->valid_ta_mask = 0;
diff --git a/umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c b/umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c
index 3dafed7..f7638a9 100644
--- a/umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c
+++ b/umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -481,7 +481,11 @@
 	if (status != QDF_STATUS_SUCCESS)
 		return status;
 
-	pcfr->rcc_param.capture_interval = params->cap_intvl;
+	if (pcfr->rcc_param.capture_duration > params->cap_intvl) {
+		cfr_err("Capture intval should be more than capture duration");
+		status = QDF_STATUS_E_INVAL;
+	} else
+		pcfr->rcc_param.capture_interval = params->cap_intvl;
 
 	wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
 
@@ -505,7 +509,12 @@
 	if (status != QDF_STATUS_SUCCESS)
 		return status;
 
-	pcfr->rcc_param.capture_duration = params->cap_dur;
+	if (pcfr->rcc_param.capture_interval
+	    && (params->cap_dur > pcfr->rcc_param.capture_interval)) {
+		cfr_err("Capture duration is exceeding capture interval");
+		status = QDF_STATUS_E_INVAL;
+	} else
+		pcfr->rcc_param.capture_duration = params->cap_dur;
 
 	wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);