diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-03-09 11:58:11 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-09 11:58:11 -0500 |
commit | 0a38f5442053b10c773b6a10a4d67e2293551f12 (patch) | |
tree | 811e84601fecc22b342caae168c95eff76a5ea5e /drivers/net | |
parent | 82c00b62c811142c8e7d3aef92fbf3fc77b83709 (diff) | |
parent | 7d9f3e85f45e8f636bdd7ce5f0b1704034380175 (diff) |
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_phy.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_wx.c | 10 |
3 files changed, 19 insertions, 7 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index e594af46ff05..80cb88eb98c6 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -1858,9 +1858,6 @@ static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id) | |||
1858 | 1858 | ||
1859 | spin_lock(&bcm->irq_lock); | 1859 | spin_lock(&bcm->irq_lock); |
1860 | 1860 | ||
1861 | assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); | ||
1862 | assert(bcm->current_core->id == BCM43xx_COREID_80211); | ||
1863 | |||
1864 | reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); | 1861 | reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); |
1865 | if (reason == 0xffffffff) { | 1862 | if (reason == 0xffffffff) { |
1866 | /* irq not for us (shared irq) */ | 1863 | /* irq not for us (shared irq) */ |
@@ -1871,6 +1868,9 @@ static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id) | |||
1871 | if (!reason) | 1868 | if (!reason) |
1872 | goto out; | 1869 | goto out; |
1873 | 1870 | ||
1871 | assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); | ||
1872 | assert(bcm->current_core->id == BCM43xx_COREID_80211); | ||
1873 | |||
1874 | bcm->dma_reason[0] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA0_REASON) | 1874 | bcm->dma_reason[0] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA0_REASON) |
1875 | & 0x0001DC00; | 1875 | & 0x0001DC00; |
1876 | bcm->dma_reason[1] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA1_REASON) | 1876 | bcm->dma_reason[1] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA1_REASON) |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c index 3a5c9c2b2150..cae89258a640 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c | |||
@@ -859,6 +859,11 @@ static void bcm43xx_phy_initb6(struct bcm43xx_private *bcm) | |||
859 | bcm43xx_radio_write16(bcm, 0x005D, 0x0088); | 859 | bcm43xx_radio_write16(bcm, 0x005D, 0x0088); |
860 | bcm43xx_radio_write16(bcm, 0x005E, 0x0088); | 860 | bcm43xx_radio_write16(bcm, 0x005E, 0x0088); |
861 | bcm43xx_radio_write16(bcm, 0x007D, 0x0088); | 861 | bcm43xx_radio_write16(bcm, 0x007D, 0x0088); |
862 | bcm43xx_shm_write32(bcm, BCM43xx_SHM_SHARED, | ||
863 | BCM43xx_UCODEFLAGS_OFFSET, | ||
864 | (bcm43xx_shm_read32(bcm, BCM43xx_SHM_SHARED, | ||
865 | BCM43xx_UCODEFLAGS_OFFSET) | ||
866 | | 0x00000200)); | ||
862 | } | 867 | } |
863 | if (radio->revision == 8) { | 868 | if (radio->revision == 8) { |
864 | bcm43xx_radio_write16(bcm, 0x0051, 0x0000); | 869 | bcm43xx_radio_write16(bcm, 0x0051, 0x0000); |
@@ -941,7 +946,8 @@ static void bcm43xx_phy_initb6(struct bcm43xx_private *bcm) | |||
941 | bcm43xx_phy_write(bcm, 0x0038, 0x0668); | 946 | bcm43xx_phy_write(bcm, 0x0038, 0x0668); |
942 | bcm43xx_radio_set_txpower_bg(bcm, 0xFFFF, 0xFFFF, 0xFFFF); | 947 | bcm43xx_radio_set_txpower_bg(bcm, 0xFFFF, 0xFFFF, 0xFFFF); |
943 | if (radio->revision <= 5) | 948 | if (radio->revision <= 5) |
944 | bcm43xx_phy_write(bcm, 0x005D, bcm43xx_phy_read(bcm, 0x005D) | 0x0003); | 949 | bcm43xx_phy_write(bcm, 0x005D, (bcm43xx_phy_read(bcm, 0x005D) |
950 | & 0xFF80) | 0x0003); | ||
945 | if (radio->revision <= 2) | 951 | if (radio->revision <= 2) |
946 | bcm43xx_radio_write16(bcm, 0x005D, 0x000D); | 952 | bcm43xx_radio_write16(bcm, 0x005D, 0x000D); |
947 | 953 | ||
@@ -958,7 +964,7 @@ static void bcm43xx_phy_initb6(struct bcm43xx_private *bcm) | |||
958 | bcm43xx_phy_write(bcm, 0x0016, 0x0410); | 964 | bcm43xx_phy_write(bcm, 0x0016, 0x0410); |
959 | bcm43xx_phy_write(bcm, 0x0017, 0x0820); | 965 | bcm43xx_phy_write(bcm, 0x0017, 0x0820); |
960 | bcm43xx_phy_write(bcm, 0x0062, 0x0007); | 966 | bcm43xx_phy_write(bcm, 0x0062, 0x0007); |
961 | (void) bcm43xx_radio_calibrationvalue(bcm); | 967 | bcm43xx_radio_init2050(bcm); |
962 | bcm43xx_phy_lo_g_measure(bcm); | 968 | bcm43xx_phy_lo_g_measure(bcm); |
963 | if (bcm->sprom.boardflags & BCM43xx_BFL_RSSI) { | 969 | if (bcm->sprom.boardflags & BCM43xx_BFL_RSSI) { |
964 | bcm43xx_calc_nrssi_slope(bcm); | 970 | bcm43xx_calc_nrssi_slope(bcm); |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c index 7b665e2386a8..d6d9413d7f23 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c | |||
@@ -105,18 +105,24 @@ static int bcm43xx_wx_set_channelfreq(struct net_device *net_dev, | |||
105 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); | 105 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); |
106 | unsigned long flags; | 106 | unsigned long flags; |
107 | u8 channel; | 107 | u8 channel; |
108 | s8 expon; | ||
108 | int freq; | 109 | int freq; |
109 | int err = -EINVAL; | 110 | int err = -EINVAL; |
110 | 111 | ||
111 | mutex_lock(&bcm->mutex); | 112 | mutex_lock(&bcm->mutex); |
112 | spin_lock_irqsave(&bcm->irq_lock, flags); | 113 | spin_lock_irqsave(&bcm->irq_lock, flags); |
113 | 114 | ||
114 | if ((data->freq.m >= 0) && (data->freq.m <= 1000)) { | 115 | if ((data->freq.e == 0) && |
116 | (data->freq.m >= 0) && (data->freq.m <= 1000)) { | ||
115 | channel = data->freq.m; | 117 | channel = data->freq.m; |
116 | freq = bcm43xx_channel_to_freq(bcm, channel); | 118 | freq = bcm43xx_channel_to_freq(bcm, channel); |
117 | } else { | 119 | } else { |
118 | channel = bcm43xx_freq_to_channel(bcm, data->freq.m); | ||
119 | freq = data->freq.m; | 120 | freq = data->freq.m; |
121 | expon = 6 - data->freq.e; | ||
122 | while (--expon >= 0) /* scale down the frequency to MHz */ | ||
123 | freq /= 10; | ||
124 | assert(freq > 1000); | ||
125 | channel = bcm43xx_freq_to_channel(bcm, freq); | ||
120 | } | 126 | } |
121 | if (!ieee80211_is_valid_channel(bcm->ieee, channel)) | 127 | if (!ieee80211_is_valid_channel(bcm->ieee, channel)) |
122 | goto out_unlock; | 128 | goto out_unlock; |