mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-30 01:52:51 +00:00 
			
		
		
		
	ipa807x: various fixes for wf186
Fixes: WIFI-12616 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
		| @@ -63,7 +63,7 @@ qcom_setup_interfaces() | |||||||
| 		ucidef_set_interface_wan "eth0"		 | 		ucidef_set_interface_wan "eth0"		 | ||||||
| 		;; | 		;; | ||||||
|        cig,wf186w) |        cig,wf186w) | ||||||
|                 ucidef_set_interface_lan "eth1"		 | 		ucidef_set_interface_wan "eth0"		 | ||||||
| 		;; | 		;; | ||||||
| 	yuncore,fap650) | 	yuncore,fap650) | ||||||
| 		ucidef_set_interface_lan "eth3 eth2 eth1 eth0" | 		ucidef_set_interface_lan "eth3 eth2 eth1 eth0" | ||||||
| @@ -135,6 +135,19 @@ qcom_setup_macs() | |||||||
| 		ip link set eth1 address $wan_mac | 		ip link set eth1 address $wan_mac | ||||||
| 		ucidef_set_label_macaddr $wan_mac | 		ucidef_set_label_macaddr $wan_mac | ||||||
| 		;; | 		;; | ||||||
|  | 	cig,wf186w) | ||||||
|  | 		mtd=$(find_mtd_chardev "0:APPSBLENV") | ||||||
|  | 		[ -z "$mtd" ] && return; | ||||||
|  | 		mac=$(grep BaseMacAddress= $mtd | cut -dx -f2) | ||||||
|  | 		[ -z "$mac" ] && return; | ||||||
|  | 		wan_mac=$(macaddr_canonicalize $mac) | ||||||
|  | 		#lan_mac=$(macaddr_add "$wan_mac" 1) | ||||||
|  | 		ucidef_set_network_device_mac eth0 $wan_mac | ||||||
|  | 	       # ucidef_set_network_device_mac eth1 $wan_mac | ||||||
|  | 		ip link set eth0 address $wan_mac | ||||||
|  | 	       # ip link set eth1 address $wan_mac | ||||||
|  | 	       # ucidef_set_label_macaddr $wan_mac		 | ||||||
|  | 		;; | ||||||
| 	cybertan,eww631-a1|\ | 	cybertan,eww631-a1|\ | ||||||
| 	cybertan,eww631-b1) | 	cybertan,eww631-b1) | ||||||
| 		mac=$(grep -i -m 1 BaseMacAddress= /dev/`cat /proc/mtd | grep APPSBLENV | cut -d: -f1` | cut -d= -f2) | 		mac=$(grep -i -m 1 BaseMacAddress= /dev/`cat /proc/mtd | grep APPSBLENV | cut -d: -f1` | cut -d= -f2) | ||||||
|   | |||||||
| @@ -71,6 +71,20 @@ ath11k_generate_macs_wf660a() { | |||||||
| 	echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs | 	echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs | ||||||
| } | } | ||||||
|  |  | ||||||
|  | ath11k_generate_macs_wf186w() { | ||||||
|  | 	touch /lib/firmware/ath11k-macs | ||||||
|  | 	local dev=$(find_mtd_chardev "0:APPSBLENV") | ||||||
|  | 	mac=$(grep BaseMacAddress= $dev | cut -dx -f2) | ||||||
|  | 	eth=$(macaddr_canonicalize $mac) | ||||||
|  | 	mac1=$(macaddr_add $eth 2) | ||||||
|  | 	mac2=$(macaddr_add $eth 3) | ||||||
|  | 	mac3=$(macaddr_add $eth 4) | ||||||
|  | 	echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs | ||||||
|  | 	echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs | ||||||
|  | 	echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| caldata_die() { | caldata_die() { | ||||||
| 	echo "caldata: " "$*" | 	echo "caldata: " "$*" | ||||||
| 	exit 1 | 	exit 1 | ||||||
| @@ -218,7 +232,6 @@ ath11k-macs) | |||||||
| 	indio,um-310ax-v1|\ | 	indio,um-310ax-v1|\ | ||||||
| 	indio,um-510axp-v1|\ | 	indio,um-510axp-v1|\ | ||||||
| 	indio,um-510axm-v1|\ | 	indio,um-510axm-v1|\ | ||||||
| 	cig,wf186w|\ |  | ||||||
| 	cig,wf188n) | 	cig,wf188n) | ||||||
| 		ath11k_generate_macs | 		ath11k_generate_macs | ||||||
| 		;; | 		;; | ||||||
| @@ -234,6 +247,9 @@ ath11k-macs) | |||||||
| 	cig,wf660a) | 	cig,wf660a) | ||||||
| 		ath11k_generate_macs_wf660a | 		ath11k_generate_macs_wf660a | ||||||
| 		;; | 		;; | ||||||
|  | 	cig,wf186w) | ||||||
|  | 		ath11k_generate_macs_wf186w | ||||||
|  | 		;; | ||||||
| 	esac | 	esac | ||||||
| 	;; | 	;; | ||||||
| *) | *) | ||||||
|   | |||||||
| @@ -532,6 +532,19 @@ | |||||||
| 		}; | 		}; | ||||||
|  |  | ||||||
|                dp1 { |                dp1 { | ||||||
|  |                         device_type = "network"; | ||||||
|  |                         compatible = "qcom,nss-dp"; | ||||||
|  |                         clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>; | ||||||
|  |                         clock-names = "nss-snoc-gmac-axi-clk"; | ||||||
|  |                         qcom,id = <2>; | ||||||
|  |                         reg = <0x39D00000 0x10000>; | ||||||
|  |                         interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>; | ||||||
|  |                         qcom,mactype = <2>; | ||||||
|  |                         local-mac-address = [000000000000]; | ||||||
|  |                         phy-mode = "sgmii"; | ||||||
|  |                 }; | ||||||
|  |  | ||||||
|  |                 dp2 { | ||||||
|                         device_type = "network"; |                         device_type = "network"; | ||||||
|                         compatible = "qcom,nss-dp"; |                         compatible = "qcom,nss-dp"; | ||||||
|                         clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>; |                         clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>; | ||||||
| @@ -547,18 +560,6 @@ | |||||||
|                         phy-mode = "sgmii"; |                         phy-mode = "sgmii"; | ||||||
|                 }; |                 }; | ||||||
|  |  | ||||||
| 		dp2 { |  | ||||||
| 			device_type = "network"; |  | ||||||
| 			compatible = "qcom,nss-dp"; |  | ||||||
| 			clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>; |  | ||||||
| 			clock-names = "nss-snoc-gmac-axi-clk"; |  | ||||||
| 			qcom,id = <2>; |  | ||||||
| 			reg = <0x39D00000 0x10000>; |  | ||||||
| 			interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>; |  | ||||||
| 			qcom,mactype = <2>; |  | ||||||
| 			local-mac-address = [000000000000]; |  | ||||||
| 			phy-mode = "sgmii"; |  | ||||||
| 		}; |  | ||||||
|  |  | ||||||
| 		qcom,test@0 { | 		qcom,test@0 { | ||||||
| 			status = "ok"; | 			status = "ok"; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 John Crispin
					John Crispin