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