Explorar o código

qcacld-3.0: Remove logs for hdd_validate_adapter() checks

hdd_validate_adapter() function already takes care of logging
the caller function name in case of any error. Hence there is no need to
add the error log again.

Getting rid of these unnecessary logs reduces driver memory footprint.

Change-Id: I8e3b3c8c5c83c84c862c501b7c8650f55886bb7f
CRs-Fixed: 2770359
Srinivas Girigowda %!s(int64=4) %!d(string=hai) anos
pai
achega
6e3a682e18

+ 1 - 3
core/hdd/src/wlan_hdd_hostapd_wext.c

@@ -2253,10 +2253,8 @@ static int __iw_softap_get_channel_list(struct net_device *dev,
 
 	hdd_enter_dev(dev);
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("Invalid adapter!!!");
+	if (hdd_validate_adapter(adapter))
 		return -ENODEV;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_main.c

@@ -10214,10 +10214,8 @@ static void hdd_adapter_param_update_work(void *arg)
 				     WLAN_HDD_ADAPTER_OPS_WORK_SCHED,
 				     WLAN_INVALID_VDEV_ID);
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err("netdev features update request for invalid adapter");
+	if (hdd_validate_adapter(adapter))
 		return;
-	}
 
 	errno = osif_vdev_sync_op_start(adapter->dev, &vdev_sync);
 	if (errno)

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_crash_inject.c

@@ -36,10 +36,8 @@ static ssize_t __hdd_sysfs_crash_inject_store(
 	uint32_t val1, val2;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 2 - 6
core/hdd/src/wlan_hdd_sysfs_dcm.c

@@ -36,10 +36,8 @@ __wlan_hdd_sysfs_dcm_store(struct net_device *net_dev, char const *buf,
 	char *sptr, *token;
 	int value, ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -101,10 +99,8 @@ __wlan_hdd_sysfs_dcm_show(struct net_device *net_dev, char *buf)
 	struct hdd_context *hdd_ctx;
 	int ret, value;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 8 - 24
core/hdd/src/wlan_hdd_sysfs_dl_modes.c

@@ -57,10 +57,8 @@ __hdd_sysfs_dl_loglevel_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -130,10 +128,8 @@ __hdd_sysfs_dl_mod_loglevel_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -203,10 +199,8 @@ __hdd_sysfs_dl_modoff_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -276,10 +270,8 @@ __hdd_sysfs_dl_modon_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -349,10 +341,8 @@ __hdd_sysfs_dl_report_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -422,10 +412,8 @@ __hdd_sysfs_dl_type_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -495,10 +483,8 @@ __hdd_sysfs_dl_vapoff_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -568,10 +554,8 @@ __hdd_sysfs_dl_vapon_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 2 - 6
core/hdd/src/wlan_hdd_sysfs_gtx_bw_mask.c

@@ -72,10 +72,8 @@ __hdd_sysfs_gtx_bw_mask_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -143,10 +141,8 @@ __hdd_sysfs_gtx_bw_mask_show(struct net_device *net_dev, char *buf)
 	struct hdd_context *hdd_ctx;
 	int ret, value;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_he_bss_color.c

@@ -37,10 +37,8 @@ __hdd_sysfs_he_bss_color_store(struct net_device *net_dev,
 	QDF_STATUS status;
 	int value, ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_modify_acl.c

@@ -41,10 +41,8 @@ static ssize_t __hdd_sysfs_modify_acl_store(
 	int ret, i;
 	QDF_STATUS qdf_status;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_monitor_mode_channel.c

@@ -38,10 +38,8 @@ __hdd_sysfs_monitor_mode_channel_store(struct net_device *net_dev,
 	uint32_t val1, val2;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 4 - 12
core/hdd/src/wlan_hdd_sysfs_motion_detection.c

@@ -45,10 +45,8 @@ __hdd_sysfs_mt_bl_config_store(struct net_device *net_dev,
 	uint32_t bl_time_t, bl_packet_gap, bl_n, bl_num_meas;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -142,10 +140,8 @@ __hdd_sysfs_mt_bl_start_store(struct net_device *net_dev,
 	QDF_STATUS status;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -229,10 +225,8 @@ __hdd_sysfs_mt_config_store(struct net_device *net_dev,
 	uint32_t val_32[HDD_SYSFS_MT_CONFIG_UINT32_ARGS];
 	int i, ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -325,10 +319,8 @@ __hdd_sysfs_mt_start_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_radar.c

@@ -40,10 +40,8 @@ __hdd_sysfs_radar_store(struct net_device *net_dev,
 	int set_value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 2 - 6
core/hdd/src/wlan_hdd_sysfs_range_ext.c

@@ -34,10 +34,8 @@ __hdd_sysfs_range_ext_show(struct net_device *net_dev, char *buf)
 	int value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -84,10 +82,8 @@ static ssize_t __hdd_sysfs_range_ext_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret, errno;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_reassoc.c

@@ -39,10 +39,8 @@ __wlan_hdd_store_reassoc_sysfs(struct net_device *net_dev, char const *buf,
 	tSirMacAddr bssid;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_rts_cts.c

@@ -41,10 +41,8 @@ __hdd_sysfs_rts_cts_store(struct net_device *net_dev,
 	QDF_STATUS status;
 	int value, ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 4 - 12
core/hdd/src/wlan_hdd_sysfs_stats.c

@@ -113,10 +113,8 @@ __hdd_sysfs_stats_show(struct net_device *net_dev, char *buf)
 	int ret;
 	ssize_t length = 0;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -164,10 +162,8 @@ __wlan_hdd_sysfs_dump_stats_store(struct net_device *net_dev, char const *buf,
 	char *sptr, *token;
 	int value, ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -224,10 +220,8 @@ __wlan_hdd_sysfs_dump_stats_show(struct net_device *net_dev, char *buf)
 	struct hdd_context *hdd_ctx;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -274,10 +268,8 @@ __wlan_hdd_sysfs_clear_stats_store(struct net_device *net_dev, char const *buf,
 	char *sptr, *token;
 	int value, ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 2 - 6
core/hdd/src/wlan_hdd_sysfs_suspend_resume.c

@@ -36,10 +36,8 @@ static ssize_t __hdd_sysfs_suspend_store(
 	char *sptr, *token;
 	int ret, pause_setting, resume_setting;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
@@ -135,10 +133,8 @@ static ssize_t __hdd_sysfs_resume_store(
 	struct hdd_context *hdd_ctx;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_temperature.c

@@ -34,10 +34,8 @@ __hdd_sysfs_temperature_show(struct net_device *net_dev, char *buf)
 	int value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_tx_stbc.c

@@ -52,10 +52,8 @@ __hdd_sysfs_tx_stbc_show(struct net_device *net_dev, char *buf)
 	int ret;
 	int value;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_txrx_fw_st_rst.c

@@ -55,10 +55,8 @@ __hdd_sysfs_txrx_fw_st_rst_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_txrx_fw_stats.c

@@ -55,10 +55,8 @@ __hdd_sysfs_txrx_fw_stats_store(struct net_device *net_dev,
 	uint32_t value;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_txrx_stats.c

@@ -44,10 +44,8 @@ __hdd_sysfs_txrx_stats_store(struct net_device *net_dev,
 	uint8_t val2;
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_unit_test.c

@@ -43,10 +43,8 @@ static ssize_t __hdd_sysfs_unit_test_target_store(
 	int module_id, args_num, ret, i;
 	QDF_STATUS status;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_wowl_add_ptrn.c

@@ -38,10 +38,8 @@ __hdd_sysfs_wowl_add_ptrn_store(struct net_device *net_dev,
 	char buf_local[MAX_SYSFS_USER_COMMAND_SIZE_LENGTH + 1];
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_sysfs_wowl_del_ptrn.c

@@ -36,10 +36,8 @@ __hdd_sysfs_wowl_del_ptrn_store(struct net_device *net_dev,
 	char buf_local[MAX_SYSFS_USER_COMMAND_SIZE_LENGTH + 1];
 	int ret;
 
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err_rl("adapter validate fail");
+	if (hdd_validate_adapter(adapter))
 		return -EINVAL;
-	}
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);

+ 1 - 3
core/hdd/src/wlan_hdd_tx_rx.c

@@ -2078,10 +2078,8 @@ QDF_STATUS hdd_rx_pkt_thread_enqueue_cbk(void *adapter,
 	}
 
 	hdd_adapter = (struct hdd_adapter *)adapter;
-	if (hdd_validate_adapter(hdd_adapter)) {
-		hdd_err_rl("adapter validate failed");
+	if (hdd_validate_adapter(hdd_adapter))
 		return QDF_STATUS_E_FAILURE;
-	}
 
 	vdev_id = hdd_adapter->vdev_id;
 	head_ptr = nbuf_list;

+ 1 - 3
core/hdd/src/wlan_hdd_wmm.c

@@ -2440,10 +2440,8 @@ bool hdd_wmm_is_acm_allowed(uint8_t vdev_id)
 	}
 
 	adapter = hdd_get_adapter_by_vdev(hdd_ctx, vdev_id);
-	if (hdd_validate_adapter(adapter)) {
-		hdd_err("Invalid adapter");
+	if (hdd_validate_adapter(adapter))
 		return false;
-	}
 
 	wmm_ac_status = adapter->hdd_wmm_status.ac_status;