old mode 100644new mode 100755.. | .. |
---|
47 | 47 | #include <linux/proc_fs.h> |
---|
48 | 48 | #include <asm/uaccess.h> |
---|
49 | 49 | #include <asm/unaligned.h> |
---|
50 | | -#include <linux/fs.h> |
---|
51 | | -#include <linux/namei.h> |
---|
52 | 50 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) |
---|
53 | 51 | #include <uapi/linux/sched/types.h> |
---|
54 | 52 | #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) |
---|
.. | .. |
---|
1929 | 1927 | struct dhd_conf *conf; /* Bus module handle */ |
---|
1930 | 1928 | void *adapter; /* adapter information, interrupt, fw path etc. */ |
---|
1931 | 1929 | void *event_params; |
---|
1932 | | -#ifdef WL_TIMER |
---|
1933 | | - void *timer_params; |
---|
1934 | | -#endif /* WL_TIMER */ |
---|
1935 | 1930 | #ifdef BCMDBUS |
---|
1936 | 1931 | bool dhd_remove; |
---|
1937 | 1932 | #endif /* BCMDBUS */ |
---|
.. | .. |
---|
2213 | 2208 | } while (0) |
---|
2214 | 2209 | #define DHD_TXFL_WAKE_LOCK_TIMEOUT(pub, val) \ |
---|
2215 | 2210 | do { \ |
---|
2216 | | - printf("call txfl_wake_timeout enable\n"); \ |
---|
| 2211 | + printf("call pm_wake_timeout enable\n"); \ |
---|
2217 | 2212 | dhd_txfl_wake_lock_timeout(pub, val); \ |
---|
2218 | 2213 | } while (0) |
---|
2219 | 2214 | #define DHD_TXFL_WAKE_UNLOCK(pub) \ |
---|
.. | .. |
---|
2366 | 2361 | #define DHD_OS_OOB_IRQ_WAKE_UNLOCK(pub) dhd_os_oob_irq_wake_unlock(pub) |
---|
2367 | 2362 | #endif /* BCMPCIE_OOB_HOST_WAKE */ |
---|
2368 | 2363 | |
---|
2369 | | -#ifndef DHD_PACKET_TIMEOUT_MS |
---|
2370 | 2364 | #define DHD_PACKET_TIMEOUT_MS 500 |
---|
2371 | | -#endif |
---|
2372 | 2365 | #define DHD_EVENT_TIMEOUT_MS 1500 |
---|
2373 | 2366 | #define SCAN_WAKE_LOCK_TIMEOUT 10000 |
---|
2374 | | -#ifndef MAX_TX_TIMEOUT |
---|
2375 | 2367 | #define MAX_TX_TIMEOUT 500 |
---|
2376 | | -#endif |
---|
2377 | 2368 | |
---|
2378 | 2369 | /* Enum for IOCTL recieved status */ |
---|
2379 | 2370 | typedef enum dhd_ioctl_recieved_status |
---|
.. | .. |
---|
4659 | 4650 | #error "DHD_DEBUGABILITY_LOG_DUMP_RING without DEBUGABILITY" |
---|
4660 | 4651 | #endif /* DEBUGABILITY */ |
---|
4661 | 4652 | #endif /* DHD_DEBUGABILITY_LOG_DUMP_RING */ |
---|
4662 | | - |
---|
4663 | | -#if defined(__linux__) |
---|
4664 | | -#ifdef DHD_SUPPORT_VFS_CALL |
---|
4665 | | -static INLINE struct file *dhd_filp_open(const char *filename, int flags, int mode) |
---|
4666 | | -{ |
---|
4667 | | - return filp_open(filename, flags, mode); |
---|
4668 | | -} |
---|
4669 | | - |
---|
4670 | | -static INLINE int dhd_filp_close(void *image, void *id) |
---|
4671 | | -{ |
---|
4672 | | - return filp_close((struct file *)image, id); |
---|
4673 | | -} |
---|
4674 | | - |
---|
4675 | | -static INLINE int dhd_i_size_read(const struct inode *inode) |
---|
4676 | | -{ |
---|
4677 | | - return i_size_read(inode); |
---|
4678 | | -} |
---|
4679 | | - |
---|
4680 | | -static INLINE int dhd_kernel_read_compat(struct file *fp, loff_t pos, void *buf, size_t count) |
---|
4681 | | -{ |
---|
4682 | | - return kernel_read_compat(fp, pos, buf, count); |
---|
4683 | | -} |
---|
4684 | | - |
---|
4685 | | -static INLINE int dhd_vfs_read(struct file *filep, char *buf, size_t size, loff_t *pos) |
---|
4686 | | -{ |
---|
4687 | | - return vfs_read(filep, buf, size, pos); |
---|
4688 | | -} |
---|
4689 | | - |
---|
4690 | | -static INLINE int dhd_vfs_write(struct file *filep, char *buf, size_t size, loff_t *pos) |
---|
4691 | | -{ |
---|
4692 | | - return vfs_write(filep, buf, size, pos); |
---|
4693 | | -} |
---|
4694 | | - |
---|
4695 | | -static INLINE int dhd_vfs_fsync(struct file *filep, int datasync) |
---|
4696 | | -{ |
---|
4697 | | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)) |
---|
4698 | | - return vfs_fsync(filep, datasync); |
---|
4699 | | -#else |
---|
4700 | | - return vfs_fsync(filep, filep->f_path.dentry, 0); |
---|
4701 | | -#endif |
---|
4702 | | -} |
---|
4703 | | - |
---|
4704 | | -static INLINE int dhd_vfs_stat(char *buf, struct kstat *stat) |
---|
4705 | | -{ |
---|
4706 | | - return vfs_stat(buf, stat); |
---|
4707 | | -} |
---|
4708 | | - |
---|
4709 | | -static INLINE int dhd_kern_path(char *name, int flags, struct path *file_path) |
---|
4710 | | -{ |
---|
4711 | | - return kern_path(name, flags, file_path); |
---|
4712 | | -} |
---|
4713 | | - |
---|
4714 | | -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)) |
---|
4715 | | -#define DHD_VFS_INODE(dir) (dir->d_inode) |
---|
4716 | | -#else |
---|
4717 | | -#define DHD_VFS_INODE(dir) d_inode(dir) |
---|
4718 | | -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) */ |
---|
4719 | | - |
---|
4720 | | -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)) |
---|
4721 | | -#define DHD_VFS_UNLINK(dir, b, c) vfs_unlink(DHD_VFS_INODE(dir), b) |
---|
4722 | | -#else |
---|
4723 | | -#define DHD_VFS_UNLINK(dir, b, c) vfs_unlink(DHD_VFS_INODE(dir), b, c) |
---|
4724 | | -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) */ |
---|
4725 | | - |
---|
4726 | | -#else |
---|
4727 | | -#define DHD_VFS_UNLINK(dir, b, c) 0 |
---|
4728 | | - |
---|
4729 | | -static INLINE struct file *dhd_filp_open(const char *filename, int flags, int mode) |
---|
4730 | | - { printf("%s: DHD_SUPPORT_VFS_CALL not defined\n", __FUNCTION__); return NULL; } |
---|
4731 | | -static INLINE int dhd_filp_close(void *image, void *id) |
---|
4732 | | - { return 0; } |
---|
4733 | | -static INLINE int dhd_i_size_read(const struct inode *inode) |
---|
4734 | | - { return 0; } |
---|
4735 | | -static INLINE int dhd_kernel_read_compat(struct file *fp, loff_t pos, void *buf, size_t count) |
---|
4736 | | - { return 0; } |
---|
4737 | | -static INLINE int dhd_vfs_read(struct file *filep, char *buf, size_t size, loff_t *pos) |
---|
4738 | | - { return 0; } |
---|
4739 | | -static INLINE int dhd_vfs_write(struct file *filep, char *buf, size_t size, loff_t *pos) |
---|
4740 | | - { return 0; } |
---|
4741 | | -static INLINE int dhd_vfs_fsync(struct file *filep, int datasync) |
---|
4742 | | - { return 0; } |
---|
4743 | | -static INLINE int dhd_vfs_stat(char *buf, struct kstat *stat) |
---|
4744 | | - { return 0; } |
---|
4745 | | -static INLINE int dhd_kern_path(char *name, int flags, struct path *file_path) |
---|
4746 | | - { return 0; } |
---|
4747 | | -#endif /* DHD_SUPPORT_VFS_CALL */ |
---|
4748 | | -#endif /* __linux__ */ |
---|
4749 | | - |
---|
4750 | 4653 | #ifdef WL_MONITOR |
---|
4751 | 4654 | void dhd_set_monitor(dhd_pub_t *pub, int ifidx, int val); |
---|
4752 | 4655 | #endif /* WL_MONITOR */ |
---|