diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index a590a94cb6fa..beaa969f7426 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -703,7 +703,7 @@ static int zd_mac_config_beacon(struct ieee80211_hw *hw, struct sk_buff *beacon) | |||
703 | dev_err(zd_mac_dev(mac), | 703 | dev_err(zd_mac_dev(mac), |
704 | "Giving up beacon config.\n"); | 704 | "Giving up beacon config.\n"); |
705 | r = -ETIMEDOUT; | 705 | r = -ETIMEDOUT; |
706 | goto release_sema; | 706 | goto reset_device; |
707 | } | 707 | } |
708 | } | 708 | } |
709 | msleep(20); | 709 | msleep(20); |
@@ -770,6 +770,17 @@ out: | |||
770 | mutex_unlock(&mac->chip.mutex); | 770 | mutex_unlock(&mac->chip.mutex); |
771 | kfree(ioreqs); | 771 | kfree(ioreqs); |
772 | return r; | 772 | return r; |
773 | |||
774 | reset_device: | ||
775 | mutex_unlock(&mac->chip.mutex); | ||
776 | kfree(ioreqs); | ||
777 | |||
778 | /* semaphore stuck, reset device to avoid fw freeze later */ | ||
779 | dev_warn(zd_mac_dev(mac), "CR_BCN_FIFO_SEMAPHORE stuck, " | ||
780 | "reseting device..."); | ||
781 | usb_queue_reset_device(mac->chip.usb.intf); | ||
782 | |||
783 | return r; | ||
773 | } | 784 | } |
774 | 785 | ||
775 | static int fill_ctrlset(struct zd_mac *mac, | 786 | static int fill_ctrlset(struct zd_mac *mac, |