OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 Broadcom Corporation | 2 * Copyright (c) 2010 Broadcom Corporation |
3 * | 3 * |
4 * Permission to use, copy, modify, and/or distribute this software for any | 4 * Permission to use, copy, modify, and/or distribute this software for any |
5 * purpose with or without fee is hereby granted, provided that the above | 5 * purpose with or without fee is hereby granted, provided that the above |
6 * copyright notice and this permission notice appear in all copies. | 6 * copyright notice and this permission notice appear in all copies. |
7 * | 7 * |
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include <linux/sched.h> | 24 #include <linux/sched.h> |
25 #include <linux/init.h> | 25 #include <linux/init.h> |
26 #include <linux/kernel.h> | 26 #include <linux/kernel.h> |
27 #include <linux/slab.h> | 27 #include <linux/slab.h> |
28 #include <linux/skbuff.h> | 28 #include <linux/skbuff.h> |
29 #include <linux/netdevice.h> | 29 #include <linux/netdevice.h> |
30 #include <linux/etherdevice.h> | 30 #include <linux/etherdevice.h> |
31 #include <linux/random.h> | 31 #include <linux/random.h> |
32 #include <linux/spinlock.h> | 32 #include <linux/spinlock.h> |
33 #include <linux/ethtool.h> | 33 #include <linux/ethtool.h> |
| 34 #include <linux/suspend.h> |
34 #include <asm/uaccess.h> | 35 #include <asm/uaccess.h> |
35 #include <asm/unaligned.h> | 36 #include <asm/unaligned.h> |
36 /* The kernel threading is sdio-specific */ | 37 /* The kernel threading is sdio-specific */ |
37 | 38 |
38 #include <wlioctl.h> | 39 #include <wlioctl.h> |
39 | 40 |
40 /* Forward decls */ | 41 /* Forward decls */ |
41 struct dhd_bus; | 42 struct dhd_bus; |
42 struct dhd_prot; | 43 struct dhd_prot; |
43 struct dhd_info; | 44 struct dhd_info; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 char *pktfilter[100]; | 118 char *pktfilter[100]; |
118 int pktfilter_count; | 119 int pktfilter_count; |
119 | 120 |
120 u8 country_code[WLC_CNTRY_BUF_SZ]; | 121 u8 country_code[WLC_CNTRY_BUF_SZ]; |
121 char eventmask[WL_EVENTING_MASK_LEN]; | 122 char eventmask[WL_EVENTING_MASK_LEN]; |
122 | 123 |
123 } dhd_pub_t; | 124 } dhd_pub_t; |
124 | 125 |
125 #if defined(CONFIG_PM_SLEEP) | 126 #if defined(CONFIG_PM_SLEEP) |
126 | 127 |
| 128 extern volatile bool dhd_mmc_suspend; |
| 129 |
127 #define DHD_PM_RESUME_WAIT_INIT(a) DECLARE_WAIT_QUEUE_HEAD(a); | 130 #define DHD_PM_RESUME_WAIT_INIT(a) DECLARE_WAIT_QUEUE_HEAD(a); |
128 #define _DHD_PM_RESUME_WAIT(a, b) do {\ | 131 #define _DHD_PM_RESUME_WAIT(a, b) do {\ |
129 int retry = 0; \ | 132 int retry = 0; \ |
130 while (dhd_mmc_suspend && retry++ != b) { \ | 133 while (dhd_mmc_suspend && retry++ != b) { \ |
131 wait_event_timeout(a, false, HZ/100); \ | 134 wait_event_timeout(a, false, HZ/100); \ |
132 } \ | 135 } \ |
133 } while (0) | 136 } while (0) |
134 #define DHD_PM_RESUME_WAIT(a) _DHD_PM_RESUME_WAIT(a, 30) | 137 #define DHD_PM_RESUME_WAIT(a) _DHD_PM_RESUME_WAIT(a, 30) |
135 #define DHD_PM_RESUME_WAIT_FOREVER(a) _DHD_PM_RESUME_WAIT(a, ~0) | 138 #define DHD_PM_RESUME_WAIT_FOREVER(a) _DHD_PM_RESUME_WAIT(a, ~0) |
136 #define DHD_PM_RESUME_RETURN_ERROR(a) \ | 139 #define DHD_PM_RESUME_RETURN_ERROR(a) \ |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 | 399 |
397 /* For supporting multiple interfaces */ | 400 /* For supporting multiple interfaces */ |
398 #define DHD_MAX_IFS 16 | 401 #define DHD_MAX_IFS 16 |
399 #define DHD_DEL_IF -0xe | 402 #define DHD_DEL_IF -0xe |
400 #define DHD_BAD_IF -0xf | 403 #define DHD_BAD_IF -0xf |
401 | 404 |
402 extern void dhd_wait_for_event(dhd_pub_t *dhd, bool * lockvar); | 405 extern void dhd_wait_for_event(dhd_pub_t *dhd, bool * lockvar); |
403 extern void dhd_wait_event_wakeup(dhd_pub_t *dhd); | 406 extern void dhd_wait_event_wakeup(dhd_pub_t *dhd); |
404 | 407 |
405 #endif /* _dhd_h_ */ | 408 #endif /* _dhd_h_ */ |
OLD | NEW |