Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 167aa7fd authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm:ipa3: Use rate limit API for logging"

parents 6feeeb7b 1bbbea7b
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -793,7 +793,7 @@ static int __ipa_validate_flt_rule(const struct ipa_flt_rule *rule,
		}
	} else {
		if (rule->rt_tbl_idx > 0) {
			IPAERR("invalid RT tbl\n");
			IPAERR_RL("invalid RT tbl\n");
			goto error;
		}
	}
@@ -1057,7 +1057,7 @@ static int __ipa_add_flt_get_ep_idx(enum ipa_client_type ep, int *ipa_ep_idx)
{
	*ipa_ep_idx = ipa3_get_ep_mapping(ep);
	if (*ipa_ep_idx < 0) {
		IPAERR("ep not valid ep=%d\n", ep);
		IPAERR_RL("ep not valid ep=%d\n", ep);
		return -EINVAL;
	}
	if (ipa3_ctx->ep[*ipa_ep_idx].valid == 0)
@@ -1535,7 +1535,7 @@ int ipa3_set_flt_tuple_mask(int pipe_idx, struct ipahal_reg_hash_tuple *tuple)
	struct ipahal_reg_fltrt_hash_tuple fltrt_tuple;

	if (!tuple) {
		IPAERR("bad tuple\n");
		IPAERR_RL("bad tuple\n");
		return -EINVAL;
	}

@@ -1603,19 +1603,19 @@ int ipa3_flt_read_tbl_from_hw(u32 pipe_idx, enum ipa_ip_type ip_type,
	 * rules operation not supported
	 */
	if (hashable && ipa3_ctx->ipa_fltrt_not_hashable) {
		IPADBG("Reading hashable rules not supported\n");
		IPAERR_RL("Reading hashable rules not supported\n");
		*num_entry = 0;
		return 0;
	}

	if (pipe_idx >= ipa3_ctx->ipa_num_pipes || ip_type >= IPA_IP_MAX ||
	    !entry || !num_entry) {
		IPAERR("Invalid params\n");
		IPAERR_RL("Invalid params\n");
		return -EFAULT;
	}

	if (!ipa_is_ep_support_flt(pipe_idx)) {
		IPAERR("pipe %d does not support filtering\n", pipe_idx);
		IPAERR_RL("pipe %d does not support filtering\n", pipe_idx);
		return -EINVAL;
	}

+4 −3
Original line number Diff line number Diff line
@@ -693,7 +693,8 @@ int __ipa3_del_hdr(u32 hdr_hdl, bool by_user)
			IPADBG("Trying to delete hdr %s offset=%u\n",
				entry->name, entry->offset_entry->offset);
			if (!entry->offset_entry->offset) {
				IPAERR("User cannot delete default header\n");
				IPAERR_RL(
				"User cannot delete default header\n");
				return -EPERM;
			}
		}
@@ -1007,9 +1008,9 @@ int ipa3_reset_hdr(bool user_only)
	 * header table entries
	 */
	if (ipa3_reset_rt(IPA_IP_v4, user_only))
		IPAERR("fail to reset v4 rt\n");
		IPAERR_RL("fail to reset v4 rt\n");
	if (ipa3_reset_rt(IPA_IP_v6, user_only))
		IPAERR("fail to reset v4 rt\n");
		IPAERR_RL("fail to reset v6 rt\n");

	mutex_lock(&ipa3_ctx->lock);
	IPADBG("reset hdr\n");
+13 −12
Original line number Diff line number Diff line
@@ -83,25 +83,25 @@ int ipa3_register_intf_ext(const char *name, const struct ipa_tx_intf *tx,
	u32 len;

	if (name == NULL || (tx == NULL && rx == NULL && ext == NULL)) {
		IPAERR("invalid params name=%pK tx=%pK rx=%pK ext=%pK\n", name,
				tx, rx, ext);
		IPAERR_RL("invalid params name=%pK tx=%pK rx=%pK ext=%pK\n",
				name, tx, rx, ext);
		return -EINVAL;
	}

	if (tx && tx->num_props > IPA_NUM_PROPS_MAX) {
		IPAERR("invalid tx num_props=%d max=%d\n", tx->num_props,
		IPAERR_RL("invalid tx num_props=%d max=%d\n", tx->num_props,
				IPA_NUM_PROPS_MAX);
		return -EINVAL;
	}

	if (rx && rx->num_props > IPA_NUM_PROPS_MAX) {
		IPAERR("invalid rx num_props=%d max=%d\n", rx->num_props,
		IPAERR_RL("invalid rx num_props=%d max=%d\n", rx->num_props,
				IPA_NUM_PROPS_MAX);
		return -EINVAL;
	}

	if (ext && ext->num_props > IPA_NUM_PROPS_MAX) {
		IPAERR("invalid ext num_props=%d max=%d\n", ext->num_props,
		IPAERR_RL("invalid ext num_props=%d max=%d\n", ext->num_props,
				IPA_NUM_PROPS_MAX);
		return -EINVAL;
	}
@@ -179,7 +179,7 @@ int ipa3_deregister_intf(const char *name)

	if ((name == NULL) ||
	    (strnlen(name, IPA_RESOURCE_NAME_MAX) == IPA_RESOURCE_NAME_MAX)) {
		IPAERR("invalid param name=%s\n", name);
		IPAERR_RL("invalid param name=%s\n", name);
		return result;
	}

@@ -261,7 +261,7 @@ int ipa3_query_intf_tx_props(struct ipa_ioc_query_intf_tx_props *tx)
	int result = -EINVAL;

	if (tx == NULL) {
		IPAERR("null args: tx\n");
		IPAERR_RL("null args: tx\n");
		return result;
	}

@@ -309,7 +309,7 @@ int ipa3_query_intf_rx_props(struct ipa_ioc_query_intf_rx_props *rx)
	int result = -EINVAL;

	if (rx == NULL) {
		IPAERR("null args: rx\n");
		IPAERR_RL("null args: rx\n");
		return result;
	}

@@ -357,7 +357,7 @@ int ipa3_query_intf_ext_props(struct ipa_ioc_query_intf_ext_props *ext)
	int result = -EINVAL;

	if (ext == NULL) {
		IPAERR("invalid param ext=%pK\n", ext);
		IPAERR_RL("invalid param ext=%pK\n", ext);
		return result;
	}

@@ -539,7 +539,7 @@ int ipa3_send_msg(struct ipa_msg_meta *meta, void *buff,
	list_add_tail(&msg->link, &ipa3_ctx->msg_list);
	/* support for softap client event cache */
	if (wlan_msg_process(meta, buff))
		IPAERR("wlan_msg_process failed\n");
		IPAERR_RL("wlan_msg_process failed\n");

	/* unlock only after process */
	mutex_unlock(&ipa3_ctx->msg_lock);
@@ -628,7 +628,8 @@ int ipa3_register_pull_msg(struct ipa_msg_meta *meta, ipa_msg_pull_fn callback)
	struct ipa3_pull_msg *msg;

	if (meta == NULL || callback == NULL) {
		IPAERR("invalid param meta=%pK callback=%pK\n", meta, callback);
		IPAERR_RL("invalid param meta=%pK callback=%pK\n",
				meta, callback);
		return -EINVAL;
	}

@@ -663,7 +664,7 @@ int ipa3_deregister_pull_msg(struct ipa_msg_meta *meta)
	int result = -EINVAL;

	if (meta == NULL) {
		IPAERR("null arg: meta\n");
		IPAERR_RL("null arg: meta\n");
		return result;
	}

+10 −10
Original line number Diff line number Diff line
@@ -680,7 +680,7 @@ int __ipa_commit_rt_v3(enum ipa_ip_type ip)
	}

	if (ipa3_send_cmd(num_cmd, desc)) {
		IPAERR("fail to send immediate command\n");
		IPAERR_RL("fail to send immediate command\n");
		rc = -EFAULT;
		goto fail_imm_cmd_construct;
	}
@@ -1155,7 +1155,7 @@ int ipa3_add_rt_rule_usr(struct ipa_ioc_add_rt_rule *rules, bool user_only)
					&rules->rules[i].rt_rule_hdl,
					0,
					user_only)) {
			IPAERR("failed to add rt rule %d\n", i);
			IPAERR_RL("failed to add rt rule %d\n", i);
			rules->rules[i].status = IPA_RT_STATUS_OF_ADD_FAILED;
		} else {
			rules->rules[i].status = 0;
@@ -1189,7 +1189,7 @@ int ipa3_add_rt_rule_ext(struct ipa_ioc_add_rt_rule_ext *rules)
	int ret;

	if (rules == NULL || rules->num_rules == 0 || rules->ip >= IPA_IP_MAX) {
		IPAERR("bad parm\n");
		IPAERR_RL("bad parm\n");
		return -EINVAL;
	}

@@ -1203,7 +1203,7 @@ int ipa3_add_rt_rule_ext(struct ipa_ioc_add_rt_rule_ext *rules)
					rules->rules[i].at_rear,
					&rules->rules[i].rt_rule_hdl,
					rules->rules[i].rule_id, true)) {
			IPAERR("failed to add rt rule %d\n", i);
			IPAERR_RL("failed to add rt rule %d\n", i);
			rules->rules[i].status = IPA_RT_STATUS_OF_ADD_FAILED;
		} else {
			rules->rules[i].status = 0;
@@ -1850,7 +1850,7 @@ int ipa3_set_rt_tuple_mask(int tbl_idx, struct ipahal_reg_hash_tuple *tuple)
	struct ipahal_reg_fltrt_hash_tuple fltrt_tuple;

	if (!tuple) {
		IPAERR("bad tuple\n");
		IPAERR_RL("bad tuple\n");
		return -EINVAL;
	}

@@ -1858,19 +1858,19 @@ int ipa3_set_rt_tuple_mask(int tbl_idx, struct ipahal_reg_hash_tuple *tuple)
		max(IPA_MEM_PART(v6_rt_num_index),
		IPA_MEM_PART(v4_rt_num_index)) ||
		tbl_idx < 0) {
		IPAERR("bad table index\n");
		IPAERR_RL("bad table index\n");
		return -EINVAL;
	}

	if (tbl_idx >= IPA_MEM_PART(v4_modem_rt_index_lo) &&
		tbl_idx <= IPA_MEM_PART(v4_modem_rt_index_hi)) {
		IPAERR("cannot configure modem v4 rt tuple by AP\n");
		IPAERR_RL("cannot configure modem v4 rt tuple by AP\n");
		return -EINVAL;
	}

	if (tbl_idx >= IPA_MEM_PART(v6_modem_rt_index_lo) &&
		tbl_idx <= IPA_MEM_PART(v6_modem_rt_index_hi)) {
		IPAERR("cannot configure modem v6 rt tuple by AP\n");
		IPAERR_RL("cannot configure modem v6 rt tuple by AP\n");
		return -EINVAL;
	}

@@ -1926,12 +1926,12 @@ int ipa3_rt_read_tbl_from_hw(u32 tbl_idx, enum ipa_ip_type ip_type,
	}

	if (ip_type == IPA_IP_v4 && tbl_idx >= IPA_MEM_PART(v4_rt_num_index)) {
		IPAERR("Invalid params\n");
		IPAERR_RL("Invalid params\n");
		return -EFAULT;
	}

	if (ip_type == IPA_IP_v6 && tbl_idx >= IPA_MEM_PART(v6_rt_num_index)) {
		IPAERR("Invalid params\n");
		IPAERR_RL("Invalid params\n");
		return -EFAULT;
	}