Chromium Code Reviews| 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 19 matching lines...) Expand all Loading... | |
| 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 <asm/uaccess.h> | 34 #include <asm/uaccess.h> |
| 35 #include <asm/unaligned.h> | 35 #include <asm/unaligned.h> |
| 36 /* The kernel threading is sdio-specific */ | 36 /* The kernel threading is sdio-specific */ |
| 37 | 37 |
| 38 #include <wlioctl.h> | 38 #include <wlioctl.h> |
| 39 | 39 |
| 40 #if defined(CONFIG_PM_SLEEP) | |
| 41 #include <linux/suspend.h> | |
| 42 #endif | |
|
Olof Johansson
2011/04/14 18:13:43
No need to ifdef the include.
| |
| 43 | |
| 40 /* Forward decls */ | 44 /* Forward decls */ |
| 41 struct dhd_bus; | 45 struct dhd_bus; |
| 42 struct dhd_prot; | 46 struct dhd_prot; |
| 43 struct dhd_info; | 47 struct dhd_info; |
| 44 | 48 |
| 45 /* The level of bus communication with the dongle */ | 49 /* The level of bus communication with the dongle */ |
| 46 enum dhd_bus_state { | 50 enum dhd_bus_state { |
| 47 DHD_BUS_DOWN, /* Not ready for frame transfers */ | 51 DHD_BUS_DOWN, /* Not ready for frame transfers */ |
| 48 DHD_BUS_LOAD, /* Download access only (CPU reset) */ | 52 DHD_BUS_LOAD, /* Download access only (CPU reset) */ |
| 49 DHD_BUS_DATA /* Ready for frame transfers */ | 53 DHD_BUS_DATA /* Ready for frame transfers */ |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 char *pktfilter[100]; | 121 char *pktfilter[100]; |
| 118 int pktfilter_count; | 122 int pktfilter_count; |
| 119 | 123 |
| 120 u8 country_code[WLC_CNTRY_BUF_SZ]; | 124 u8 country_code[WLC_CNTRY_BUF_SZ]; |
| 121 char eventmask[WL_EVENTING_MASK_LEN]; | 125 char eventmask[WL_EVENTING_MASK_LEN]; |
| 122 | 126 |
| 123 } dhd_pub_t; | 127 } dhd_pub_t; |
| 124 | 128 |
| 125 #if defined(CONFIG_PM_SLEEP) | 129 #if defined(CONFIG_PM_SLEEP) |
| 126 | 130 |
| 131 extern volatile bool dhd_mmc_suspend; | |
|
Olof Johansson
2011/04/14 18:13:43
Extern volatile? Huge red flags. Please move to an
| |
| 132 | |
| 127 #define DHD_PM_RESUME_WAIT_INIT(a) DECLARE_WAIT_QUEUE_HEAD(a); | 133 #define DHD_PM_RESUME_WAIT_INIT(a) DECLARE_WAIT_QUEUE_HEAD(a); |
| 128 #define _DHD_PM_RESUME_WAIT(a, b) do {\ | 134 #define _DHD_PM_RESUME_WAIT(a, b) do {\ |
| 129 int retry = 0; \ | 135 int retry = 0; \ |
| 130 while (dhd_mmc_suspend && retry++ != b) { \ | 136 while (dhd_mmc_suspend && retry++ != b) { \ |
| 131 wait_event_timeout(a, false, HZ/100); \ | 137 wait_event_timeout(a, false, HZ/100); \ |
| 132 } \ | 138 } \ |
| 133 } while (0) | 139 } while (0) |
| 134 #define DHD_PM_RESUME_WAIT(a) _DHD_PM_RESUME_WAIT(a, 30) | 140 #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) | 141 #define DHD_PM_RESUME_WAIT_FOREVER(a) _DHD_PM_RESUME_WAIT(a, ~0) |
| 136 #define DHD_PM_RESUME_RETURN_ERROR(a) \ | 142 #define DHD_PM_RESUME_RETURN_ERROR(a) \ |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 396 | 402 |
| 397 /* For supporting multiple interfaces */ | 403 /* For supporting multiple interfaces */ |
| 398 #define DHD_MAX_IFS 16 | 404 #define DHD_MAX_IFS 16 |
| 399 #define DHD_DEL_IF -0xe | 405 #define DHD_DEL_IF -0xe |
| 400 #define DHD_BAD_IF -0xf | 406 #define DHD_BAD_IF -0xf |
| 401 | 407 |
| 402 extern void dhd_wait_for_event(dhd_pub_t *dhd, bool * lockvar); | 408 extern void dhd_wait_for_event(dhd_pub_t *dhd, bool * lockvar); |
| 403 extern void dhd_wait_event_wakeup(dhd_pub_t *dhd); | 409 extern void dhd_wait_event_wakeup(dhd_pub_t *dhd); |
| 404 | 410 |
| 405 #endif /* _dhd_h_ */ | 411 #endif /* _dhd_h_ */ |
| OLD | NEW |