msm: ipa: add ioctl to get ipa hw version
Add ioctl for user space to get ipa hw version Change-Id: Iba207623126f641324fbcf174bddd46552f489de Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
This commit is contained in:
parent
50dca023e9
commit
987c28ae62
|
@ -1241,6 +1241,18 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case IPA_IOC_GET_HW_VERSION:
|
||||
pyld_sz = sizeof(enum ipa_hw_type);
|
||||
param = kzalloc(pyld_sz, GFP_KERNEL);
|
||||
if (!param) {
|
||||
retval = -ENOMEM;
|
||||
break;
|
||||
}
|
||||
memcpy(param, &ipa_ctx->ipa_hw_type, pyld_sz);
|
||||
if (copy_to_user((u8 *)arg, param, pyld_sz)) {
|
||||
retval = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
default: /* redundant, as cmd was checked against MAXNR */
|
||||
ipa_dec_client_disable_clks();
|
||||
|
|
|
@ -66,7 +66,8 @@
|
|||
#define IPA_IOCTL_DEL_HDR_PROC_CTX 41
|
||||
#define IPA_IOCTL_MDFY_RT_RULE 42
|
||||
#define IPA_IOCTL_NAT_MODIFY_PDN 43
|
||||
#define IPA_IOCTL_MAX 44
|
||||
#define IPA_IOCTL_GET_HW_VERSION 44
|
||||
#define IPA_IOCTL_MAX 45
|
||||
|
||||
/**
|
||||
* max size of the header to be inserted
|
||||
|
@ -1528,6 +1529,10 @@ enum ipacm_client_enum {
|
|||
IPA_IOCTL_DEL_HDR_PROC_CTX, \
|
||||
struct ipa_ioc_del_hdr_proc_ctx *)
|
||||
|
||||
#define IPA_IOC_GET_HW_VERSION _IOWR(IPA_IOC_MAGIC, \
|
||||
IPA_IOCTL_GET_HW_VERSION, \
|
||||
enum ipa_hw_type *)
|
||||
|
||||
/*
|
||||
* unique magic number of the Tethering bridge ioctls
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue