[kernel] Experiment: Double the length of the brcmsmac transmit timeout.

Dave Jones davej at fedoraproject.org
Wed Jan 16 18:53:39 UTC 2013


commit 74cf3922e78e6dc8a90f381e8241522b3999d33b
Author: Dave Jones <davej at redhat.com>
Date:   Wed Jan 16 13:53:10 2013 -0500

    Experiment: Double the length of the brcmsmac transmit timeout.

 brcmsmac-double-timeout.patch |   39 +++++++++++++++++++++++++++++++++++++++
 kernel.spec                   |    8 ++++++++
 2 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/brcmsmac-double-timeout.patch b/brcmsmac-double-timeout.patch
new file mode 100644
index 0000000..adb718d
--- /dev/null
+++ b/brcmsmac-double-timeout.patch
@@ -0,0 +1,39 @@
+diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
+index 17594de..a86d689 100644
+--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
++++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
+@@ -7518,7 +7518,7 @@ int brcms_c_get_curband(struct brcms_c_info *wlc)
+ 	return wlc->band->bandunit;
+ }
+ 
+-void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc, bool drop)
++static int __brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc, bool drop)
+ {
+ 	int timeout = 20;
+ 	int i;
+@@ -7536,9 +7536,25 @@ void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc, bool drop)
+ 			break;
+ 	}
+ 
++	return timeout;
++}
++
++void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc, bool drop)
++{
++	int timeout;
++
++	timeout = __brcms_c_wait_for_tx_completion(wlc, drop);
++	if (timeout != 0)
++		return;
++
++	/* Retry. */
++	printk(KERN_INFO "brcms_c_wait_for_tx_completion took > 20ms. Retrying.\n");
++	timeout = __brcms_c_wait_for_tx_completion(wlc, drop);
++
+ 	WARN_ON_ONCE(timeout == 0);
+ }
+ 
++
+ void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval)
+ {
+ 	wlc->bcn_li_bcn = interval;
diff --git a/kernel.spec b/kernel.spec
index 9cefbdc..e529068 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -692,6 +692,8 @@ Patch2899: v4l-dvb-fixes.patch
 Patch2900: v4l-dvb-update.patch
 Patch2901: v4l-dvb-experimental.patch
 
+Patch3000: brcmsmac-double-timeout.patch
+
 # fs fixes
 
 # NFSv4
@@ -1392,6 +1394,9 @@ ApplyOptionalPatch v4l-dvb-fixes.patch
 ApplyOptionalPatch v4l-dvb-update.patch
 ApplyOptionalPatch v4l-dvb-experimental.patch
 
+# Experiment: Double the length of the brcmsmac transmit timeout.
+ApplyPatch brcmsmac-double-timeout.patch
+
 # Patches headed upstream
 ApplyPatch fs-proc-devtree-remove_proc_entry.patch
 
@@ -2292,6 +2297,9 @@ fi
 #                 ||----w |
 #                 ||     ||
 %changelog
+* Wed Jan 16 2013 Dave Jones <davej at redhat.com>
+- Experiment: Double the length of the brcmsmac transmit timeout.
+
 * Wed Jan 16 2013 Josh Boyer <jwboyer at redhat.com>
 - Add patch from Stanislaw Gruszka to fix iwlegacy IBSS cleanup (rhbz 886946)
 


More information about the scm-commits mailing list