[kernel/f15] ath5k-disable-fast-channel-switching-by-default.patch

Kyle McMartin kyle at fedoraproject.org
Thu Jun 9 14:50:58 UTC 2011


commit 8dba4a6f78b8fd57570fcf5f9b5af7428cd1ae60
Author: Kyle McMartin <kyle at redhat.com>
Date:   Thu Jun 9 10:45:09 2011 -0400

    ath5k-disable-fast-channel-switching-by-default.patch
    
    (rhbz#709122) (korgbz#34992) [a99168ee in wireless-next]

 ...disable-fast-channel-switching-by-default.patch |   72 ++++++++++++++++++++
 kernel.spec                                        |    9 +++
 2 files changed, 81 insertions(+), 0 deletions(-)
---
diff --git a/ath5k-disable-fast-channel-switching-by-default.patch b/ath5k-disable-fast-channel-switching-by-default.patch
new file mode 100644
index 0000000..86ebf83
--- /dev/null
+++ b/ath5k-disable-fast-channel-switching-by-default.patch
@@ -0,0 +1,72 @@
+From c564db51fe187362c4da0a9de2905c020e981c75 Mon Sep 17 00:00:00 2001
+From: Nick Kossifidis <mickflemm at gmail.com>
+Date: Thu, 2 Jun 2011 03:09:48 +0300
+Subject: ath5k: Disable fast channel switching by default
+
+Disable fast channel change by default on AR2413/AR5413 due to
+some bug reports (it still works for me but it's better to be safe).
+Add a module parameter "fastchanswitch" in case anyone wants to enable
+it and play with it.
+
+Signed-off-by: Nick Kossifidis <mickflemm at gmail.com>
+Tested-by: Sedat Dilek <sedat.dilek at gmail.com>
+Signed-off-by: John W. Linville <linville at tuxdriver.com>
+---
+ drivers/net/wireless/ath/ath5k/base.c  |    9 ++++++++-
+ drivers/net/wireless/ath/ath5k/reset.c |    5 ++++-
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
+index 09ae4ef..0fb6333 100644
+--- a/drivers/net/wireless/ath/ath5k/base.c
++++ b/drivers/net/wireless/ath/ath5k/base.c
+@@ -69,6 +69,11 @@ static int modparam_all_channels;
+ module_param_named(all_channels, modparam_all_channels, bool, S_IRUGO);
+ MODULE_PARM_DESC(all_channels, "Expose all channels the device can use.");
+ 
++static int modparam_fastchanswitch;
++module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO);
++MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios.");
++
++
+ /* Module info */
+ MODULE_AUTHOR("Jiri Slaby");
+ MODULE_AUTHOR("Nick Kossifidis");
+@@ -2664,6 +2669,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
+ 	struct ath5k_hw *ah = sc->ah;
+ 	struct ath_common *common = ath5k_hw_common(ah);
+ 	int ret, ani_mode;
++	bool fast;
+ 
+ 	ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n");
+ 
+@@ -2685,7 +2691,8 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
+ 		sc->curchan = chan;
+ 		sc->curband = &sc->sbands[chan->band];
+ 	}
+-	ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL,
++	fast = ((chan != NULL) && modparam_fastchanswitch) ? 1 : 0;
++	ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, fast,
+ 								skip_pcu);
+ 	if (ret) {
+ 		ATH5K_ERR(sc, "can't reset hardware (%d)\n", ret);
+diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
+index 8420689..6f53d2b 100644
+--- a/drivers/net/wireless/ath/ath5k/reset.c
++++ b/drivers/net/wireless/ath/ath5k/reset.c
+@@ -1119,8 +1119,11 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
+ 			/* Non fatal, can happen eg.
+ 			 * on mode change */
+ 			ret = 0;
+-		} else
++		} else {
++			ATH5K_DBG(ah->ah_sc, ATH5K_DEBUG_RESET,
++				"fast chan change successful\n");
+ 			return 0;
++		}
+ 	}
+ 
+ 	/*
+-- 
+1.7.5.2
+
diff --git a/kernel.spec b/kernel.spec
index 06756f1..391f0e9 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -749,6 +749,8 @@ Patch12407: scsi_dh_hp_sw-fix-deadlock-in-start_stop_endio.patch
 Patch12415: hid-multitouch-add-support-for-elo-touchsystems.patch
 Patch12416: bluetooth-device-ids-for-ath3k-on-pegatron-lucid-tablets.patch
 
+Patch12418: ath5k-disable-fast-channel-switching-by-default.patch
+
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1390,6 +1392,9 @@ ApplyPatch scsi_dh_hp_sw-fix-deadlock-in-start_stop_endio.patch
 ApplyPatch hid-multitouch-add-support-for-elo-touchsystems.patch
 ApplyPatch bluetooth-device-ids-for-ath3k-on-pegatron-lucid-tablets.patch
 
+# rhbz#709122
+ApplyPatch ath5k-disable-fast-channel-switching-by-default.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -1998,6 +2003,10 @@ fi
 # and build.
 
 %changelog
+* Thu Jun 09 2011 Kyle McMartin <kmcmartin at redhat.com>
+- ath5k-disable-fast-channel-switching-by-default.patch (rhbz#709122)
+  (korgbz#34992) [a99168ee in wireless-next]
+
 * Tue Jun 07 2011 Dave Jones <davej at redhat.com>
 - [SCSI] Fix oops caused by queue refcounting failure.
 


More information about the scm-commits mailing list