[PATCHv2 2/2] ipq806x: add support for TP-Link Talon AD7200

Gary Cooper gaco at bitmessage.de
Tue Oct 20 16:33:00 EDT 2020


From: Gary Cooper <gaco at bitmessage.de>

1: Daniel: As requested.
2: Robert: Your if/then-logic seems to also do the trick, this patch
simply references the existing logic for 802.11a/ac.

802.11ad support

Signed-off-by: Gary Cooper <gaco at bitmessage.de>
---
 package/base-files/files/sbin/wifi                 | 1 +
 package/kernel/mac80211/files/lib/wifi/mac80211.sh | 6 ++++++
 package/network/services/hostapd/files/hostapd.sh  | 8 ++++++++
 3 files changed, 15 insertions(+)

diff --git a/package/base-files/files/sbin/wifi
b/package/base-files/files/sbin/wifi
index a8b4451c60..75759b94f3 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -79,6 +79,7 @@ wifi_fixup_hwmode() {
         case "$hwmode" in
                 11bg) hwmode=bg;;
                 11a) hwmode=a;;
+                11ad) hwmode=ad;;
                 11b) hwmode=b;;
                 11g) hwmode=g;;
                 11n*)
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
index c0fbfbe5a8..3e99f06693 100644
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
@@ -88,6 +88,12 @@ detect_mac80211() {
                         iw phy "$dev" info | grep -q 'VHT Capabilities'
&& htmode="VHT80"
                 }

+                iw phy "$dev" info | grep -q '\* 5.... MHz \[' && {
+                        mode_band="ad"
+                        channel=$(iw phy "$dev" info | grep '\* 5.... MHz
\[' | grep
'(disabled)' -v -m 1 | sed 's/[^[]*\[\|\|\].*//g')
+                        iw phy "$dev" info | grep -q 'Capabilities:' &&
htmode="HT20"
+                }
+
                 [ -n "$htmode" ] && ht_capab="set
wireless.radio${devidx}.htmode=$htmode"

                 path="$(mac80211_phy_to_path "$dev")"
diff --git a/package/network/services/hostapd/files/hostapd.sh
b/package/network/services/hostapd/files/hostapd.sh
index 3290358ed2..b5563d88a6 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -1163,6 +1163,14 @@ wpa_supplicant_add_network() {
                 ;;
         esac

+        case "$wpa_cipher" in
+                GCMP)
+                        append network_data "pairwise=GCMP" "$N$T"
+                        append network_data "group=GCMP" "$N$T"
+                ;;
+                *) ;;
+        esac
+
         [ "$mode" = mesh ] || {
                 case "$wpa" in
                         1)
--




More information about the openwrt-devel mailing list