diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 37 | ||||
-rw-r--r-- | drivers/net/wireless/ath5k/debug.c | 2 | ||||
-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 | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/p54/p54pci.c | 132 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/Kconfig | 2 |
10 files changed, 97 insertions, 115 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 0f1d6bdd51a2..9e47d727e220 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -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 | ||
@@ -688,16 +687,6 @@ ath5k_pci_resume(struct pci_dev *pdev) | |||
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 |
@@ -2202,7 +2183,8 @@ ath5k_beacon_config(struct ath5k_softc *sc) | |||
2202 | static int | 2183 | static int |
2203 | ath5k_init(struct ath5k_softc *sc, bool is_resume) | 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 | ||
@@ -2235,10 +2217,17 @@ ath5k_init(struct ath5k_softc *sc, bool is_resume) | |||
2235 | if (ret) | 2217 | if (ret) |
2236 | goto done; | 2218 | goto done; |
2237 | 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 | |||
2238 | __set_bit(ATH_STAT_STARTED, sc->status); | 2227 | __set_bit(ATH_STAT_STARTED, sc->status); |
2239 | 2228 | ||
2240 | /* Set ack to be sent at low bit-rates */ | 2229 | /* Set ack to be sent at low bit-rates */ |
2241 | ath5k_hw_set_ack_bitrate_high(sc->ah, false); | 2230 | ath5k_hw_set_ack_bitrate_high(ah, false); |
2242 | 2231 | ||
2243 | mod_timer(&sc->calib_tim, round_jiffies(jiffies + | 2232 | mod_timer(&sc->calib_tim, round_jiffies(jiffies + |
2244 | msecs_to_jiffies(ath5k_calinterval * 1000))); | 2233 | msecs_to_jiffies(ath5k_calinterval * 1000))); |
@@ -2953,10 +2942,8 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw, | |||
2953 | sc->opmode != NL80211_IFTYPE_MESH_POINT && | 2942 | sc->opmode != NL80211_IFTYPE_MESH_POINT && |
2954 | test_bit(ATH_STAT_PROMISC, sc->status)) | 2943 | test_bit(ATH_STAT_PROMISC, sc->status)) |
2955 | rfilt |= AR5K_RX_FILTER_PROM; | 2944 | rfilt |= AR5K_RX_FILTER_PROM; |
2956 | if (sc->opmode == NL80211_IFTYPE_STATION || | 2945 | if (sc->opmode == NL80211_IFTYPE_ADHOC) |
2957 | sc->opmode == NL80211_IFTYPE_ADHOC) { | ||
2958 | rfilt |= AR5K_RX_FILTER_BEACON; | 2946 | rfilt |= AR5K_RX_FILTER_BEACON; |
2959 | } | ||
2960 | 2947 | ||
2961 | /* Set filters */ | 2948 | /* Set filters */ |
2962 | ath5k_hw_set_rx_filter(ah,rfilt); | 2949 | ath5k_hw_set_rx_filter(ah,rfilt); |
diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c index 8f92d670f614..19980cbd5d5f 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/initvals.c b/drivers/net/wireless/ath5k/initvals.c index ea2e1a20b499..ceaa6c475c06 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 8f1886834e61..1b6d45b6772d 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 2af9a14446e4..fe9307424a91 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2086,7 +2086,6 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2086 | iwl4965_error_recovery(priv); | 2086 | iwl4965_error_recovery(priv); |
2087 | 2087 | ||
2088 | iwl_power_update_mode(priv, 1); | 2088 | iwl_power_update_mode(priv, 1); |
2089 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); | ||
2090 | 2089 | ||
2091 | if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status)) | 2090 | if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status)) |
2092 | iwl4965_set_mode(priv, priv->iw_mode); | 2091 | iwl4965_set_mode(priv, priv->iw_mode); |
@@ -2338,6 +2337,7 @@ static void iwl_bg_alive_start(struct work_struct *data) | |||
2338 | mutex_lock(&priv->mutex); | 2337 | mutex_lock(&priv->mutex); |
2339 | iwl_alive_start(priv); | 2338 | iwl_alive_start(priv); |
2340 | mutex_unlock(&priv->mutex); | 2339 | mutex_unlock(&priv->mutex); |
2340 | ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); | ||
2341 | } | 2341 | } |
2342 | 2342 | ||
2343 | static void iwl4965_bg_rf_kill(struct work_struct *work) | 2343 | static void iwl4965_bg_rf_kill(struct work_struct *work) |
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 8542d85f36af..d45b07cf6a62 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -604,9 +604,9 @@ int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel, | |||
604 | if (ret == 0) { | 604 | if (ret == 0) { |
605 | *curlevel = le16_to_cpu(cmd.curlevel); | 605 | *curlevel = le16_to_cpu(cmd.curlevel); |
606 | if (minlevel) | 606 | if (minlevel) |
607 | *minlevel = le16_to_cpu(cmd.minlevel); | 607 | *minlevel = cmd.minlevel; |
608 | if (maxlevel) | 608 | if (maxlevel) |
609 | *maxlevel = le16_to_cpu(cmd.maxlevel); | 609 | *maxlevel = cmd.maxlevel; |
610 | } | 610 | } |
611 | 611 | ||
612 | lbs_deb_leave(LBS_DEB_CMD); | 612 | lbs_deb_leave(LBS_DEB_CMD); |
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index fcaef38d5df9..351b3f6e5664 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -596,8 +596,8 @@ static int lbs_process_bss(struct bss_descriptor *bss, | |||
596 | 596 | ||
597 | switch (elem->id) { | 597 | switch (elem->id) { |
598 | case MFIE_TYPE_SSID: | 598 | case MFIE_TYPE_SSID: |
599 | bss->ssid_len = elem->len; | 599 | bss->ssid_len = min_t(int, 32, elem->len); |
600 | memcpy(bss->ssid, elem->data, elem->len); | 600 | memcpy(bss->ssid, elem->data, bss->ssid_len); |
601 | lbs_deb_scan("got SSID IE: '%s', len %u\n", | 601 | lbs_deb_scan("got SSID IE: '%s', len %u\n", |
602 | escape_essid(bss->ssid, bss->ssid_len), | 602 | escape_essid(bss->ssid, bss->ssid_len), |
603 | bss->ssid_len); | 603 | bss->ssid_len); |
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 72859decd907..6370c44c64d5 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -319,7 +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; | 322 | u16 synth = 0; |
323 | 323 | ||
324 | wrap = (struct eeprom_pda_wrap *) eeprom; | 324 | wrap = (struct eeprom_pda_wrap *) eeprom; |
325 | entry = (void *)wrap->data + le16_to_cpu(wrap->len); | 325 | entry = (void *)wrap->data + le16_to_cpu(wrap->len); |
@@ -421,7 +421,8 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) | |||
421 | entry = (void *)entry + (entry_len + 1)*2; | 421 | entry = (void *)entry + (entry_len + 1)*2; |
422 | } | 422 | } |
423 | 423 | ||
424 | if (!priv->iq_autocal || !priv->output_limit || !priv->curve_data) { | 424 | if (!synth || !priv->iq_autocal || !priv->output_limit || |
425 | !priv->curve_data) { | ||
425 | printk(KERN_ERR "p54: not all required entries found in eeprom!\n"); | 426 | printk(KERN_ERR "p54: not all required entries found in eeprom!\n"); |
426 | err = -EINVAL; | 427 | err = -EINVAL; |
427 | goto err; | 428 | goto err; |
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c index 194237b66424..bba2c90e533f 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 | { |
@@ -555,11 +555,13 @@ static int __devinit p54p_probe(struct pci_dev *pdev, | |||
555 | spin_lock_init(&priv->lock); | 555 | spin_lock_init(&priv->lock); |
556 | tasklet_init(&priv->rx_tasklet, p54p_rx_tasklet, (unsigned long)dev); | 556 | tasklet_init(&priv->rx_tasklet, p54p_rx_tasklet, (unsigned long)dev); |
557 | 557 | ||
558 | p54p_open(dev); | 558 | err = p54p_open(dev); |
559 | if (err) | ||
560 | goto err_free_common; | ||
559 | err = p54_read_eeprom(dev); | 561 | err = p54_read_eeprom(dev); |
560 | p54p_stop(dev); | 562 | p54p_stop(dev); |
561 | if (err) | 563 | if (err) |
562 | goto err_free_desc; | 564 | goto err_free_common; |
563 | 565 | ||
564 | err = ieee80211_register_hw(dev); | 566 | err = ieee80211_register_hw(dev); |
565 | if (err) { | 567 | if (err) { |
@@ -572,8 +574,6 @@ static int __devinit p54p_probe(struct pci_dev *pdev, | |||
572 | 574 | ||
573 | err_free_common: | 575 | err_free_common: |
574 | p54_free_common(dev); | 576 | p54_free_common(dev); |
575 | |||
576 | err_free_desc: | ||
577 | pci_free_consistent(pdev, sizeof(*priv->ring_control), | 577 | pci_free_consistent(pdev, sizeof(*priv->ring_control), |
578 | priv->ring_control, priv->ring_control_dma); | 578 | priv->ring_control, priv->ring_control_dma); |
579 | 579 | ||
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig index f839ce044afd..95511ac22470 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, |