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

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: 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 22 matching lines...) Expand all
33 #include <linux/etherdevice.h> 33 #include <linux/etherdevice.h>
34 #include <linux/wireless.h> 34 #include <linux/wireless.h>
35 #include <linux/ieee80211.h> 35 #include <linux/ieee80211.h>
36 #include <net/cfg80211.h> 36 #include <net/cfg80211.h>
37 37
38 #include <net/rtnetlink.h> 38 #include <net/rtnetlink.h>
39 #include <linux/mmc/sdio_func.h> 39 #include <linux/mmc/sdio_func.h>
40 #include <linux/firmware.h> 40 #include <linux/firmware.h>
41 #include <wl_cfg80211.h> 41 #include <wl_cfg80211.h>
42 42
43 #if defined(CONFIG_PM_SLEEP)
44 extern volatile bool dhd_mmc_suspend;
ggg 2011/04/07 20:28:58 I think dhd_mmc_suspend prototype belongs in brcmf
45 #endif /* defined(CONFIG_PM_SLEEP) */
46
43 void sdioh_sdio_set_host_pm_flags(int flag); 47 void sdioh_sdio_set_host_pm_flags(int flag);
44 48
45 static struct sdio_func *cfg80211_sdio_func; 49 static struct sdio_func *cfg80211_sdio_func;
46 static struct wl_dev *wl_cfg80211_dev; 50 static struct wl_dev *wl_cfg80211_dev;
47 static const u8 ether_bcast[ETH_ALEN] = {255, 255, 255, 255, 255, 255}; 51 static const u8 ether_bcast[ETH_ALEN] = {255, 255, 255, 255, 255, 255};
48 52
49 u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_INFO; 53 u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_INFO;
50 54
51 #define WL_4329_FW_FILE "brcm/bcm4329-fullmac-4.bin" 55 #define WL_4329_FW_FILE "brcm/bcm4329-fullmac-4.bin"
52 #define WL_4329_NVRAM_FILE "brcm/bcm4329-fullmac-4.txt" 56 #define WL_4329_NVRAM_FILE "brcm/bcm4329-fullmac-4.txt"
(...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 WL_ERR("could not set fixed rate (%d) (%d)\n", err_bg, err_a); 1964 WL_ERR("could not set fixed rate (%d) (%d)\n", err_bg, err_a);
1961 return err_bg | err_a; 1965 return err_bg | err_a;
1962 } 1966 }
1963 1967
1964 return err; 1968 return err;
1965 } 1969 }
1966 1970
1967 static s32 wl_cfg80211_resume(struct wiphy *wiphy) 1971 static s32 wl_cfg80211_resume(struct wiphy *wiphy)
1968 { 1972 {
1969 s32 err = 0; 1973 s32 err = 0;
1970 1974 »
1975 #if defined(CONFIG_PM_SLEEP)
1976 » dhd_mmc_suspend = false;
1977 #endif» /* defined(CONFIG_PM_SLEEP) */
1971 CHECK_SYS_UP(); 1978 CHECK_SYS_UP();
1972 wl_invoke_iscan(wiphy_to_wl(wiphy)); 1979 wl_invoke_iscan(wiphy_to_wl(wiphy));
1973 1980
1974 return err; 1981 return err;
1975 } 1982 }
1976 1983
1977 static s32 wl_cfg80211_suspend(struct wiphy *wiphy) 1984 static s32 wl_cfg80211_suspend(struct wiphy *wiphy)
1978 { 1985 {
1979 struct wl_priv *wl = wiphy_to_wl(wiphy); 1986 struct wl_priv *wl = wiphy_to_wl(wiphy);
1980 struct net_device *ndev = wl_to_ndev(wl); 1987 struct net_device *ndev = wl_to_ndev(wl);
1981 s32 err = 0; 1988 s32 err = 0;
1982 1989
1983 set_bit(WL_STATUS_SCAN_ABORTING, &wl->status); 1990 set_bit(WL_STATUS_SCAN_ABORTING, &wl->status);
1984 wl_term_iscan(wl); 1991 wl_term_iscan(wl);
1985 if (wl->scan_request) { 1992 if (wl->scan_request) {
1986 cfg80211_scan_done(wl->scan_request, true); /* true means 1993 cfg80211_scan_done(wl->scan_request, true); /* true means
1987 abort */ 1994 abort */
1988 wl_set_mpc(ndev, 1); 1995 wl_set_mpc(ndev, 1);
1989 wl->scan_request = NULL; 1996 wl->scan_request = NULL;
1990 } 1997 }
1991 clear_bit(WL_STATUS_SCANNING, &wl->status); 1998 clear_bit(WL_STATUS_SCANNING, &wl->status);
1992 clear_bit(WL_STATUS_SCAN_ABORTING, &wl->status); 1999 clear_bit(WL_STATUS_SCAN_ABORTING, &wl->status);
1993 2000
1994 sdioh_sdio_set_host_pm_flags(MMC_PM_KEEP_POWER); 2001 sdioh_sdio_set_host_pm_flags(MMC_PM_KEEP_POWER);
1995 2002
1996 » return err; 2003 #if defined(CONFIG_PM_SLEEP)
2004 » dhd_mmc_suspend = true;
2005 #endif» /* defined(CONFIG_PM_SLEEP) */
2006 » return err;
1997 } 2007 }
1998 2008
1999 static __used s32 2009 static __used s32
2000 wl_update_pmklist(struct net_device *dev, struct wl_pmk_list *pmk_list, 2010 wl_update_pmklist(struct net_device *dev, struct wl_pmk_list *pmk_list,
2001 s32 err) 2011 s32 err)
2002 { 2012 {
2003 int i, j; 2013 int i, j;
2004 2014
2005 WL_DBG("No of elements %d\n", pmk_list->pmkids.npmkid); 2015 WL_DBG("No of elements %d\n", pmk_list->pmkids.npmkid);
2006 for (i = 0; i < pmk_list->pmkids.npmkid; i++) { 2016 for (i = 0; i < pmk_list->pmkids.npmkid; i++) {
(...skipping 2209 matching lines...) Expand 10 before | Expand all | Expand 10 after
4216 4226
4217 err_out: 4227 err_out:
4218 return err; 4228 return err;
4219 } 4229 }
4220 4230
4221 static void wl_debugfs_remove_netdev(struct wl_priv *wl) 4231 static void wl_debugfs_remove_netdev(struct wl_priv *wl)
4222 { 4232 {
4223 debugfs_remove_recursive(wl->debugfsdir); 4233 debugfs_remove_recursive(wl->debugfsdir);
4224 wl->debugfsdir = NULL; 4234 wl->debugfsdir = NULL;
4225 } 4235 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698