diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-20 13:30:31 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-20 13:30:31 -0500 |
| commit | c7cace6437b2f8bbab5ef05b465738283a9a100a (patch) | |
| tree | 304a7dca0354eaa8ac21aa05cd287e317fa21b8c /drivers/net/starfire.c | |
| parent | a90779bfc83b7489270a8ce2c3fc9df20dac2b24 (diff) | |
| parent | 2e9ff56efbc005ab2b92b68df65940c7459446c6 (diff) | |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (150 commits)
[PATCH] ipw2100: Update version ipw2100 stamp to 1.2.2
[PATCH] ipw2100: move mutex.h include from ipw2100.c to ipw2100.h
[PATCH] ipw2100: semaphore to mutexes conversion
[PATCH] ipw2100: Fix radiotap code gcc warning
[PATCH] ipw2100: add radiotap headers to packtes captured in monitor mode
[PATCH] ipw2x00: expend Copyright to 2006
[PATCH] drivers/net/wireless/ipw2200.c: fix an array overun
[PATCH] ieee80211: Don't update network statistics from off-channel packets.
[PATCH] ipw2200: Update ipw2200 version stamp to 1.1.1
[PATCH] ipw2200: switch to the new ipw2200-fw-3.0 image format
[PATCH] ipw2200: wireless extension sensitivity threshold support
[PATCH] ipw2200: Enables the "slow diversity" algorithm
[PATCH] ipw2200: Set a meaningful silence threshold value
[PATCH] ipw2200: export `debug' module param only if CONFIG_IPW2200_DEBUG
[PATCH] ipw2200: Change debug level for firmware error logging
[PATCH] ipw2200: Filter unsupported channels out in ad-hoc mode
[PATCH] ipw2200: Fix ipw_sw_reset() implementation inconsistent with comment
[PATCH] ipw2200: Fix rf_kill is activated after mode change with 'disable=1'
[PATCH] ipw2200: remove the WPA card associates to non-WPA AP checking
[PATCH] ipw2200: Add signal level to iwlist scan output
...
Diffstat (limited to 'drivers/net/starfire.c')
| -rw-r--r-- | drivers/net/starfire.c | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index d167deda9a53..35b18057fbdd 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
| @@ -201,7 +201,7 @@ static int max_interrupt_work = 20; | |||
| 201 | static int mtu; | 201 | static int mtu; |
| 202 | /* Maximum number of multicast addresses to filter (vs. rx-all-multicast). | 202 | /* Maximum number of multicast addresses to filter (vs. rx-all-multicast). |
| 203 | The Starfire has a 512 element hash table based on the Ethernet CRC. */ | 203 | The Starfire has a 512 element hash table based on the Ethernet CRC. */ |
| 204 | static int multicast_filter_limit = 512; | 204 | static const int multicast_filter_limit = 512; |
| 205 | /* Whether to do TCP/UDP checksums in hardware */ | 205 | /* Whether to do TCP/UDP checksums in hardware */ |
| 206 | static int enable_hw_cksum = 1; | 206 | static int enable_hw_cksum = 1; |
| 207 | 207 | ||
| @@ -463,7 +463,7 @@ static struct pci_device_id starfire_pci_tbl[] = { | |||
| 463 | MODULE_DEVICE_TABLE(pci, starfire_pci_tbl); | 463 | MODULE_DEVICE_TABLE(pci, starfire_pci_tbl); |
| 464 | 464 | ||
| 465 | /* A chip capabilities table, matching the CH_xxx entries in xxx_pci_tbl[] above. */ | 465 | /* A chip capabilities table, matching the CH_xxx entries in xxx_pci_tbl[] above. */ |
| 466 | static struct chip_info { | 466 | static const struct chip_info { |
| 467 | const char *name; | 467 | const char *name; |
| 468 | int drv_flags; | 468 | int drv_flags; |
| 469 | } netdrv_tbl[] __devinitdata = { | 469 | } netdrv_tbl[] __devinitdata = { |
| @@ -2084,6 +2084,38 @@ static int netdev_close(struct net_device *dev) | |||
| 2084 | return 0; | 2084 | return 0; |
| 2085 | } | 2085 | } |
| 2086 | 2086 | ||
| 2087 | #ifdef CONFIG_PM | ||
| 2088 | static int starfire_suspend(struct pci_dev *pdev, pm_message_t state) | ||
| 2089 | { | ||
| 2090 | struct net_device *dev = pci_get_drvdata(pdev); | ||
| 2091 | |||
| 2092 | if (netif_running(dev)) { | ||
| 2093 | netif_device_detach(dev); | ||
| 2094 | netdev_close(dev); | ||
| 2095 | } | ||
| 2096 | |||
| 2097 | pci_save_state(pdev); | ||
| 2098 | pci_set_power_state(pdev, pci_choose_state(pdev,state)); | ||
| 2099 | |||
| 2100 | return 0; | ||
| 2101 | } | ||
| 2102 | |||
| 2103 | static int starfire_resume(struct pci_dev *pdev) | ||
| 2104 | { | ||
| 2105 | struct net_device *dev = pci_get_drvdata(pdev); | ||
| 2106 | |||
| 2107 | pci_set_power_state(pdev, PCI_D0); | ||
| 2108 | pci_restore_state(pdev); | ||
| 2109 | |||
| 2110 | if (netif_running(dev)) { | ||
| 2111 | netdev_open(dev); | ||
| 2112 | netif_device_attach(dev); | ||
| 2113 | } | ||
| 2114 | |||
| 2115 | return 0; | ||
| 2116 | } | ||
| 2117 | #endif /* CONFIG_PM */ | ||
| 2118 | |||
| 2087 | 2119 | ||
| 2088 | static void __devexit starfire_remove_one (struct pci_dev *pdev) | 2120 | static void __devexit starfire_remove_one (struct pci_dev *pdev) |
| 2089 | { | 2121 | { |
| @@ -2115,6 +2147,10 @@ static struct pci_driver starfire_driver = { | |||
| 2115 | .name = DRV_NAME, | 2147 | .name = DRV_NAME, |
| 2116 | .probe = starfire_init_one, | 2148 | .probe = starfire_init_one, |
| 2117 | .remove = __devexit_p(starfire_remove_one), | 2149 | .remove = __devexit_p(starfire_remove_one), |
| 2150 | #ifdef CONFIG_PM | ||
| 2151 | .suspend = starfire_suspend, | ||
| 2152 | .resume = starfire_resume, | ||
| 2153 | #endif /* CONFIG_PM */ | ||
| 2118 | .id_table = starfire_pci_tbl, | 2154 | .id_table = starfire_pci_tbl, |
| 2119 | }; | 2155 | }; |
| 2120 | 2156 | ||
