[package] hostap-driver: Fix adhoc mode
[openwrt.git] / package / ltq-vmmc / patches / 200-kernel-37.patch
1 --- a/src/drv_vmmc_init.c
2 +++ b/src/drv_vmmc_init.c
3 @@ -784,7 +784,7 @@
4 dwld.fwDwld.length = IoInit.pram_size;
5
6 /* download firmware */
7 - ret = ifx_mps_ioctl((IFX_void_t *) command, IFX_NULL, FIO_MPS_DOWNLOAD,
8 + ret = ifx_mps_ioctl((IFX_void_t *) command, FIO_MPS_DOWNLOAD,
9 (IFX_uint32_t) &dwld.fwDwld);
10 }
11
12 @@ -1594,7 +1594,7 @@
13 #ifdef VMMC_DRIVER_UNLOAD_HOOK
14 if (VDevices[0].nDevState & DS_GPIO_RESERVED)
15 {
16 - IFX_int32_t ret;
17 + IFX_int32_t ret = 0;
18 VMMC_DRIVER_UNLOAD_HOOK(ret);
19 if (!VMMC_SUCCESS(ret))
20 {
21 --- a/src/mps/drv_mps_vmmc_linux.c
22 +++ b/src/mps/drv_mps_vmmc_linux.c
23 @@ -112,7 +112,7 @@
24 #ifndef __KERNEL__
25 IFX_int32_t ifx_mps_open (struct inode *inode, struct file *file_p);
26 IFX_int32_t ifx_mps_close (struct inode *inode, struct file *file_p);
27 -IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p,
28 +long ifx_mps_ioctl (struct file *file_p,
29 IFX_uint32_t nCmd, IFX_ulong_t arg);
30 IFX_int32_t ifx_mps_read_mailbox (mps_devices type, mps_message * rw);
31 IFX_int32_t ifx_mps_write_mailbox (mps_devices type, mps_message * rw);
32 @@ -173,7 +173,7 @@
33 static struct file_operations ifx_mps_fops = {
34 owner:THIS_MODULE,
35 poll:ifx_mps_poll,
36 - ioctl:ifx_mps_ioctl,
37 + unlocked_ioctl:ifx_mps_ioctl,
38 open:ifx_mps_open,
39 release:ifx_mps_close
40 };
41 @@ -616,7 +616,7 @@
42 * \return -ENOIOCTLCMD Invalid command
43 * \ingroup API
44 */
45 -IFX_int32_t ifx_mps_ioctl (struct inode * inode, struct file * file_p,
46 +long ifx_mps_ioctl (struct file *file_p,
47 IFX_uint32_t nCmd, IFX_ulong_t arg)
48 {
49 IFX_int32_t retvalue = -EINVAL;
50 @@ -631,17 +631,18 @@
51 'mps_devices' enum type, which in fact is [0..8]; So, if inode value is
52 [0..NUM_VOICE_CHANNEL+1], then we make sure that we are calling from
53 kernel space. */
54 - if (((IFX_int32_t) inode >= 0) &&
55 - ((IFX_int32_t) inode < NUM_VOICE_CHANNEL + 1))
56 + if (((IFX_int32_t) file_p >= 0) &&
57 + ((IFX_int32_t) file_p < NUM_VOICE_CHANNEL + 1))
58 {
59 from_kernel = 1;
60
61 /* Get corresponding mailbox device structure */
62 if ((pMBDev =
63 - ifx_mps_get_device ((mps_devices) ((IFX_int32_t) inode))) == 0)
64 + ifx_mps_get_device ((mps_devices) ((IFX_int32_t) file_p))) == 0)
65 {
66 return (-EINVAL);
67 }
68 + file_p = NULL;
69 }
70 else
71 {
72 --- a/src/drv_vmmc_ioctl.c
73 +++ b/src/drv_vmmc_ioctl.c
74 @@ -427,18 +427,18 @@
75 /* MPS driver will do the USR2KERN so just pass on the pointer. */
76 dwnld_struct.data = (IFX_void_t *)IoInit.pPRAMfw;
77
78 - ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL,
79 + ret = ifx_mps_ioctl((IFX_void_t *)command,
80 FIO_MPS_DOWNLOAD, (IFX_uint32_t) &dwnld_struct);
81 break;
82 }
83 case FIO_DEV_RESET:
84 {
85 - ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESET, 0);
86 + ret = ifx_mps_ioctl((IFX_void_t *)command, FIO_MPS_RESET, 0);
87 break;
88 }
89 case FIO_DEV_RESTART:
90 {
91 - ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESTART, 0);
92 + ret = ifx_mps_ioctl((IFX_void_t *)command, FIO_MPS_RESTART, 0);
93 break;
94 }
95 case FIO_LASTERR:
96 --- a/src/mps/drv_mps_vmmc.h
97 +++ b/src/mps/drv_mps_vmmc.h
98 @@ -279,7 +279,7 @@
99 #include <linux/fs.h>
100 IFX_int32_t ifx_mps_open (struct inode *inode, struct file *file_p);
101 IFX_int32_t ifx_mps_close (struct inode *inode, struct file *filp);
102 -IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p,
103 +long ifx_mps_ioctl (struct file *filp,
104 IFX_uint32_t nCmd, unsigned long arg);
105 IFX_int32_t ifx_mps_register_data_callback (mps_devices type, IFX_uint32_t dir,
106 IFX_void_t (*callback) (mps_devices
This page took 0.04574 seconds and 5 git commands to generate.