diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 2 |
4 files changed, 5 insertions, 37 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 05f94e21b423..5752aaae906b 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -646,10 +646,8 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
646 | * Register HW. | 646 | * Register HW. |
647 | */ | 647 | */ |
648 | status = ieee80211_register_hw(rt2x00dev->hw); | 648 | status = ieee80211_register_hw(rt2x00dev->hw); |
649 | if (status) { | 649 | if (status) |
650 | rt2x00lib_remove_hw(rt2x00dev); | ||
651 | return status; | 650 | return status; |
652 | } | ||
653 | 651 | ||
654 | set_bit(DEVICE_STATE_REGISTERED_HW, &rt2x00dev->flags); | 652 | set_bit(DEVICE_STATE_REGISTERED_HW, &rt2x00dev->flags); |
655 | 653 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 43fa0f849003..9730b4f8fd26 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -369,8 +369,6 @@ int rt2x00pci_suspend(struct pci_dev *pci_dev, pm_message_t state) | |||
369 | if (retval) | 369 | if (retval) |
370 | return retval; | 370 | return retval; |
371 | 371 | ||
372 | rt2x00pci_free_reg(rt2x00dev); | ||
373 | |||
374 | pci_save_state(pci_dev); | 372 | pci_save_state(pci_dev); |
375 | pci_disable_device(pci_dev); | 373 | pci_disable_device(pci_dev); |
376 | return pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state)); | 374 | return pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state)); |
@@ -381,7 +379,6 @@ int rt2x00pci_resume(struct pci_dev *pci_dev) | |||
381 | { | 379 | { |
382 | struct ieee80211_hw *hw = pci_get_drvdata(pci_dev); | 380 | struct ieee80211_hw *hw = pci_get_drvdata(pci_dev); |
383 | struct rt2x00_dev *rt2x00dev = hw->priv; | 381 | struct rt2x00_dev *rt2x00dev = hw->priv; |
384 | int retval; | ||
385 | 382 | ||
386 | if (pci_set_power_state(pci_dev, PCI_D0) || | 383 | if (pci_set_power_state(pci_dev, PCI_D0) || |
387 | pci_enable_device(pci_dev) || | 384 | pci_enable_device(pci_dev) || |
@@ -390,20 +387,7 @@ int rt2x00pci_resume(struct pci_dev *pci_dev) | |||
390 | return -EIO; | 387 | return -EIO; |
391 | } | 388 | } |
392 | 389 | ||
393 | retval = rt2x00pci_alloc_reg(rt2x00dev); | 390 | return rt2x00lib_resume(rt2x00dev); |
394 | if (retval) | ||
395 | return retval; | ||
396 | |||
397 | retval = rt2x00lib_resume(rt2x00dev); | ||
398 | if (retval) | ||
399 | goto exit_free_reg; | ||
400 | |||
401 | return 0; | ||
402 | |||
403 | exit_free_reg: | ||
404 | rt2x00pci_free_reg(rt2x00dev); | ||
405 | |||
406 | return retval; | ||
407 | } | 391 | } |
408 | EXPORT_SYMBOL_GPL(rt2x00pci_resume); | 392 | EXPORT_SYMBOL_GPL(rt2x00pci_resume); |
409 | #endif /* CONFIG_PM */ | 393 | #endif /* CONFIG_PM */ |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 7d50ca82375e..501544882c2c 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -702,8 +702,6 @@ int rt2x00usb_suspend(struct usb_interface *usb_intf, pm_message_t state) | |||
702 | if (retval) | 702 | if (retval) |
703 | return retval; | 703 | return retval; |
704 | 704 | ||
705 | rt2x00usb_free_reg(rt2x00dev); | ||
706 | |||
707 | /* | 705 | /* |
708 | * Decrease usbdev refcount. | 706 | * Decrease usbdev refcount. |
709 | */ | 707 | */ |
@@ -717,24 +715,10 @@ int rt2x00usb_resume(struct usb_interface *usb_intf) | |||
717 | { | 715 | { |
718 | struct ieee80211_hw *hw = usb_get_intfdata(usb_intf); | 716 | struct ieee80211_hw *hw = usb_get_intfdata(usb_intf); |
719 | struct rt2x00_dev *rt2x00dev = hw->priv; | 717 | struct rt2x00_dev *rt2x00dev = hw->priv; |
720 | int retval; | ||
721 | 718 | ||
722 | usb_get_dev(interface_to_usbdev(usb_intf)); | 719 | usb_get_dev(interface_to_usbdev(usb_intf)); |
723 | 720 | ||
724 | retval = rt2x00usb_alloc_reg(rt2x00dev); | 721 | return rt2x00lib_resume(rt2x00dev); |
725 | if (retval) | ||
726 | return retval; | ||
727 | |||
728 | retval = rt2x00lib_resume(rt2x00dev); | ||
729 | if (retval) | ||
730 | goto exit_free_reg; | ||
731 | |||
732 | return 0; | ||
733 | |||
734 | exit_free_reg: | ||
735 | rt2x00usb_free_reg(rt2x00dev); | ||
736 | |||
737 | return retval; | ||
738 | } | 722 | } |
739 | EXPORT_SYMBOL_GPL(rt2x00usb_resume); | 723 | EXPORT_SYMBOL_GPL(rt2x00usb_resume); |
740 | #endif /* CONFIG_PM */ | 724 | #endif /* CONFIG_PM */ |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 420fff42c0dd..853b2b279b64 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -2369,6 +2369,8 @@ static struct usb_device_id rt73usb_device_table[] = { | |||
2369 | /* Buffalo */ | 2369 | /* Buffalo */ |
2370 | { USB_DEVICE(0x0411, 0x00d8), USB_DEVICE_DATA(&rt73usb_ops) }, | 2370 | { USB_DEVICE(0x0411, 0x00d8), USB_DEVICE_DATA(&rt73usb_ops) }, |
2371 | { USB_DEVICE(0x0411, 0x00f4), USB_DEVICE_DATA(&rt73usb_ops) }, | 2371 | { USB_DEVICE(0x0411, 0x00f4), USB_DEVICE_DATA(&rt73usb_ops) }, |
2372 | { USB_DEVICE(0x0411, 0x0116), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2373 | { USB_DEVICE(0x0411, 0x0119), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2372 | /* CNet */ | 2374 | /* CNet */ |
2373 | { USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt73usb_ops) }, | 2375 | { USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt73usb_ops) }, |
2374 | { USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) }, | 2376 | { USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) }, |