mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
Merge tag 'LA.BR.1.3.6-04910-8976.0' of https://source.codeaurora.org/quic/la/kernel/msm-3.10 into HEAD
"LA.BR.1.3.6-04910-8976.0"
This commit is contained in:
commit
4cce184099
22 changed files with 255 additions and 179 deletions
|
@ -2238,21 +2238,23 @@ static int kgsl_setup_dmabuf_useraddr(struct kgsl_device *device,
|
|||
if (fd != 0)
|
||||
dmabuf = dma_buf_get(fd - 1);
|
||||
}
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
|
||||
if (dmabuf == NULL)
|
||||
return -ENODEV;
|
||||
if (IS_ERR_OR_NULL(dmabuf)) {
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
return dmabuf ? PTR_ERR(dmabuf) : -ENODEV;
|
||||
}
|
||||
|
||||
ret = kgsl_setup_dma_buf(device, pagetable, entry, dmabuf);
|
||||
if (ret) {
|
||||
dma_buf_put(dmabuf);
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Setup the user addr/cache mode for cache operations */
|
||||
entry->memdesc.useraddr = hostptr;
|
||||
_setup_cache_mode(entry, vma);
|
||||
|
||||
up_read(¤t->mm->mmap_sem);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
@ -2289,7 +2291,7 @@ static long _gpuobj_map_useraddr(struct kgsl_device *device,
|
|||
struct kgsl_mem_entry *entry,
|
||||
struct kgsl_gpuobj_import *param)
|
||||
{
|
||||
struct kgsl_gpuobj_import_useraddr useraddr;
|
||||
struct kgsl_gpuobj_import_useraddr useraddr = {0};
|
||||
int ret;
|
||||
|
||||
param->flags &= KGSL_MEMFLAGS_GPUREADONLY
|
||||
|
|
|
@ -981,13 +981,18 @@ static int msm_fd_s_ctrl(struct file *file, void *fh, struct v4l2_control *a)
|
|||
break;
|
||||
case V4L2_CID_FD_WORK_MEMORY_FD:
|
||||
if (ctx->work_buf.fd != -1)
|
||||
mutex_lock(&ctx->fd_device->recovery_lock);
|
||||
if (ctx->work_buf.handle)
|
||||
msm_fd_hw_unmap_buffer(&ctx->work_buf);
|
||||
if (a->value >= 0) {
|
||||
ret = msm_fd_hw_map_buffer(&ctx->mem_pool,
|
||||
a->value, &ctx->work_buf);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
mutex_unlock(&ctx->fd_device->recovery_lock);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&ctx->fd_device->recovery_lock);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
|
|
@ -767,6 +767,11 @@ static void msm_vfe40_reg_update(struct vfe_device *vfe_dev,
|
|||
vfe_dev->reg_update_requested;
|
||||
if ((vfe_dev->is_split && vfe_dev->pdev->id == ISP_VFE1) &&
|
||||
((frame_src == VFE_PIX_0) || (frame_src == VFE_SRC_MAX))) {
|
||||
if (!vfe_dev->common_data->dual_vfe_res->vfe_base[ISP_VFE0]) {
|
||||
pr_err("%s vfe_base for ISP_VFE0 is NULL\n", __func__);
|
||||
spin_unlock_irqrestore(&vfe_dev->reg_update_lock, flags);
|
||||
return;
|
||||
}
|
||||
msm_camera_io_w_mb(update_mask,
|
||||
vfe_dev->common_data->dual_vfe_res->vfe_base[ISP_VFE0]
|
||||
+ 0x378);
|
||||
|
|
|
@ -634,6 +634,11 @@ static void msm_vfe44_reg_update(struct vfe_device *vfe_dev,
|
|||
vfe_dev->reg_update_requested;
|
||||
if ((vfe_dev->is_split && vfe_dev->pdev->id == ISP_VFE1) &&
|
||||
((frame_src == VFE_PIX_0) || (frame_src == VFE_SRC_MAX))) {
|
||||
if (!vfe_dev->common_data->dual_vfe_res->vfe_base[ISP_VFE0]) {
|
||||
pr_err("%s vfe_base for ISP_VFE0 is NULL\n", __func__);
|
||||
spin_unlock_irqrestore(&vfe_dev->reg_update_lock, flags);
|
||||
return;
|
||||
}
|
||||
msm_camera_io_w_mb(update_mask,
|
||||
vfe_dev->common_data->dual_vfe_res->vfe_base[ISP_VFE0]
|
||||
+ 0x378);
|
||||
|
|
|
@ -570,6 +570,11 @@ static void msm_vfe46_reg_update(struct vfe_device *vfe_dev,
|
|||
vfe_dev->reg_update_requested;
|
||||
if ((vfe_dev->is_split && vfe_dev->pdev->id == ISP_VFE1) &&
|
||||
((frame_src == VFE_PIX_0) || (frame_src == VFE_SRC_MAX))) {
|
||||
if (!vfe_dev->common_data->dual_vfe_res->vfe_base[ISP_VFE0]) {
|
||||
pr_err("%s vfe_base for ISP_VFE0 is NULL\n", __func__);
|
||||
spin_unlock_irqrestore(&vfe_dev->reg_update_lock, flags);
|
||||
return;
|
||||
}
|
||||
msm_camera_io_w_mb(update_mask,
|
||||
vfe_dev->common_data->dual_vfe_res->vfe_base[ISP_VFE0]
|
||||
+ 0x3D8);
|
||||
|
|
|
@ -604,6 +604,11 @@ static void msm_vfe47_reg_update(struct vfe_device *vfe_dev,
|
|||
vfe_dev->reg_update_requested;
|
||||
if ((vfe_dev->is_split && vfe_dev->pdev->id == ISP_VFE1) &&
|
||||
((frame_src == VFE_PIX_0) || (frame_src == VFE_SRC_MAX))) {
|
||||
if (!vfe_dev->common_data->dual_vfe_res->vfe_base[ISP_VFE0]) {
|
||||
pr_err("%s vfe_base for ISP_VFE0 is NULL\n", __func__);
|
||||
spin_unlock_irqrestore(&vfe_dev->reg_update_lock, flags);
|
||||
return;
|
||||
}
|
||||
msm_camera_io_w_mb(update_mask,
|
||||
vfe_dev->common_data->dual_vfe_res->vfe_base[ISP_VFE0]
|
||||
+ 0x4AC);
|
||||
|
|
|
@ -1134,6 +1134,9 @@ static long msm_flash_subdev_do_ioctl(
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case VIDIOC_MSM_FLASH_CFG:
|
||||
pr_err("invalid cmd 0x%x received\n", cmd);
|
||||
return -EINVAL;
|
||||
default:
|
||||
return msm_flash_subdev_ioctl(sd, cmd, arg);
|
||||
}
|
||||
|
|
|
@ -354,13 +354,17 @@ static ssize_t mpq_sdmx_log_level_write(struct file *fp,
|
|||
int level;
|
||||
struct mpq_demux *mpq_demux = fp->private_data;
|
||||
|
||||
if (count >= 16)
|
||||
if (count == 0 || count >= 16)
|
||||
return -EINVAL;
|
||||
|
||||
ret_count = simple_write_to_buffer(user_str, 16, position, user_buffer,
|
||||
memset(user_str, '\0', sizeof(user_str));
|
||||
|
||||
ret_count = simple_write_to_buffer(user_str, 15, position, user_buffer,
|
||||
count);
|
||||
if (ret_count < 0)
|
||||
return ret_count;
|
||||
else if (ret_count == 0)
|
||||
return -EINVAL;
|
||||
|
||||
ret = sscanf(user_str, "%d", &level);
|
||||
if (ret != 1)
|
||||
|
|
|
@ -457,7 +457,7 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_nat_dma_cmd *)param)->entries
|
||||
!= pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_nat_dma_cmd *)param)->entries,
|
||||
pre_entry);
|
||||
retval = -EFAULT;
|
||||
|
@ -504,7 +504,7 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_add_hdr *)param)->num_hdrs
|
||||
!= pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_add_hdr *)param)->num_hdrs,
|
||||
pre_entry);
|
||||
retval = -EFAULT;
|
||||
|
@ -543,7 +543,7 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_del_hdr *)param)->num_hdls
|
||||
!= pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_del_hdr *)param)->num_hdls,
|
||||
pre_entry);
|
||||
retval = -EFAULT;
|
||||
|
@ -583,8 +583,9 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_add_rt_rule *)param)->num_rules
|
||||
!= pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
((struct ipa_ioc_add_rt_rule *)param)->num_rules,
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_add_rt_rule *)param)->
|
||||
num_rules,
|
||||
pre_entry);
|
||||
retval = -EFAULT;
|
||||
break;
|
||||
|
@ -622,8 +623,9 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_mdfy_rt_rule *)param)->num_rules
|
||||
!= pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
((struct ipa_ioc_mdfy_rt_rule *)param)->num_rules,
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_mdfy_rt_rule *)param)->
|
||||
num_rules,
|
||||
pre_entry);
|
||||
retval = -EFAULT;
|
||||
break;
|
||||
|
@ -661,7 +663,7 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_del_rt_rule *)param)->num_hdls
|
||||
!= pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_del_rt_rule *)param)->num_hdls,
|
||||
pre_entry);
|
||||
retval = -EFAULT;
|
||||
|
@ -700,8 +702,9 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_add_flt_rule *)param)->num_rules
|
||||
!= pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
((struct ipa_ioc_add_flt_rule *)param)->num_rules,
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_add_flt_rule *)param)->
|
||||
num_rules,
|
||||
pre_entry);
|
||||
retval = -EFAULT;
|
||||
break;
|
||||
|
@ -739,8 +742,9 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_del_flt_rule *)param)->num_hdls
|
||||
!= pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
((struct ipa_ioc_del_flt_rule *)param)->num_hdls,
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_del_flt_rule *)param)->
|
||||
num_hdls,
|
||||
pre_entry);
|
||||
retval = -EFAULT;
|
||||
break;
|
||||
|
@ -778,8 +782,9 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_mdfy_flt_rule *)param)->num_rules
|
||||
!= pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
((struct ipa_ioc_mdfy_flt_rule *)param)->num_rules,
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_mdfy_flt_rule *)param)->
|
||||
num_rules,
|
||||
pre_entry);
|
||||
retval = -EFAULT;
|
||||
break;
|
||||
|
@ -914,7 +919,7 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
if (unlikely(((struct ipa_ioc_query_intf_tx_props *)
|
||||
param)->num_tx_props
|
||||
!= pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_query_intf_tx_props *)
|
||||
param)->num_tx_props, pre_entry);
|
||||
retval = -EFAULT;
|
||||
|
@ -958,7 +963,7 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_query_intf_rx_props *)
|
||||
param)->num_rx_props != pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_query_intf_rx_props *)
|
||||
param)->num_rx_props, pre_entry);
|
||||
retval = -EFAULT;
|
||||
|
@ -1003,7 +1008,7 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_query_intf_ext_props *)
|
||||
param)->num_ext_props != pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_query_intf_ext_props *)
|
||||
param)->num_ext_props, pre_entry);
|
||||
retval = -EFAULT;
|
||||
|
@ -1041,7 +1046,7 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_msg_meta *)param)->msg_len
|
||||
!= pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_msg_meta *)param)->msg_len,
|
||||
pre_entry);
|
||||
retval = -EFAULT;
|
||||
|
@ -1180,7 +1185,7 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_add_hdr_proc_ctx *)
|
||||
param)->num_proc_ctxs != pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_add_hdr_proc_ctx *)
|
||||
param)->num_proc_ctxs, pre_entry);
|
||||
retval = -EFAULT;
|
||||
|
@ -1219,8 +1224,9 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
/* add check in case user-space module compromised */
|
||||
if (unlikely(((struct ipa_ioc_del_hdr_proc_ctx *)
|
||||
param)->num_hdls != pre_entry)) {
|
||||
IPAERR("current %d pre %d\n",
|
||||
((struct ipa_ioc_del_hdr_proc_ctx *)param)->num_hdls,
|
||||
IPAERR_RL("current %d pre %d\n",
|
||||
((struct ipa_ioc_del_hdr_proc_ctx *)param)->
|
||||
num_hdls,
|
||||
pre_entry);
|
||||
retval = -EFAULT;
|
||||
break;
|
||||
|
|
|
@ -1013,25 +1013,25 @@ static int __ipa_add_flt_rule(struct ipa_flt_tbl *tbl, enum ipa_ip_type ip,
|
|||
if (rule->action != IPA_PASS_TO_EXCEPTION) {
|
||||
if (!rule->eq_attrib_type) {
|
||||
if (!rule->rt_tbl_hdl) {
|
||||
IPAERR("invalid RT tbl\n");
|
||||
IPAERR_RL("invalid RT tbl\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
rt_tbl = ipa_id_find(rule->rt_tbl_hdl);
|
||||
if (rt_tbl == NULL) {
|
||||
IPAERR("RT tbl not found\n");
|
||||
IPAERR_RL("RT tbl not found\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (rt_tbl->cookie != IPA_RT_TBL_COOKIE) {
|
||||
IPAERR("RT table cookie is invalid\n");
|
||||
IPAERR_RL("RT table cookie is invalid\n");
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
if (rule->rt_tbl_idx > ((ip == IPA_IP_v4) ?
|
||||
IPA_MEM_PART(v4_modem_rt_index_hi) :
|
||||
IPA_MEM_PART(v6_modem_rt_index_hi))) {
|
||||
IPAERR("invalid RT tbl\n");
|
||||
IPAERR_RL("invalid RT tbl\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
@ -1087,12 +1087,12 @@ static int __ipa_del_flt_rule(u32 rule_hdl)
|
|||
|
||||
entry = ipa_id_find(rule_hdl);
|
||||
if (entry == NULL) {
|
||||
IPAERR("lookup failed\n");
|
||||
IPAERR_RL("lookup failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (entry->cookie != IPA_FLT_COOKIE) {
|
||||
IPAERR("bad params\n");
|
||||
IPAERR_RL("bad params\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
id = entry->id;
|
||||
|
@ -1119,12 +1119,12 @@ static int __ipa_mdfy_flt_rule(struct ipa_flt_rule_mdfy *frule,
|
|||
|
||||
entry = ipa_id_find(frule->rule_hdl);
|
||||
if (entry == NULL) {
|
||||
IPAERR("lookup failed\n");
|
||||
IPAERR_RL("lookup failed\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (entry->cookie != IPA_FLT_COOKIE) {
|
||||
IPAERR("bad params\n");
|
||||
IPAERR_RL("bad params\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -1134,25 +1134,25 @@ static int __ipa_mdfy_flt_rule(struct ipa_flt_rule_mdfy *frule,
|
|||
if (frule->rule.action != IPA_PASS_TO_EXCEPTION) {
|
||||
if (!frule->rule.eq_attrib_type) {
|
||||
if (!frule->rule.rt_tbl_hdl) {
|
||||
IPAERR("invalid RT tbl\n");
|
||||
IPAERR_RL("invalid RT tbl\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
rt_tbl = ipa_id_find(frule->rule.rt_tbl_hdl);
|
||||
if (rt_tbl == NULL) {
|
||||
IPAERR("RT tbl not found\n");
|
||||
IPAERR_RL("RT tbl not found\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (rt_tbl->cookie != IPA_RT_TBL_COOKIE) {
|
||||
IPAERR("RT table cookie is invalid\n");
|
||||
IPAERR_RL("RT table cookie is invalid\n");
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
if (frule->rule.rt_tbl_idx > ((ip == IPA_IP_v4) ?
|
||||
IPA_MEM_PART(v4_modem_rt_index_hi) :
|
||||
IPA_MEM_PART(v6_modem_rt_index_hi))) {
|
||||
IPAERR("invalid RT tbl\n");
|
||||
IPAERR_RL("invalid RT tbl\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
@ -1176,7 +1176,7 @@ static int __ipa_add_global_flt_rule(enum ipa_ip_type ip,
|
|||
struct ipa_flt_tbl *tbl;
|
||||
|
||||
if (rule == NULL || rule_hdl == NULL) {
|
||||
IPAERR("bad parms rule=%p rule_hdl=%p\n", rule, rule_hdl);
|
||||
IPAERR_RL("bad parms rule=%p rule_hdl=%p\n", rule, rule_hdl);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -1195,14 +1195,14 @@ static int __ipa_add_ep_flt_rule(enum ipa_ip_type ip, enum ipa_client_type ep,
|
|||
int ipa_ep_idx;
|
||||
|
||||
if (rule == NULL || rule_hdl == NULL || ep >= IPA_CLIENT_MAX) {
|
||||
IPAERR("bad parms rule=%p rule_hdl=%p ep=%d\n", rule,
|
||||
IPAERR_RL("bad parms rule=%p rule_hdl=%p ep=%d\n", rule,
|
||||
rule_hdl, ep);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
ipa_ep_idx = ipa_get_ep_mapping(ep);
|
||||
if (ipa_ep_idx == IPA_FLT_TABLE_INDEX_NOT_FOUND) {
|
||||
IPAERR("ep not valid ep=%d\n", ep);
|
||||
IPAERR_RL("ep not valid ep=%d\n", ep);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (ipa_ctx->ep[ipa_ep_idx].valid == 0)
|
||||
|
@ -1229,7 +1229,7 @@ int ipa_add_flt_rule(struct ipa_ioc_add_flt_rule *rules)
|
|||
|
||||
if (rules == NULL || rules->num_rules == 0 ||
|
||||
rules->ip >= IPA_IP_MAX) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -1247,7 +1247,7 @@ int ipa_add_flt_rule(struct ipa_ioc_add_flt_rule *rules)
|
|||
rules->rules[i].at_rear,
|
||||
&rules->rules[i].flt_rule_hdl);
|
||||
if (result) {
|
||||
IPAERR("failed to add flt rule %d\n", i);
|
||||
IPAERR_RL("failed to add flt rule %d\n", i);
|
||||
rules->rules[i].status = IPA_FLT_STATUS_OF_ADD_FAILED;
|
||||
} else {
|
||||
rules->rules[i].status = 0;
|
||||
|
@ -1281,14 +1281,14 @@ int ipa_del_flt_rule(struct ipa_ioc_del_flt_rule *hdls)
|
|||
int result;
|
||||
|
||||
if (hdls == NULL || hdls->num_hdls == 0 || hdls->ip >= IPA_IP_MAX) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&ipa_ctx->lock);
|
||||
for (i = 0; i < hdls->num_hdls; i++) {
|
||||
if (__ipa_del_flt_rule(hdls->hdl[i].hdl)) {
|
||||
IPAERR("failed to del rt rule %i\n", i);
|
||||
IPAERR_RL("failed to del rt rule %i\n", i);
|
||||
hdls->hdl[i].status = IPA_FLT_STATUS_OF_DEL_FAILED;
|
||||
} else {
|
||||
hdls->hdl[i].status = 0;
|
||||
|
@ -1322,14 +1322,14 @@ int ipa_mdfy_flt_rule(struct ipa_ioc_mdfy_flt_rule *hdls)
|
|||
int result;
|
||||
|
||||
if (hdls == NULL || hdls->num_rules == 0 || hdls->ip >= IPA_IP_MAX) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&ipa_ctx->lock);
|
||||
for (i = 0; i < hdls->num_rules; i++) {
|
||||
if (__ipa_mdfy_flt_rule(&hdls->rules[i], hdls->ip)) {
|
||||
IPAERR("failed to mdfy rt rule %i\n", i);
|
||||
IPAERR_RL("failed to mdfy rt rule %i\n", i);
|
||||
hdls->rules[i].status = IPA_FLT_STATUS_OF_MDFY_FAILED;
|
||||
} else {
|
||||
hdls->rules[i].status = 0;
|
||||
|
@ -1364,7 +1364,7 @@ int ipa_commit_flt(enum ipa_ip_type ip)
|
|||
int result;
|
||||
|
||||
if (ip >= IPA_IP_MAX) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -1401,7 +1401,7 @@ int ipa_reset_flt(enum ipa_ip_type ip)
|
|||
int id;
|
||||
|
||||
if (ip >= IPA_IP_MAX) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -490,13 +490,13 @@ static int __ipa_add_hdr_proc_ctx(struct ipa_hdr_proc_ctx_add *proc_ctx,
|
|||
proc_ctx->type, proc_ctx->hdr_hdl);
|
||||
|
||||
if (!HDR_PROC_TYPE_IS_VALID(proc_ctx->type)) {
|
||||
IPAERR("invalid processing type %d\n", proc_ctx->type);
|
||||
IPAERR_RL("invalid processing type %d\n", proc_ctx->type);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hdr_entry = ipa_id_find(proc_ctx->hdr_hdl);
|
||||
if (!hdr_entry || (hdr_entry->cookie != IPA_HDR_COOKIE)) {
|
||||
IPAERR("hdr_hdl is invalid\n");
|
||||
IPAERR_RL("hdr_hdl is invalid\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -524,7 +524,7 @@ static int __ipa_add_hdr_proc_ctx(struct ipa_hdr_proc_ctx_add *proc_ctx,
|
|||
ipa_hdr_proc_ctx_bin_sz[IPA_HDR_PROC_CTX_BIN1]) {
|
||||
bin = IPA_HDR_PROC_CTX_BIN1;
|
||||
} else {
|
||||
IPAERR("unexpected needed len %d\n", needed_len);
|
||||
IPAERR_RL("unexpected needed len %d\n", needed_len);
|
||||
WARN_ON(1);
|
||||
goto bad_len;
|
||||
}
|
||||
|
@ -597,12 +597,12 @@ static int __ipa_add_hdr(struct ipa_hdr_add *hdr)
|
|||
int mem_size;
|
||||
|
||||
if (hdr->hdr_len == 0 || hdr->hdr_len > IPA_HDR_MAX_SIZE) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!HDR_TYPE_IS_VALID(hdr->type)) {
|
||||
IPAERR("invalid hdr type %d\n", hdr->type);
|
||||
IPAERR_RL("invalid hdr type %d\n", hdr->type);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -634,7 +634,7 @@ static int __ipa_add_hdr(struct ipa_hdr_add *hdr)
|
|||
else if (hdr->hdr_len <= ipa_hdr_bin_sz[IPA_HDR_BIN4])
|
||||
bin = IPA_HDR_BIN4;
|
||||
else {
|
||||
IPAERR("unexpected hdr len %d\n", hdr->hdr_len);
|
||||
IPAERR_RL("unexpected hdr len %d\n", hdr->hdr_len);
|
||||
goto bad_hdr_len;
|
||||
}
|
||||
|
||||
|
@ -757,7 +757,7 @@ static int __ipa_del_hdr_proc_ctx(u32 proc_ctx_hdl,
|
|||
|
||||
entry = ipa_id_find(proc_ctx_hdl);
|
||||
if (!entry || (entry->cookie != IPA_PROC_HDR_COOKIE)) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -765,7 +765,7 @@ static int __ipa_del_hdr_proc_ctx(u32 proc_ctx_hdl,
|
|||
htbl->proc_ctx_cnt, entry->offset_entry->offset);
|
||||
|
||||
if (by_user && entry->user_deleted) {
|
||||
IPAERR("proc_ctx already deleted by user\n");
|
||||
IPAERR_RL("proc_ctx already deleted by user\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -803,12 +803,12 @@ int __ipa_del_hdr(u32 hdr_hdl, bool by_user)
|
|||
|
||||
entry = ipa_id_find(hdr_hdl);
|
||||
if (entry == NULL) {
|
||||
IPAERR("lookup failed\n");
|
||||
IPAERR_RL("lookup failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!entry || (entry->cookie != IPA_HDR_COOKIE)) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -870,7 +870,7 @@ int ipa_add_hdr(struct ipa_ioc_add_hdr *hdrs)
|
|||
}
|
||||
|
||||
if (hdrs == NULL || hdrs->num_hdrs == 0) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -879,7 +879,7 @@ int ipa_add_hdr(struct ipa_ioc_add_hdr *hdrs)
|
|||
hdrs->num_hdrs);
|
||||
for (i = 0; i < hdrs->num_hdrs; i++) {
|
||||
if (__ipa_add_hdr(&hdrs->hdr[i])) {
|
||||
IPAERR("failed to add hdr %d\n", i);
|
||||
IPAERR_RL("failed to add hdr %d\n", i);
|
||||
hdrs->hdr[i].status = -1;
|
||||
} else {
|
||||
hdrs->hdr[i].status = 0;
|
||||
|
@ -921,14 +921,14 @@ int ipa_del_hdr_by_user(struct ipa_ioc_del_hdr *hdls, bool by_user)
|
|||
}
|
||||
|
||||
if (hdls == NULL || hdls->num_hdls == 0) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&ipa_ctx->lock);
|
||||
for (i = 0; i < hdls->num_hdls; i++) {
|
||||
if (__ipa_del_hdr(hdls->hdl[i].hdl, by_user)) {
|
||||
IPAERR("failed to del hdr %i\n", i);
|
||||
IPAERR_RL("failed to del hdr %i\n", i);
|
||||
hdls->hdl[i].status = -1;
|
||||
} else {
|
||||
hdls->hdl[i].status = 0;
|
||||
|
@ -984,7 +984,7 @@ int ipa_add_hdr_proc_ctx(struct ipa_ioc_add_hdr_proc_ctx *proc_ctxs)
|
|||
}
|
||||
|
||||
if (proc_ctxs == NULL || proc_ctxs->num_proc_ctxs == 0) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -993,7 +993,7 @@ int ipa_add_hdr_proc_ctx(struct ipa_ioc_add_hdr_proc_ctx *proc_ctxs)
|
|||
proc_ctxs->num_proc_ctxs);
|
||||
for (i = 0; i < proc_ctxs->num_proc_ctxs; i++) {
|
||||
if (__ipa_add_hdr_proc_ctx(&proc_ctxs->proc_ctx[i], true)) {
|
||||
IPAERR("failed to add hdr pric ctx %d\n", i);
|
||||
IPAERR_RL("failed to add hdr pric ctx %d\n", i);
|
||||
proc_ctxs->proc_ctx[i].status = -1;
|
||||
} else {
|
||||
proc_ctxs->proc_ctx[i].status = 0;
|
||||
|
@ -1039,14 +1039,14 @@ int ipa_del_hdr_proc_ctx_by_user(struct ipa_ioc_del_hdr_proc_ctx *hdls,
|
|||
}
|
||||
|
||||
if (hdls == NULL || hdls->num_hdls == 0) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&ipa_ctx->lock);
|
||||
for (i = 0; i < hdls->num_hdls; i++) {
|
||||
if (__ipa_del_hdr_proc_ctx(hdls->hdl[i].hdl, true, by_user)) {
|
||||
IPAERR("failed to del hdr %i\n", i);
|
||||
IPAERR_RL("failed to del hdr %i\n", i);
|
||||
hdls->hdl[i].status = -1;
|
||||
} else {
|
||||
hdls->hdl[i].status = 0;
|
||||
|
@ -1279,7 +1279,7 @@ int ipa_get_hdr(struct ipa_ioc_get_hdr *lookup)
|
|||
}
|
||||
|
||||
if (lookup == NULL) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
mutex_lock(&ipa_ctx->lock);
|
||||
|
@ -1367,13 +1367,13 @@ int ipa_put_hdr(u32 hdr_hdl)
|
|||
|
||||
entry = ipa_id_find(hdr_hdl);
|
||||
if (entry == NULL) {
|
||||
IPAERR("lookup failed\n");
|
||||
IPAERR_RL("lookup failed\n");
|
||||
result = -EINVAL;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
if (entry == NULL || entry->cookie != IPA_HDR_COOKIE) {
|
||||
IPAERR("bad params\n");
|
||||
IPAERR_RL("bad params\n");
|
||||
result = -EINVAL;
|
||||
goto bail;
|
||||
}
|
||||
|
@ -1402,7 +1402,7 @@ int ipa_copy_hdr(struct ipa_ioc_copy_hdr *copy)
|
|||
int result = -EFAULT;
|
||||
|
||||
if (copy == NULL) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
mutex_lock(&ipa_ctx->lock);
|
||||
|
|
|
@ -54,6 +54,8 @@
|
|||
pr_debug(DRV_NAME " %s:%d " fmt, __func__, __LINE__, ## args)
|
||||
#define IPAERR(fmt, args...) \
|
||||
pr_err(DRV_NAME " %s:%d " fmt, __func__, __LINE__, ## args)
|
||||
#define IPAERR_RL(fmt, args...) \
|
||||
pr_err_ratelimited(DRV_NAME " %s:%d " fmt, __func__, __LINE__, ## args)
|
||||
|
||||
#define WLAN_AMPDU_TX_EP 15
|
||||
#define WLAN_PROD_TX_EP 19
|
||||
|
|
|
@ -277,7 +277,7 @@ int ipa_query_intf_tx_props(struct ipa_ioc_query_intf_tx_props *tx)
|
|||
if (!strncmp(entry->name, tx->name, IPA_RESOURCE_NAME_MAX)) {
|
||||
/* add the entry check */
|
||||
if (entry->num_tx_props != tx->num_tx_props) {
|
||||
IPAERR("invalid entry number(%u %u)\n",
|
||||
IPAERR_RL("invalid entry number(%u %u)\n",
|
||||
entry->num_tx_props,
|
||||
tx->num_tx_props);
|
||||
mutex_unlock(&ipa_ctx->lock);
|
||||
|
@ -318,7 +318,7 @@ int ipa_query_intf_rx_props(struct ipa_ioc_query_intf_rx_props *rx)
|
|||
if (!strncmp(entry->name, rx->name, IPA_RESOURCE_NAME_MAX)) {
|
||||
/* add the entry check */
|
||||
if (entry->num_rx_props != rx->num_rx_props) {
|
||||
IPAERR("invalid entry number(%u %u)\n",
|
||||
IPAERR_RL("invalid entry number(%u %u)\n",
|
||||
entry->num_rx_props,
|
||||
rx->num_rx_props);
|
||||
mutex_unlock(&ipa_ctx->lock);
|
||||
|
@ -359,7 +359,7 @@ int ipa_query_intf_ext_props(struct ipa_ioc_query_intf_ext_props *ext)
|
|||
if (!strcmp(entry->name, ext->name)) {
|
||||
/* add the entry check */
|
||||
if (entry->num_ext_props != ext->num_ext_props) {
|
||||
IPAERR("invalid entry number(%u %u)\n",
|
||||
IPAERR_RL("invalid entry number(%u %u)\n",
|
||||
entry->num_ext_props,
|
||||
ext->num_ext_props);
|
||||
mutex_unlock(&ipa_ctx->lock);
|
||||
|
@ -402,13 +402,13 @@ int ipa_send_msg(struct ipa_msg_meta *meta, void *buff,
|
|||
|
||||
if (meta == NULL || (buff == NULL && callback != NULL) ||
|
||||
(buff != NULL && callback == NULL)) {
|
||||
IPAERR("invalid param meta=%p buff=%p, callback=%p\n",
|
||||
IPAERR_RL("invalid param meta=%p buff=%p, callback=%p\n",
|
||||
meta, buff, callback);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (meta->msg_type >= IPA_EVENT_MAX_NUM) {
|
||||
IPAERR("unsupported message type %d\n", meta->msg_type);
|
||||
IPAERR_RL("unsupported message type %d\n", meta->msg_type);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -450,7 +450,8 @@ int ipa_register_pull_msg(struct ipa_msg_meta *meta, ipa_msg_pull_fn callback)
|
|||
struct ipa_pull_msg *msg;
|
||||
|
||||
if (meta == NULL || callback == NULL) {
|
||||
IPAERR("invalid param meta=%p callback=%p\n", meta, callback);
|
||||
IPAERR_RL("invalid param meta=%p callback=%p\n",
|
||||
meta, callback);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -250,8 +250,8 @@ int allocate_nat_device(struct ipa_ioc_nat_alloc_mem *mem)
|
|||
|
||||
mutex_lock(&nat_ctx->lock);
|
||||
if (strcmp(mem->dev_name, NAT_DEV_NAME)) {
|
||||
IPAERR("Nat device name mismatch\n");
|
||||
IPAERR("Expect: %s Recv: %s\n", NAT_DEV_NAME, mem->dev_name);
|
||||
IPAERR_RL("Nat device name mismatch\n");
|
||||
IPAERR_RL("Expect: %s Recv: %s\n", NAT_DEV_NAME, mem->dev_name);
|
||||
result = -EPERM;
|
||||
goto bail;
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ int allocate_nat_device(struct ipa_ioc_nat_alloc_mem *mem)
|
|||
|
||||
if (mem->size <= 0 ||
|
||||
nat_ctx->is_dev_init == true) {
|
||||
IPAERR("Invalid Parameters or device is already init\n");
|
||||
IPAERR_RL("Invalid Parameters or device is already init\n");
|
||||
result = -EPERM;
|
||||
goto bail;
|
||||
}
|
||||
|
@ -441,16 +441,16 @@ int ipa_nat_init_cmd(struct ipa_ioc_v4_nat_init *init)
|
|||
(init->expn_rules_offset > offset) ||
|
||||
(init->index_offset > offset) ||
|
||||
(init->index_expn_offset > offset)) {
|
||||
IPAERR("Failed due to integer overflow\n");
|
||||
IPAERR("nat.mem.dma_handle: 0x%pa\n",
|
||||
IPAERR_RL("Failed due to integer overflow\n");
|
||||
IPAERR_RL("nat.mem.dma_handle: 0x%pa\n",
|
||||
&ipa_ctx->nat_mem.dma_handle);
|
||||
IPAERR("ipv4_rules_offset: 0x%x\n",
|
||||
IPAERR_RL("ipv4_rules_offset: 0x%x\n",
|
||||
init->ipv4_rules_offset);
|
||||
IPAERR("expn_rules_offset: 0x%x\n",
|
||||
IPAERR_RL("expn_rules_offset: 0x%x\n",
|
||||
init->expn_rules_offset);
|
||||
IPAERR("index_offset: 0x%x\n",
|
||||
IPAERR_RL("index_offset: 0x%x\n",
|
||||
init->index_offset);
|
||||
IPAERR("index_expn_offset: 0x%x\n",
|
||||
IPAERR_RL("index_expn_offset: 0x%x\n",
|
||||
init->index_expn_offset);
|
||||
result = -EPERM;
|
||||
goto free_mem;
|
||||
|
@ -578,7 +578,7 @@ int ipa_nat_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma)
|
|||
|
||||
for (cnt = 0; cnt < dma->entries; cnt++) {
|
||||
if (dma->dma[cnt].table_index >= 1) {
|
||||
IPAERR("Invalid table index %d\n",
|
||||
IPAERR_RL("Invalid table index %d\n",
|
||||
dma->dma[cnt].table_index);
|
||||
ret = -EPERM;
|
||||
goto bail;
|
||||
|
@ -589,7 +589,7 @@ int ipa_nat_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma)
|
|||
if (dma->dma[cnt].offset >=
|
||||
(ipa_ctx->nat_mem.size_base_tables + 1) *
|
||||
NAT_TABLE_ENTRY_SIZE_BYTE) {
|
||||
IPAERR("Invalid offset %d\n",
|
||||
IPAERR_RL("Invalid offset %d\n",
|
||||
dma->dma[cnt].offset);
|
||||
ret = -EPERM;
|
||||
goto bail;
|
||||
|
@ -601,7 +601,7 @@ int ipa_nat_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma)
|
|||
if (dma->dma[cnt].offset >=
|
||||
ipa_ctx->nat_mem.size_expansion_tables *
|
||||
NAT_TABLE_ENTRY_SIZE_BYTE) {
|
||||
IPAERR("Invalid offset %d\n",
|
||||
IPAERR_RL("Invalid offset %d\n",
|
||||
dma->dma[cnt].offset);
|
||||
ret = -EPERM;
|
||||
goto bail;
|
||||
|
@ -613,7 +613,7 @@ int ipa_nat_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma)
|
|||
if (dma->dma[cnt].offset >=
|
||||
(ipa_ctx->nat_mem.size_base_tables + 1) *
|
||||
NAT_INTEX_TABLE_ENTRY_SIZE_BYTE) {
|
||||
IPAERR("Invalid offset %d\n",
|
||||
IPAERR_RL("Invalid offset %d\n",
|
||||
dma->dma[cnt].offset);
|
||||
ret = -EPERM;
|
||||
goto bail;
|
||||
|
@ -625,7 +625,7 @@ int ipa_nat_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma)
|
|||
if (dma->dma[cnt].offset >=
|
||||
ipa_ctx->nat_mem.size_expansion_tables *
|
||||
NAT_INTEX_TABLE_ENTRY_SIZE_BYTE) {
|
||||
IPAERR("Invalid offset %d\n",
|
||||
IPAERR_RL("Invalid offset %d\n",
|
||||
dma->dma[cnt].offset);
|
||||
ret = -EPERM;
|
||||
goto bail;
|
||||
|
|
|
@ -824,7 +824,7 @@ int ipa_query_rt_index(struct ipa_ioc_get_rt_tbl_indx *in)
|
|||
struct ipa_rt_tbl *entry;
|
||||
|
||||
if (in->ip >= IPA_IP_MAX) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -850,7 +850,7 @@ static struct ipa_rt_tbl *__ipa_add_rt_tbl(enum ipa_ip_type ip,
|
|||
int id;
|
||||
|
||||
if (ip >= IPA_IP_MAX || name == NULL) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -916,12 +916,12 @@ static int __ipa_del_rt_tbl(struct ipa_rt_tbl *entry)
|
|||
u32 id;
|
||||
|
||||
if (entry == NULL || (entry->cookie != IPA_RT_TBL_COOKIE)) {
|
||||
IPAERR("bad parms\n");
|
||||
IPAERR_RL("bad parms\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
id = entry->id;
|
||||
if (ipa_id_find(id) == NULL) {
|
||||
IPAERR("lookup failed\n");
|
||||
IPAERR_RL("lookup failed\n");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
|
@ -1055,7 +1055,7 @@ int ipa_add_rt_rule(struct ipa_ioc_add_rt_rule *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;
|
||||
}
|
||||
|
||||
|
@ -1065,7 +1065,7 @@ int ipa_add_rt_rule(struct ipa_ioc_add_rt_rule *rules)
|
|||
&rules->rules[i].rule,
|
||||
rules->rules[i].at_rear,
|
||||
&rules->rules[i].rt_rule_hdl)) {
|
||||
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;
|
||||
|
@ -1093,12 +1093,12 @@ int __ipa_del_rt_rule(u32 rule_hdl)
|
|||
entry = ipa_id_find(rule_hdl);
|
||||
|
||||
if (entry == NULL) {
|
||||
IPAERR("lookup failed\n");
|
||||
IPAERR_RL("lookup failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (entry->cookie != IPA_RT_RULE_COOKIE) {
|
||||
IPAERR("bad params\n");
|
||||
IPAERR_RL("bad params\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -1112,7 +1112,7 @@ int __ipa_del_rt_rule(u32 rule_hdl)
|
|||
entry->tbl->rule_cnt);
|
||||
if (entry->tbl->rule_cnt == 0 && entry->tbl->ref_cnt == 0) {
|
||||
if (__ipa_del_rt_tbl(entry->tbl))
|
||||
IPAERR("fail to del RT tbl\n");
|
||||
IPAERR_RL("fail to del RT tbl\n");
|
||||
}
|
||||
entry->cookie = 0;
|
||||
id = entry->id;
|
||||
|
@ -1139,14 +1139,14 @@ int ipa_del_rt_rule(struct ipa_ioc_del_rt_rule *hdls)
|
|||
int ret;
|
||||
|
||||
if (hdls == NULL || hdls->num_hdls == 0 || hdls->ip >= IPA_IP_MAX) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&ipa_ctx->lock);
|
||||
for (i = 0; i < hdls->num_hdls; i++) {
|
||||
if (__ipa_del_rt_rule(hdls->hdl[i].hdl)) {
|
||||
IPAERR("failed to del rt rule %i\n", i);
|
||||
IPAERR_RL("failed to del rt rule %i\n", i);
|
||||
hdls->hdl[i].status = IPA_RT_STATUS_OF_DEL_FAILED;
|
||||
} else {
|
||||
hdls->hdl[i].status = 0;
|
||||
|
@ -1180,7 +1180,7 @@ int ipa_commit_rt(enum ipa_ip_type ip)
|
|||
int ret;
|
||||
|
||||
if (ip >= IPA_IP_MAX) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -1225,7 +1225,7 @@ int ipa_reset_rt(enum ipa_ip_type ip)
|
|||
int id;
|
||||
|
||||
if (ip >= IPA_IP_MAX) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -1243,7 +1243,7 @@ int ipa_reset_rt(enum ipa_ip_type ip)
|
|||
* filtering rules point to routing tables
|
||||
*/
|
||||
if (ipa_reset_flt(ip))
|
||||
IPAERR("fail to reset flt ip=%d\n", ip);
|
||||
IPAERR_RL("fail to reset flt ip=%d\n", ip);
|
||||
|
||||
set = &ipa_ctx->rt_tbl_set[ip];
|
||||
rset = &ipa_ctx->reap_rt_tbl_set[ip];
|
||||
|
@ -1330,7 +1330,7 @@ int ipa_get_rt_tbl(struct ipa_ioc_get_rt_tbl *lookup)
|
|||
int result = -EFAULT;
|
||||
|
||||
if (lookup == NULL || lookup->ip >= IPA_IP_MAX) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
mutex_lock(&ipa_ctx->lock);
|
||||
|
@ -1345,7 +1345,7 @@ int ipa_get_rt_tbl(struct ipa_ioc_get_rt_tbl *lookup)
|
|||
|
||||
/* commit for get */
|
||||
if (ipa_ctx->ctrl->ipa_commit_rt(lookup->ip))
|
||||
IPAERR("fail to commit RT tbl\n");
|
||||
IPAERR_RL("fail to commit RT tbl\n");
|
||||
|
||||
result = 0;
|
||||
}
|
||||
|
@ -1374,13 +1374,13 @@ int ipa_put_rt_tbl(u32 rt_tbl_hdl)
|
|||
mutex_lock(&ipa_ctx->lock);
|
||||
entry = ipa_id_find(rt_tbl_hdl);
|
||||
if (entry == NULL) {
|
||||
IPAERR("lookup failed\n");
|
||||
IPAERR_RL("lookup failed\n");
|
||||
result = -EINVAL;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
if ((entry->cookie != IPA_RT_TBL_COOKIE) || entry->ref_cnt == 0) {
|
||||
IPAERR("bad parms\n");
|
||||
IPAERR_RL("bad parms\n");
|
||||
result = -EINVAL;
|
||||
goto ret;
|
||||
}
|
||||
|
@ -1398,10 +1398,10 @@ int ipa_put_rt_tbl(u32 rt_tbl_hdl)
|
|||
entry->ref_cnt--;
|
||||
if (entry->ref_cnt == 0 && entry->rule_cnt == 0) {
|
||||
if (__ipa_del_rt_tbl(entry))
|
||||
IPAERR("fail to del RT tbl\n");
|
||||
IPAERR_RL("fail to del RT tbl\n");
|
||||
/* commit for put */
|
||||
if (ipa_ctx->ctrl->ipa_commit_rt(ip))
|
||||
IPAERR("fail to commit RT tbl\n");
|
||||
IPAERR_RL("fail to commit RT tbl\n");
|
||||
}
|
||||
|
||||
result = 0;
|
||||
|
@ -1422,19 +1422,19 @@ static int __ipa_mdfy_rt_rule(struct ipa_rt_rule_mdfy *rtrule)
|
|||
if (rtrule->rule.hdr_hdl) {
|
||||
hdr = ipa_id_find(rtrule->rule.hdr_hdl);
|
||||
if ((hdr == NULL) || (hdr->cookie != IPA_HDR_COOKIE)) {
|
||||
IPAERR("rt rule does not point to valid hdr\n");
|
||||
IPAERR_RL("rt rule does not point to valid hdr\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
entry = ipa_id_find(rtrule->rt_rule_hdl);
|
||||
if (entry == NULL) {
|
||||
IPAERR("lookup failed\n");
|
||||
IPAERR_RL("lookup failed\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (entry->cookie != IPA_RT_RULE_COOKIE) {
|
||||
IPAERR("bad params\n");
|
||||
IPAERR_RL("bad params\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -1467,14 +1467,14 @@ int ipa_mdfy_rt_rule(struct ipa_ioc_mdfy_rt_rule *hdls)
|
|||
int result;
|
||||
|
||||
if (hdls == NULL || hdls->num_rules == 0 || hdls->ip >= IPA_IP_MAX) {
|
||||
IPAERR("bad parm\n");
|
||||
IPAERR_RL("bad parm\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&ipa_ctx->lock);
|
||||
for (i = 0; i < hdls->num_rules; i++) {
|
||||
if (__ipa_mdfy_rt_rule(&hdls->rules[i])) {
|
||||
IPAERR("failed to mdfy rt rule %i\n", i);
|
||||
IPAERR_RL("failed to mdfy rt rule %i\n", i);
|
||||
hdls->rules[i].status = IPA_RT_STATUS_OF_MDFY_FAILED;
|
||||
} else {
|
||||
hdls->rules[i].status = 0;
|
||||
|
|
|
@ -886,7 +886,7 @@ int ipa_get_ep_mapping(enum ipa_client_type client)
|
|||
}
|
||||
|
||||
if (client >= IPA_CLIENT_MAX || client < 0) {
|
||||
IPAERR("Bad client number! client =%d\n", client);
|
||||
IPAERR_RL("Bad client number! client =%d\n", client);
|
||||
return INVALID_EP_MAPPING_INDEX;
|
||||
}
|
||||
|
||||
|
@ -1770,7 +1770,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
if (attrib->attrib_mask & IPA_FLT_NEXT_HDR ||
|
||||
attrib->attrib_mask & IPA_FLT_TC || attrib->attrib_mask &
|
||||
IPA_FLT_FLOW_LABEL) {
|
||||
IPAERR("v6 attrib's specified for v4 rule\n");
|
||||
IPAERR_RL("v6 attrib's specified for v4 rule\n");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
|
@ -1782,7 +1782,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_TOS_MASKED) {
|
||||
if (ipa_ofst_meq32[ofst_meq32] == -1) {
|
||||
IPAERR("ran out of meq32 eq\n");
|
||||
IPAERR_RL("ran out of meq32 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq32[ofst_meq32];
|
||||
|
@ -1802,7 +1802,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_SRC_ADDR) {
|
||||
if (ipa_ofst_meq32[ofst_meq32] == -1) {
|
||||
IPAERR("ran out of meq32 eq\n");
|
||||
IPAERR_RL("ran out of meq32 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq32[ofst_meq32];
|
||||
|
@ -1816,7 +1816,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_DST_ADDR) {
|
||||
if (ipa_ofst_meq32[ofst_meq32] == -1) {
|
||||
IPAERR("ran out of meq32 eq\n");
|
||||
IPAERR_RL("ran out of meq32 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq32[ofst_meq32];
|
||||
|
@ -1830,11 +1830,11 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_SRC_PORT_RANGE) {
|
||||
if (ipa_ihl_ofst_rng16[ihl_ofst_rng16] == -1) {
|
||||
IPAERR("ran out of ihl_rng16 eq\n");
|
||||
IPAERR_RL("ran out of ihl_rng16 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
if (attrib->src_port_hi < attrib->src_port_lo) {
|
||||
IPAERR("bad src port range param\n");
|
||||
IPAERR_RL("bad src port range param\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_rng16[ihl_ofst_rng16];
|
||||
|
@ -1848,11 +1848,11 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_DST_PORT_RANGE) {
|
||||
if (ipa_ihl_ofst_rng16[ihl_ofst_rng16] == -1) {
|
||||
IPAERR("ran out of ihl_rng16 eq\n");
|
||||
IPAERR_RL("ran out of ihl_rng16 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
if (attrib->dst_port_hi < attrib->dst_port_lo) {
|
||||
IPAERR("bad dst port range param\n");
|
||||
IPAERR_RL("bad dst port range param\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_rng16[ihl_ofst_rng16];
|
||||
|
@ -1866,7 +1866,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_TYPE) {
|
||||
if (ipa_ihl_ofst_meq32[ihl_ofst_meq32] == -1) {
|
||||
IPAERR("ran out of ihl_meq32 eq\n");
|
||||
IPAERR_RL("ran out of ihl_meq32 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_meq32[ihl_ofst_meq32];
|
||||
|
@ -1879,7 +1879,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_CODE) {
|
||||
if (ipa_ihl_ofst_meq32[ihl_ofst_meq32] == -1) {
|
||||
IPAERR("ran out of ihl_meq32 eq\n");
|
||||
IPAERR_RL("ran out of ihl_meq32 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_meq32[ihl_ofst_meq32];
|
||||
|
@ -1892,7 +1892,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_SPI) {
|
||||
if (ipa_ihl_ofst_meq32[ihl_ofst_meq32] == -1) {
|
||||
IPAERR("ran out of ihl_meq32 eq\n");
|
||||
IPAERR_RL("ran out of ihl_meq32 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_meq32[ihl_ofst_meq32];
|
||||
|
@ -1906,7 +1906,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_SRC_PORT) {
|
||||
if (ipa_ihl_ofst_rng16[ihl_ofst_rng16] == -1) {
|
||||
IPAERR("ran out of ihl_rng16 eq\n");
|
||||
IPAERR_RL("ran out of ihl_rng16 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_rng16[ihl_ofst_rng16];
|
||||
|
@ -1920,7 +1920,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_DST_PORT) {
|
||||
if (ipa_ihl_ofst_rng16[ihl_ofst_rng16] == -1) {
|
||||
IPAERR("ran out of ihl_rng16 eq\n");
|
||||
IPAERR_RL("ran out of ihl_rng16 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_rng16[ihl_ofst_rng16];
|
||||
|
@ -1947,7 +1947,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_MAC_DST_ADDR_ETHER_II) {
|
||||
if (ipa_ofst_meq128[ofst_meq128] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq128[ofst_meq128];
|
||||
|
@ -1962,7 +1962,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_MAC_SRC_ADDR_ETHER_II) {
|
||||
if (ipa_ofst_meq128[ofst_meq128] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq128[ofst_meq128];
|
||||
|
@ -1977,7 +1977,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_MAC_DST_ADDR_802_3) {
|
||||
if (ipa_ofst_meq128[ofst_meq128] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq128[ofst_meq128];
|
||||
|
@ -1992,7 +1992,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_MAC_SRC_ADDR_802_3) {
|
||||
if (ipa_ofst_meq128[ofst_meq128] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq128[ofst_meq128];
|
||||
|
@ -2007,7 +2007,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_MAC_ETHER_TYPE) {
|
||||
if (ipa_ofst_meq32[ofst_meq32] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq32[ofst_meq32];
|
||||
|
@ -2025,7 +2025,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
/* error check */
|
||||
if (attrib->attrib_mask & IPA_FLT_TOS ||
|
||||
attrib->attrib_mask & IPA_FLT_PROTOCOL) {
|
||||
IPAERR("v4 attrib's specified for v6 rule\n");
|
||||
IPAERR_RL("v4 attrib's specified for v6 rule\n");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
|
@ -2037,7 +2037,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_TYPE) {
|
||||
if (ipa_ihl_ofst_meq32[ihl_ofst_meq32] == -1) {
|
||||
IPAERR("ran out of ihl_meq32 eq\n");
|
||||
IPAERR_RL("ran out of ihl_meq32 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_meq32[ihl_ofst_meq32];
|
||||
|
@ -2050,7 +2050,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_CODE) {
|
||||
if (ipa_ihl_ofst_meq32[ihl_ofst_meq32] == -1) {
|
||||
IPAERR("ran out of ihl_meq32 eq\n");
|
||||
IPAERR_RL("ran out of ihl_meq32 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_meq32[ihl_ofst_meq32];
|
||||
|
@ -2063,7 +2063,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_SPI) {
|
||||
if (ipa_ihl_ofst_meq32[ihl_ofst_meq32] == -1) {
|
||||
IPAERR("ran out of ihl_meq32 eq\n");
|
||||
IPAERR_RL("ran out of ihl_meq32 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_meq32[ihl_ofst_meq32];
|
||||
|
@ -2077,7 +2077,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_SRC_PORT) {
|
||||
if (ipa_ihl_ofst_rng16[ihl_ofst_rng16] == -1) {
|
||||
IPAERR("ran out of ihl_rng16 eq\n");
|
||||
IPAERR_RL("ran out of ihl_rng16 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_rng16[ihl_ofst_rng16];
|
||||
|
@ -2091,7 +2091,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_DST_PORT) {
|
||||
if (ipa_ihl_ofst_rng16[ihl_ofst_rng16] == -1) {
|
||||
IPAERR("ran out of ihl_rng16 eq\n");
|
||||
IPAERR_RL("ran out of ihl_rng16 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ihl_ofst_rng16[ihl_ofst_rng16];
|
||||
|
@ -2105,7 +2105,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_SRC_PORT_RANGE) {
|
||||
if (ipa_ihl_ofst_rng16[ihl_ofst_rng16] == -1) {
|
||||
IPAERR("ran out of ihl_rng16 eq\n");
|
||||
IPAERR_RL("ran out of ihl_rng16 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
if (attrib->src_port_hi < attrib->src_port_lo) {
|
||||
|
@ -2123,7 +2123,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_DST_PORT_RANGE) {
|
||||
if (ipa_ihl_ofst_rng16[ihl_ofst_rng16] == -1) {
|
||||
IPAERR("ran out of ihl_rng16 eq\n");
|
||||
IPAERR_RL("ran out of ihl_rng16 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
if (attrib->dst_port_hi < attrib->dst_port_lo) {
|
||||
|
@ -2141,7 +2141,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_SRC_ADDR) {
|
||||
if (ipa_ofst_meq128[ofst_meq128] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq128[ofst_meq128];
|
||||
|
@ -2167,7 +2167,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_DST_ADDR) {
|
||||
if (ipa_ofst_meq128[ofst_meq128] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq128[ofst_meq128];
|
||||
|
@ -2199,7 +2199,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_TOS_MASKED) {
|
||||
if (ipa_ofst_meq128[ofst_meq128] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq128[ofst_meq128];
|
||||
|
@ -2244,7 +2244,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_MAC_DST_ADDR_ETHER_II) {
|
||||
if (ipa_ofst_meq128[ofst_meq128] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq128[ofst_meq128];
|
||||
|
@ -2259,7 +2259,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_MAC_SRC_ADDR_ETHER_II) {
|
||||
if (ipa_ofst_meq128[ofst_meq128] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq128[ofst_meq128];
|
||||
|
@ -2274,7 +2274,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_MAC_DST_ADDR_802_3) {
|
||||
if (ipa_ofst_meq128[ofst_meq128] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq128[ofst_meq128];
|
||||
|
@ -2289,7 +2289,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_MAC_SRC_ADDR_802_3) {
|
||||
if (ipa_ofst_meq128[ofst_meq128] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq128[ofst_meq128];
|
||||
|
@ -2304,7 +2304,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
|
||||
if (attrib->attrib_mask & IPA_FLT_MAC_ETHER_TYPE) {
|
||||
if (ipa_ofst_meq32[ofst_meq32] == -1) {
|
||||
IPAERR("ran out of meq128 eq\n");
|
||||
IPAERR_RL("ran out of meq128 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq32[ofst_meq32];
|
||||
|
@ -2327,7 +2327,7 @@ int ipa_generate_flt_eq(enum ipa_ip_type ip,
|
|||
*/
|
||||
if (attrib->attrib_mask == 0) {
|
||||
if (ipa_ofst_meq32[ofst_meq32] == -1) {
|
||||
IPAERR("ran out of meq32 eq\n");
|
||||
IPAERR_RL("ran out of meq32 eq\n");
|
||||
return -EPERM;
|
||||
}
|
||||
*en_rule |= ipa_ofst_meq32[ofst_meq32];
|
||||
|
@ -3627,19 +3627,19 @@ int ipa_write_qmap_id(struct ipa_ioc_write_qmapid *param_in)
|
|||
}
|
||||
|
||||
if (param_in->client >= IPA_CLIENT_MAX) {
|
||||
IPAERR("bad parm client:%d\n", param_in->client);
|
||||
IPAERR_RL("bad parm client:%d\n", param_in->client);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ipa_ep_idx = ipa_get_ep_mapping(param_in->client);
|
||||
if (ipa_ep_idx == -1) {
|
||||
IPAERR("Invalid client.\n");
|
||||
IPAERR_RL("Invalid client.\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ep = &ipa_ctx->ep[ipa_ep_idx];
|
||||
if (!ep->valid) {
|
||||
IPAERR("EP not allocated.\n");
|
||||
IPAERR_RL("EP not allocated.\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -3652,7 +3652,7 @@ int ipa_write_qmap_id(struct ipa_ioc_write_qmapid *param_in)
|
|||
ipa_ctx->ep[ipa_ep_idx].cfg.meta = meta;
|
||||
result = ipa_write_qmapid_wdi_pipe(ipa_ep_idx, meta.qmap_id);
|
||||
if (result)
|
||||
IPAERR("qmap_id %d write failed on ep=%d\n",
|
||||
IPAERR_RL("qmap_id %d write failed on ep=%d\n",
|
||||
meta.qmap_id, ipa_ep_idx);
|
||||
result = 0;
|
||||
}
|
||||
|
|
|
@ -1810,6 +1810,35 @@ static void dummy_tx_cmd_ch_remote_close_ack(struct glink_transport_if *if_ptr,
|
|||
/* intentionally left blank */
|
||||
}
|
||||
|
||||
/**
|
||||
* dummy_tx_cmd_ch_open() - dummy channel open cmd sending function
|
||||
* @if_ptr: The transport to transmit on.
|
||||
* @lcid: The local channel id to encode.
|
||||
* @name: The channel name to encode.
|
||||
* @req_xprt: The transport the core would like to migrate this channel to.
|
||||
*
|
||||
* Return: 0 on success or standard Linux error code.
|
||||
*/
|
||||
static int dummy_tx_cmd_ch_open(struct glink_transport_if *if_ptr,
|
||||
uint32_t lcid, const char *name,
|
||||
uint16_t req_xprt)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
/**
|
||||
* dummy_tx_cmd_ch_remote_open_ack() - convert a channel open ack cmd to wire
|
||||
* format and transmit
|
||||
* @if_ptr: The transport to transmit on.
|
||||
* @rcid: The remote channel id to encode.
|
||||
* @xprt_resp: The response to a transport migration request.
|
||||
*/
|
||||
static void dummy_tx_cmd_ch_remote_open_ack(struct glink_transport_if *if_ptr,
|
||||
uint32_t rcid, uint16_t xprt_resp)
|
||||
{
|
||||
/* intentionally left blank */
|
||||
}
|
||||
|
||||
/**
|
||||
* notif_if_up_all_xprts() - Check and notify existing transport state if up
|
||||
* @notif_info: Data structure containing transport information to be notified.
|
||||
|
@ -3005,8 +3034,11 @@ static struct glink_core_xprt_ctx *glink_create_dummy_xprt_ctx(
|
|||
if_ptr->tx_cmd_remote_rx_intent_req_ack =
|
||||
dummy_tx_cmd_remote_rx_intent_req_ack;
|
||||
if_ptr->tx_cmd_set_sigs = dummy_tx_cmd_set_sigs;
|
||||
if_ptr->tx_cmd_ch_open = dummy_tx_cmd_ch_open;
|
||||
if_ptr->tx_cmd_ch_remote_open_ack = dummy_tx_cmd_ch_remote_open_ack;
|
||||
if_ptr->tx_cmd_ch_close = dummy_tx_cmd_ch_close;
|
||||
if_ptr->tx_cmd_ch_remote_close_ack = dummy_tx_cmd_ch_remote_close_ack;
|
||||
if_ptr->tx_cmd_tracer_pkt = dummy_tx_cmd_tracer_pkt;
|
||||
|
||||
xprt_ptr->ops = if_ptr;
|
||||
spin_lock_init(&xprt_ptr->xprt_ctx_lock_lhb1);
|
||||
|
|
|
@ -898,7 +898,7 @@ static int mdss_dsi_cmd_flush(struct file *file, fl_owner_t id)
|
|||
while (len >= sizeof(*dchdr)) {
|
||||
dchdr = (struct dsi_ctrl_hdr *)bp;
|
||||
dchdr->dlen = ntohs(dchdr->dlen);
|
||||
if (dchdr->dlen > len) {
|
||||
if (dchdr->dlen > len || dchdr->dlen < 0) {
|
||||
pr_err("%s: dtsi cmd=%x error, len=%d\n",
|
||||
__func__, dchdr->dtype, dchdr->dlen);
|
||||
kfree(buf);
|
||||
|
|
|
@ -1724,6 +1724,13 @@ int hdmi_edid_parser(void *input)
|
|||
goto bail;
|
||||
}
|
||||
|
||||
/* Find out if CEA extension blocks exceeding max limit */
|
||||
if (num_of_cea_blocks >= MAX_EDID_BLOCKS) {
|
||||
DEV_WARN("%s: HDMI EDID exceeded max CEA blocks limit\n",
|
||||
__func__);
|
||||
num_of_cea_blocks = MAX_EDID_BLOCKS - 1;
|
||||
}
|
||||
|
||||
/* check for valid CEA block */
|
||||
if (edid_buf[EDID_BLOCK_SIZE] != 2) {
|
||||
DEV_ERR("%s: Invalid CEA block\n", __func__);
|
||||
|
|
|
@ -310,8 +310,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
|
|||
[NL80211_ATTR_WPA_VERSIONS] = { .type = NLA_U32 },
|
||||
[NL80211_ATTR_PID] = { .type = NLA_U32 },
|
||||
[NL80211_ATTR_4ADDR] = { .type = NLA_U8 },
|
||||
[NL80211_ATTR_PMKID] = { .type = NLA_BINARY,
|
||||
.len = WLAN_PMKID_LEN },
|
||||
[NL80211_ATTR_PMKID] = { .len = WLAN_PMKID_LEN },
|
||||
[NL80211_ATTR_DURATION] = { .type = NLA_U32 },
|
||||
[NL80211_ATTR_COOKIE] = { .type = NLA_U64 },
|
||||
[NL80211_ATTR_TX_RATES] = { .type = NLA_NESTED },
|
||||
|
|
|
@ -2780,6 +2780,15 @@ int q6asm_set_shared_circ_buff(struct audio_client *ac,
|
|||
int bytes_to_alloc, rc;
|
||||
size_t len;
|
||||
|
||||
mutex_lock(&ac->cmd_lock);
|
||||
|
||||
if (ac->port[dir].buf) {
|
||||
pr_err("%s: Buffer already allocated\n", __func__);
|
||||
rc = -EINVAL;
|
||||
mutex_unlock(&ac->cmd_lock);
|
||||
goto done;
|
||||
}
|
||||
|
||||
buf_circ = kzalloc(sizeof(struct audio_buffer), GFP_KERNEL);
|
||||
|
||||
if (!buf_circ) {
|
||||
|
@ -2787,10 +2796,6 @@ int q6asm_set_shared_circ_buff(struct audio_client *ac,
|
|||
goto done;
|
||||
}
|
||||
|
||||
mutex_lock(&ac->cmd_lock);
|
||||
|
||||
ac->port[dir].buf = buf_circ;
|
||||
|
||||
bytes_to_alloc = bufsz * bufcnt;
|
||||
bytes_to_alloc = PAGE_ALIGN(bytes_to_alloc);
|
||||
|
||||
|
@ -2802,11 +2807,12 @@ int q6asm_set_shared_circ_buff(struct audio_client *ac,
|
|||
if (rc) {
|
||||
pr_err("%s: Audio ION alloc is failed, rc = %d\n", __func__,
|
||||
rc);
|
||||
mutex_unlock(&ac->cmd_lock);
|
||||
kfree(buf_circ);
|
||||
mutex_unlock(&ac->cmd_lock);
|
||||
goto done;
|
||||
}
|
||||
|
||||
ac->port[dir].buf = buf_circ;
|
||||
buf_circ->used = dir ^ 1;
|
||||
buf_circ->size = bytes_to_alloc;
|
||||
buf_circ->actual_size = bytes_to_alloc;
|
||||
|
@ -2964,12 +2970,6 @@ int q6asm_open_shared_io(struct audio_client *ac,
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (ac->port[dir].buf) {
|
||||
pr_err("%s: Buffer already allocated\n", __func__);
|
||||
rc = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
rc = q6asm_set_shared_circ_buff(ac, open, bufsz, bufcnt, dir);
|
||||
|
||||
if (rc)
|
||||
|
|
|
@ -65,7 +65,6 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
|
|||
struct snd_soc_codec *codec;
|
||||
struct snd_soc_dapm_context *dapm;
|
||||
struct snd_soc_jack_pin *pin;
|
||||
unsigned int sync = 0;
|
||||
int enable;
|
||||
|
||||
trace_snd_soc_jack_report(jack, mask, status);
|
||||
|
@ -93,16 +92,12 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
|
|||
snd_soc_dapm_enable_pin(dapm, pin->pin);
|
||||
else
|
||||
snd_soc_dapm_disable_pin(dapm, pin->pin);
|
||||
|
||||
/* we need to sync for this case only */
|
||||
sync = 1;
|
||||
}
|
||||
|
||||
/* Report before the DAPM sync to help users updating micbias status */
|
||||
blocking_notifier_call_chain(&jack->notifier, jack->status, jack);
|
||||
|
||||
if (sync)
|
||||
snd_soc_dapm_sync(dapm);
|
||||
snd_soc_dapm_sync(dapm);
|
||||
|
||||
snd_jack_report(jack->jack, jack->status);
|
||||
|
||||
|
|
Loading…
Reference in a new issue