summaryrefslogtreecommitdiffstats
path: root/brcmsmac-double-timeout.patch
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2013-01-16 13:53:10 -0500
committerDave Jones <davej@redhat.com>2013-01-16 13:53:10 -0500
commit74cf3922e78e6dc8a90f381e8241522b3999d33b (patch)
treeeb54bbab11084af473ea4829dab6b17130fdf6d0 /brcmsmac-double-timeout.patch
parentf6e179360940569a25dea128759e6139e9916bbe (diff)
downloadkernel-74cf3922e78e6dc8a90f381e8241522b3999d33b.tar.gz
kernel-74cf3922e78e6dc8a90f381e8241522b3999d33b.tar.xz
kernel-74cf3922e78e6dc8a90f381e8241522b3999d33b.zip
Experiment: Double the length of the brcmsmac transmit timeout.
Diffstat (limited to 'brcmsmac-double-timeout.patch')
-rw-r--r--brcmsmac-double-timeout.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/brcmsmac-double-timeout.patch b/brcmsmac-double-timeout.patch
new file mode 100644
index 000000000..adb718d83
--- /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;