Netgear R7800 exploration (IPQ8065, QCA9984)

I think the following belongs in this thread, if not I can split it elsewhere. This may be of interest to some users.

Enabling VHT80P80 on the R7800.
Apply the following patch (note that this patch is handwritten from my own notes, so may not apply cleanly. i'm still formalising a patch to incorporate into my build environment):

--- a/lib/netifd/wireless/mac80211.sh
+++ b/lib/netifd/wireless/mac80211.sh
@@ -49,6 +49,7 @@ drv_mac80211_init_device_config() {
 		short_gi_40 \
 		max_amsdu \
 		dsss_cck_40
+	config_add_string channel2
 }
 
 drv_mac80211_init_iface_config() {

@@ -96,7 +97,7 @@ mac80211_hostapd_setup_base() {
 	[ "$auto_channel" -gt 0 ] && channel=acs_survey
 	[ "$auto_channel" -gt 0 ] && json_get_values channel_list channels
 
-	json_get_vars noscan ht_coex
+	json_get_vars noscan ht_coex channel2
 	json_get_values ht_capab_list ht_capab
 	ieee80211n=1
 	ht_capab=
 	case "$htmode" in
 		VHT20|HT20) ;;
-		HT40*|VHT40|VHT80|VHT160)
+		HT40*|VHT40|VHT80|VHT160|VHT80P80)
 			case "$hwmode" in
 				a)
 					case "$(( ($channel / 4) % 2 ))" in

@@ -174,6 +175,7 @@
 	# 802.11ac
 	enable_ac=0
 	idx="$channel"
+	idx2="$channel2"
 	case "$htmode" in
 		VHT20) enable_ac=1;;
 		VHT40)

@@ -204,6 +206,24 @@
 			append base_cfg "vht_oper_chwidth=2" "$N"
 			append base_cfg "vht_oper_centr_freq_seg0_idx=$idx" "$N"
 		;;
+		VHT80P80)
+			case "$(( ($channel / 4) % 4 ))" in
+				1) idx=$(($channel + 6));;
+				2) idx=$(($channel + 2));;
+				3) idx=$(($channel - 2));;
+				0) idx=$(($channel - 6));;
+			esac
+			case "$(( ($channel2 / 4) % 4 ))" in
+				1) idx2=$(($channel2 + 6));;
+				2) idx2=$(($channel2 + 2));;
+				3) idx2=$(($channel2 - 2));;
+				0) idx2=$(($channel2 - 6));;
+			esac
+			enable_ac=1
+			append base_cfg "vht_oper_chwidth=3" "$N"
+			append base_cfg "vht_oper_centr_freq_seg0_idx=$idx" "$N"
+			append base_cfg "vht_oper_centr_freq_seg1_idx=$idx2" "$N"
+		;;
 	esac
 
 	if [ "$enable_ac" != "0" ]; then

Apply the following (or similar) settings in /etc/config/wireless/:

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11a'
	option path 'soc/1b500000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'
	option channel '36'
	option channel2 '149'
	option htmode 'VHT80P80'

Fully restart netifd so it picks up the new config items /etc/init.d/network restart, and it should fire up.
Not many channel scanners understand VHT80P80 so i had to rely on my own.

This patch would need to be cleaned up and thought through a bit more carefully to be included upstream, but will become more useful when we have HE80P80 capability in future routers (probably ath11k).

I've only tried this with kmod-ath10k-ct and the associated ct firmware so far.

3 Likes