Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1227)

Side by Side Diff: drivers/staging/brcm80211/brcmfmac/dhd.h

Issue 6802002: drivers/staging/brcm80211: Fix for suspend/resume bug (Closed) Base URL: http://git.chromium.org/git/kernel-next.git@chromeos-2.6.37
Patch Set: Fixed review comments Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
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_ */
OLDNEW
« no previous file with comments | « drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c ('k') | drivers/staging/brcm80211/brcmfmac/dhd_linux.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698