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

Side by Side Diff: drivers/staging/brcm80211/brcmfmac/wl_cfg80211.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: 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
« no previous file with comments | « drivers/staging/brcm80211/brcmfmac/dhd_linux.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 return err_bg | err_a; 1961 return err_bg | err_a;
1962 } 1962 }
1963 1963
1964 return err; 1964 return err;
1965 } 1965 }
1966 1966
1967 static s32 wl_cfg80211_resume(struct wiphy *wiphy) 1967 static s32 wl_cfg80211_resume(struct wiphy *wiphy)
1968 { 1968 {
1969 s32 err = 0; 1969 s32 err = 0;
1970 1970
1971 #if defined(CONFIG_PM_SLEEP)
1972 dhd_mmc_suspend = false;
1973 #endif /* defined(CONFIG_PM_SLEEP) */
1971 CHECK_SYS_UP(); 1974 CHECK_SYS_UP();
1972 wl_invoke_iscan(wiphy_to_wl(wiphy)); 1975 wl_invoke_iscan(wiphy_to_wl(wiphy));
1973 1976
1974 return err; 1977 return err;
1975 } 1978 }
1976 1979
1977 static s32 wl_cfg80211_suspend(struct wiphy *wiphy) 1980 static s32 wl_cfg80211_suspend(struct wiphy *wiphy)
1978 { 1981 {
1979 struct wl_priv *wl = wiphy_to_wl(wiphy); 1982 struct wl_priv *wl = wiphy_to_wl(wiphy);
1980 struct net_device *ndev = wl_to_ndev(wl); 1983 struct net_device *ndev = wl_to_ndev(wl);
1981 s32 err = 0; 1984 s32 err = 0;
1982 1985
1983 set_bit(WL_STATUS_SCAN_ABORTING, &wl->status); 1986 set_bit(WL_STATUS_SCAN_ABORTING, &wl->status);
1984 wl_term_iscan(wl); 1987 wl_term_iscan(wl);
1985 if (wl->scan_request) { 1988 if (wl->scan_request) {
1986 cfg80211_scan_done(wl->scan_request, true); /* true means 1989 cfg80211_scan_done(wl->scan_request, true); /* true means
1987 abort */ 1990 abort */
1988 wl_set_mpc(ndev, 1); 1991 wl_set_mpc(ndev, 1);
1989 wl->scan_request = NULL; 1992 wl->scan_request = NULL;
1990 } 1993 }
1991 clear_bit(WL_STATUS_SCANNING, &wl->status); 1994 clear_bit(WL_STATUS_SCANNING, &wl->status);
1992 clear_bit(WL_STATUS_SCAN_ABORTING, &wl->status); 1995 clear_bit(WL_STATUS_SCAN_ABORTING, &wl->status);
1993 1996
1994 sdioh_sdio_set_host_pm_flags(MMC_PM_KEEP_POWER); 1997 sdioh_sdio_set_host_pm_flags(MMC_PM_KEEP_POWER);
1995 1998
1996 » return err; 1999 #if defined(CONFIG_PM_SLEEP)
2000 » dhd_mmc_suspend = true;
2001 #endif» /* defined(CONFIG_PM_SLEEP) */
2002 » return err;
1997 } 2003 }
1998 2004
1999 static __used s32 2005 static __used s32
2000 wl_update_pmklist(struct net_device *dev, struct wl_pmk_list *pmk_list, 2006 wl_update_pmklist(struct net_device *dev, struct wl_pmk_list *pmk_list,
2001 s32 err) 2007 s32 err)
2002 { 2008 {
2003 int i, j; 2009 int i, j;
2004 2010
2005 WL_DBG("No of elements %d\n", pmk_list->pmkids.npmkid); 2011 WL_DBG("No of elements %d\n", pmk_list->pmkids.npmkid);
2006 for (i = 0; i < pmk_list->pmkids.npmkid; i++) { 2012 for (i = 0; i < pmk_list->pmkids.npmkid; i++) {
(...skipping 2209 matching lines...) Expand 10 before | Expand all | Expand 10 after
4216 4222
4217 err_out: 4223 err_out:
4218 return err; 4224 return err;
4219 } 4225 }
4220 4226
4221 static void wl_debugfs_remove_netdev(struct wl_priv *wl) 4227 static void wl_debugfs_remove_netdev(struct wl_priv *wl)
4222 { 4228 {
4223 debugfs_remove_recursive(wl->debugfsdir); 4229 debugfs_remove_recursive(wl->debugfsdir);
4224 wl->debugfsdir = NULL; 4230 wl->debugfsdir = NULL;
4225 } 4231 }
OLDNEW
« no previous file with comments | « drivers/staging/brcm80211/brcmfmac/dhd_linux.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698