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 23 matching lines...) Expand all Loading... |
34 #include <linux/etherdevice.h> | 34 #include <linux/etherdevice.h> |
35 #include <linux/wireless.h> | 35 #include <linux/wireless.h> |
36 #include <linux/ieee80211.h> | 36 #include <linux/ieee80211.h> |
37 #include <net/cfg80211.h> | 37 #include <net/cfg80211.h> |
38 | 38 |
39 #include <net/rtnetlink.h> | 39 #include <net/rtnetlink.h> |
40 #include <linux/mmc/sdio_func.h> | 40 #include <linux/mmc/sdio_func.h> |
41 #include <linux/firmware.h> | 41 #include <linux/firmware.h> |
42 #include <wl_cfg80211.h> | 42 #include <wl_cfg80211.h> |
43 | 43 |
| 44 void sdioh_sdio_set_host_pm_flags(int flag); |
| 45 |
44 static struct sdio_func *cfg80211_sdio_func; | 46 static struct sdio_func *cfg80211_sdio_func; |
45 static struct wl_dev *wl_cfg80211_dev; | 47 static struct wl_dev *wl_cfg80211_dev; |
46 static const u8 ether_bcast[ETH_ALEN] = {255, 255, 255, 255, 255, 255}; | 48 static const u8 ether_bcast[ETH_ALEN] = {255, 255, 255, 255, 255, 255}; |
47 | 49 |
48 u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_INFO; | 50 u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_INFO; |
49 | 51 |
50 #define WL_4329_FW_FILE "brcm/bcm4329-fullmac-4.bin" | 52 #define WL_4329_FW_FILE "brcm/bcm4329-fullmac-4.bin" |
51 #define WL_4329_NVRAM_FILE "brcm/bcm4329-fullmac-4.txt" | 53 #define WL_4329_NVRAM_FILE "brcm/bcm4329-fullmac-4.txt" |
52 | 54 |
53 /* | 55 /* |
(...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1972 | 1974 |
1973 return err; | 1975 return err; |
1974 } | 1976 } |
1975 | 1977 |
1976 static s32 wl_cfg80211_suspend(struct wiphy *wiphy) | 1978 static s32 wl_cfg80211_suspend(struct wiphy *wiphy) |
1977 { | 1979 { |
1978 struct wl_priv *wl = wiphy_to_wl(wiphy); | 1980 struct wl_priv *wl = wiphy_to_wl(wiphy); |
1979 struct net_device *ndev = wl_to_ndev(wl); | 1981 struct net_device *ndev = wl_to_ndev(wl); |
1980 s32 err = 0; | 1982 s32 err = 0; |
1981 | 1983 |
1982 CHECK_SYS_UP(); | |
1983 | |
1984 set_bit(WL_STATUS_SCAN_ABORTING, &wl->status); | 1984 set_bit(WL_STATUS_SCAN_ABORTING, &wl->status); |
1985 wl_term_iscan(wl); | 1985 wl_term_iscan(wl); |
1986 if (wl->scan_request) { | 1986 if (wl->scan_request) { |
1987 cfg80211_scan_done(wl->scan_request, true); /* true means | 1987 cfg80211_scan_done(wl->scan_request, true); /* true means |
1988 abort */ | 1988 abort */ |
1989 wl_set_mpc(ndev, 1); | 1989 wl_set_mpc(ndev, 1); |
1990 wl->scan_request = NULL; | 1990 wl->scan_request = NULL; |
1991 } | 1991 } |
1992 clear_bit(WL_STATUS_SCANNING, &wl->status); | 1992 clear_bit(WL_STATUS_SCANNING, &wl->status); |
1993 clear_bit(WL_STATUS_SCAN_ABORTING, &wl->status); | 1993 clear_bit(WL_STATUS_SCAN_ABORTING, &wl->status); |
1994 | 1994 |
| 1995 sdioh_sdio_set_host_pm_flags(MMC_PM_KEEP_POWER); |
| 1996 |
1995 return err; | 1997 return err; |
1996 } | 1998 } |
1997 | 1999 |
1998 static __used s32 | 2000 static __used s32 |
1999 wl_update_pmklist(struct net_device *dev, struct wl_pmk_list *pmk_list, | 2001 wl_update_pmklist(struct net_device *dev, struct wl_pmk_list *pmk_list, |
2000 s32 err) | 2002 s32 err) |
2001 { | 2003 { |
2002 int i, j; | 2004 int i, j; |
2003 | 2005 |
2004 WL_DBG("No of elements %d\n", pmk_list->pmkids.npmkid); | 2006 WL_DBG("No of elements %d\n", pmk_list->pmkids.npmkid); |
(...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4213 | 4215 |
4214 err_out: | 4216 err_out: |
4215 return err; | 4217 return err; |
4216 } | 4218 } |
4217 | 4219 |
4218 static void wl_debugfs_remove_netdev(struct wl_priv *wl) | 4220 static void wl_debugfs_remove_netdev(struct wl_priv *wl) |
4219 { | 4221 { |
4220 debugfs_remove_recursive(wl->debugfsdir); | 4222 debugfs_remove_recursive(wl->debugfsdir); |
4221 wl->debugfsdir = NULL; | 4223 wl->debugfsdir = NULL; |
4222 } | 4224 } |
OLD | NEW |