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

Side by Side Diff: drivers/staging/brcm80211/brcmfmac/dhd_linux.c

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: 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 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 2081
2082 /* 2082 /*
2083 * Save the dhd_info into the priv 2083 * Save the dhd_info into the priv
2084 */ 2084 */
2085 memcpy(netdev_priv(net), &dhd, sizeof(dhd)); 2085 memcpy(netdev_priv(net), &dhd, sizeof(dhd));
2086 2086
2087 #if defined(CUSTOMER_HW2) && defined(CONFIG_WIFI_CONTROL_FUNC) 2087 #if defined(CUSTOMER_HW2) && defined(CONFIG_WIFI_CONTROL_FUNC)
2088 g_bus = bus; 2088 g_bus = bus;
2089 #endif 2089 #endif
2090 #if defined(CONFIG_PM_SLEEP) 2090 #if defined(CONFIG_PM_SLEEP)
2091 » register_pm_notifier(&dhd_sleep_pm_notifier); 2091 » if (!IS_CFG80211_FAVORITE())
ggg 2011/04/07 20:28:58 #define FAVORITE_WIFI_CP (!!dhd_cfg80211) #define
2092 » {
2093 » » register_pm_notifier(&dhd_sleep_pm_notifier);
2094 » }
2092 #endif /* defined(CONFIG_PM_SLEEP) */ 2095 #endif /* defined(CONFIG_PM_SLEEP) */
2093 /* && defined(DHD_GPL) */ 2096 /* && defined(DHD_GPL) */
2094 /* Init lock suspend to prevent kernel going to suspend */ 2097 /* Init lock suspend to prevent kernel going to suspend */
2095 #ifdef CONFIG_HAS_EARLYSUSPEND 2098 #ifdef CONFIG_HAS_EARLYSUSPEND
2096 dhd->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 20; 2099 dhd->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 20;
2097 dhd->early_suspend.suspend = dhd_early_suspend; 2100 dhd->early_suspend.suspend = dhd_early_suspend;
2098 dhd->early_suspend.resume = dhd_late_resume; 2101 dhd->early_suspend.resume = dhd_late_resume;
2099 register_early_suspend(&dhd->early_suspend); 2102 register_early_suspend(&dhd->early_suspend);
2100 #endif 2103 #endif
2101 2104
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2387 dhd_prot_detach(dhdp); 2390 dhd_prot_detach(dhdp);
2388 2391
2389 #if defined(CONFIG_WIRELESS_EXT) 2392 #if defined(CONFIG_WIRELESS_EXT)
2390 wl_iw_detach(); 2393 wl_iw_detach();
2391 #endif /* (CONFIG_WIRELESS_EXT) */ 2394 #endif /* (CONFIG_WIRELESS_EXT) */
2392 2395
2393 if (IS_CFG80211_FAVORITE()) 2396 if (IS_CFG80211_FAVORITE())
2394 wl_cfg80211_detach(); 2397 wl_cfg80211_detach();
2395 2398
2396 #if defined(CONFIG_PM_SLEEP) 2399 #if defined(CONFIG_PM_SLEEP)
2397 » » » unregister_pm_notifier(&dhd_sleep_pm_notifier); 2400 » » » if (!IS_CFG80211_FAVORITE())
2401 » » » {
2402 » » » » unregister_pm_notifier(&dhd_sleep_pm_notifier);
2403 » » » }
2398 #endif /* defined(CONFIG_PM_SLEEP) */ 2404 #endif /* defined(CONFIG_PM_SLEEP) */
2399 /* && defined(DHD_GPL) */ 2405 /* && defined(DHD_GPL) */
2400 free_netdev(ifp->net); 2406 free_netdev(ifp->net);
2401 kfree(ifp); 2407 kfree(ifp);
2402 kfree(dhd); 2408 kfree(dhd);
2403 } 2409 }
2404 } 2410 }
2405 } 2411 }
2406 2412
2407 static void __exit dhd_module_cleanup(void) 2413 static void __exit dhd_module_cleanup(void)
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 kfree(buf); 2954 kfree(buf);
2949 /* close file before return */ 2955 /* close file before return */
2950 if (fp) 2956 if (fp)
2951 filp_close(fp, current->files); 2957 filp_close(fp, current->files);
2952 /* restore previous address limit */ 2958 /* restore previous address limit */
2953 set_fs(old_fs); 2959 set_fs(old_fs);
2954 2960
2955 return ret; 2961 return ret;
2956 } 2962 }
2957 #endif /* DHD_DEBUG */ 2963 #endif /* DHD_DEBUG */
OLDNEW
« no previous file with comments | « no previous file | drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c » ('j') | drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698