diff options
Diffstat (limited to 'drivers/net/wireless/bcm43xx/bcm43xx_main.c')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index d8f5600578b4..df317c1e12a8 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -1547,7 +1547,7 @@ static void handle_irq_noise(struct bcm43xx_private *bcm) | |||
1547 | goto generate_new; | 1547 | goto generate_new; |
1548 | 1548 | ||
1549 | /* Get the noise samples. */ | 1549 | /* Get the noise samples. */ |
1550 | assert(bcm->noisecalc.nr_samples <= 8); | 1550 | assert(bcm->noisecalc.nr_samples < 8); |
1551 | i = bcm->noisecalc.nr_samples; | 1551 | i = bcm->noisecalc.nr_samples; |
1552 | noise[0] = limit_value(noise[0], 0, ARRAY_SIZE(radio->nrssi_lt) - 1); | 1552 | noise[0] = limit_value(noise[0], 0, ARRAY_SIZE(radio->nrssi_lt) - 1); |
1553 | noise[1] = limit_value(noise[1], 0, ARRAY_SIZE(radio->nrssi_lt) - 1); | 1553 | noise[1] = limit_value(noise[1], 0, ARRAY_SIZE(radio->nrssi_lt) - 1); |
@@ -1885,6 +1885,15 @@ static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id, struct pt_re | |||
1885 | 1885 | ||
1886 | spin_lock(&bcm->irq_lock); | 1886 | spin_lock(&bcm->irq_lock); |
1887 | 1887 | ||
1888 | /* Only accept IRQs, if we are initialized properly. | ||
1889 | * This avoids an RX race while initializing. | ||
1890 | * We should probably not enable IRQs before we are initialized | ||
1891 | * completely, but some careful work is needed to fix this. I think it | ||
1892 | * is best to stay with this cheap workaround for now... . | ||
1893 | */ | ||
1894 | if (unlikely(bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED)) | ||
1895 | goto out; | ||
1896 | |||
1888 | reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); | 1897 | reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); |
1889 | if (reason == 0xffffffff) { | 1898 | if (reason == 0xffffffff) { |
1890 | /* irq not for us (shared irq) */ | 1899 | /* irq not for us (shared irq) */ |
@@ -1906,19 +1915,11 @@ static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id, struct pt_re | |||
1906 | 1915 | ||
1907 | bcm43xx_interrupt_ack(bcm, reason); | 1916 | bcm43xx_interrupt_ack(bcm, reason); |
1908 | 1917 | ||
1909 | /* Only accept IRQs, if we are initialized properly. | 1918 | /* disable all IRQs. They are enabled again in the bottom half. */ |
1910 | * This avoids an RX race while initializing. | 1919 | bcm->irq_savedstate = bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL); |
1911 | * We should probably not enable IRQs before we are initialized | 1920 | /* save the reason code and call our bottom half. */ |
1912 | * completely, but some careful work is needed to fix this. I think it | 1921 | bcm->irq_reason = reason; |
1913 | * is best to stay with this cheap workaround for now... . | 1922 | tasklet_schedule(&bcm->isr_tasklet); |
1914 | */ | ||
1915 | if (likely(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED)) { | ||
1916 | /* disable all IRQs. They are enabled again in the bottom half. */ | ||
1917 | bcm->irq_savedstate = bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL); | ||
1918 | /* save the reason code and call our bottom half. */ | ||
1919 | bcm->irq_reason = reason; | ||
1920 | tasklet_schedule(&bcm->isr_tasklet); | ||
1921 | } | ||
1922 | 1923 | ||
1923 | out: | 1924 | out: |
1924 | mmiowb(); | 1925 | mmiowb(); |
@@ -3698,6 +3699,10 @@ static void bcm43xx_ieee80211_set_security(struct net_device *net_dev, | |||
3698 | secinfo->encrypt = sec->encrypt; | 3699 | secinfo->encrypt = sec->encrypt; |
3699 | dprintk(", .encrypt = %d", sec->encrypt); | 3700 | dprintk(", .encrypt = %d", sec->encrypt); |
3700 | } | 3701 | } |
3702 | if (sec->flags & SEC_AUTH_MODE) { | ||
3703 | secinfo->auth_mode = sec->auth_mode; | ||
3704 | dprintk(", .auth_mode = %d", sec->auth_mode); | ||
3705 | } | ||
3701 | dprintk("\n"); | 3706 | dprintk("\n"); |
3702 | if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED && | 3707 | if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED && |
3703 | !bcm->ieee->host_encrypt) { | 3708 | !bcm->ieee->host_encrypt) { |