diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 60 | ||||
-rw-r--r-- | drivers/net/wireless/ath5k/base.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath5k/debug.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath5k/desc.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/ath5k/initvals.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath5k/reset.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/rx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco.c | 42 | ||||
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 31 | ||||
-rw-r--r-- | drivers/net/wireless/p54/p54pci.c | 132 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_usb.c | 2 |
17 files changed, 192 insertions, 162 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 9b95c4049b3..cfd4d052d66 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -340,9 +340,9 @@ static inline u64 ath5k_extend_tsf(struct ath5k_hw *ah, u32 rstamp) | |||
340 | } | 340 | } |
341 | 341 | ||
342 | /* Interrupt handling */ | 342 | /* Interrupt handling */ |
343 | static int ath5k_init(struct ath5k_softc *sc); | 343 | static int ath5k_init(struct ath5k_softc *sc, bool is_resume); |
344 | static int ath5k_stop_locked(struct ath5k_softc *sc); | 344 | static int ath5k_stop_locked(struct ath5k_softc *sc); |
345 | static int ath5k_stop_hw(struct ath5k_softc *sc); | 345 | static int ath5k_stop_hw(struct ath5k_softc *sc, bool is_suspend); |
346 | static irqreturn_t ath5k_intr(int irq, void *dev_id); | 346 | static irqreturn_t ath5k_intr(int irq, void *dev_id); |
347 | static void ath5k_tasklet_reset(unsigned long data); | 347 | static void ath5k_tasklet_reset(unsigned long data); |
348 | 348 | ||
@@ -646,7 +646,7 @@ ath5k_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
646 | 646 | ||
647 | ath5k_led_off(sc); | 647 | ath5k_led_off(sc); |
648 | 648 | ||
649 | ath5k_stop_hw(sc); | 649 | ath5k_stop_hw(sc, true); |
650 | 650 | ||
651 | free_irq(pdev->irq, sc); | 651 | free_irq(pdev->irq, sc); |
652 | pci_save_state(pdev); | 652 | pci_save_state(pdev); |
@@ -661,8 +661,7 @@ ath5k_pci_resume(struct pci_dev *pdev) | |||
661 | { | 661 | { |
662 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); | 662 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); |
663 | struct ath5k_softc *sc = hw->priv; | 663 | struct ath5k_softc *sc = hw->priv; |
664 | struct ath5k_hw *ah = sc->ah; | 664 | int err; |
665 | int i, err; | ||
666 | 665 | ||
667 | pci_restore_state(pdev); | 666 | pci_restore_state(pdev); |
668 | 667 | ||
@@ -683,21 +682,11 @@ ath5k_pci_resume(struct pci_dev *pdev) | |||
683 | goto err_no_irq; | 682 | goto err_no_irq; |
684 | } | 683 | } |
685 | 684 | ||
686 | err = ath5k_init(sc); | 685 | err = ath5k_init(sc, true); |
687 | if (err) | 686 | if (err) |
688 | goto err_irq; | 687 | goto err_irq; |
689 | ath5k_led_enable(sc); | 688 | ath5k_led_enable(sc); |
690 | 689 | ||
691 | /* | ||
692 | * Reset the key cache since some parts do not | ||
693 | * reset the contents on initial power up or resume. | ||
694 | * | ||
695 | * FIXME: This may need to be revisited when mac80211 becomes | ||
696 | * aware of suspend/resume. | ||
697 | */ | ||
698 | for (i = 0; i < AR5K_KEYTABLE_SIZE; i++) | ||
699 | ath5k_hw_reset_key(ah, i); | ||
700 | |||
701 | return 0; | 690 | return 0; |
702 | err_irq: | 691 | err_irq: |
703 | free_irq(pdev->irq, sc); | 692 | free_irq(pdev->irq, sc); |
@@ -718,7 +707,6 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw) | |||
718 | struct ath5k_softc *sc = hw->priv; | 707 | struct ath5k_softc *sc = hw->priv; |
719 | struct ath5k_hw *ah = sc->ah; | 708 | struct ath5k_hw *ah = sc->ah; |
720 | u8 mac[ETH_ALEN]; | 709 | u8 mac[ETH_ALEN]; |
721 | unsigned int i; | ||
722 | int ret; | 710 | int ret; |
723 | 711 | ||
724 | ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device); | 712 | ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device); |
@@ -737,13 +725,6 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw) | |||
737 | __set_bit(ATH_STAT_MRRETRY, sc->status); | 725 | __set_bit(ATH_STAT_MRRETRY, sc->status); |
738 | 726 | ||
739 | /* | 727 | /* |
740 | * Reset the key cache since some parts do not | ||
741 | * reset the contents on initial power up. | ||
742 | */ | ||
743 | for (i = 0; i < AR5K_KEYTABLE_SIZE; i++) | ||
744 | ath5k_hw_reset_key(ah, i); | ||
745 | |||
746 | /* | ||
747 | * Collect the channel list. The 802.11 layer | 728 | * Collect the channel list. The 802.11 layer |
748 | * is resposible for filtering this list based | 729 | * is resposible for filtering this list based |
749 | * on settings like the phy mode and regulatory | 730 | * on settings like the phy mode and regulatory |
@@ -2200,12 +2181,18 @@ ath5k_beacon_config(struct ath5k_softc *sc) | |||
2200 | \********************/ | 2181 | \********************/ |
2201 | 2182 | ||
2202 | static int | 2183 | static int |
2203 | ath5k_init(struct ath5k_softc *sc) | 2184 | ath5k_init(struct ath5k_softc *sc, bool is_resume) |
2204 | { | 2185 | { |
2205 | int ret; | 2186 | struct ath5k_hw *ah = sc->ah; |
2187 | int ret, i; | ||
2206 | 2188 | ||
2207 | mutex_lock(&sc->lock); | 2189 | mutex_lock(&sc->lock); |
2208 | 2190 | ||
2191 | if (is_resume && !test_bit(ATH_STAT_STARTED, sc->status)) | ||
2192 | goto out_ok; | ||
2193 | |||
2194 | __clear_bit(ATH_STAT_STARTED, sc->status); | ||
2195 | |||
2209 | ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "mode %d\n", sc->opmode); | 2196 | ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "mode %d\n", sc->opmode); |
2210 | 2197 | ||
2211 | /* | 2198 | /* |
@@ -2230,12 +2217,22 @@ ath5k_init(struct ath5k_softc *sc) | |||
2230 | if (ret) | 2217 | if (ret) |
2231 | goto done; | 2218 | goto done; |
2232 | 2219 | ||
2220 | /* | ||
2221 | * Reset the key cache since some parts do not reset the | ||
2222 | * contents on initial power up or resume from suspend. | ||
2223 | */ | ||
2224 | for (i = 0; i < AR5K_KEYTABLE_SIZE; i++) | ||
2225 | ath5k_hw_reset_key(ah, i); | ||
2226 | |||
2227 | __set_bit(ATH_STAT_STARTED, sc->status); | ||
2228 | |||
2233 | /* Set ack to be sent at low bit-rates */ | 2229 | /* Set ack to be sent at low bit-rates */ |
2234 | ath5k_hw_set_ack_bitrate_high(sc->ah, false); | 2230 | ath5k_hw_set_ack_bitrate_high(ah, false); |
2235 | 2231 | ||
2236 | mod_timer(&sc->calib_tim, round_jiffies(jiffies + | 2232 | mod_timer(&sc->calib_tim, round_jiffies(jiffies + |
2237 | msecs_to_jiffies(ath5k_calinterval * 1000))); | 2233 | msecs_to_jiffies(ath5k_calinterval * 1000))); |
2238 | 2234 | ||
2235 | out_ok: | ||
2239 | ret = 0; | 2236 | ret = 0; |
2240 | done: | 2237 | done: |
2241 | mmiowb(); | 2238 | mmiowb(); |
@@ -2290,7 +2287,7 @@ ath5k_stop_locked(struct ath5k_softc *sc) | |||
2290 | * stop is preempted). | 2287 | * stop is preempted). |
2291 | */ | 2288 | */ |
2292 | static int | 2289 | static int |
2293 | ath5k_stop_hw(struct ath5k_softc *sc) | 2290 | ath5k_stop_hw(struct ath5k_softc *sc, bool is_suspend) |
2294 | { | 2291 | { |
2295 | int ret; | 2292 | int ret; |
2296 | 2293 | ||
@@ -2321,6 +2318,9 @@ ath5k_stop_hw(struct ath5k_softc *sc) | |||
2321 | } | 2318 | } |
2322 | } | 2319 | } |
2323 | ath5k_txbuf_free(sc, sc->bbuf); | 2320 | ath5k_txbuf_free(sc, sc->bbuf); |
2321 | if (!is_suspend) | ||
2322 | __clear_bit(ATH_STAT_STARTED, sc->status); | ||
2323 | |||
2324 | mmiowb(); | 2324 | mmiowb(); |
2325 | mutex_unlock(&sc->lock); | 2325 | mutex_unlock(&sc->lock); |
2326 | 2326 | ||
@@ -2718,12 +2718,12 @@ ath5k_reset_wake(struct ath5k_softc *sc) | |||
2718 | 2718 | ||
2719 | static int ath5k_start(struct ieee80211_hw *hw) | 2719 | static int ath5k_start(struct ieee80211_hw *hw) |
2720 | { | 2720 | { |
2721 | return ath5k_init(hw->priv); | 2721 | return ath5k_init(hw->priv, false); |
2722 | } | 2722 | } |
2723 | 2723 | ||
2724 | static void ath5k_stop(struct ieee80211_hw *hw) | 2724 | static void ath5k_stop(struct ieee80211_hw *hw) |
2725 | { | 2725 | { |
2726 | ath5k_stop_hw(hw->priv); | 2726 | ath5k_stop_hw(hw->priv, false); |
2727 | } | 2727 | } |
2728 | 2728 | ||
2729 | static int ath5k_add_interface(struct ieee80211_hw *hw, | 2729 | static int ath5k_add_interface(struct ieee80211_hw *hw, |
diff --git a/drivers/net/wireless/ath5k/base.h b/drivers/net/wireless/ath5k/base.h index 9d0b728928e..06d1054ca94 100644 --- a/drivers/net/wireless/ath5k/base.h +++ b/drivers/net/wireless/ath5k/base.h | |||
@@ -128,11 +128,12 @@ struct ath5k_softc { | |||
128 | size_t desc_len; /* size of TX/RX descriptors */ | 128 | size_t desc_len; /* size of TX/RX descriptors */ |
129 | u16 cachelsz; /* cache line size */ | 129 | u16 cachelsz; /* cache line size */ |
130 | 130 | ||
131 | DECLARE_BITMAP(status, 4); | 131 | DECLARE_BITMAP(status, 5); |
132 | #define ATH_STAT_INVALID 0 /* disable hardware accesses */ | 132 | #define ATH_STAT_INVALID 0 /* disable hardware accesses */ |
133 | #define ATH_STAT_MRRETRY 1 /* multi-rate retry support */ | 133 | #define ATH_STAT_MRRETRY 1 /* multi-rate retry support */ |
134 | #define ATH_STAT_PROMISC 2 | 134 | #define ATH_STAT_PROMISC 2 |
135 | #define ATH_STAT_LEDSOFT 3 /* enable LED gpio status */ | 135 | #define ATH_STAT_LEDSOFT 3 /* enable LED gpio status */ |
136 | #define ATH_STAT_STARTED 4 /* opened & irqs enabled */ | ||
136 | 137 | ||
137 | unsigned int filter_flags; /* HW flags, AR5K_RX_FILTER_* */ | 138 | unsigned int filter_flags; /* HW flags, AR5K_RX_FILTER_* */ |
138 | unsigned int curmode; /* current phy mode */ | 139 | unsigned int curmode; /* current phy mode */ |
diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c index 8f92d670f61..19980cbd5d5 100644 --- a/drivers/net/wireless/ath5k/debug.c +++ b/drivers/net/wireless/ath5k/debug.c | |||
@@ -339,7 +339,7 @@ static struct { | |||
339 | { ATH5K_DEBUG_BEACON, "beacon", "beacon handling" }, | 339 | { ATH5K_DEBUG_BEACON, "beacon", "beacon handling" }, |
340 | { ATH5K_DEBUG_CALIBRATE, "calib", "periodic calibration" }, | 340 | { ATH5K_DEBUG_CALIBRATE, "calib", "periodic calibration" }, |
341 | { ATH5K_DEBUG_TXPOWER, "txpower", "transmit power setting" }, | 341 | { ATH5K_DEBUG_TXPOWER, "txpower", "transmit power setting" }, |
342 | { ATH5K_DEBUG_LED, "led", "LED mamagement" }, | 342 | { ATH5K_DEBUG_LED, "led", "LED management" }, |
343 | { ATH5K_DEBUG_DUMP_RX, "dumprx", "print received skb content" }, | 343 | { ATH5K_DEBUG_DUMP_RX, "dumprx", "print received skb content" }, |
344 | { ATH5K_DEBUG_DUMP_TX, "dumptx", "print transmit skb content" }, | 344 | { ATH5K_DEBUG_DUMP_TX, "dumptx", "print transmit skb content" }, |
345 | { ATH5K_DEBUG_DUMPBANDS, "dumpbands", "dump bands" }, | 345 | { ATH5K_DEBUG_DUMPBANDS, "dumpbands", "dump bands" }, |
diff --git a/drivers/net/wireless/ath5k/desc.c b/drivers/net/wireless/ath5k/desc.c index dd1374052ba..5e362a7a362 100644 --- a/drivers/net/wireless/ath5k/desc.c +++ b/drivers/net/wireless/ath5k/desc.c | |||
@@ -531,10 +531,10 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah, | |||
531 | AR5K_5210_RX_DESC_STATUS0_RECEIVE_SIGNAL); | 531 | AR5K_5210_RX_DESC_STATUS0_RECEIVE_SIGNAL); |
532 | rs->rs_rate = AR5K_REG_MS(rx_status->rx_status_0, | 532 | rs->rs_rate = AR5K_REG_MS(rx_status->rx_status_0, |
533 | AR5K_5210_RX_DESC_STATUS0_RECEIVE_RATE); | 533 | AR5K_5210_RX_DESC_STATUS0_RECEIVE_RATE); |
534 | rs->rs_antenna = rx_status->rx_status_0 & | 534 | rs->rs_antenna = AR5K_REG_MS(rx_status->rx_status_0, |
535 | AR5K_5210_RX_DESC_STATUS0_RECEIVE_ANTENNA; | 535 | AR5K_5210_RX_DESC_STATUS0_RECEIVE_ANTENNA); |
536 | rs->rs_more = rx_status->rx_status_0 & | 536 | rs->rs_more = !!(rx_status->rx_status_0 & |
537 | AR5K_5210_RX_DESC_STATUS0_MORE; | 537 | AR5K_5210_RX_DESC_STATUS0_MORE); |
538 | /* TODO: this timestamp is 13 bit, later on we assume 15 bit */ | 538 | /* TODO: this timestamp is 13 bit, later on we assume 15 bit */ |
539 | rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, | 539 | rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, |
540 | AR5K_5210_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); | 540 | AR5K_5210_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); |
@@ -607,10 +607,10 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah, | |||
607 | AR5K_5212_RX_DESC_STATUS0_RECEIVE_SIGNAL); | 607 | AR5K_5212_RX_DESC_STATUS0_RECEIVE_SIGNAL); |
608 | rs->rs_rate = AR5K_REG_MS(rx_status->rx_status_0, | 608 | rs->rs_rate = AR5K_REG_MS(rx_status->rx_status_0, |
609 | AR5K_5212_RX_DESC_STATUS0_RECEIVE_RATE); | 609 | AR5K_5212_RX_DESC_STATUS0_RECEIVE_RATE); |
610 | rs->rs_antenna = rx_status->rx_status_0 & | 610 | rs->rs_antenna = AR5K_REG_MS(rx_status->rx_status_0, |
611 | AR5K_5212_RX_DESC_STATUS0_RECEIVE_ANTENNA; | 611 | AR5K_5212_RX_DESC_STATUS0_RECEIVE_ANTENNA); |
612 | rs->rs_more = rx_status->rx_status_0 & | 612 | rs->rs_more = !!(rx_status->rx_status_0 & |
613 | AR5K_5212_RX_DESC_STATUS0_MORE; | 613 | AR5K_5212_RX_DESC_STATUS0_MORE); |
614 | rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, | 614 | rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, |
615 | AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); | 615 | AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); |
616 | rs->rs_status = 0; | 616 | rs->rs_status = 0; |
diff --git a/drivers/net/wireless/ath5k/initvals.c b/drivers/net/wireless/ath5k/initvals.c index ea2e1a20b49..ceaa6c475c0 100644 --- a/drivers/net/wireless/ath5k/initvals.c +++ b/drivers/net/wireless/ath5k/initvals.c | |||
@@ -806,6 +806,8 @@ static const struct ath5k_ini_mode ar5212_rf5111_ini_mode_end[] = { | |||
806 | { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }, | 806 | { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }, |
807 | { AR5K_PHY(642), | 807 | { AR5K_PHY(642), |
808 | { 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788 } }, | 808 | { 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788 } }, |
809 | { 0xa228, | ||
810 | { 0x000001b5, 0x000001b5, 0x000001b5, 0x000001b5, 0x000001b5 } }, | ||
809 | { 0xa23c, | 811 | { 0xa23c, |
810 | { 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af } }, | 812 | { 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af } }, |
811 | }; | 813 | }; |
diff --git a/drivers/net/wireless/ath5k/reset.c b/drivers/net/wireless/ath5k/reset.c index 8f1886834e6..1b6d45b6772 100644 --- a/drivers/net/wireless/ath5k/reset.c +++ b/drivers/net/wireless/ath5k/reset.c | |||
@@ -537,9 +537,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, | |||
537 | mdelay(1); | 537 | mdelay(1); |
538 | 538 | ||
539 | /* | 539 | /* |
540 | * Write some more initial register settings | 540 | * Write some more initial register settings for revised chips |
541 | */ | 541 | */ |
542 | if (ah->ah_version == AR5K_AR5212) { | 542 | if (ah->ah_version == AR5K_AR5212 && |
543 | ah->ah_phy_revision > 0x41) { | ||
543 | ath5k_hw_reg_write(ah, 0x0002a002, 0x982c); | 544 | ath5k_hw_reg_write(ah, 0x0002a002, 0x982c); |
544 | 545 | ||
545 | if (channel->hw_value == CHANNEL_G) | 546 | if (channel->hw_value == CHANNEL_G) |
@@ -558,19 +559,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, | |||
558 | else | 559 | else |
559 | ath5k_hw_reg_write(ah, 0x00000000, 0x994c); | 560 | ath5k_hw_reg_write(ah, 0x00000000, 0x994c); |
560 | 561 | ||
561 | /* Some bits are disabled here, we know nothing about | 562 | /* Got this from legacy-hal */ |
562 | * register 0xa228 yet, most of the times this ends up | 563 | AR5K_REG_DISABLE_BITS(ah, 0xa228, 0x200); |
563 | * with a value 0x9b5 -haven't seen any dump with | 564 | |
564 | * a different value- */ | 565 | AR5K_REG_MASKED_BITS(ah, 0xa228, 0x800, 0xfffe03ff); |
565 | /* Got this from decompiling binary HAL */ | ||
566 | data = ath5k_hw_reg_read(ah, 0xa228); | ||
567 | data &= 0xfffffdff; | ||
568 | ath5k_hw_reg_write(ah, data, 0xa228); | ||
569 | |||
570 | data = ath5k_hw_reg_read(ah, 0xa228); | ||
571 | data &= 0xfffe03ff; | ||
572 | ath5k_hw_reg_write(ah, data, 0xa228); | ||
573 | data = 0; | ||
574 | 566 | ||
575 | /* Just write 0x9b5 ? */ | 567 | /* Just write 0x9b5 ? */ |
576 | /* ath5k_hw_reg_write(ah, 0x000009b5, 0xa228); */ | 568 | /* ath5k_hw_reg_write(ah, 0x000009b5, 0xa228); */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 24a1aeb6448..8d690a0eb1a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2090,7 +2090,6 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2090 | iwl4965_error_recovery(priv); | 2090 | iwl4965_error_recovery(priv); |
2091 | 2091 | ||
2092 | iwl_power_update_mode(priv, 1); | 2092 | iwl_power_update_mode(priv, 1); |
2093 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); | ||
2094 | 2093 | ||
2095 | if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status)) | 2094 | if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status)) |
2096 | iwl4965_set_mode(priv, priv->iw_mode); | 2095 | iwl4965_set_mode(priv, priv->iw_mode); |
@@ -2342,6 +2341,7 @@ static void iwl_bg_alive_start(struct work_struct *data) | |||
2342 | mutex_lock(&priv->mutex); | 2341 | mutex_lock(&priv->mutex); |
2343 | iwl_alive_start(priv); | 2342 | iwl_alive_start(priv); |
2344 | mutex_unlock(&priv->mutex); | 2343 | mutex_unlock(&priv->mutex); |
2344 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); | ||
2345 | } | 2345 | } |
2346 | 2346 | ||
2347 | static void iwl4965_bg_rf_kill(struct work_struct *work) | 2347 | static void iwl4965_bg_rf_kill(struct work_struct *work) |
@@ -3252,7 +3252,11 @@ static void iwl4965_mac_update_tkip_key(struct ieee80211_hw *hw, | |||
3252 | return; | 3252 | return; |
3253 | } | 3253 | } |
3254 | 3254 | ||
3255 | iwl_scan_cancel_timeout(priv, 100); | 3255 | if (iwl_scan_cancel(priv)) { |
3256 | /* cancel scan failed, just live w/ bad key and rely | ||
3257 | briefly on SW decryption */ | ||
3258 | return; | ||
3259 | } | ||
3256 | 3260 | ||
3257 | key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK); | 3261 | key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK); |
3258 | key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); | 3262 | key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 3b0bee331a3..c89365e2ca5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -896,6 +896,13 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
896 | return; | 896 | return; |
897 | 897 | ||
898 | done: | 898 | done: |
899 | /* Cannot perform scan. Make sure we clear scanning | ||
900 | * bits from status so next scan request can be performed. | ||
901 | * If we don't clear scanning status bit here all next scan | ||
902 | * will fail | ||
903 | */ | ||
904 | clear_bit(STATUS_SCAN_HW, &priv->status); | ||
905 | clear_bit(STATUS_SCANNING, &priv->status); | ||
899 | /* inform mac80211 scan aborted */ | 906 | /* inform mac80211 scan aborted */ |
900 | queue_work(priv->workqueue, &priv->scan_completed); | 907 | queue_work(priv->workqueue, &priv->scan_completed); |
901 | mutex_unlock(&priv->mutex); | 908 | mutex_unlock(&priv->mutex); |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index d15a2c99795..285b53e7e26 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -5768,7 +5768,6 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv) | |||
5768 | if (priv->error_recovering) | 5768 | if (priv->error_recovering) |
5769 | iwl3945_error_recovery(priv); | 5769 | iwl3945_error_recovery(priv); |
5770 | 5770 | ||
5771 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); | ||
5772 | return; | 5771 | return; |
5773 | 5772 | ||
5774 | restart: | 5773 | restart: |
@@ -6013,6 +6012,7 @@ static void iwl3945_bg_alive_start(struct work_struct *data) | |||
6013 | mutex_lock(&priv->mutex); | 6012 | mutex_lock(&priv->mutex); |
6014 | iwl3945_alive_start(priv); | 6013 | iwl3945_alive_start(priv); |
6015 | mutex_unlock(&priv->mutex); | 6014 | mutex_unlock(&priv->mutex); |
6015 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); | ||
6016 | } | 6016 | } |
6017 | 6017 | ||
6018 | static void iwl3945_bg_rf_kill(struct work_struct *work) | 6018 | static void iwl3945_bg_rf_kill(struct work_struct *work) |
@@ -6256,6 +6256,11 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
6256 | n_probes, | 6256 | n_probes, |
6257 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); | 6257 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); |
6258 | 6258 | ||
6259 | if (scan->channel_count == 0) { | ||
6260 | IWL_DEBUG_SCAN("channel count %d\n", scan->channel_count); | ||
6261 | goto done; | ||
6262 | } | ||
6263 | |||
6259 | cmd.len += le16_to_cpu(scan->tx_cmd.len) + | 6264 | cmd.len += le16_to_cpu(scan->tx_cmd.len) + |
6260 | scan->channel_count * sizeof(struct iwl3945_scan_channel); | 6265 | scan->channel_count * sizeof(struct iwl3945_scan_channel); |
6261 | cmd.data = scan; | 6266 | cmd.data = scan; |
@@ -6273,6 +6278,14 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
6273 | return; | 6278 | return; |
6274 | 6279 | ||
6275 | done: | 6280 | done: |
6281 | /* can not perform scan make sure we clear scanning | ||
6282 | * bits from status so next scan request can be performed. | ||
6283 | * if we dont clear scanning status bit here all next scan | ||
6284 | * will fail | ||
6285 | */ | ||
6286 | clear_bit(STATUS_SCAN_HW, &priv->status); | ||
6287 | clear_bit(STATUS_SCANNING, &priv->status); | ||
6288 | |||
6276 | /* inform mac80211 scan aborted */ | 6289 | /* inform mac80211 scan aborted */ |
6277 | queue_work(priv->workqueue, &priv->scan_completed); | 6290 | queue_work(priv->workqueue, &priv->scan_completed); |
6278 | mutex_unlock(&priv->mutex); | 6291 | mutex_unlock(&priv->mutex); |
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 297696de2da..8265c7d25ed 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -605,9 +605,9 @@ int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel, | |||
605 | if (ret == 0) { | 605 | if (ret == 0) { |
606 | *curlevel = le16_to_cpu(cmd.curlevel); | 606 | *curlevel = le16_to_cpu(cmd.curlevel); |
607 | if (minlevel) | 607 | if (minlevel) |
608 | *minlevel = le16_to_cpu(cmd.minlevel); | 608 | *minlevel = cmd.minlevel; |
609 | if (maxlevel) | 609 | if (maxlevel) |
610 | *maxlevel = le16_to_cpu(cmd.maxlevel); | 610 | *maxlevel = cmd.maxlevel; |
611 | } | 611 | } |
612 | 612 | ||
613 | lbs_deb_leave(LBS_DEB_CMD); | 613 | lbs_deb_leave(LBS_DEB_CMD); |
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index 5749f22b296..079e6aa874d 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c | |||
@@ -328,7 +328,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv, | |||
328 | lbs_deb_rx("rx err: frame received with bad length\n"); | 328 | lbs_deb_rx("rx err: frame received with bad length\n"); |
329 | priv->stats.rx_length_errors++; | 329 | priv->stats.rx_length_errors++; |
330 | ret = -EINVAL; | 330 | ret = -EINVAL; |
331 | kfree(skb); | 331 | kfree_skb(skb); |
332 | goto done; | 332 | goto done; |
333 | } | 333 | } |
334 | 334 | ||
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 8f66903641b..22c4c611052 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -598,8 +598,8 @@ static int lbs_process_bss(struct bss_descriptor *bss, | |||
598 | 598 | ||
599 | switch (elem->id) { | 599 | switch (elem->id) { |
600 | case MFIE_TYPE_SSID: | 600 | case MFIE_TYPE_SSID: |
601 | bss->ssid_len = elem->len; | 601 | bss->ssid_len = min_t(int, 32, elem->len); |
602 | memcpy(bss->ssid, elem->data, elem->len); | 602 | memcpy(bss->ssid, elem->data, bss->ssid_len); |
603 | lbs_deb_scan("got SSID IE: '%s', len %u\n", | 603 | lbs_deb_scan("got SSID IE: '%s', len %u\n", |
604 | escape_essid(bss->ssid, bss->ssid_len), | 604 | escape_essid(bss->ssid, bss->ssid_len), |
605 | bss->ssid_len); | 605 | bss->ssid_len); |
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 50904771f29..e0512e49d6d 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -433,7 +433,7 @@ struct fw_info { | |||
433 | const static struct fw_info orinoco_fw[] = { | 433 | const static struct fw_info orinoco_fw[] = { |
434 | { "", "agere_sta_fw.bin", "agere_ap_fw.bin", 0x00390000, 1000 }, | 434 | { "", "agere_sta_fw.bin", "agere_ap_fw.bin", 0x00390000, 1000 }, |
435 | { "", "prism_sta_fw.bin", "prism_ap_fw.bin", 0, 1024 }, | 435 | { "", "prism_sta_fw.bin", "prism_ap_fw.bin", 0, 1024 }, |
436 | { "symbol_sp24t_prim_fw", "symbol_sp24t_sec_fw", "", 0x00003100, 0x100 } | 436 | { "symbol_sp24t_prim_fw", "symbol_sp24t_sec_fw", "", 0x00003100, 512 } |
437 | }; | 437 | }; |
438 | 438 | ||
439 | /* Structure used to access fields in FW | 439 | /* Structure used to access fields in FW |
@@ -458,7 +458,7 @@ orinoco_dl_firmware(struct orinoco_private *priv, | |||
458 | int ap) | 458 | int ap) |
459 | { | 459 | { |
460 | /* Plug Data Area (PDA) */ | 460 | /* Plug Data Area (PDA) */ |
461 | __le16 pda[512] = { 0 }; | 461 | __le16 *pda; |
462 | 462 | ||
463 | hermes_t *hw = &priv->hw; | 463 | hermes_t *hw = &priv->hw; |
464 | const struct firmware *fw_entry; | 464 | const struct firmware *fw_entry; |
@@ -467,7 +467,11 @@ orinoco_dl_firmware(struct orinoco_private *priv, | |||
467 | const unsigned char *end; | 467 | const unsigned char *end; |
468 | const char *firmware; | 468 | const char *firmware; |
469 | struct net_device *dev = priv->ndev; | 469 | struct net_device *dev = priv->ndev; |
470 | int err; | 470 | int err = 0; |
471 | |||
472 | pda = kzalloc(fw->pda_size, GFP_KERNEL); | ||
473 | if (!pda) | ||
474 | return -ENOMEM; | ||
471 | 475 | ||
472 | if (ap) | 476 | if (ap) |
473 | firmware = fw->ap_fw; | 477 | firmware = fw->ap_fw; |
@@ -478,17 +482,17 @@ orinoco_dl_firmware(struct orinoco_private *priv, | |||
478 | dev->name, firmware); | 482 | dev->name, firmware); |
479 | 483 | ||
480 | /* Read current plug data */ | 484 | /* Read current plug data */ |
481 | err = hermes_read_pda(hw, pda, fw->pda_addr, | 485 | err = hermes_read_pda(hw, pda, fw->pda_addr, fw->pda_size, 0); |
482 | min_t(u16, fw->pda_size, sizeof(pda)), 0); | ||
483 | printk(KERN_DEBUG "%s: Read PDA returned %d\n", dev->name, err); | 486 | printk(KERN_DEBUG "%s: Read PDA returned %d\n", dev->name, err); |
484 | if (err) | 487 | if (err) |
485 | return err; | 488 | goto free; |
486 | 489 | ||
487 | err = request_firmware(&fw_entry, firmware, priv->dev); | 490 | err = request_firmware(&fw_entry, firmware, priv->dev); |
488 | if (err) { | 491 | if (err) { |
489 | printk(KERN_ERR "%s: Cannot find firmware %s\n", | 492 | printk(KERN_ERR "%s: Cannot find firmware %s\n", |
490 | dev->name, firmware); | 493 | dev->name, firmware); |
491 | return -ENOENT; | 494 | err = -ENOENT; |
495 | goto free; | ||
492 | } | 496 | } |
493 | 497 | ||
494 | hdr = (const struct orinoco_fw_header *) fw_entry->data; | 498 | hdr = (const struct orinoco_fw_header *) fw_entry->data; |
@@ -532,6 +536,9 @@ orinoco_dl_firmware(struct orinoco_private *priv, | |||
532 | 536 | ||
533 | abort: | 537 | abort: |
534 | release_firmware(fw_entry); | 538 | release_firmware(fw_entry); |
539 | |||
540 | free: | ||
541 | kfree(pda); | ||
535 | return err; | 542 | return err; |
536 | } | 543 | } |
537 | 544 | ||
@@ -549,12 +556,12 @@ symbol_dl_image(struct orinoco_private *priv, const struct fw_info *fw, | |||
549 | int secondary) | 556 | int secondary) |
550 | { | 557 | { |
551 | hermes_t *hw = &priv->hw; | 558 | hermes_t *hw = &priv->hw; |
552 | int ret; | 559 | int ret = 0; |
553 | const unsigned char *ptr; | 560 | const unsigned char *ptr; |
554 | const unsigned char *first_block; | 561 | const unsigned char *first_block; |
555 | 562 | ||
556 | /* Plug Data Area (PDA) */ | 563 | /* Plug Data Area (PDA) */ |
557 | __le16 pda[256]; | 564 | __le16 *pda = NULL; |
558 | 565 | ||
559 | /* Binary block begins after the 0x1A marker */ | 566 | /* Binary block begins after the 0x1A marker */ |
560 | ptr = image; | 567 | ptr = image; |
@@ -563,28 +570,33 @@ symbol_dl_image(struct orinoco_private *priv, const struct fw_info *fw, | |||
563 | 570 | ||
564 | /* Read the PDA from EEPROM */ | 571 | /* Read the PDA from EEPROM */ |
565 | if (secondary) { | 572 | if (secondary) { |
566 | ret = hermes_read_pda(hw, pda, fw->pda_addr, sizeof(pda), 1); | 573 | pda = kzalloc(fw->pda_size, GFP_KERNEL); |
574 | if (!pda) | ||
575 | return -ENOMEM; | ||
576 | |||
577 | ret = hermes_read_pda(hw, pda, fw->pda_addr, fw->pda_size, 1); | ||
567 | if (ret) | 578 | if (ret) |
568 | return ret; | 579 | goto free; |
569 | } | 580 | } |
570 | 581 | ||
571 | /* Stop the firmware, so that it can be safely rewritten */ | 582 | /* Stop the firmware, so that it can be safely rewritten */ |
572 | if (priv->stop_fw) { | 583 | if (priv->stop_fw) { |
573 | ret = priv->stop_fw(priv, 1); | 584 | ret = priv->stop_fw(priv, 1); |
574 | if (ret) | 585 | if (ret) |
575 | return ret; | 586 | goto free; |
576 | } | 587 | } |
577 | 588 | ||
578 | /* Program the adapter with new firmware */ | 589 | /* Program the adapter with new firmware */ |
579 | ret = hermes_program(hw, first_block, end); | 590 | ret = hermes_program(hw, first_block, end); |
580 | if (ret) | 591 | if (ret) |
581 | return ret; | 592 | goto free; |
582 | 593 | ||
583 | /* Write the PDA to the adapter */ | 594 | /* Write the PDA to the adapter */ |
584 | if (secondary) { | 595 | if (secondary) { |
585 | size_t len = hermes_blocks_length(first_block); | 596 | size_t len = hermes_blocks_length(first_block); |
586 | ptr = first_block + len; | 597 | ptr = first_block + len; |
587 | ret = hermes_apply_pda(hw, ptr, pda); | 598 | ret = hermes_apply_pda(hw, ptr, pda); |
599 | kfree(pda); | ||
588 | if (ret) | 600 | if (ret) |
589 | return ret; | 601 | return ret; |
590 | } | 602 | } |
@@ -608,6 +620,10 @@ symbol_dl_image(struct orinoco_private *priv, const struct fw_info *fw, | |||
608 | return -ENODEV; | 620 | return -ENODEV; |
609 | 621 | ||
610 | return 0; | 622 | return 0; |
623 | |||
624 | free: | ||
625 | kfree(pda); | ||
626 | return ret; | ||
611 | } | 627 | } |
612 | 628 | ||
613 | 629 | ||
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 117c7d3a52b..827ca0384a4 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -306,8 +306,8 @@ static int p54_convert_rev1(struct ieee80211_hw *dev, | |||
306 | return 0; | 306 | return 0; |
307 | } | 307 | } |
308 | 308 | ||
309 | static const char *p54_rf_chips[] = { "NULL", "Indigo?", "Duette", | 309 | static const char *p54_rf_chips[] = { "NULL", "Duette3", "Duette2", |
310 | "Frisbee", "Xbow", "Longbow" }; | 310 | "Frisbee", "Xbow", "Longbow", "NULL", "NULL" }; |
311 | static int p54_init_xbow_synth(struct ieee80211_hw *dev); | 311 | static int p54_init_xbow_synth(struct ieee80211_hw *dev); |
312 | 312 | ||
313 | static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) | 313 | static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) |
@@ -319,6 +319,7 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) | |||
319 | void *tmp; | 319 | void *tmp; |
320 | int err; | 320 | int err; |
321 | u8 *end = (u8 *)eeprom + len; | 321 | u8 *end = (u8 *)eeprom + len; |
322 | u16 synth = 0; | ||
322 | DECLARE_MAC_BUF(mac); | 323 | DECLARE_MAC_BUF(mac); |
323 | 324 | ||
324 | wrap = (struct eeprom_pda_wrap *) eeprom; | 325 | wrap = (struct eeprom_pda_wrap *) eeprom; |
@@ -400,8 +401,8 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) | |||
400 | tmp = entry->data; | 401 | tmp = entry->data; |
401 | while ((u8 *)tmp < entry->data + data_len) { | 402 | while ((u8 *)tmp < entry->data + data_len) { |
402 | struct bootrec_exp_if *exp_if = tmp; | 403 | struct bootrec_exp_if *exp_if = tmp; |
403 | if (le16_to_cpu(exp_if->if_id) == 0xF) | 404 | if (le16_to_cpu(exp_if->if_id) == 0xf) |
404 | priv->rxhw = le16_to_cpu(exp_if->variant) & 0x07; | 405 | synth = le16_to_cpu(exp_if->variant); |
405 | tmp += sizeof(struct bootrec_exp_if); | 406 | tmp += sizeof(struct bootrec_exp_if); |
406 | } | 407 | } |
407 | break; | 408 | break; |
@@ -421,28 +422,20 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) | |||
421 | entry = (void *)entry + (entry_len + 1)*2; | 422 | entry = (void *)entry + (entry_len + 1)*2; |
422 | } | 423 | } |
423 | 424 | ||
424 | if (!priv->iq_autocal || !priv->output_limit || !priv->curve_data) { | 425 | if (!synth || !priv->iq_autocal || !priv->output_limit || |
426 | !priv->curve_data) { | ||
425 | printk(KERN_ERR "p54: not all required entries found in eeprom!\n"); | 427 | printk(KERN_ERR "p54: not all required entries found in eeprom!\n"); |
426 | err = -EINVAL; | 428 | err = -EINVAL; |
427 | goto err; | 429 | goto err; |
428 | } | 430 | } |
429 | 431 | ||
430 | switch (priv->rxhw) { | 432 | priv->rxhw = synth & 0x07; |
431 | case 4: /* XBow */ | 433 | if (priv->rxhw == 4) |
432 | p54_init_xbow_synth(dev); | 434 | p54_init_xbow_synth(dev); |
433 | case 1: /* Indigo? */ | 435 | if (!(synth & 0x40)) |
434 | case 2: /* Duette */ | ||
435 | dev->wiphy->bands[IEEE80211_BAND_5GHZ] = &band_5GHz; | ||
436 | case 3: /* Frisbee */ | ||
437 | case 5: /* Longbow */ | ||
438 | dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &band_2GHz; | 436 | dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &band_2GHz; |
439 | break; | 437 | if (!(synth & 0x80)) |
440 | default: | 438 | dev->wiphy->bands[IEEE80211_BAND_5GHZ] = &band_5GHz; |
441 | printk(KERN_ERR "%s: unsupported RF-Chip\n", | ||
442 | wiphy_name(dev->wiphy)); | ||
443 | err = -EINVAL; | ||
444 | goto err; | ||
445 | } | ||
446 | 439 | ||
447 | if (!is_valid_ether_addr(dev->wiphy->perm_addr)) { | 440 | if (!is_valid_ether_addr(dev->wiphy->perm_addr)) { |
448 | u8 perm_addr[ETH_ALEN]; | 441 | u8 perm_addr[ETH_ALEN]; |
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c index 1c2a02a741a..88b3cad8b65 100644 --- a/drivers/net/wireless/p54/p54pci.c +++ b/drivers/net/wireless/p54/p54pci.c | |||
@@ -346,68 +346,6 @@ static void p54p_tx(struct ieee80211_hw *dev, struct p54_control_hdr *data, | |||
346 | printk(KERN_INFO "%s: tx overflow.\n", wiphy_name(dev->wiphy)); | 346 | printk(KERN_INFO "%s: tx overflow.\n", wiphy_name(dev->wiphy)); |
347 | } | 347 | } |
348 | 348 | ||
349 | static int p54p_open(struct ieee80211_hw *dev) | ||
350 | { | ||
351 | struct p54p_priv *priv = dev->priv; | ||
352 | int err; | ||
353 | |||
354 | init_completion(&priv->boot_comp); | ||
355 | err = request_irq(priv->pdev->irq, &p54p_interrupt, | ||
356 | IRQF_SHARED, "p54pci", dev); | ||
357 | if (err) { | ||
358 | printk(KERN_ERR "%s: failed to register IRQ handler\n", | ||
359 | wiphy_name(dev->wiphy)); | ||
360 | return err; | ||
361 | } | ||
362 | |||
363 | memset(priv->ring_control, 0, sizeof(*priv->ring_control)); | ||
364 | err = p54p_upload_firmware(dev); | ||
365 | if (err) { | ||
366 | free_irq(priv->pdev->irq, dev); | ||
367 | return err; | ||
368 | } | ||
369 | priv->rx_idx_data = priv->tx_idx_data = 0; | ||
370 | priv->rx_idx_mgmt = priv->tx_idx_mgmt = 0; | ||
371 | |||
372 | p54p_refill_rx_ring(dev, 0, priv->ring_control->rx_data, | ||
373 | ARRAY_SIZE(priv->ring_control->rx_data), priv->rx_buf_data); | ||
374 | |||
375 | p54p_refill_rx_ring(dev, 2, priv->ring_control->rx_mgmt, | ||
376 | ARRAY_SIZE(priv->ring_control->rx_mgmt), priv->rx_buf_mgmt); | ||
377 | |||
378 | P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma)); | ||
379 | P54P_READ(ring_control_base); | ||
380 | wmb(); | ||
381 | udelay(10); | ||
382 | |||
383 | P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_INIT)); | ||
384 | P54P_READ(int_enable); | ||
385 | wmb(); | ||
386 | udelay(10); | ||
387 | |||
388 | P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET)); | ||
389 | P54P_READ(dev_int); | ||
390 | |||
391 | if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) { | ||
392 | printk(KERN_ERR "%s: Cannot boot firmware!\n", | ||
393 | wiphy_name(dev->wiphy)); | ||
394 | free_irq(priv->pdev->irq, dev); | ||
395 | return -ETIMEDOUT; | ||
396 | } | ||
397 | |||
398 | P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE)); | ||
399 | P54P_READ(int_enable); | ||
400 | wmb(); | ||
401 | udelay(10); | ||
402 | |||
403 | P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_UPDATE)); | ||
404 | P54P_READ(dev_int); | ||
405 | wmb(); | ||
406 | udelay(10); | ||
407 | |||
408 | return 0; | ||
409 | } | ||
410 | |||
411 | static void p54p_stop(struct ieee80211_hw *dev) | 349 | static void p54p_stop(struct ieee80211_hw *dev) |
412 | { | 350 | { |
413 | struct p54p_priv *priv = dev->priv; | 351 | struct p54p_priv *priv = dev->priv; |
@@ -474,6 +412,68 @@ static void p54p_stop(struct ieee80211_hw *dev) | |||
474 | memset(ring_control, 0, sizeof(*ring_control)); | 412 | memset(ring_control, 0, sizeof(*ring_control)); |
475 | } | 413 | } |
476 | 414 | ||
415 | static int p54p_open(struct ieee80211_hw *dev) | ||
416 | { | ||
417 | struct p54p_priv *priv = dev->priv; | ||
418 | int err; | ||
419 | |||
420 | init_completion(&priv->boot_comp); | ||
421 | err = request_irq(priv->pdev->irq, &p54p_interrupt, | ||
422 | IRQF_SHARED, "p54pci", dev); | ||
423 | if (err) { | ||
424 | printk(KERN_ERR "%s: failed to register IRQ handler\n", | ||
425 | wiphy_name(dev->wiphy)); | ||
426 | return err; | ||
427 | } | ||
428 | |||
429 | memset(priv->ring_control, 0, sizeof(*priv->ring_control)); | ||
430 | err = p54p_upload_firmware(dev); | ||
431 | if (err) { | ||
432 | free_irq(priv->pdev->irq, dev); | ||
433 | return err; | ||
434 | } | ||
435 | priv->rx_idx_data = priv->tx_idx_data = 0; | ||
436 | priv->rx_idx_mgmt = priv->tx_idx_mgmt = 0; | ||
437 | |||
438 | p54p_refill_rx_ring(dev, 0, priv->ring_control->rx_data, | ||
439 | ARRAY_SIZE(priv->ring_control->rx_data), priv->rx_buf_data); | ||
440 | |||
441 | p54p_refill_rx_ring(dev, 2, priv->ring_control->rx_mgmt, | ||
442 | ARRAY_SIZE(priv->ring_control->rx_mgmt), priv->rx_buf_mgmt); | ||
443 | |||
444 | P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma)); | ||
445 | P54P_READ(ring_control_base); | ||
446 | wmb(); | ||
447 | udelay(10); | ||
448 | |||
449 | P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_INIT)); | ||
450 | P54P_READ(int_enable); | ||
451 | wmb(); | ||
452 | udelay(10); | ||
453 | |||
454 | P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET)); | ||
455 | P54P_READ(dev_int); | ||
456 | |||
457 | if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) { | ||
458 | printk(KERN_ERR "%s: Cannot boot firmware!\n", | ||
459 | wiphy_name(dev->wiphy)); | ||
460 | p54p_stop(dev); | ||
461 | return -ETIMEDOUT; | ||
462 | } | ||
463 | |||
464 | P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE)); | ||
465 | P54P_READ(int_enable); | ||
466 | wmb(); | ||
467 | udelay(10); | ||
468 | |||
469 | P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_UPDATE)); | ||
470 | P54P_READ(dev_int); | ||
471 | wmb(); | ||
472 | udelay(10); | ||
473 | |||
474 | return 0; | ||
475 | } | ||
476 | |||
477 | static int __devinit p54p_probe(struct pci_dev *pdev, | 477 | static int __devinit p54p_probe(struct pci_dev *pdev, |
478 | const struct pci_device_id *id) | 478 | const struct pci_device_id *id) |
479 | { | 479 | { |
@@ -556,11 +556,13 @@ static int __devinit p54p_probe(struct pci_dev *pdev, | |||
556 | spin_lock_init(&priv->lock); | 556 | spin_lock_init(&priv->lock); |
557 | tasklet_init(&priv->rx_tasklet, p54p_rx_tasklet, (unsigned long)dev); | 557 | tasklet_init(&priv->rx_tasklet, p54p_rx_tasklet, (unsigned long)dev); |
558 | 558 | ||
559 | p54p_open(dev); | 559 | err = p54p_open(dev); |
560 | if (err) | ||
561 | goto err_free_common; | ||
560 | err = p54_read_eeprom(dev); | 562 | err = p54_read_eeprom(dev); |
561 | p54p_stop(dev); | 563 | p54p_stop(dev); |
562 | if (err) | 564 | if (err) |
563 | goto err_free_desc; | 565 | goto err_free_common; |
564 | 566 | ||
565 | err = ieee80211_register_hw(dev); | 567 | err = ieee80211_register_hw(dev); |
566 | if (err) { | 568 | if (err) { |
@@ -573,8 +575,6 @@ static int __devinit p54p_probe(struct pci_dev *pdev, | |||
573 | 575 | ||
574 | err_free_common: | 576 | err_free_common: |
575 | p54_free_common(dev); | 577 | p54_free_common(dev); |
576 | |||
577 | err_free_desc: | ||
578 | pci_free_consistent(pdev, sizeof(*priv->ring_control), | 578 | pci_free_consistent(pdev, sizeof(*priv->ring_control), |
579 | priv->ring_control, priv->ring_control_dma); | 579 | priv->ring_control, priv->ring_control_dma); |
580 | 580 | ||
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig index f839ce044af..95511ac2247 100644 --- a/drivers/net/wireless/rt2x00/Kconfig +++ b/drivers/net/wireless/rt2x00/Kconfig | |||
@@ -1,5 +1,5 @@ | |||
1 | menuconfig RT2X00 | 1 | menuconfig RT2X00 |
2 | bool "Ralink driver support" | 2 | tristate "Ralink driver support" |
3 | depends on MAC80211 && WLAN_80211 && EXPERIMENTAL | 3 | depends on MAC80211 && WLAN_80211 && EXPERIMENTAL |
4 | ---help--- | 4 | ---help--- |
5 | This will enable the experimental support for the Ralink drivers, | 5 | This will enable the experimental support for the Ralink drivers, |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index a60ae86bd5c..a3ccd8c1c71 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -61,6 +61,7 @@ static struct usb_device_id usb_ids[] = { | |||
61 | { USB_DEVICE(0x0105, 0x145f), .driver_info = DEVICE_ZD1211 }, | 61 | { USB_DEVICE(0x0105, 0x145f), .driver_info = DEVICE_ZD1211 }, |
62 | /* ZD1211B */ | 62 | /* ZD1211B */ |
63 | { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B }, | 63 | { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B }, |
64 | { USB_DEVICE(0x0ace, 0xb215), .driver_info = DEVICE_ZD1211B }, | ||
64 | { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B }, | 65 | { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B }, |
65 | { USB_DEVICE(0x079b, 0x0062), .driver_info = DEVICE_ZD1211B }, | 66 | { USB_DEVICE(0x079b, 0x0062), .driver_info = DEVICE_ZD1211B }, |
66 | { USB_DEVICE(0x1582, 0x6003), .driver_info = DEVICE_ZD1211B }, | 67 | { USB_DEVICE(0x1582, 0x6003), .driver_info = DEVICE_ZD1211B }, |
@@ -82,6 +83,7 @@ static struct usb_device_id usb_ids[] = { | |||
82 | { USB_DEVICE(0x0cde, 0x001a), .driver_info = DEVICE_ZD1211B }, | 83 | { USB_DEVICE(0x0cde, 0x001a), .driver_info = DEVICE_ZD1211B }, |
83 | { USB_DEVICE(0x0586, 0x340a), .driver_info = DEVICE_ZD1211B }, | 84 | { USB_DEVICE(0x0586, 0x340a), .driver_info = DEVICE_ZD1211B }, |
84 | { USB_DEVICE(0x0471, 0x1237), .driver_info = DEVICE_ZD1211B }, | 85 | { USB_DEVICE(0x0471, 0x1237), .driver_info = DEVICE_ZD1211B }, |
86 | { USB_DEVICE(0x07fa, 0x1196), .driver_info = DEVICE_ZD1211B }, | ||
85 | /* "Driverless" devices that need ejecting */ | 87 | /* "Driverless" devices that need ejecting */ |
86 | { USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER }, | 88 | { USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER }, |
87 | { USB_DEVICE(0x0ace, 0x20ff), .driver_info = DEVICE_INSTALLER }, | 89 | { USB_DEVICE(0x0ace, 0x20ff), .driver_info = DEVICE_INSTALLER }, |