summaryrefslogtreecommitdiff
path: root/libre/linux-libre
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@lavabit.com>2013-07-08 05:22:55 -0300
committerAndré Fabian Silva Delgado <emulatorman@lavabit.com>2013-07-08 05:22:55 -0300
commit13f9d20d4cd910574d3d92ffb96b1fe61df19427 (patch)
tree2547a7e298c8a384bf3ef53a1fba925562de8e4e /libre/linux-libre
parent6661c2d96141f1dfde61459a71c088614cd54308 (diff)
linux-libre-3.9.9-1.1: add patch to fix bug on ath9k-htc driver
Diffstat (limited to 'libre/linux-libre')
-rw-r--r--libre/linux-libre/PKGBUILD8
-rw-r--r--libre/linux-libre/ath9k_htc-fix-target-is-unresponsive.patch67
2 files changed, 74 insertions, 1 deletions
diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD
index 78293fad3..c28f53521 100644
--- a/libre/linux-libre/PKGBUILD
+++ b/libre/linux-libre/PKGBUILD
@@ -12,7 +12,7 @@ pkgbase=linux-libre # Build stock -LIBRE kernel
_basekernel=3.9
_sublevel=9
pkgver=${_basekernel}.${_sublevel}
-pkgrel=1
+pkgrel=1.1
_lxopkgver=${_basekernel}.8 # nearly always the same as pkgver
arch=('i686' 'x86_64' 'mips64el')
url="http://linux-libre.fsfla.org/"
@@ -29,6 +29,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn
'Kbuild.platforms'
'boot-logo.patch'
'change-default-console-loglevel.patch'
+ 'ath9k_htc-fix-target-is-unresponsive.patch'
"http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2")
md5sums=('120df29f88622dabf7015a22c7cc8e25'
'e143fc381f4d2fdfc18686b867a5e6a5'
@@ -39,6 +40,7 @@ md5sums=('120df29f88622dabf7015a22c7cc8e25'
'8267264d9a8966e57fdacd1fa1fc65c4'
'04b21c79df0a952c22d681dd4f4562df'
'f3def2cefdcbb954c21d8505d23cc83c'
+ 'db6ad371bb61e04b960c453d95e1d5cd'
'30092ce96affb12f89a9eddfad966741')
if [ "$CARCH" != "mips64el" ]; then
# Don't use the Loongson-specific patches on non-mips64el arches.
@@ -64,6 +66,10 @@ prepare() {
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch"
+ # fix "ath9k_htc: Target is unresponsive"
+ # https://github.com/qca/open-ath9k-htc-firmware/issues/1
+ patch -Np1 -i "${srcdir}/ath9k_htc-fix-target-is-unresponsive.patch"
+
if [ "$CARCH" == "mips64el" ]; then
sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre|" Makefile
sed -r "s|^( SUBLEVEL = ).*|\1$_sublevel|" \
diff --git a/libre/linux-libre/ath9k_htc-fix-target-is-unresponsive.patch b/libre/linux-libre/ath9k_htc-fix-target-is-unresponsive.patch
new file mode 100644
index 000000000..ff6bb410e
--- /dev/null
+++ b/libre/linux-libre/ath9k_htc-fix-target-is-unresponsive.patch
@@ -0,0 +1,67 @@
+diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
+index f5dda84..90ce6f3 100644
+--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
++++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
+@@ -1124,7 +1124,7 @@ static void ath9k_hif_usb_firmware_cb(const struct firmware *fw, void *context)
+ }
+
+ release_firmware(fw);
+- hif_dev->flags |= HIF_USB_READY;
++ hif_dev->flags |= HIF_USB_FW_LOADED;
+ complete(&hif_dev->fw_done);
+
+ return;
+@@ -1281,7 +1281,7 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
+
+ wait_for_completion(&hif_dev->fw_done);
+
+- if (hif_dev->flags & HIF_USB_READY) {
++ if (hif_dev->flags & HIF_USB_FW_LOADED) {
+ ath9k_htc_hw_deinit(hif_dev->htc_handle, unplugged);
+ ath9k_htc_hw_free(hif_dev->htc_handle);
+ ath9k_hif_usb_dev_deinit(hif_dev);
+@@ -1289,7 +1289,9 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
+
+ usb_set_intfdata(interface, NULL);
+
+- if (!unplugged && (hif_dev->flags & HIF_USB_START))
++ /* If firmware was loaded we should drop it
++ * go back to first stage bootloader. */
++ if (!unplugged && (hif_dev->flags & HIF_USB_FW_LOADED))
+ ath9k_hif_usb_reboot(udev);
+
+ kfree(hif_dev);
+@@ -1326,7 +1328,7 @@ static int ath9k_hif_usb_resume(struct usb_interface *interface)
+ if (ret)
+ return ret;
+
+- if (hif_dev->flags & HIF_USB_READY) {
++ if (hif_dev->flags & HIF_USB_FW_LOADED) {
+ /* request cached firmware during suspend/resume cycle */
+ ret = request_firmware(&fw, hif_dev->fw_name,
+ &hif_dev->udev->dev);
+diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.h b/drivers/net/wireless/ath/ath9k/hif_usb.h
+index 51496e7..d74697d 100644
+--- a/drivers/net/wireless/ath/ath9k/hif_usb.h
++++ b/drivers/net/wireless/ath/ath9k/hif_usb.h
+@@ -85,7 +85,7 @@ struct cmd_buf {
+ };
+
+ #define HIF_USB_START BIT(0)
+-#define HIF_USB_READY BIT(1)
++#define HIF_USB_FW_LOADED BIT(1)
+
+ struct hif_device_usb {
+ struct usb_device *udev;
+diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+index a47f5e0..9b6a8c7 100644
+--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
++++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+@@ -846,6 +846,7 @@ static int ath9k_init_device(struct ath9k_htc_priv *priv,
+ if (error != 0)
+ goto err_rx;
+
++ ath9k_hw_disable(priv->ah);
+ #ifdef CONFIG_MAC80211_LEDS
+ /* must be initialized before ieee80211_register_hw */
+ priv->led_cdev.default_trigger = ieee80211_create_tpt_led_trigger(priv->hw,