On 1/23/21 1:58 AM, David Bauer wrote:
Enable support for the Ubiquiti UniFi Outdoor+ RF filter via device-tree. The old way of using platform data is not required anymore, as it was only used on the now removed ar71xx target.Signed-off-by: David Bauer <[email protected]> --- .../ath/551-ath9k_ubnt_uap_plus_hsr.patch | 35 ++++++------------- .../files/include/linux/ath9k_platform.h | 2 -- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch index 4454baeef1..24cffb0e0e 100644 --- a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch +++ b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch @@ -1,27 +1,26 @@ --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c -@@ -15,6 +15,8 @@ +@@ -15,6 +15,7 @@ */#include "ath9k.h"-+#include <linux/ath9k_platform.h> +#include "hsr.h"/* Set/change channels. If the channel is really being changed, it's done* by reseting the chip. To accomplish this we must first cleanup any pending -@@ -22,6 +24,7 @@ +@@ -22,6 +23,7 @@ */ static int ath_set_channel(struct ath_softc *sc) { -+ struct ath9k_platform_data *pdata = sc->dev->platform_data; ++ struct device_node *np = sc->dev->of_node; struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); struct ieee80211_hw *hw = sc->hw; -@@ -42,6 +45,11 @@ static int ath_set_channel(struct ath_so +@@ -42,6 +44,11 @@ static int ath_set_channel(struct ath_so ath_dbg(common, CONFIG, "Set channel: %d MHz width: %d\n", chan->center_freq, chandef->width);-+ if (pdata && pdata->ubnt_hsr) {++ if (of_property_read_bool(np, "ath9k,ubnt-hsr")) {
The vendor prefix should be "ubnt", not "ath9k" (see Documentation/devicetree/bindings/vendor-prefixes.yaml for the official list.)
+ ath9k_hsr_enable(ah, chandef->width, chan->center_freq); + ath9k_hsr_status(ah); + } @@ -332,30 +331,27 @@ +#endif /* HSR_H */ --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -16,8 +16,10 @@ -
[...]
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
