diff options
Diffstat (limited to 'drivers/net/wireless/bcm43xx/bcm43xx_main.c')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 7776b5c42ac7..a94c6d8826f8 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -2925,10 +2925,13 @@ static int bcm43xx_wireless_core_init(struct bcm43xx_private *bcm, | |||
2925 | bcm43xx_write16(bcm, 0x043C, 0x000C); | 2925 | bcm43xx_write16(bcm, 0x043C, 0x000C); |
2926 | 2926 | ||
2927 | if (active_wlcore) { | 2927 | if (active_wlcore) { |
2928 | if (bcm43xx_using_pio(bcm)) | 2928 | if (bcm43xx_using_pio(bcm)) { |
2929 | err = bcm43xx_pio_init(bcm); | 2929 | err = bcm43xx_pio_init(bcm); |
2930 | else | 2930 | } else { |
2931 | err = bcm43xx_dma_init(bcm); | 2931 | err = bcm43xx_dma_init(bcm); |
2932 | if (err == -ENOSYS) | ||
2933 | err = bcm43xx_pio_init(bcm); | ||
2934 | } | ||
2932 | if (err) | 2935 | if (err) |
2933 | goto err_chip_cleanup; | 2936 | goto err_chip_cleanup; |
2934 | } | 2937 | } |
@@ -3992,8 +3995,6 @@ static int bcm43xx_init_private(struct bcm43xx_private *bcm, | |||
3992 | struct net_device *net_dev, | 3995 | struct net_device *net_dev, |
3993 | struct pci_dev *pci_dev) | 3996 | struct pci_dev *pci_dev) |
3994 | { | 3997 | { |
3995 | int err; | ||
3996 | |||
3997 | bcm43xx_set_status(bcm, BCM43xx_STAT_UNINIT); | 3998 | bcm43xx_set_status(bcm, BCM43xx_STAT_UNINIT); |
3998 | bcm->ieee = netdev_priv(net_dev); | 3999 | bcm->ieee = netdev_priv(net_dev); |
3999 | bcm->softmac = ieee80211_priv(net_dev); | 4000 | bcm->softmac = ieee80211_priv(net_dev); |
@@ -4011,22 +4012,8 @@ static int bcm43xx_init_private(struct bcm43xx_private *bcm, | |||
4011 | (void (*)(unsigned long))bcm43xx_interrupt_tasklet, | 4012 | (void (*)(unsigned long))bcm43xx_interrupt_tasklet, |
4012 | (unsigned long)bcm); | 4013 | (unsigned long)bcm); |
4013 | tasklet_disable_nosync(&bcm->isr_tasklet); | 4014 | tasklet_disable_nosync(&bcm->isr_tasklet); |
4014 | if (modparam_pio) { | 4015 | if (modparam_pio) |
4015 | bcm->__using_pio = 1; | 4016 | bcm->__using_pio = 1; |
4016 | } else { | ||
4017 | err = pci_set_dma_mask(pci_dev, DMA_30BIT_MASK); | ||
4018 | err |= pci_set_consistent_dma_mask(pci_dev, DMA_30BIT_MASK); | ||
4019 | if (err) { | ||
4020 | #ifdef CONFIG_BCM43XX_PIO | ||
4021 | printk(KERN_WARNING PFX "DMA not supported. Falling back to PIO.\n"); | ||
4022 | bcm->__using_pio = 1; | ||
4023 | #else | ||
4024 | printk(KERN_ERR PFX "FATAL: DMA not supported and PIO not configured. " | ||
4025 | "Recompile the driver with PIO support, please.\n"); | ||
4026 | return -ENODEV; | ||
4027 | #endif /* CONFIG_BCM43XX_PIO */ | ||
4028 | } | ||
4029 | } | ||
4030 | bcm->rts_threshold = BCM43xx_DEFAULT_RTS_THRESHOLD; | 4017 | bcm->rts_threshold = BCM43xx_DEFAULT_RTS_THRESHOLD; |
4031 | 4018 | ||
4032 | /* default to sw encryption for now */ | 4019 | /* default to sw encryption for now */ |