From 7c67ff0cf1b3bdaf06c3947c17802be5a91feeb7 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 17 Jan 2016 23:16:00 +0100
Subject: [PATCH] ath9k: fix HSR tuner support for UniFi Outdoor Plus

Also remove the BROKEN check as the UniFi Outdoor Plus support seems to
work fine now.

Fixes #272
---
 ...d-HSR-tuner-support-for-UniFi-Outdoor-Plus.patch | 13 +++----------
 targets/ar71xx-generic/profiles.mk                  |  3 ++-
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/patches/openwrt/0024-ath9k-add-HSR-tuner-support-for-UniFi-Outdoor-Plus.patch b/patches/openwrt/0024-ath9k-add-HSR-tuner-support-for-UniFi-Outdoor-Plus.patch
index 98a85aaff..3b74d88d5 100644
--- a/patches/openwrt/0024-ath9k-add-HSR-tuner-support-for-UniFi-Outdoor-Plus.patch
+++ b/patches/openwrt/0024-ath9k-add-HSR-tuner-support-for-UniFi-Outdoor-Plus.patch
@@ -6,10 +6,10 @@ Patch-by: Stefan Rompf <stefan@loplof.de>
 
 diff --git a/package/kernel/mac80211/patches/931-ubnt-uap-plus-hsr.patch b/package/kernel/mac80211/patches/931-ubnt-uap-plus-hsr.patch
 new file mode 100644
-index 0000000..4cd6faf
+index 0000000..4533335
 --- /dev/null
 +++ b/package/kernel/mac80211/patches/931-ubnt-uap-plus-hsr.patch
-@@ -0,0 +1,353 @@
+@@ -0,0 +1,346 @@
 +--- a/drivers/net/wireless/ath/ath9k/channel.c
 ++++ b/drivers/net/wireless/ath/ath9k/channel.c
 +@@ -15,6 +15,8 @@
@@ -266,7 +266,7 @@ index 0000000..4cd6faf
 ++
 +--- /dev/null
 ++++ b/drivers/net/wireless/ath/ath9k/hsr.h
-+@@ -0,0 +1,40 @@
++@@ -0,0 +1,33 @@
 ++/*
 ++ * The MIT License (MIT)
 ++ *
@@ -294,17 +294,10 @@ index 0000000..4cd6faf
 ++#ifndef HSR_H_
 ++#define HSR_H_
 ++
-++#ifdef CPTCFG_ATH9K_UBNTHSR
 ++void hsr_init(struct ath_hw* ah);
 ++int hsr_disable(struct ath_hw* ah);
 ++int hsr_enable(struct ath_hw* ah, int bw, int fq);
 ++int hsr_status(struct ath_hw* ah);
-++#else
-++static inline void hsr_init(struct ath_hw* ah) {}
-++static inline int hsr_disable(struct ath_hw* ah) { return 0; }
-++static inline int hsr_enable(struct ath_hw* ah, int bw, int fq) { return 0; }
-++static inline int hsr_status(struct ath_hw* ah) { return 0; }
-++#endif
 ++
 ++#endif /* HSR_H_ */
 +--- a/drivers/net/wireless/ath/ath9k/main.c
diff --git a/targets/ar71xx-generic/profiles.mk b/targets/ar71xx-generic/profiles.mk
index d846ce0cd..23eefdd1a 100644
--- a/targets/ar71xx-generic/profiles.mk
+++ b/targets/ar71xx-generic/profiles.mk
@@ -159,9 +159,10 @@ $(eval $(call GluonModel,UBNT,ubnt-nano-m-xw,ubiquiti-nanostation-m-xw))
 $(eval $(call GluonModel,UBNT,ubnt-uap-pro,ubiquiti-unifi-ap-pro))
 $(eval $(call GluonModel,UBNT,ubnt-unifi,ubiquiti-unifi))
 $(eval $(call GluonModel,UBNT,ubnt-unifi-outdoor,ubiquiti-unifiap-outdoor))
+$(eval $(call GluonModel,UBNT,ubnt-unifi-outdoor-plus,ubiquiti-unifiap-outdoor+))
+
 ifeq ($(BROKEN),1)
 $(eval $(call GluonModel,UBNT,ubnt-ls-sr71,ubiquiti-ls-sr71)) # BROKEN: Untested
-$(eval $(call GluonModel,UBNT,ubnt-unifi-outdoor-plus,ubiquiti-unifiap-outdoor+)) # BROKEN: WLAN doesn't work correctly (high packet loss)
 endif
 
 
-- 
GitLab