Преглед изворни кода

qcacmn: Reduce regulatory logging

As part of logging optimization, reduce the
logging from regulatory component.

Change-Id: If81f87b06e111cffb9189cae20a1acc66849678d
CRs-Fixed: 2624108
Ashish Kumar Dhanotiya пре 5 година
родитељ
комит
48934773cd

+ 2 - 2
target_if/regulatory/src/target_if_reg.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -224,7 +224,7 @@ clean:
 	qdf_mem_free(reg_info->reg_rules_5g_ptr);
 	qdf_mem_free(reg_info);
 
-	target_if_debug("processed reg channel list ret_val %d", ret_val);
+	TARGET_IF_EXIT();
 
 	return ret_val;
 }

+ 2 - 2
target_if/regulatory/src/target_if_reg_lte.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -77,7 +77,7 @@ static int tgt_reg_ch_avoid_event_handler(ol_scn_t handle, uint8_t *event_buf,
 		return -EFAULT;
 	}
 
-	target_if_debug("processed CH avoid event");
+	TARGET_IF_EXIT();
 
 	return 0;
 }

+ 4 - 6
umac/regulatory/core/src/reg_build_chan_list.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-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
@@ -923,7 +923,7 @@ reg_send_ctl_info(struct wlan_regulatory_psoc_priv_obj *soc_reg,
 		return QDF_STATUS_SUCCESS;
 
 	if (!tx_ops || !tx_ops->send_ctl_info) {
-		reg_err("No regulatory tx_ops for send_ctl_info");
+		reg_err("No regulatory tx_ops");
 		return QDF_STATUS_E_FAULT;
 	}
 
@@ -1019,7 +1019,7 @@ QDF_STATUS reg_process_master_chan_list(
 	}
 
 	if (regulat_info->status_code != REG_SET_CC_STATUS_PASS) {
-		reg_err("Setting country code failed, status code is %d",
+		reg_err("Set country code failed, status code %d",
 			regulat_info->status_code);
 
 		pdev = wlan_objmgr_get_pdev_by_id(psoc, phy_id, dbg_id);
@@ -1135,10 +1135,8 @@ QDF_STATUS reg_process_master_chan_list(
 
 	soc_reg->chan_list_recvd[phy_id] = true;
 	status = reg_send_ctl_info(soc_reg, regulat_info, tx_ops);
-	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		reg_err("Failed to send ctl info to fw");
+	if (!QDF_IS_STATUS_SUCCESS(status))
 		return status;
-	}
 
 	if (soc_reg->new_user_ctry_pending[phy_id]) {
 		soc_reg->new_user_ctry_pending[phy_id] = false;

+ 9 - 14
umac/regulatory/core/src/reg_callbacks.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-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
@@ -62,10 +62,8 @@ static void reg_call_chan_change_cbks(struct wlan_objmgr_psoc *psoc,
 	}
 
 	cur_chan_list = qdf_mem_malloc(NUM_CHANNELS * sizeof(*cur_chan_list));
-	if (!cur_chan_list) {
-		reg_alert("Mem alloc failed for current channel list");
+	if (!cur_chan_list)
 		return;
-	}
 
 	qdf_mem_copy(cur_chan_list,
 		     pdev_priv_obj->cur_chan_list,
@@ -74,10 +72,9 @@ static void reg_call_chan_change_cbks(struct wlan_objmgr_psoc *psoc,
 
 	if (psoc_priv_obj->ch_avoid_ind) {
 		avoid_freq_ind = qdf_mem_malloc(sizeof(*avoid_freq_ind));
-		if (!avoid_freq_ind) {
-			reg_alert("Mem alloc failed for avoid freq ind");
+		if (!avoid_freq_ind)
 			goto skip_ch_avoid_ind;
-		}
+
 		qdf_mem_copy(&avoid_freq_ind->freq_list,
 			     &psoc_priv_obj->avoid_freq_list,
 				sizeof(struct ch_avoid_ind_type));
@@ -210,7 +207,7 @@ QDF_STATUS reg_send_scheduler_msg_sb(struct wlan_objmgr_psoc *psoc,
 	}
 
 	if (!pdev_priv_obj->chan_list_recvd) {
-		reg_err("channel list is empty");
+		reg_err("Empty channel list");
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -229,7 +226,7 @@ QDF_STATUS reg_send_scheduler_msg_sb(struct wlan_objmgr_psoc *psoc,
 
 	reg_alloc_and_fill_payload(psoc, pdev, &payload);
 	if (!payload) {
-		reg_err("payload memory alloc failed");
+		reg_err("malloc failed");
 		wlan_objmgr_pdev_release_ref(pdev, WLAN_REGULATORY_SB_ID);
 		wlan_objmgr_psoc_release_ref(psoc, WLAN_REGULATORY_SB_ID);
 		return QDF_STATUS_E_NOMEM;
@@ -245,7 +242,6 @@ QDF_STATUS reg_send_scheduler_msg_sb(struct wlan_objmgr_psoc *psoc,
 	if (QDF_IS_STATUS_ERROR(status)) {
 		wlan_objmgr_pdev_release_ref(pdev, WLAN_REGULATORY_SB_ID);
 		wlan_objmgr_psoc_release_ref(psoc, WLAN_REGULATORY_SB_ID);
-		reg_err("scheduler msg posting failed");
 		qdf_mem_free(payload);
 	}
 
@@ -267,7 +263,7 @@ QDF_STATUS reg_send_scheduler_msg_nb(struct wlan_objmgr_psoc *psoc,
 	}
 
 	if (!pdev_priv_obj->chan_list_recvd) {
-		reg_err("channel list is empty");
+		reg_err("Empty channel list");
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -286,7 +282,7 @@ QDF_STATUS reg_send_scheduler_msg_nb(struct wlan_objmgr_psoc *psoc,
 
 	reg_alloc_and_fill_payload(psoc, pdev, &payload);
 	if (!payload) {
-		reg_err("payload memory alloc failed");
+		reg_err("malloc failed");
 		wlan_objmgr_pdev_release_ref(pdev, WLAN_REGULATORY_NB_ID);
 		wlan_objmgr_psoc_release_ref(psoc, WLAN_REGULATORY_NB_ID);
 		return QDF_STATUS_E_NOMEM;
@@ -301,7 +297,6 @@ QDF_STATUS reg_send_scheduler_msg_nb(struct wlan_objmgr_psoc *psoc,
 	if (QDF_IS_STATUS_ERROR(status)) {
 		wlan_objmgr_pdev_release_ref(pdev, WLAN_REGULATORY_NB_ID);
 		wlan_objmgr_psoc_release_ref(psoc, WLAN_REGULATORY_NB_ID);
-		reg_err("scheduler msg posting failed");
 		qdf_mem_free(payload);
 	}
 
@@ -372,7 +367,7 @@ void reg_register_chan_change_callback(struct wlan_objmgr_psoc *psoc,
 	qdf_spin_unlock_bh(&psoc_priv_obj->cbk_list_lock);
 
 	if (count == REG_MAX_CHAN_CHANGE_CBKS)
-		reg_err("callback list is full, could not add the cbk");
+		reg_err("callback list is full");
 }
 
 void reg_unregister_chan_change_callback(struct wlan_objmgr_psoc *psoc,

+ 4 - 5
umac/regulatory/core/src/reg_db_parser.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -246,8 +246,8 @@ static inline QDF_STATUS reg_get_reginfo_form_country_code_and_regdmn_pair(
 				ant_gain_2g, ant_gain_5g, reg_info);
 
 		if (err == QDF_STATUS_E_FAILURE) {
-			reg_err("%s : No rule found for country index = %d regdmn_pair = %d",
-				__func__, country_index, regdmn_pair);
+			reg_err("No rule for country index = %d regdmn_pair = %d",
+				country_index, regdmn_pair);
 			return QDF_STATUS_E_FAILURE;
 		}
 
@@ -358,8 +358,7 @@ static inline QDF_STATUS reg_get_reginfo_form_regdmn_pair(
 		err = reg_regrules_assign(dmn_id_2g, dmn_id_5g,
 			ant_gain_2g, ant_gain_5g, reg_info);
 		if (err == QDF_STATUS_E_FAILURE) {
-			reg_err("%s : No rule found for regdmn_pair = %d\n",
-					__func__, regdmn_pair);
+			reg_err("No rule for regdmn_pair = %d\n", regdmn_pair);
 			return QDF_STATUS_E_FAILURE;
 		}
 

+ 5 - 7
umac/regulatory/core/src/reg_host_11d.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -66,9 +66,9 @@ static QDF_STATUS reg_11d_scan_trigger_handler(
 	req->scan_req.scan_f_passive = false;
 
 	status = ucfg_scan_start(req);
-	reg_debug("11d scan trigger vdev %d scan_id %d req_id %d status %d",
-		  soc_reg->vdev_id_for_11d_scan, soc_reg->scan_id,
-		  soc_reg->scan_req_id, status);
+	reg_nofl_debug("11d scan trigger vdev %d scan_id %d req_id %d status %d",
+		       soc_reg->vdev_id_for_11d_scan, soc_reg->scan_id,
+		       soc_reg->scan_req_id, status);
 
 	if (status != QDF_STATUS_SUCCESS)
 		/* Don't free req here, ucfg_scan_start will do free */
@@ -99,10 +99,8 @@ QDF_STATUS reg_11d_host_scan(
 	if (soc_reg->enable_11d_supp) {
 		qdf_mc_timer_stop(&soc_reg->timer);
 		status = reg_11d_scan_trigger_handler(soc_reg);
-		if (status != QDF_STATUS_SUCCESS) {
-			reg_err("11d scan trigger failed!");
+		if (status != QDF_STATUS_SUCCESS)
 			return status;
-		}
 
 		qdf_mc_timer_start(&soc_reg->timer, soc_reg->scan_11d_interval);
 	} else {

+ 3 - 8
umac/regulatory/core/src/reg_lte.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -117,19 +117,14 @@ static QDF_STATUS reg_process_ch_avoid_freq(struct wlan_objmgr_psoc *psoc,
 		}
 	}
 
-	reg_debug("number of unsafe channels is %d ",
-		  psoc_priv_obj->unsafe_chan_list.chan_cnt);
-
-	if (!psoc_priv_obj->unsafe_chan_list.chan_cnt) {
-		reg_debug("No valid ch are present in avoid freq event");
+	if (!psoc_priv_obj->unsafe_chan_list.chan_cnt)
 		return QDF_STATUS_SUCCESS;
-	}
 
 	for (ch_loop = 0; ch_loop < psoc_priv_obj->unsafe_chan_list.chan_cnt;
 		ch_loop++) {
 		if (ch_loop >= NUM_CHANNELS)
 			break;
-		reg_debug("channel freq %d is not safe",
+		reg_debug("Unsafe freq %d",
 			  psoc_priv_obj->unsafe_chan_list.chan_freq_list[ch_loop]);
 	}
 

+ 17 - 19
umac/regulatory/core/src/reg_offload_11d_scan.c

@@ -45,7 +45,7 @@ QDF_STATUS reg_set_11d_country(struct wlan_objmgr_pdev *pdev,
 	uint8_t pdev_id;
 
 	if (!country) {
-		reg_err("country code is NULL");
+		reg_err("Null country code");
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -54,18 +54,18 @@ QDF_STATUS reg_set_11d_country(struct wlan_objmgr_pdev *pdev,
 	psoc = wlan_pdev_get_psoc(pdev);
 	psoc_priv_obj = reg_get_psoc_obj(psoc);
 	if (!psoc_priv_obj) {
-		reg_err("psoc reg component is NULL");
+		reg_err("Null psoc reg component");
 		return QDF_STATUS_E_INVAL;
 	}
 
 	if (!qdf_mem_cmp(psoc_priv_obj->cur_country, country, REG_ALPHA2_LEN)) {
 		if (psoc_priv_obj->cc_src == SOURCE_11D) {
-			reg_debug("country is not different");
+			reg_debug("same country");
 			return QDF_STATUS_SUCCESS;
 		}
 	}
 
-	reg_info("programming new 11d country:%c%c to firmware",
+	reg_info("set new 11d country:%c%c to fW",
 		 country[0], country[1]);
 
 	qdf_mem_copy(country_code.country, country, REG_ALPHA2_LEN + 1);
@@ -126,13 +126,13 @@ static QDF_STATUS reg_send_11d_msg_cbk(struct scheduler_msg *msg)
 
 	psoc_priv_obj = reg_get_psoc_obj(psoc);
 	if (!psoc_priv_obj) {
-		reg_err("psoc priv obj is NULL");
+		reg_err("Null psoc priv obj");
 		goto end;
 	}
 
 	if (psoc_priv_obj->vdev_id_for_11d_scan == INVALID_VDEV_ID) {
 		psoc_priv_obj->enable_11d_supp = false;
-		reg_err("No valid vdev for 11d scan command");
+		reg_err("Invalid vdev");
 		goto end;
 	}
 
@@ -175,10 +175,8 @@ static QDF_STATUS reg_sched_11d_msg(struct wlan_objmgr_psoc *psoc)
 	status = scheduler_post_message(QDF_MODULE_ID_REGULATORY,
 					QDF_MODULE_ID_REGULATORY,
 					QDF_MODULE_ID_TARGET_IF, &msg);
-	if (QDF_IS_STATUS_ERROR(status)) {
+	if (QDF_IS_STATUS_ERROR(status))
 		wlan_objmgr_psoc_release_ref(psoc, WLAN_REGULATORY_SB_ID);
-		reg_err("scheduler msg posting failed");
-	}
 
 	return status;
 }
@@ -191,13 +189,13 @@ void reg_run_11d_state_machine(struct wlan_objmgr_psoc *psoc)
 
 	psoc_priv_obj = reg_get_psoc_obj(psoc);
 	if (!psoc_priv_obj) {
-		reg_err("reg psoc private obj is NULL");
+		reg_err("Null reg psoc private obj");
 		return;
 	}
 
 	if (psoc_priv_obj->vdev_id_for_11d_scan == INVALID_VDEV_ID) {
 		psoc_priv_obj->enable_11d_supp = false;
-		reg_err("No valid vdev for 11d scan command");
+		reg_err("Invalid vdev");
 		return;
 	}
 
@@ -290,7 +288,7 @@ QDF_STATUS reg_11d_vdev_delete_update(struct wlan_objmgr_vdev *vdev)
 	uint8_t i;
 
 	if (!vdev) {
-		reg_err("vdev is NULL");
+		reg_err("NULL vdev");
 		return QDF_STATUS_E_INVAL;
 	}
 	op_mode = wlan_vdev_mlme_get_opmode(vdev);
@@ -300,7 +298,7 @@ QDF_STATUS reg_11d_vdev_delete_update(struct wlan_objmgr_vdev *vdev)
 
 	psoc_priv_obj = reg_get_psoc_obj(parent_psoc);
 	if (!psoc_priv_obj) {
-		reg_err("reg psoc private obj is NULL");
+		reg_err("NULL reg psoc private obj");
 		return QDF_STATUS_E_FAULT;
 	}
 
@@ -355,7 +353,7 @@ bool reg_is_11d_scan_inprogress(struct wlan_objmgr_psoc *psoc)
 
 	psoc_priv_obj = reg_get_psoc_obj(psoc);
 	if (!psoc_priv_obj) {
-		reg_err("reg psoc private obj is NULL");
+		reg_err("NULL reg psoc private obj");
 		return false;
 	}
 
@@ -373,7 +371,7 @@ QDF_STATUS reg_save_new_11d_country(struct wlan_objmgr_psoc *psoc,
 
 	psoc_priv_obj = reg_get_psoc_obj(psoc);
 	if (!psoc_priv_obj) {
-		reg_err("reg psoc private obj is NULL");
+		reg_err("NULL reg psoc private obj");
 
 		return QDF_STATUS_E_FAILURE;
 	}
@@ -394,7 +392,7 @@ QDF_STATUS reg_save_new_11d_country(struct wlan_objmgr_psoc *psoc,
 		if (tx_ops->set_country_code) {
 			tx_ops->set_country_code(psoc, &country_code);
 		} else {
-			reg_err("country set handler is not present");
+			reg_err("NULL country set handler");
 			for (ctr = 0; ctr < psoc_priv_obj->num_phy; ctr++)
 				psoc_priv_obj->new_11d_ctry_pending[ctr] =
 					false;
@@ -411,7 +409,7 @@ bool reg_11d_enabled_on_host(struct wlan_objmgr_psoc *psoc)
 
 	psoc_priv_obj = reg_get_psoc_obj(psoc);
 	if (!psoc_priv_obj) {
-		reg_err("reg psoc private obj is NULL");
+		reg_err("NULL reg psoc private obj");
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -425,7 +423,7 @@ QDF_STATUS reg_set_11d_offloaded(struct wlan_objmgr_psoc *psoc, bool val)
 
 	psoc_priv_obj = reg_get_psoc_obj(psoc);
 	if (!psoc_priv_obj) {
-		reg_err("psoc reg component is NULL");
+		reg_err("NULL psoc reg component");
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -440,7 +438,7 @@ bool reg_is_11d_offloaded(struct wlan_objmgr_psoc *psoc)
 
 	psoc_priv_obj = reg_get_psoc_obj(psoc);
 	if (!psoc_priv_obj) {
-		reg_err("reg psoc private obj is NULL");
+		reg_err("NULL reg psoc private obj");
 		return false;
 	}
 

+ 5 - 6
umac/regulatory/core/src/reg_opclass.c

@@ -266,8 +266,7 @@ struct reg_dmn_op_class_map_t *reg_get_class_from_country(uint8_t *country)
 {
 	const struct reg_dmn_op_class_map_t *class = NULL;
 
-	qdf_debug("Country %c%c 0x%x",
-		  country[0], country[1], country[2]);
+	reg_debug_rl("Country %c%c 0x%x", country[0], country[1], country[2]);
 
 	switch (country[2]) {
 	case OP_CLASS_US:
@@ -473,7 +472,7 @@ void reg_freq_width_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
 	chan_enum = reg_get_chan_enum_for_freq(freq);
 
 	if (chan_enum == INVALID_CHANNEL) {
-		reg_err(" channel enumeration is invalid %d", chan_enum);
+		reg_err_rl("Invalid chan enum %d", chan_enum);
 		return;
 	}
 
@@ -528,7 +527,7 @@ void reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
 	pdev_priv_obj = reg_get_pdev_obj(pdev);
 
 	if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
-		reg_err("pdev reg obj is NULL");
+		reg_err_rl("NULL pdev reg obj");
 		return;
 	}
 
@@ -537,7 +536,7 @@ void reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
 	chan_enum = reg_get_chan_enum_for_freq(freq);
 
 	if (chan_enum == INVALID_CHANNEL) {
-		reg_err(" channel enumeration is invalid %d", chan_enum);
+		reg_err_rl("Invalid chan enum %d", chan_enum);
 		return;
 	}
 
@@ -649,7 +648,7 @@ uint16_t reg_chan_opclass_to_freq(uint8_t chan,
 		}
 		op_class_tbl++;
 	}
-	reg_err_rl("Invalid opclass given as input");
+	reg_err_rl("Invalid opclass");
 	return 0;
 }
 

+ 7 - 11
umac/regulatory/core/src/reg_priv_objs.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-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
@@ -76,10 +76,8 @@ QDF_STATUS wlan_regulatory_psoc_obj_created_notification(
 	uint8_t pdev_cnt;
 
 	soc_reg_obj = qdf_mem_malloc(sizeof(*soc_reg_obj));
-	if (!soc_reg_obj) {
-		reg_alert("Mem alloc failed for reg psoc priv obj");
+	if (!soc_reg_obj)
 		return QDF_STATUS_E_NOMEM;
-	}
 
 	soc_reg_obj->offload_enabled = false;
 	soc_reg_obj->psoc_ptr = psoc;
@@ -136,7 +134,7 @@ QDF_STATUS wlan_regulatory_psoc_obj_destroyed_notification(
 
 	psoc_priv_obj = reg_get_psoc_obj(psoc);
 	if (!psoc_priv_obj) {
-		reg_err("reg psoc private obj is NULL");
+		reg_err_rl("NULL reg psoc priv obj");
 		return QDF_STATUS_E_FAULT;
 	}
 
@@ -147,9 +145,9 @@ QDF_STATUS wlan_regulatory_psoc_obj_destroyed_notification(
 			psoc, WLAN_UMAC_COMP_REGULATORY, psoc_priv_obj);
 
 	if (status != QDF_STATUS_SUCCESS)
-		reg_err("psoc_priv_obj private obj detach failed");
+		reg_err_rl("psoc_priv_obj private obj detach failed");
 
-	reg_debug("reg psoc obj detached with status %d", status);
+	reg_debug("reg psoc obj detached");
 
 	qdf_mem_free(psoc_priv_obj);
 
@@ -190,10 +188,8 @@ QDF_STATUS wlan_regulatory_pdev_obj_created_notification(
 	struct reg_rule_info *psoc_reg_rules;
 
 	pdev_priv_obj = qdf_mem_malloc(sizeof(*pdev_priv_obj));
-	if (!pdev_priv_obj) {
-		reg_alert("Mem alloc failed for pdev priv obj");
+	if (!pdev_priv_obj)
 		return QDF_STATUS_E_NOMEM;
-	}
 
 	parent_psoc = wlan_pdev_get_psoc(pdev);
 	pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
@@ -310,7 +306,7 @@ QDF_STATUS wlan_regulatory_pdev_obj_destroyed_notification(
 	if (status != QDF_STATUS_SUCCESS)
 		reg_err("reg pdev private obj detach failed");
 
-	reg_debug("reg pdev obj deleted with status %d", status);
+	reg_debug("reg pdev obj deleted");
 
 	qdf_spin_lock_bh(&pdev_priv_obj->reg_rules_lock);
 	reg_reset_reg_rules(&pdev_priv_obj->reg_rules);

+ 12 - 16
umac/regulatory/core/src/reg_services_common.c

@@ -1443,9 +1443,9 @@ update_bw:
 	      ch_params->ch_width == CH_WIDTH_80P80MHZ))
 		ch_params->center_freq_seg1 = 0;
 
-	reg_debug("ch %d ch_wd %d freq0 %d freq1 %d", ch,
-		  ch_params->ch_width, ch_params->center_freq_seg0,
-		  ch_params->center_freq_seg1);
+	reg_nofl_debug("ch %d ch_wd %d freq0 %d freq1 %d", ch,
+		       ch_params->ch_width, ch_params->center_freq_seg0,
+		       ch_params->center_freq_seg1);
 }
 
 /**
@@ -1647,7 +1647,7 @@ uint8_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
 	struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
 
 	if (freq == 0) {
-		reg_err_rl("Invalid frequency %d", freq);
+		reg_err_rl("Invalid freq %d", freq);
 		return 0;
 	}
 
@@ -1869,10 +1869,8 @@ QDF_STATUS reg_program_default_cc(struct wlan_objmgr_pdev *pdev,
 
 	reg_info = (struct cur_regulatory_info *)qdf_mem_malloc
 		(sizeof(struct cur_regulatory_info));
-	if (!reg_info) {
-		reg_err("reg info is NULL");
+	if (!reg_info)
 		return QDF_STATUS_E_NOMEM;
-	}
 
 	psoc = wlan_pdev_get_psoc(pdev);
 	if (!psoc) {
@@ -1897,7 +1895,7 @@ QDF_STATUS reg_program_default_cc(struct wlan_objmgr_pdev *pdev,
 
 		err = reg_get_cur_reginfo(reg_info, country_index, regdmn_pair);
 		if (err == QDF_STATUS_E_FAILURE) {
-			reg_err("%s : Unable to set country code\n", __func__);
+			reg_err("Unable to set country code\n");
 			qdf_mem_free(reg_info->reg_rules_2g_ptr);
 			qdf_mem_free(reg_info->reg_rules_5g_ptr);
 			qdf_mem_free(reg_info);
@@ -1911,7 +1909,7 @@ QDF_STATUS reg_program_default_cc(struct wlan_objmgr_pdev *pdev,
 
 		err = reg_get_cur_reginfo(reg_info, country_index, regdmn_pair);
 		if (err == QDF_STATUS_E_FAILURE) {
-			reg_err("%s : Unable to set country code\n", __func__);
+			reg_err("Unable to set country code\n");
 			qdf_mem_free(reg_info->reg_rules_2g_ptr);
 			qdf_mem_free(reg_info->reg_rules_5g_ptr);
 			qdf_mem_free(reg_info);
@@ -1979,10 +1977,8 @@ QDF_STATUS reg_program_chan_list(struct wlan_objmgr_pdev *pdev,
 
 	reg_info = (struct cur_regulatory_info *)qdf_mem_malloc
 		(sizeof(struct cur_regulatory_info));
-	if (!reg_info) {
-		reg_err("reg info is NULL");
+	if (!reg_info)
 		return QDF_STATUS_E_NOMEM;
-	}
 
 	reg_info->psoc = psoc;
 	reg_info->phy_id = wlan_objmgr_pdev_get_pdev_id(pdev);
@@ -2002,7 +1998,7 @@ QDF_STATUS reg_program_chan_list(struct wlan_objmgr_pdev *pdev,
 
 	err = reg_get_cur_reginfo(reg_info, country_index, regdmn_pair);
 	if (err == QDF_STATUS_E_FAILURE) {
-		reg_err("%s : Unable to set country code\n", __func__);
+		reg_err("Unable to set country code\n");
 		qdf_mem_free(reg_info->reg_rules_2g_ptr);
 		qdf_mem_free(reg_info->reg_rules_5g_ptr);
 		qdf_mem_free(reg_info);
@@ -2489,7 +2485,7 @@ qdf_freq_t reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
 	if (BAND_6G_PRESENT(band_mask)) {
 		if (BAND_2G_PRESENT(band_mask) ||
 		    BAND_5G_PRESENT(band_mask)) {
-			reg_err("Incorrect band_mask %x", band_mask);
+			reg_err_rl("Incorrect band_mask %x", band_mask);
 				return 0;
 		}
 
@@ -2518,7 +2514,7 @@ qdf_freq_t reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
 							max_chan);
 		}
 
-		reg_err("Incorrect band_mask %x", band_mask);
+		reg_err_rl("Incorrect band_mask %x", band_mask);
 		return 0;
 	}
 }
@@ -2625,7 +2621,7 @@ QDF_STATUS reg_enable_dfs_channels(struct wlan_objmgr_pdev *pdev,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	reg_info("setting dfs_enabled: %d", enable);
+	reg_info("set dfs_enabled: %d", enable);
 
 	pdev_priv_obj->dfs_enabled = enable;
 

+ 9 - 10
umac/regulatory/core/src/reg_utils.c

@@ -146,7 +146,7 @@ QDF_STATUS reg_set_default_country(struct wlan_objmgr_psoc *psoc,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	reg_info("setting default_country: %s", country);
+	reg_info("set default_country: %s", country);
 
 	qdf_mem_copy(psoc_reg->def_country, country, REG_ALPHA2_LEN + 1);
 
@@ -278,7 +278,6 @@ QDF_STATUS reg_reset_country(struct wlan_objmgr_psoc *psoc)
 		return QDF_STATUS_E_INVAL;
 	}
 
-	reg_info("re-setting user country to default");
 	qdf_mem_copy(psoc_reg->cur_country,
 		     psoc_reg->def_country,
 		     REG_ALPHA2_LEN + 1);
@@ -299,7 +298,7 @@ QDF_STATUS reg_get_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr,
 	*reg_domain_ptr = 0;
 
 	if (!country_alpha2) {
-		reg_err("Country code array is NULL");
+		reg_err("Country code is NULL");
 		return QDF_STATUS_E_FAULT;
 	}
 
@@ -466,7 +465,7 @@ QDF_STATUS reg_set_band(struct wlan_objmgr_pdev *pdev,
 	}
 
 	if (pdev_priv_obj->band_capability == band) {
-		reg_info("band is already set to %d", band);
+		reg_info("same band %d", band);
 		return QDF_STATUS_SUCCESS;
 	}
 
@@ -482,7 +481,7 @@ QDF_STATUS reg_set_band(struct wlan_objmgr_pdev *pdev,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	reg_info("setting band_info: %d", band);
+	reg_info("set band_info: %d", band);
 	pdev_priv_obj->band_capability = band;
 
 	reg_compute_pdev_current_chan_list(pdev_priv_obj);
@@ -518,7 +517,7 @@ QDF_STATUS reg_get_band(struct wlan_objmgr_pdev *pdev,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	reg_debug("getting band_info: %d", pdev_priv_obj->band_capability);
+	reg_debug("get band_info: %d", pdev_priv_obj->band_capability);
 	*band = pdev_priv_obj->band_capability;
 
 	return QDF_STATUS_SUCCESS;
@@ -693,11 +692,11 @@ QDF_STATUS reg_set_fcc_constraint(struct wlan_objmgr_pdev *pdev,
 	}
 
 	if (pdev_priv_obj->set_fcc_channel == fcc_constraint) {
-		reg_info("fcc_constraint is already set to %d", fcc_constraint);
+		reg_info("same fcc_constraint %d", fcc_constraint);
 		return QDF_STATUS_SUCCESS;
 	}
 
-	reg_info("setting set_fcc_channel: %d", fcc_constraint);
+	reg_info("set fcc_constraint: %d", fcc_constraint);
 	pdev_priv_obj->set_fcc_channel = fcc_constraint;
 
 	psoc = wlan_pdev_get_psoc(pdev);
@@ -997,14 +996,14 @@ QDF_STATUS reg_set_curr_country(struct wlan_regulatory_psoc_priv_obj *soc_reg,
 	country_code.pdev_id = pdev_id;
 
 	if (!tx_ops || !tx_ops->set_country_code) {
-		reg_err("No regulatory tx_ops for set_country_code");
+		reg_err("No regulatory tx_ops");
 		status = QDF_STATUS_E_FAULT;
 		goto error;
 	}
 
 	status = tx_ops->set_country_code(psoc, &country_code);
 	if (QDF_IS_STATUS_ERROR(status)) {
-		reg_err("Failed to send country code to firmware");
+		reg_err("Failed to send country code to fw");
 		goto error;
 	}