diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2011-05-22 21:57:03 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-01 15:12:30 -0400 |
commit | 0541ac4cb47a31f44bf841a4dade539395c146ee (patch) | |
tree | 1c3727fa0103e9faab8a7adcfe8120a3b54e568c /drivers/net/wireless | |
parent | 78d57372cc781c69a97700cac1f181ec42433fca (diff) |
b43legacy: Fix warnings from gcc 4.6.0
gcc 4.6.0 warnings for b43legacy:
CC [M] drivers/net/wireless/b43legacy/main.o
drivers/net/wireless/b43legacy/main.c: In function ‘b43legacy_request_firmware’:
drivers/net/wireless/b43legacy/main.c:1567:6: warning: variable ‘tmshigh’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/main.c: In function ‘b43legacy_op_dev_config’:
drivers/net/wireless/b43legacy/main.c:2637:6: warning: variable ‘antenna_rx’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/main.c: In function ‘b43legacy_op_bss_info_changed’:
drivers/net/wireless/b43legacy/main.c:2778:24: warning: variable ‘phy’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/xmit.c: In function ‘generate_txhdr_fw3’:
drivers/net/wireless/b43legacy/xmit.c:324:7: warning: variable ‘rts_rate_ofdm’ set but not used [-Wunused-but-set-variable]
CC [M] drivers/net/wireless/b43legacy/dma.o
drivers/net/wireless/b43legacy/dma.c: In function ‘free_all_descbuffers’:
drivers/net/wireless/b43legacy/dma.c:820:36: warning: variable ‘desc’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/dma.c: In function ‘b43legacy_dma_tx’:
drivers/net/wireless/b43legacy/dma.c:1377:28: warning: variable ‘info’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/dma.c:1374:24: warning: variable ‘hdr’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43legacy/dma.c: In function ‘b43legacy_dma_handle_txstatus’:
drivers/net/wireless/b43legacy/dma.c:1438:36: warning: variable ‘desc’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/b43legacy/dma.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/xmit.c | 2 |
3 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c index e03e01d0bc35..c33934ad6cd2 100644 --- a/drivers/net/wireless/b43legacy/dma.c +++ b/drivers/net/wireless/b43legacy/dma.c | |||
@@ -817,14 +817,13 @@ static void dmacontroller_cleanup(struct b43legacy_dmaring *ring) | |||
817 | 817 | ||
818 | static void free_all_descbuffers(struct b43legacy_dmaring *ring) | 818 | static void free_all_descbuffers(struct b43legacy_dmaring *ring) |
819 | { | 819 | { |
820 | struct b43legacy_dmadesc_generic *desc; | ||
821 | struct b43legacy_dmadesc_meta *meta; | 820 | struct b43legacy_dmadesc_meta *meta; |
822 | int i; | 821 | int i; |
823 | 822 | ||
824 | if (!ring->used_slots) | 823 | if (!ring->used_slots) |
825 | return; | 824 | return; |
826 | for (i = 0; i < ring->nr_slots; i++) { | 825 | for (i = 0; i < ring->nr_slots; i++) { |
827 | desc = ring->ops->idx2desc(ring, i, &meta); | 826 | ring->ops->idx2desc(ring, i, &meta); |
828 | 827 | ||
829 | if (!meta->skb) { | 828 | if (!meta->skb) { |
830 | B43legacy_WARN_ON(!ring->tx); | 829 | B43legacy_WARN_ON(!ring->tx); |
@@ -1371,10 +1370,8 @@ int b43legacy_dma_tx(struct b43legacy_wldev *dev, | |||
1371 | struct sk_buff *skb) | 1370 | struct sk_buff *skb) |
1372 | { | 1371 | { |
1373 | struct b43legacy_dmaring *ring; | 1372 | struct b43legacy_dmaring *ring; |
1374 | struct ieee80211_hdr *hdr; | ||
1375 | int err = 0; | 1373 | int err = 0; |
1376 | unsigned long flags; | 1374 | unsigned long flags; |
1377 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
1378 | 1375 | ||
1379 | ring = priority_to_txring(dev, skb_get_queue_mapping(skb)); | 1376 | ring = priority_to_txring(dev, skb_get_queue_mapping(skb)); |
1380 | spin_lock_irqsave(&ring->lock, flags); | 1377 | spin_lock_irqsave(&ring->lock, flags); |
@@ -1401,8 +1398,6 @@ int b43legacy_dma_tx(struct b43legacy_wldev *dev, | |||
1401 | 1398 | ||
1402 | /* dma_tx_fragment might reallocate the skb, so invalidate pointers pointing | 1399 | /* dma_tx_fragment might reallocate the skb, so invalidate pointers pointing |
1403 | * into the skb data or cb now. */ | 1400 | * into the skb data or cb now. */ |
1404 | hdr = NULL; | ||
1405 | info = NULL; | ||
1406 | err = dma_tx_fragment(ring, &skb); | 1401 | err = dma_tx_fragment(ring, &skb); |
1407 | if (unlikely(err == -ENOKEY)) { | 1402 | if (unlikely(err == -ENOKEY)) { |
1408 | /* Drop this packet, as we don't have the encryption key | 1403 | /* Drop this packet, as we don't have the encryption key |
@@ -1435,7 +1430,6 @@ void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev, | |||
1435 | { | 1430 | { |
1436 | const struct b43legacy_dma_ops *ops; | 1431 | const struct b43legacy_dma_ops *ops; |
1437 | struct b43legacy_dmaring *ring; | 1432 | struct b43legacy_dmaring *ring; |
1438 | struct b43legacy_dmadesc_generic *desc; | ||
1439 | struct b43legacy_dmadesc_meta *meta; | 1433 | struct b43legacy_dmadesc_meta *meta; |
1440 | int retry_limit; | 1434 | int retry_limit; |
1441 | int slot; | 1435 | int slot; |
@@ -1450,7 +1444,7 @@ void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev, | |||
1450 | ops = ring->ops; | 1444 | ops = ring->ops; |
1451 | while (1) { | 1445 | while (1) { |
1452 | B43legacy_WARN_ON(!(slot >= 0 && slot < ring->nr_slots)); | 1446 | B43legacy_WARN_ON(!(slot >= 0 && slot < ring->nr_slots)); |
1453 | desc = ops->idx2desc(ring, slot, &meta); | 1447 | ops->idx2desc(ring, slot, &meta); |
1454 | 1448 | ||
1455 | if (meta->skb) | 1449 | if (meta->skb) |
1456 | unmap_descbuffer(ring, meta->dmaaddr, | 1450 | unmap_descbuffer(ring, meta->dmaaddr, |
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 1ab8861dd43a..ffa46717323e 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -1564,10 +1564,10 @@ static int b43legacy_request_firmware(struct b43legacy_wldev *dev) | |||
1564 | struct b43legacy_firmware *fw = &dev->fw; | 1564 | struct b43legacy_firmware *fw = &dev->fw; |
1565 | const u8 rev = dev->dev->id.revision; | 1565 | const u8 rev = dev->dev->id.revision; |
1566 | const char *filename; | 1566 | const char *filename; |
1567 | u32 tmshigh; | ||
1568 | int err; | 1567 | int err; |
1569 | 1568 | ||
1570 | tmshigh = ssb_read32(dev->dev, SSB_TMSHIGH); | 1569 | /* do dummy read */ |
1570 | ssb_read32(dev->dev, SSB_TMSHIGH); | ||
1571 | if (!fw->ucode) { | 1571 | if (!fw->ucode) { |
1572 | if (rev == 2) | 1572 | if (rev == 2) |
1573 | filename = "ucode2"; | 1573 | filename = "ucode2"; |
@@ -2634,11 +2634,9 @@ static int b43legacy_op_dev_config(struct ieee80211_hw *hw, | |||
2634 | unsigned long flags; | 2634 | unsigned long flags; |
2635 | unsigned int new_phymode = 0xFFFF; | 2635 | unsigned int new_phymode = 0xFFFF; |
2636 | int antenna_tx; | 2636 | int antenna_tx; |
2637 | int antenna_rx; | ||
2638 | int err = 0; | 2637 | int err = 0; |
2639 | 2638 | ||
2640 | antenna_tx = B43legacy_ANTENNA_DEFAULT; | 2639 | antenna_tx = B43legacy_ANTENNA_DEFAULT; |
2641 | antenna_rx = B43legacy_ANTENNA_DEFAULT; | ||
2642 | 2640 | ||
2643 | mutex_lock(&wl->mutex); | 2641 | mutex_lock(&wl->mutex); |
2644 | dev = wl->current_dev; | 2642 | dev = wl->current_dev; |
@@ -2775,14 +2773,12 @@ static void b43legacy_op_bss_info_changed(struct ieee80211_hw *hw, | |||
2775 | { | 2773 | { |
2776 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); | 2774 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); |
2777 | struct b43legacy_wldev *dev; | 2775 | struct b43legacy_wldev *dev; |
2778 | struct b43legacy_phy *phy; | ||
2779 | unsigned long flags; | 2776 | unsigned long flags; |
2780 | 2777 | ||
2781 | mutex_lock(&wl->mutex); | 2778 | mutex_lock(&wl->mutex); |
2782 | B43legacy_WARN_ON(wl->vif != vif); | 2779 | B43legacy_WARN_ON(wl->vif != vif); |
2783 | 2780 | ||
2784 | dev = wl->current_dev; | 2781 | dev = wl->current_dev; |
2785 | phy = &dev->phy; | ||
2786 | 2782 | ||
2787 | /* Disable IRQs while reconfiguring the device. | 2783 | /* Disable IRQs while reconfiguring the device. |
2788 | * This makes it possible to drop the spinlock throughout | 2784 | * This makes it possible to drop the spinlock throughout |
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c index 3a95541708a6..6c174f38ca3c 100644 --- a/drivers/net/wireless/b43legacy/xmit.c +++ b/drivers/net/wireless/b43legacy/xmit.c | |||
@@ -321,11 +321,9 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
321 | struct ieee80211_hdr *hdr; | 321 | struct ieee80211_hdr *hdr; |
322 | int rts_rate; | 322 | int rts_rate; |
323 | int rts_rate_fb; | 323 | int rts_rate_fb; |
324 | int rts_rate_ofdm; | ||
325 | int rts_rate_fb_ofdm; | 324 | int rts_rate_fb_ofdm; |
326 | 325 | ||
327 | rts_rate = ieee80211_get_rts_cts_rate(dev->wl->hw, info)->hw_value; | 326 | rts_rate = ieee80211_get_rts_cts_rate(dev->wl->hw, info)->hw_value; |
328 | rts_rate_ofdm = b43legacy_is_ofdm_rate(rts_rate); | ||
329 | rts_rate_fb = b43legacy_calc_fallback_rate(rts_rate); | 327 | rts_rate_fb = b43legacy_calc_fallback_rate(rts_rate); |
330 | rts_rate_fb_ofdm = b43legacy_is_ofdm_rate(rts_rate_fb); | 328 | rts_rate_fb_ofdm = b43legacy_is_ofdm_rate(rts_rate_fb); |
331 | if (rts_rate_fb_ofdm) | 329 | if (rts_rate_fb_ofdm) |