Fix system freeze due to incorrect rt2800 initialization (rhbz 1000679)

This commit is contained in:
Josh Boyer 2013-09-09 08:35:58 -04:00
parent e0efd044a8
commit dd3844ff41
2 changed files with 44 additions and 0 deletions

View File

@ -769,6 +769,9 @@ Patch25077: media-cx23885-Fix-TeVii-S471-regression-since-introduction-of-ts2020
#CVE-2013-0343 rhbz 914664 999380
Patch25078: ipv6-remove-max_addresses-check-from-ipv6_create_tempaddr.patch
#rhbz 1000679
Patch25079: rt2800-rearrange-bbp-rfcsr-initialization.patch
#CVE-2013-2888 rhbz 1000451 1002543 CVE-2013-2889 rhbz 999890 1002548
#CVE-2013-2891 rhbz 999960 1002555 CVE-2013-2892 rhbz 1000429 1002570
#CVE-2013-2893 rhbz 1000414 1002575 CVE-2013-2894 rhbz 1000137 1002579
@ -1487,6 +1490,9 @@ ApplyPatch ipv6-remove-max_addresses-check-from-ipv6_create_tempaddr.patch
#CVE-2013-2897 rhbz 1000536 1002600 CVE-2013-2899 rhbz 1000373 1002604
ApplyPatch HID-CVE-fixes.patch
#rhbz 1000679
ApplyPatch rt2800-rearrange-bbp-rfcsr-initialization.patch
# END OF PATCH APPLICATIONS
%endif
@ -2328,6 +2334,9 @@ fi
# ||----w |
# || ||
%changelog
* Mon Sep 09 2013 Josh Boyer <jwboyer@fedoraproject.org>
- Fix system freeze due to incorrect rt2800 initialization (rhbz 1000679)
* Thu Sep 09 2013 Justin M. Forbes <jforbes@fedoraproject.org> 3.10.11-100
- Linux v3.10.11

View File

@ -0,0 +1,35 @@
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 7e66a90..6a70c27 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4041,8 +4041,7 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
u8 reg_id;
u8 value;
- if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev) ||
- rt2800_wait_bbp_ready(rt2x00dev)))
+ if (unlikely(rt2800_wait_bbp_ready(rt2x00dev)))
return -EACCES;
if (rt2x00_rt(rt2x00dev, RT5592)) {
@@ -5185,15 +5184,17 @@ int rt2800_enable_radio(struct rt2x00_dev *rt2x00dev)
rt2800_init_registers(rt2x00dev)))
return -EIO;
+ if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev)))
+ return -EIO;
+
/*
* Send signal to firmware during boot time.
*/
rt2800_register_write(rt2x00dev, H2M_BBP_AGENT, 0);
rt2800_register_write(rt2x00dev, H2M_MAILBOX_CSR, 0);
- if (rt2x00_is_usb(rt2x00dev)) {
+ if (rt2x00_is_usb(rt2x00dev))
rt2800_register_write(rt2x00dev, H2M_INT_SRC, 0);
- rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0, 0, 0);
- }
+ rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0, 0, 0);
msleep(1);
if (unlikely(rt2800_init_bbp(rt2x00dev)))