diff options
Diffstat (limited to 'drivers/net/wireless')
30 files changed, 105 insertions, 67 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index f1b8af64569c..2d10239ce829 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
| @@ -1040,7 +1040,7 @@ static int ath9k_hif_usb_probe(struct usb_interface *interface, | |||
| 1040 | } | 1040 | } |
| 1041 | 1041 | ||
| 1042 | ret = ath9k_htc_hw_init(hif_dev->htc_handle, | 1042 | ret = ath9k_htc_hw_init(hif_dev->htc_handle, |
| 1043 | &hif_dev->udev->dev, hif_dev->device_id, | 1043 | &interface->dev, hif_dev->device_id, |
| 1044 | hif_dev->udev->product, id->driver_info); | 1044 | hif_dev->udev->product, id->driver_info); |
| 1045 | if (ret) { | 1045 | if (ret) { |
| 1046 | ret = -EINVAL; | 1046 | ret = -EINVAL; |
| @@ -1158,7 +1158,7 @@ fail_resume: | |||
| 1158 | #endif | 1158 | #endif |
| 1159 | 1159 | ||
| 1160 | static struct usb_driver ath9k_hif_usb_driver = { | 1160 | static struct usb_driver ath9k_hif_usb_driver = { |
| 1161 | .name = "ath9k_hif_usb", | 1161 | .name = KBUILD_MODNAME, |
| 1162 | .probe = ath9k_hif_usb_probe, | 1162 | .probe = ath9k_hif_usb_probe, |
| 1163 | .disconnect = ath9k_hif_usb_disconnect, | 1163 | .disconnect = ath9k_hif_usb_disconnect, |
| 1164 | #ifdef CONFIG_PM | 1164 | #ifdef CONFIG_PM |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 338b07502f1a..c95bc5cc1a1f 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
| @@ -1254,15 +1254,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
| 1254 | ah->txchainmask = common->tx_chainmask; | 1254 | ah->txchainmask = common->tx_chainmask; |
| 1255 | ah->rxchainmask = common->rx_chainmask; | 1255 | ah->rxchainmask = common->rx_chainmask; |
| 1256 | 1256 | ||
| 1257 | if ((common->bus_ops->ath_bus_type != ATH_USB) && !ah->chip_fullsleep) { | ||
| 1258 | ath9k_hw_abortpcurecv(ah); | ||
| 1259 | if (!ath9k_hw_stopdmarecv(ah)) { | ||
| 1260 | ath_dbg(common, ATH_DBG_XMIT, | ||
| 1261 | "Failed to stop receive dma\n"); | ||
| 1262 | bChannelChange = false; | ||
| 1263 | } | ||
| 1264 | } | ||
| 1265 | |||
| 1266 | if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) | 1257 | if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) |
| 1267 | return -EIO; | 1258 | return -EIO; |
| 1268 | 1259 | ||
| @@ -2546,6 +2537,7 @@ static struct { | |||
| 2546 | { AR_SREV_VERSION_9287, "9287" }, | 2537 | { AR_SREV_VERSION_9287, "9287" }, |
| 2547 | { AR_SREV_VERSION_9271, "9271" }, | 2538 | { AR_SREV_VERSION_9271, "9271" }, |
| 2548 | { AR_SREV_VERSION_9300, "9300" }, | 2539 | { AR_SREV_VERSION_9300, "9300" }, |
| 2540 | { AR_SREV_VERSION_9485, "9485" }, | ||
| 2549 | }; | 2541 | }; |
| 2550 | 2542 | ||
| 2551 | /* For devices with external radios */ | 2543 | /* For devices with external radios */ |
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index 562257ac52cf..edc1cbbfecaf 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c | |||
| @@ -751,28 +751,47 @@ void ath9k_hw_abortpcurecv(struct ath_hw *ah) | |||
| 751 | } | 751 | } |
| 752 | EXPORT_SYMBOL(ath9k_hw_abortpcurecv); | 752 | EXPORT_SYMBOL(ath9k_hw_abortpcurecv); |
| 753 | 753 | ||
| 754 | bool ath9k_hw_stopdmarecv(struct ath_hw *ah) | 754 | bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset) |
| 755 | { | 755 | { |
| 756 | #define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */ | 756 | #define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */ |
| 757 | #define AH_RX_TIME_QUANTUM 100 /* usec */ | 757 | #define AH_RX_TIME_QUANTUM 100 /* usec */ |
| 758 | struct ath_common *common = ath9k_hw_common(ah); | 758 | struct ath_common *common = ath9k_hw_common(ah); |
| 759 | u32 mac_status, last_mac_status = 0; | ||
| 759 | int i; | 760 | int i; |
| 760 | 761 | ||
| 762 | /* Enable access to the DMA observation bus */ | ||
| 763 | REG_WRITE(ah, AR_MACMISC, | ||
| 764 | ((AR_MACMISC_DMA_OBS_LINE_8 << AR_MACMISC_DMA_OBS_S) | | ||
| 765 | (AR_MACMISC_MISC_OBS_BUS_1 << | ||
| 766 | AR_MACMISC_MISC_OBS_BUS_MSB_S))); | ||
| 767 | |||
| 761 | REG_WRITE(ah, AR_CR, AR_CR_RXD); | 768 | REG_WRITE(ah, AR_CR, AR_CR_RXD); |
| 762 | 769 | ||
| 763 | /* Wait for rx enable bit to go low */ | 770 | /* Wait for rx enable bit to go low */ |
| 764 | for (i = AH_RX_STOP_DMA_TIMEOUT / AH_TIME_QUANTUM; i != 0; i--) { | 771 | for (i = AH_RX_STOP_DMA_TIMEOUT / AH_TIME_QUANTUM; i != 0; i--) { |
| 765 | if ((REG_READ(ah, AR_CR) & AR_CR_RXE) == 0) | 772 | if ((REG_READ(ah, AR_CR) & AR_CR_RXE) == 0) |
| 766 | break; | 773 | break; |
| 774 | |||
| 775 | if (!AR_SREV_9300_20_OR_LATER(ah)) { | ||
| 776 | mac_status = REG_READ(ah, AR_DMADBG_7) & 0x7f0; | ||
| 777 | if (mac_status == 0x1c0 && mac_status == last_mac_status) { | ||
| 778 | *reset = true; | ||
| 779 | break; | ||
| 780 | } | ||
| 781 | |||
| 782 | last_mac_status = mac_status; | ||
| 783 | } | ||
| 784 | |||
| 767 | udelay(AH_TIME_QUANTUM); | 785 | udelay(AH_TIME_QUANTUM); |
| 768 | } | 786 | } |
| 769 | 787 | ||
| 770 | if (i == 0) { | 788 | if (i == 0) { |
| 771 | ath_err(common, | 789 | ath_err(common, |
| 772 | "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n", | 790 | "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n", |
| 773 | AH_RX_STOP_DMA_TIMEOUT / 1000, | 791 | AH_RX_STOP_DMA_TIMEOUT / 1000, |
| 774 | REG_READ(ah, AR_CR), | 792 | REG_READ(ah, AR_CR), |
| 775 | REG_READ(ah, AR_DIAG_SW)); | 793 | REG_READ(ah, AR_DIAG_SW), |
| 794 | REG_READ(ah, AR_DMADBG_7)); | ||
| 776 | return false; | 795 | return false; |
| 777 | } else { | 796 | } else { |
| 778 | return true; | 797 | return true; |
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h index b2b2ff852c32..c2a59386fb9c 100644 --- a/drivers/net/wireless/ath/ath9k/mac.h +++ b/drivers/net/wireless/ath/ath9k/mac.h | |||
| @@ -695,7 +695,7 @@ bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set); | |||
| 695 | void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp); | 695 | void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp); |
| 696 | void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning); | 696 | void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning); |
| 697 | void ath9k_hw_abortpcurecv(struct ath_hw *ah); | 697 | void ath9k_hw_abortpcurecv(struct ath_hw *ah); |
| 698 | bool ath9k_hw_stopdmarecv(struct ath_hw *ah); | 698 | bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset); |
| 699 | int ath9k_hw_beaconq_setup(struct ath_hw *ah); | 699 | int ath9k_hw_beaconq_setup(struct ath_hw *ah); |
| 700 | 700 | ||
| 701 | /* Interrupt Handling */ | 701 | /* Interrupt Handling */ |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index dddb85de622d..17d04ff8d678 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
| @@ -1376,7 +1376,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, | |||
| 1376 | 1376 | ||
| 1377 | ath9k_calculate_iter_data(hw, vif, &iter_data); | 1377 | ath9k_calculate_iter_data(hw, vif, &iter_data); |
| 1378 | 1378 | ||
| 1379 | ath9k_ps_wakeup(sc); | ||
| 1380 | /* Set BSSID mask. */ | 1379 | /* Set BSSID mask. */ |
| 1381 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); | 1380 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); |
| 1382 | ath_hw_setbssidmask(common); | 1381 | ath_hw_setbssidmask(common); |
| @@ -1411,7 +1410,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, | |||
| 1411 | } | 1410 | } |
| 1412 | 1411 | ||
| 1413 | ath9k_hw_set_interrupts(ah, ah->imask); | 1412 | ath9k_hw_set_interrupts(ah, ah->imask); |
| 1414 | ath9k_ps_restore(sc); | ||
| 1415 | 1413 | ||
| 1416 | /* Set up ANI */ | 1414 | /* Set up ANI */ |
| 1417 | if ((iter_data.naps + iter_data.nadhocs) > 0) { | 1415 | if ((iter_data.naps + iter_data.nadhocs) > 0) { |
| @@ -1457,6 +1455,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
| 1457 | struct ath_vif *avp = (void *)vif->drv_priv; | 1455 | struct ath_vif *avp = (void *)vif->drv_priv; |
| 1458 | int ret = 0; | 1456 | int ret = 0; |
| 1459 | 1457 | ||
| 1458 | ath9k_ps_wakeup(sc); | ||
| 1460 | mutex_lock(&sc->mutex); | 1459 | mutex_lock(&sc->mutex); |
| 1461 | 1460 | ||
| 1462 | switch (vif->type) { | 1461 | switch (vif->type) { |
| @@ -1503,6 +1502,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
| 1503 | ath9k_do_vif_add_setup(hw, vif); | 1502 | ath9k_do_vif_add_setup(hw, vif); |
| 1504 | out: | 1503 | out: |
| 1505 | mutex_unlock(&sc->mutex); | 1504 | mutex_unlock(&sc->mutex); |
| 1505 | ath9k_ps_restore(sc); | ||
| 1506 | return ret; | 1506 | return ret; |
| 1507 | } | 1507 | } |
| 1508 | 1508 | ||
| @@ -1517,6 +1517,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, | |||
| 1517 | 1517 | ||
| 1518 | ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); | 1518 | ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); |
| 1519 | mutex_lock(&sc->mutex); | 1519 | mutex_lock(&sc->mutex); |
| 1520 | ath9k_ps_wakeup(sc); | ||
| 1520 | 1521 | ||
| 1521 | /* See if new interface type is valid. */ | 1522 | /* See if new interface type is valid. */ |
| 1522 | if ((new_type == NL80211_IFTYPE_ADHOC) && | 1523 | if ((new_type == NL80211_IFTYPE_ADHOC) && |
| @@ -1546,6 +1547,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, | |||
| 1546 | 1547 | ||
| 1547 | ath9k_do_vif_add_setup(hw, vif); | 1548 | ath9k_do_vif_add_setup(hw, vif); |
| 1548 | out: | 1549 | out: |
| 1550 | ath9k_ps_restore(sc); | ||
| 1549 | mutex_unlock(&sc->mutex); | 1551 | mutex_unlock(&sc->mutex); |
| 1550 | return ret; | 1552 | return ret; |
| 1551 | } | 1553 | } |
| @@ -1558,6 +1560,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
| 1558 | 1560 | ||
| 1559 | ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n"); | 1561 | ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n"); |
| 1560 | 1562 | ||
| 1563 | ath9k_ps_wakeup(sc); | ||
| 1561 | mutex_lock(&sc->mutex); | 1564 | mutex_lock(&sc->mutex); |
| 1562 | 1565 | ||
| 1563 | sc->nvifs--; | 1566 | sc->nvifs--; |
| @@ -1569,6 +1572,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
| 1569 | ath9k_calculate_summary_state(hw, NULL); | 1572 | ath9k_calculate_summary_state(hw, NULL); |
| 1570 | 1573 | ||
| 1571 | mutex_unlock(&sc->mutex); | 1574 | mutex_unlock(&sc->mutex); |
| 1575 | ath9k_ps_restore(sc); | ||
| 1572 | } | 1576 | } |
| 1573 | 1577 | ||
| 1574 | static void ath9k_enable_ps(struct ath_softc *sc) | 1578 | static void ath9k_enable_ps(struct ath_softc *sc) |
| @@ -1809,6 +1813,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
| 1809 | 1813 | ||
| 1810 | txq = sc->tx.txq_map[queue]; | 1814 | txq = sc->tx.txq_map[queue]; |
| 1811 | 1815 | ||
| 1816 | ath9k_ps_wakeup(sc); | ||
| 1812 | mutex_lock(&sc->mutex); | 1817 | mutex_lock(&sc->mutex); |
| 1813 | 1818 | ||
| 1814 | memset(&qi, 0, sizeof(struct ath9k_tx_queue_info)); | 1819 | memset(&qi, 0, sizeof(struct ath9k_tx_queue_info)); |
| @@ -1832,6 +1837,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
| 1832 | ath_beaconq_config(sc); | 1837 | ath_beaconq_config(sc); |
| 1833 | 1838 | ||
| 1834 | mutex_unlock(&sc->mutex); | 1839 | mutex_unlock(&sc->mutex); |
| 1840 | ath9k_ps_restore(sc); | ||
| 1835 | 1841 | ||
| 1836 | return ret; | 1842 | return ret; |
| 1837 | } | 1843 | } |
| @@ -1894,6 +1900,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, | |||
| 1894 | int slottime; | 1900 | int slottime; |
| 1895 | int error; | 1901 | int error; |
| 1896 | 1902 | ||
| 1903 | ath9k_ps_wakeup(sc); | ||
| 1897 | mutex_lock(&sc->mutex); | 1904 | mutex_lock(&sc->mutex); |
| 1898 | 1905 | ||
| 1899 | if (changed & BSS_CHANGED_BSSID) { | 1906 | if (changed & BSS_CHANGED_BSSID) { |
| @@ -1994,6 +2001,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, | |||
| 1994 | } | 2001 | } |
| 1995 | 2002 | ||
| 1996 | mutex_unlock(&sc->mutex); | 2003 | mutex_unlock(&sc->mutex); |
| 2004 | ath9k_ps_restore(sc); | ||
| 1997 | } | 2005 | } |
| 1998 | 2006 | ||
| 1999 | static u64 ath9k_get_tsf(struct ieee80211_hw *hw) | 2007 | static u64 ath9k_get_tsf(struct ieee80211_hw *hw) |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index a9c3f4672aa0..dcd19bc337d1 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
| @@ -486,12 +486,12 @@ start_recv: | |||
| 486 | bool ath_stoprecv(struct ath_softc *sc) | 486 | bool ath_stoprecv(struct ath_softc *sc) |
| 487 | { | 487 | { |
| 488 | struct ath_hw *ah = sc->sc_ah; | 488 | struct ath_hw *ah = sc->sc_ah; |
| 489 | bool stopped; | 489 | bool stopped, reset = false; |
| 490 | 490 | ||
| 491 | spin_lock_bh(&sc->rx.rxbuflock); | 491 | spin_lock_bh(&sc->rx.rxbuflock); |
| 492 | ath9k_hw_abortpcurecv(ah); | 492 | ath9k_hw_abortpcurecv(ah); |
| 493 | ath9k_hw_setrxfilter(ah, 0); | 493 | ath9k_hw_setrxfilter(ah, 0); |
| 494 | stopped = ath9k_hw_stopdmarecv(ah); | 494 | stopped = ath9k_hw_stopdmarecv(ah, &reset); |
| 495 | 495 | ||
| 496 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) | 496 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) |
| 497 | ath_edma_stop_recv(sc); | 497 | ath_edma_stop_recv(sc); |
| @@ -506,7 +506,7 @@ bool ath_stoprecv(struct ath_softc *sc) | |||
| 506 | "confusing the DMA engine when we start RX up\n"); | 506 | "confusing the DMA engine when we start RX up\n"); |
| 507 | ATH_DBG_WARN_ON_ONCE(!stopped); | 507 | ATH_DBG_WARN_ON_ONCE(!stopped); |
| 508 | } | 508 | } |
| 509 | return stopped; | 509 | return stopped || reset; |
| 510 | } | 510 | } |
| 511 | 511 | ||
| 512 | void ath_flushrecv(struct ath_softc *sc) | 512 | void ath_flushrecv(struct ath_softc *sc) |
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h index 248c670fdfbe..5c2cfe694152 100644 --- a/drivers/net/wireless/ath/regd_common.h +++ b/drivers/net/wireless/ath/regd_common.h | |||
| @@ -195,6 +195,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = { | |||
| 195 | {APL9_WORLD, CTL_ETSI, CTL_ETSI}, | 195 | {APL9_WORLD, CTL_ETSI, CTL_ETSI}, |
| 196 | 196 | ||
| 197 | {APL3_FCCA, CTL_FCC, CTL_FCC}, | 197 | {APL3_FCCA, CTL_FCC, CTL_FCC}, |
| 198 | {APL7_FCCA, CTL_FCC, CTL_FCC}, | ||
| 198 | {APL1_ETSIC, CTL_FCC, CTL_ETSI}, | 199 | {APL1_ETSIC, CTL_FCC, CTL_ETSI}, |
| 199 | {APL2_ETSIC, CTL_FCC, CTL_ETSI}, | 200 | {APL2_ETSIC, CTL_FCC, CTL_ETSI}, |
| 200 | {APL2_APLD, CTL_FCC, NO_CTL}, | 201 | {APL2_APLD, CTL_FCC, NO_CTL}, |
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 3d5566e7af0a..ff0f5ba14b2c 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
| @@ -1536,7 +1536,7 @@ static void dma_rx(struct b43_dmaring *ring, int *slot) | |||
| 1536 | dmaaddr = meta->dmaaddr; | 1536 | dmaaddr = meta->dmaaddr; |
| 1537 | goto drop_recycle_buffer; | 1537 | goto drop_recycle_buffer; |
| 1538 | } | 1538 | } |
| 1539 | if (unlikely(len > ring->rx_buffersize)) { | 1539 | if (unlikely(len + ring->frameoffset > ring->rx_buffersize)) { |
| 1540 | /* The data did not fit into one descriptor buffer | 1540 | /* The data did not fit into one descriptor buffer |
| 1541 | * and is split over multiple buffers. | 1541 | * and is split over multiple buffers. |
| 1542 | * This should never happen, as we try to allocate buffers | 1542 | * This should never happen, as we try to allocate buffers |
diff --git a/drivers/net/wireless/b43/dma.h b/drivers/net/wireless/b43/dma.h index a01c2100f166..e8a80a1251bf 100644 --- a/drivers/net/wireless/b43/dma.h +++ b/drivers/net/wireless/b43/dma.h | |||
| @@ -163,7 +163,7 @@ struct b43_dmadesc_generic { | |||
| 163 | /* DMA engine tuning knobs */ | 163 | /* DMA engine tuning knobs */ |
| 164 | #define B43_TXRING_SLOTS 256 | 164 | #define B43_TXRING_SLOTS 256 |
| 165 | #define B43_RXRING_SLOTS 64 | 165 | #define B43_RXRING_SLOTS 64 |
| 166 | #define B43_DMA0_RX_BUFFERSIZE IEEE80211_MAX_FRAME_LEN | 166 | #define B43_DMA0_RX_BUFFERSIZE (B43_DMA0_RX_FRAMEOFFSET + IEEE80211_MAX_FRAME_LEN) |
| 167 | 167 | ||
| 168 | /* Pointer poison */ | 168 | /* Pointer poison */ |
| 169 | #define B43_DMA_PTR_POISON ((void *)ERR_PTR(-ENOMEM)) | 169 | #define B43_DMA_PTR_POISON ((void *)ERR_PTR(-ENOMEM)) |
diff --git a/drivers/net/wireless/iwlegacy/Kconfig b/drivers/net/wireless/iwlegacy/Kconfig index 2a45dd44cc12..aef65cd47661 100644 --- a/drivers/net/wireless/iwlegacy/Kconfig +++ b/drivers/net/wireless/iwlegacy/Kconfig | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | config IWLWIFI_LEGACY | 1 | config IWLWIFI_LEGACY |
| 2 | tristate "Intel Wireless Wifi legacy devices" | 2 | tristate |
| 3 | depends on PCI && MAC80211 | ||
| 4 | select FW_LOADER | 3 | select FW_LOADER |
| 5 | select NEW_LEDS | 4 | select NEW_LEDS |
| 6 | select LEDS_CLASS | 5 | select LEDS_CLASS |
| @@ -65,7 +64,8 @@ endmenu | |||
| 65 | 64 | ||
| 66 | config IWL4965 | 65 | config IWL4965 |
| 67 | tristate "Intel Wireless WiFi 4965AGN (iwl4965)" | 66 | tristate "Intel Wireless WiFi 4965AGN (iwl4965)" |
| 68 | depends on IWLWIFI_LEGACY | 67 | depends on PCI && MAC80211 |
| 68 | select IWLWIFI_LEGACY | ||
| 69 | ---help--- | 69 | ---help--- |
| 70 | This option enables support for | 70 | This option enables support for |
| 71 | 71 | ||
| @@ -92,7 +92,8 @@ config IWL4965 | |||
| 92 | 92 | ||
| 93 | config IWL3945 | 93 | config IWL3945 |
| 94 | tristate "Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)" | 94 | tristate "Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)" |
| 95 | depends on IWLWIFI_LEGACY | 95 | depends on PCI && MAC80211 |
| 96 | select IWLWIFI_LEGACY | ||
| 96 | ---help--- | 97 | ---help--- |
| 97 | Select to build the driver supporting the: | 98 | Select to build the driver supporting the: |
| 98 | 99 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945-hw.h b/drivers/net/wireless/iwlegacy/iwl-3945-hw.h index 779d3cb86e2c..5c3a68d3af12 100644 --- a/drivers/net/wireless/iwlegacy/iwl-3945-hw.h +++ b/drivers/net/wireless/iwlegacy/iwl-3945-hw.h | |||
| @@ -74,8 +74,6 @@ | |||
| 74 | /* RSSI to dBm */ | 74 | /* RSSI to dBm */ |
| 75 | #define IWL39_RSSI_OFFSET 95 | 75 | #define IWL39_RSSI_OFFSET 95 |
| 76 | 76 | ||
| 77 | #define IWL_DEFAULT_TX_POWER 0x0F | ||
| 78 | |||
| 79 | /* | 77 | /* |
| 80 | * EEPROM related constants, enums, and structures. | 78 | * EEPROM related constants, enums, and structures. |
| 81 | */ | 79 | */ |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-hw.h b/drivers/net/wireless/iwlegacy/iwl-4965-hw.h index 08b189c8472d..fc6fa2886d9c 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-hw.h +++ b/drivers/net/wireless/iwlegacy/iwl-4965-hw.h | |||
| @@ -804,9 +804,6 @@ struct iwl4965_scd_bc_tbl { | |||
| 804 | 804 | ||
| 805 | #define IWL4965_DEFAULT_TX_RETRY 15 | 805 | #define IWL4965_DEFAULT_TX_RETRY 15 |
| 806 | 806 | ||
| 807 | /* Limit range of txpower output target to be between these values */ | ||
| 808 | #define IWL4965_TX_POWER_TARGET_POWER_MIN (0) /* 0 dBm: 1 milliwatt */ | ||
| 809 | |||
| 810 | /* EEPROM */ | 807 | /* EEPROM */ |
| 811 | #define IWL4965_FIRST_AMPDU_QUEUE 10 | 808 | #define IWL4965_FIRST_AMPDU_QUEUE 10 |
| 812 | 809 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index 7007d61bb6b5..c1511b14b239 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c | |||
| @@ -160,6 +160,7 @@ int iwl_legacy_init_geos(struct iwl_priv *priv) | |||
| 160 | struct ieee80211_channel *geo_ch; | 160 | struct ieee80211_channel *geo_ch; |
| 161 | struct ieee80211_rate *rates; | 161 | struct ieee80211_rate *rates; |
| 162 | int i = 0; | 162 | int i = 0; |
| 163 | s8 max_tx_power = 0; | ||
| 163 | 164 | ||
| 164 | if (priv->bands[IEEE80211_BAND_2GHZ].n_bitrates || | 165 | if (priv->bands[IEEE80211_BAND_2GHZ].n_bitrates || |
| 165 | priv->bands[IEEE80211_BAND_5GHZ].n_bitrates) { | 166 | priv->bands[IEEE80211_BAND_5GHZ].n_bitrates) { |
| @@ -235,8 +236,8 @@ int iwl_legacy_init_geos(struct iwl_priv *priv) | |||
| 235 | 236 | ||
| 236 | geo_ch->flags |= ch->ht40_extension_channel; | 237 | geo_ch->flags |= ch->ht40_extension_channel; |
| 237 | 238 | ||
| 238 | if (ch->max_power_avg > priv->tx_power_device_lmt) | 239 | if (ch->max_power_avg > max_tx_power) |
| 239 | priv->tx_power_device_lmt = ch->max_power_avg; | 240 | max_tx_power = ch->max_power_avg; |
| 240 | } else { | 241 | } else { |
| 241 | geo_ch->flags |= IEEE80211_CHAN_DISABLED; | 242 | geo_ch->flags |= IEEE80211_CHAN_DISABLED; |
| 242 | } | 243 | } |
| @@ -249,6 +250,10 @@ int iwl_legacy_init_geos(struct iwl_priv *priv) | |||
| 249 | geo_ch->flags); | 250 | geo_ch->flags); |
| 250 | } | 251 | } |
| 251 | 252 | ||
| 253 | priv->tx_power_device_lmt = max_tx_power; | ||
| 254 | priv->tx_power_user_lmt = max_tx_power; | ||
| 255 | priv->tx_power_next = max_tx_power; | ||
| 256 | |||
| 252 | if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && | 257 | if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && |
| 253 | priv->cfg->sku & IWL_SKU_A) { | 258 | priv->cfg->sku & IWL_SKU_A) { |
| 254 | IWL_INFO(priv, "Incorrectly detected BG card as ABG. " | 259 | IWL_INFO(priv, "Incorrectly detected BG card as ABG. " |
| @@ -1124,11 +1129,11 @@ int iwl_legacy_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force) | |||
| 1124 | if (!priv->cfg->ops->lib->send_tx_power) | 1129 | if (!priv->cfg->ops->lib->send_tx_power) |
| 1125 | return -EOPNOTSUPP; | 1130 | return -EOPNOTSUPP; |
| 1126 | 1131 | ||
| 1127 | if (tx_power < IWL4965_TX_POWER_TARGET_POWER_MIN) { | 1132 | /* 0 dBm mean 1 milliwatt */ |
| 1133 | if (tx_power < 0) { | ||
| 1128 | IWL_WARN(priv, | 1134 | IWL_WARN(priv, |
| 1129 | "Requested user TXPOWER %d below lower limit %d.\n", | 1135 | "Requested user TXPOWER %d below 1 mW.\n", |
| 1130 | tx_power, | 1136 | tx_power); |
| 1131 | IWL4965_TX_POWER_TARGET_POWER_MIN); | ||
| 1132 | return -EINVAL; | 1137 | return -EINVAL; |
| 1133 | } | 1138 | } |
| 1134 | 1139 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-eeprom.c b/drivers/net/wireless/iwlegacy/iwl-eeprom.c index 04c5648027df..cb346d1a9ffa 100644 --- a/drivers/net/wireless/iwlegacy/iwl-eeprom.c +++ b/drivers/net/wireless/iwlegacy/iwl-eeprom.c | |||
| @@ -471,13 +471,6 @@ int iwl_legacy_init_channel_map(struct iwl_priv *priv) | |||
| 471 | flags & EEPROM_CHANNEL_RADAR)) | 471 | flags & EEPROM_CHANNEL_RADAR)) |
| 472 | ? "" : "not "); | 472 | ? "" : "not "); |
| 473 | 473 | ||
| 474 | /* Set the tx_power_user_lmt to the highest power | ||
| 475 | * supported by any channel */ | ||
| 476 | if (eeprom_ch_info[ch].max_power_avg > | ||
| 477 | priv->tx_power_user_lmt) | ||
| 478 | priv->tx_power_user_lmt = | ||
| 479 | eeprom_ch_info[ch].max_power_avg; | ||
| 480 | |||
| 481 | ch_info++; | 474 | ch_info++; |
| 482 | } | 475 | } |
| 483 | } | 476 | } |
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c index 28eb3d885ba1..cc7ebcee60e5 100644 --- a/drivers/net/wireless/iwlegacy/iwl3945-base.c +++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c | |||
| @@ -3825,10 +3825,6 @@ static int iwl3945_init_drv(struct iwl_priv *priv) | |||
| 3825 | priv->force_reset[IWL_FW_RESET].reset_duration = | 3825 | priv->force_reset[IWL_FW_RESET].reset_duration = |
| 3826 | IWL_DELAY_NEXT_FORCE_FW_RELOAD; | 3826 | IWL_DELAY_NEXT_FORCE_FW_RELOAD; |
| 3827 | 3827 | ||
| 3828 | |||
| 3829 | priv->tx_power_user_lmt = IWL_DEFAULT_TX_POWER; | ||
| 3830 | priv->tx_power_next = IWL_DEFAULT_TX_POWER; | ||
| 3831 | |||
| 3832 | if (eeprom->version < EEPROM_3945_EEPROM_VERSION) { | 3828 | if (eeprom->version < EEPROM_3945_EEPROM_VERSION) { |
| 3833 | IWL_WARN(priv, "Unsupported EEPROM version: 0x%04X\n", | 3829 | IWL_WARN(priv, "Unsupported EEPROM version: 0x%04X\n", |
| 3834 | eeprom->version); | 3830 | eeprom->version); |
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c index 91b3d8b9d7a5..d484c3678163 100644 --- a/drivers/net/wireless/iwlegacy/iwl4965-base.c +++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c | |||
| @@ -3140,12 +3140,6 @@ static int iwl4965_init_drv(struct iwl_priv *priv) | |||
| 3140 | 3140 | ||
| 3141 | iwl_legacy_init_scan_params(priv); | 3141 | iwl_legacy_init_scan_params(priv); |
| 3142 | 3142 | ||
| 3143 | /* Set the tx_power_user_lmt to the lowest power level | ||
| 3144 | * this value will get overwritten by channel max power avg | ||
| 3145 | * from eeprom */ | ||
| 3146 | priv->tx_power_user_lmt = IWL4965_TX_POWER_TARGET_POWER_MIN; | ||
| 3147 | priv->tx_power_next = IWL4965_TX_POWER_TARGET_POWER_MIN; | ||
| 3148 | |||
| 3149 | ret = iwl_legacy_init_channel_map(priv); | 3143 | ret = iwl_legacy_init_channel_map(priv); |
| 3150 | if (ret) { | 3144 | if (ret) { |
| 3151 | IWL_ERR(priv, "initializing regulatory failed: %d\n", ret); | 3145 | IWL_ERR(priv, "initializing regulatory failed: %d\n", ret); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 3ea31b659d1a..22e045b5bcee 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
| @@ -530,6 +530,9 @@ static struct iwl_ht_params iwl5000_ht_params = { | |||
| 530 | struct iwl_cfg iwl5300_agn_cfg = { | 530 | struct iwl_cfg iwl5300_agn_cfg = { |
| 531 | .name = "Intel(R) Ultimate N WiFi Link 5300 AGN", | 531 | .name = "Intel(R) Ultimate N WiFi Link 5300 AGN", |
| 532 | IWL_DEVICE_5000, | 532 | IWL_DEVICE_5000, |
| 533 | /* at least EEPROM 0x11A has wrong info */ | ||
| 534 | .valid_tx_ant = ANT_ABC, /* .cfg overwrite */ | ||
| 535 | .valid_rx_ant = ANT_ABC, /* .cfg overwrite */ | ||
| 533 | .ht_params = &iwl5000_ht_params, | 536 | .ht_params = &iwl5000_ht_params, |
| 534 | }; | 537 | }; |
| 535 | 538 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h index 98aa8af01192..20b66469d68f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h | |||
| @@ -241,7 +241,7 @@ struct iwl_eeprom_enhanced_txpwr { | |||
| 241 | 241 | ||
| 242 | /* 6x00 Specific */ | 242 | /* 6x00 Specific */ |
| 243 | #define EEPROM_6000_TX_POWER_VERSION (4) | 243 | #define EEPROM_6000_TX_POWER_VERSION (4) |
| 244 | #define EEPROM_6000_EEPROM_VERSION (0x434) | 244 | #define EEPROM_6000_EEPROM_VERSION (0x423) |
| 245 | 245 | ||
| 246 | /* 6x50 Specific */ | 246 | /* 6x50 Specific */ |
| 247 | #define EEPROM_6050_TX_POWER_VERSION (4) | 247 | #define EEPROM_6050_TX_POWER_VERSION (4) |
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 36952274950e..c1ceb4b23971 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
| @@ -137,6 +137,7 @@ struct mwl8k_tx_queue { | |||
| 137 | struct mwl8k_priv { | 137 | struct mwl8k_priv { |
| 138 | struct ieee80211_hw *hw; | 138 | struct ieee80211_hw *hw; |
| 139 | struct pci_dev *pdev; | 139 | struct pci_dev *pdev; |
| 140 | int irq; | ||
| 140 | 141 | ||
| 141 | struct mwl8k_device_info *device_info; | 142 | struct mwl8k_device_info *device_info; |
| 142 | 143 | ||
| @@ -3761,9 +3762,11 @@ static int mwl8k_start(struct ieee80211_hw *hw) | |||
| 3761 | rc = request_irq(priv->pdev->irq, mwl8k_interrupt, | 3762 | rc = request_irq(priv->pdev->irq, mwl8k_interrupt, |
| 3762 | IRQF_SHARED, MWL8K_NAME, hw); | 3763 | IRQF_SHARED, MWL8K_NAME, hw); |
| 3763 | if (rc) { | 3764 | if (rc) { |
| 3765 | priv->irq = -1; | ||
| 3764 | wiphy_err(hw->wiphy, "failed to register IRQ handler\n"); | 3766 | wiphy_err(hw->wiphy, "failed to register IRQ handler\n"); |
| 3765 | return -EIO; | 3767 | return -EIO; |
| 3766 | } | 3768 | } |
| 3769 | priv->irq = priv->pdev->irq; | ||
| 3767 | 3770 | ||
| 3768 | /* Enable TX reclaim and RX tasklets. */ | 3771 | /* Enable TX reclaim and RX tasklets. */ |
| 3769 | tasklet_enable(&priv->poll_tx_task); | 3772 | tasklet_enable(&priv->poll_tx_task); |
| @@ -3800,6 +3803,7 @@ static int mwl8k_start(struct ieee80211_hw *hw) | |||
| 3800 | if (rc) { | 3803 | if (rc) { |
| 3801 | iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); | 3804 | iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); |
| 3802 | free_irq(priv->pdev->irq, hw); | 3805 | free_irq(priv->pdev->irq, hw); |
| 3806 | priv->irq = -1; | ||
| 3803 | tasklet_disable(&priv->poll_tx_task); | 3807 | tasklet_disable(&priv->poll_tx_task); |
| 3804 | tasklet_disable(&priv->poll_rx_task); | 3808 | tasklet_disable(&priv->poll_rx_task); |
| 3805 | } | 3809 | } |
| @@ -3818,7 +3822,10 @@ static void mwl8k_stop(struct ieee80211_hw *hw) | |||
| 3818 | 3822 | ||
| 3819 | /* Disable interrupts */ | 3823 | /* Disable interrupts */ |
| 3820 | iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); | 3824 | iowrite32(0, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK); |
| 3821 | free_irq(priv->pdev->irq, hw); | 3825 | if (priv->irq != -1) { |
| 3826 | free_irq(priv->pdev->irq, hw); | ||
| 3827 | priv->irq = -1; | ||
| 3828 | } | ||
| 3822 | 3829 | ||
| 3823 | /* Stop finalize join worker */ | 3830 | /* Stop finalize join worker */ |
| 3824 | cancel_work_sync(&priv->finalize_join_worker); | 3831 | cancel_work_sync(&priv->finalize_join_worker); |
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 9b344a921e74..e18358725b69 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c | |||
| @@ -56,6 +56,7 @@ static struct usb_device_id p54u_table[] __devinitdata = { | |||
| 56 | {USB_DEVICE(0x0846, 0x4210)}, /* Netgear WG121 the second ? */ | 56 | {USB_DEVICE(0x0846, 0x4210)}, /* Netgear WG121 the second ? */ |
| 57 | {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */ | 57 | {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */ |
| 58 | {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */ | 58 | {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */ |
| 59 | {USB_DEVICE(0x0bf8, 0x1007)}, /* Fujitsu E-5400 USB */ | ||
| 59 | {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */ | 60 | {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */ |
| 60 | {USB_DEVICE(0x0db0, 0x6826)}, /* MSI UB54G (MS-6826) */ | 61 | {USB_DEVICE(0x0db0, 0x6826)}, /* MSI UB54G (MS-6826) */ |
| 61 | {USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */ | 62 | {USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */ |
| @@ -68,6 +69,7 @@ static struct usb_device_id p54u_table[] __devinitdata = { | |||
| 68 | {USB_DEVICE(0x1915, 0x2235)}, /* Linksys WUSB54G Portable OEM */ | 69 | {USB_DEVICE(0x1915, 0x2235)}, /* Linksys WUSB54G Portable OEM */ |
| 69 | {USB_DEVICE(0x2001, 0x3701)}, /* DLink DWL-G120 Spinnaker */ | 70 | {USB_DEVICE(0x2001, 0x3701)}, /* DLink DWL-G120 Spinnaker */ |
| 70 | {USB_DEVICE(0x2001, 0x3703)}, /* DLink DWL-G122 */ | 71 | {USB_DEVICE(0x2001, 0x3703)}, /* DLink DWL-G122 */ |
| 72 | {USB_DEVICE(0x2001, 0x3762)}, /* Conceptronic C54U */ | ||
| 71 | {USB_DEVICE(0x5041, 0x2234)}, /* Linksys WUSB54G */ | 73 | {USB_DEVICE(0x5041, 0x2234)}, /* Linksys WUSB54G */ |
| 72 | {USB_DEVICE(0x5041, 0x2235)}, /* Linksys WUSB54G Portable */ | 74 | {USB_DEVICE(0x5041, 0x2235)}, /* Linksys WUSB54G Portable */ |
| 73 | 75 | ||
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c index 7834c26c2954..042842e704de 100644 --- a/drivers/net/wireless/p54/txrx.c +++ b/drivers/net/wireless/p54/txrx.c | |||
| @@ -703,7 +703,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
| 703 | struct p54_tx_info *p54info; | 703 | struct p54_tx_info *p54info; |
| 704 | struct p54_hdr *hdr; | 704 | struct p54_hdr *hdr; |
| 705 | struct p54_tx_data *txhdr; | 705 | struct p54_tx_data *txhdr; |
| 706 | unsigned int padding, len, extra_len; | 706 | unsigned int padding, len, extra_len = 0; |
| 707 | int i, j, ridx; | 707 | int i, j, ridx; |
| 708 | u16 hdr_flags = 0, aid = 0; | 708 | u16 hdr_flags = 0, aid = 0; |
| 709 | u8 rate, queue = 0, crypt_offset = 0; | 709 | u8 rate, queue = 0, crypt_offset = 0; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 9de9dbe94399..84eb6ad36377 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
| @@ -1062,8 +1062,10 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev) | |||
| 1062 | * Stop all work. | 1062 | * Stop all work. |
| 1063 | */ | 1063 | */ |
| 1064 | cancel_work_sync(&rt2x00dev->intf_work); | 1064 | cancel_work_sync(&rt2x00dev->intf_work); |
| 1065 | cancel_work_sync(&rt2x00dev->rxdone_work); | 1065 | if (rt2x00_is_usb(rt2x00dev)) { |
| 1066 | cancel_work_sync(&rt2x00dev->txdone_work); | 1066 | cancel_work_sync(&rt2x00dev->rxdone_work); |
| 1067 | cancel_work_sync(&rt2x00dev->txdone_work); | ||
| 1068 | } | ||
| 1067 | destroy_workqueue(rt2x00dev->workqueue); | 1069 | destroy_workqueue(rt2x00dev->workqueue); |
| 1068 | 1070 | ||
| 1069 | /* | 1071 | /* |
diff --git a/drivers/net/wireless/rtlwifi/efuse.c b/drivers/net/wireless/rtlwifi/efuse.c index f74a8701c67d..590f14f45a89 100644 --- a/drivers/net/wireless/rtlwifi/efuse.c +++ b/drivers/net/wireless/rtlwifi/efuse.c | |||
| @@ -685,7 +685,7 @@ static int efuse_pg_packet_read(struct ieee80211_hw *hw, u8 offset, u8 *data) | |||
| 685 | 685 | ||
| 686 | u8 efuse_data, word_cnts = 0; | 686 | u8 efuse_data, word_cnts = 0; |
| 687 | u16 efuse_addr = 0; | 687 | u16 efuse_addr = 0; |
| 688 | u8 hworden; | 688 | u8 hworden = 0; |
| 689 | u8 tmpdata[8]; | 689 | u8 tmpdata[8]; |
| 690 | 690 | ||
| 691 | if (data == NULL) | 691 | if (data == NULL) |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c index 5ef91374b230..28a6ce3bc239 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | |||
| @@ -303,7 +303,7 @@ static void _rtl92c_fill_h2c_command(struct ieee80211_hw *hw, | |||
| 303 | u16 box_reg, box_extreg; | 303 | u16 box_reg, box_extreg; |
| 304 | u8 u1b_tmp; | 304 | u8 u1b_tmp; |
| 305 | bool isfw_read = false; | 305 | bool isfw_read = false; |
| 306 | u8 buf_index; | 306 | u8 buf_index = 0; |
| 307 | bool bwrite_sucess = false; | 307 | bool bwrite_sucess = false; |
| 308 | u8 wait_h2c_limmit = 100; | 308 | u8 wait_h2c_limmit = 100; |
| 309 | u8 wait_writeh2c_limmit = 100; | 309 | u8 wait_writeh2c_limmit = 100; |
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c index a4b2613d6a8c..f5d85735d642 100644 --- a/drivers/net/wireless/rtlwifi/usb.c +++ b/drivers/net/wireless/rtlwifi/usb.c | |||
| @@ -246,7 +246,7 @@ static void _rtl_usb_io_handler_init(struct device *dev, | |||
| 246 | 246 | ||
| 247 | static void _rtl_usb_io_handler_release(struct ieee80211_hw *hw) | 247 | static void _rtl_usb_io_handler_release(struct ieee80211_hw *hw) |
| 248 | { | 248 | { |
| 249 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 249 | struct rtl_priv __maybe_unused *rtlpriv = rtl_priv(hw); |
| 250 | 250 | ||
| 251 | mutex_destroy(&rtlpriv->io.bb_mutex); | 251 | mutex_destroy(&rtlpriv->io.bb_mutex); |
| 252 | } | 252 | } |
diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c index 5b9dbeafec06..b1c7d031c391 100644 --- a/drivers/net/wireless/wl12xx/sdio.c +++ b/drivers/net/wireless/wl12xx/sdio.c | |||
| @@ -340,7 +340,7 @@ module_init(wl1271_init); | |||
| 340 | module_exit(wl1271_exit); | 340 | module_exit(wl1271_exit); |
| 341 | 341 | ||
| 342 | MODULE_LICENSE("GPL"); | 342 | MODULE_LICENSE("GPL"); |
| 343 | MODULE_AUTHOR("Luciano Coelho <luciano.coelho@nokia.com>"); | 343 | MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>"); |
| 344 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); | 344 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); |
| 345 | MODULE_FIRMWARE(WL1271_FW_NAME); | 345 | MODULE_FIRMWARE(WL1271_FW_NAME); |
| 346 | MODULE_FIRMWARE(WL1271_AP_FW_NAME); | 346 | MODULE_FIRMWARE(WL1271_AP_FW_NAME); |
diff --git a/drivers/net/wireless/wl12xx/spi.c b/drivers/net/wireless/wl12xx/spi.c index 18cf01719ae0..ffc745b17f4d 100644 --- a/drivers/net/wireless/wl12xx/spi.c +++ b/drivers/net/wireless/wl12xx/spi.c | |||
| @@ -487,7 +487,7 @@ module_init(wl1271_init); | |||
| 487 | module_exit(wl1271_exit); | 487 | module_exit(wl1271_exit); |
| 488 | 488 | ||
| 489 | MODULE_LICENSE("GPL"); | 489 | MODULE_LICENSE("GPL"); |
| 490 | MODULE_AUTHOR("Luciano Coelho <luciano.coelho@nokia.com>"); | 490 | MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>"); |
| 491 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); | 491 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); |
| 492 | MODULE_FIRMWARE(WL1271_FW_NAME); | 492 | MODULE_FIRMWARE(WL1271_FW_NAME); |
| 493 | MODULE_FIRMWARE(WL1271_AP_FW_NAME); | 493 | MODULE_FIRMWARE(WL1271_AP_FW_NAME); |
diff --git a/drivers/net/wireless/wl12xx/testmode.c b/drivers/net/wireless/wl12xx/testmode.c index e64403b6896d..6ec06a4a4c6d 100644 --- a/drivers/net/wireless/wl12xx/testmode.c +++ b/drivers/net/wireless/wl12xx/testmode.c | |||
| @@ -204,7 +204,10 @@ static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[]) | |||
| 204 | 204 | ||
| 205 | kfree(wl->nvs); | 205 | kfree(wl->nvs); |
| 206 | 206 | ||
| 207 | wl->nvs = kzalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL); | 207 | if (len != sizeof(struct wl1271_nvs_file)) |
| 208 | return -EINVAL; | ||
| 209 | |||
| 210 | wl->nvs = kzalloc(len, GFP_KERNEL); | ||
| 208 | if (!wl->nvs) { | 211 | if (!wl->nvs) { |
| 209 | wl1271_error("could not allocate memory for the nvs file"); | 212 | wl1271_error("could not allocate memory for the nvs file"); |
| 210 | ret = -ENOMEM; | 213 | ret = -ENOMEM; |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 58236e6d0921..ab607bbd6291 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
| @@ -643,7 +643,7 @@ static void rx_urb_complete(struct urb *urb) | |||
| 643 | usb = urb->context; | 643 | usb = urb->context; |
| 644 | rx = &usb->rx; | 644 | rx = &usb->rx; |
| 645 | 645 | ||
| 646 | zd_usb_reset_rx_idle_timer(usb); | 646 | tasklet_schedule(&rx->reset_timer_tasklet); |
| 647 | 647 | ||
| 648 | if (length%rx->usb_packet_size > rx->usb_packet_size-4) { | 648 | if (length%rx->usb_packet_size > rx->usb_packet_size-4) { |
| 649 | /* If there is an old first fragment, we don't care. */ | 649 | /* If there is an old first fragment, we don't care. */ |
| @@ -812,6 +812,7 @@ void zd_usb_disable_rx(struct zd_usb *usb) | |||
| 812 | __zd_usb_disable_rx(usb); | 812 | __zd_usb_disable_rx(usb); |
| 813 | mutex_unlock(&rx->setup_mutex); | 813 | mutex_unlock(&rx->setup_mutex); |
| 814 | 814 | ||
| 815 | tasklet_kill(&rx->reset_timer_tasklet); | ||
| 815 | cancel_delayed_work_sync(&rx->idle_work); | 816 | cancel_delayed_work_sync(&rx->idle_work); |
| 816 | } | 817 | } |
| 817 | 818 | ||
| @@ -1106,6 +1107,13 @@ static void zd_rx_idle_timer_handler(struct work_struct *work) | |||
| 1106 | zd_usb_reset_rx(usb); | 1107 | zd_usb_reset_rx(usb); |
| 1107 | } | 1108 | } |
| 1108 | 1109 | ||
| 1110 | static void zd_usb_reset_rx_idle_timer_tasklet(unsigned long param) | ||
| 1111 | { | ||
| 1112 | struct zd_usb *usb = (struct zd_usb *)param; | ||
| 1113 | |||
| 1114 | zd_usb_reset_rx_idle_timer(usb); | ||
| 1115 | } | ||
| 1116 | |||
| 1109 | void zd_usb_reset_rx_idle_timer(struct zd_usb *usb) | 1117 | void zd_usb_reset_rx_idle_timer(struct zd_usb *usb) |
| 1110 | { | 1118 | { |
| 1111 | struct zd_usb_rx *rx = &usb->rx; | 1119 | struct zd_usb_rx *rx = &usb->rx; |
| @@ -1127,6 +1135,7 @@ static inline void init_usb_interrupt(struct zd_usb *usb) | |||
| 1127 | static inline void init_usb_rx(struct zd_usb *usb) | 1135 | static inline void init_usb_rx(struct zd_usb *usb) |
| 1128 | { | 1136 | { |
| 1129 | struct zd_usb_rx *rx = &usb->rx; | 1137 | struct zd_usb_rx *rx = &usb->rx; |
| 1138 | |||
| 1130 | spin_lock_init(&rx->lock); | 1139 | spin_lock_init(&rx->lock); |
| 1131 | mutex_init(&rx->setup_mutex); | 1140 | mutex_init(&rx->setup_mutex); |
| 1132 | if (interface_to_usbdev(usb->intf)->speed == USB_SPEED_HIGH) { | 1141 | if (interface_to_usbdev(usb->intf)->speed == USB_SPEED_HIGH) { |
| @@ -1136,11 +1145,14 @@ static inline void init_usb_rx(struct zd_usb *usb) | |||
| 1136 | } | 1145 | } |
| 1137 | ZD_ASSERT(rx->fragment_length == 0); | 1146 | ZD_ASSERT(rx->fragment_length == 0); |
| 1138 | INIT_DELAYED_WORK(&rx->idle_work, zd_rx_idle_timer_handler); | 1147 | INIT_DELAYED_WORK(&rx->idle_work, zd_rx_idle_timer_handler); |
| 1148 | rx->reset_timer_tasklet.func = zd_usb_reset_rx_idle_timer_tasklet; | ||
| 1149 | rx->reset_timer_tasklet.data = (unsigned long)usb; | ||
| 1139 | } | 1150 | } |
| 1140 | 1151 | ||
| 1141 | static inline void init_usb_tx(struct zd_usb *usb) | 1152 | static inline void init_usb_tx(struct zd_usb *usb) |
| 1142 | { | 1153 | { |
| 1143 | struct zd_usb_tx *tx = &usb->tx; | 1154 | struct zd_usb_tx *tx = &usb->tx; |
| 1155 | |||
| 1144 | spin_lock_init(&tx->lock); | 1156 | spin_lock_init(&tx->lock); |
| 1145 | atomic_set(&tx->enabled, 0); | 1157 | atomic_set(&tx->enabled, 0); |
| 1146 | tx->stopped = 0; | 1158 | tx->stopped = 0; |
| @@ -1671,6 +1683,10 @@ static void iowrite16v_urb_complete(struct urb *urb) | |||
| 1671 | 1683 | ||
| 1672 | if (urb->status && !usb->cmd_error) | 1684 | if (urb->status && !usb->cmd_error) |
| 1673 | usb->cmd_error = urb->status; | 1685 | usb->cmd_error = urb->status; |
| 1686 | |||
| 1687 | if (!usb->cmd_error && | ||
| 1688 | urb->actual_length != urb->transfer_buffer_length) | ||
| 1689 | usb->cmd_error = -EIO; | ||
| 1674 | } | 1690 | } |
| 1675 | 1691 | ||
| 1676 | static int zd_submit_waiting_urb(struct zd_usb *usb, bool last) | 1692 | static int zd_submit_waiting_urb(struct zd_usb *usb, bool last) |
| @@ -1805,7 +1821,7 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, | |||
| 1805 | usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), | 1821 | usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), |
| 1806 | req, req_len, iowrite16v_urb_complete, usb, | 1822 | req, req_len, iowrite16v_urb_complete, usb, |
| 1807 | ep->desc.bInterval); | 1823 | ep->desc.bInterval); |
| 1808 | urb->transfer_flags |= URB_FREE_BUFFER | URB_SHORT_NOT_OK; | 1824 | urb->transfer_flags |= URB_FREE_BUFFER; |
| 1809 | 1825 | ||
| 1810 | /* Submit previous URB */ | 1826 | /* Submit previous URB */ |
| 1811 | r = zd_submit_waiting_urb(usb, false); | 1827 | r = zd_submit_waiting_urb(usb, false); |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.h b/drivers/net/wireless/zd1211rw/zd_usb.h index b3df2c8116cc..325d0f989257 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.h +++ b/drivers/net/wireless/zd1211rw/zd_usb.h | |||
| @@ -183,6 +183,7 @@ struct zd_usb_rx { | |||
| 183 | spinlock_t lock; | 183 | spinlock_t lock; |
| 184 | struct mutex setup_mutex; | 184 | struct mutex setup_mutex; |
| 185 | struct delayed_work idle_work; | 185 | struct delayed_work idle_work; |
| 186 | struct tasklet_struct reset_timer_tasklet; | ||
| 186 | u8 fragment[2 * USB_MAX_RX_SIZE]; | 187 | u8 fragment[2 * USB_MAX_RX_SIZE]; |
| 187 | unsigned int fragment_length; | 188 | unsigned int fragment_length; |
| 188 | unsigned int usb_packet_size; | 189 | unsigned int usb_packet_size; |
