[LEDE-DEV] [PATCH v2] ramips: fix GL-inet GL-MT300N-V2 LAN MAC address

Mathias Kresin dev at kresin.me
Tue Mar 20 04:50:09 PDT 2018


20.03.2018 09:54, Kyson Lok:
> Override the LAN MAC to use the same address as WAN.
> The stock firmware uses the same MAC address for all
> interfaces.
> 
> Signed-off-by: Kyson Lok <kysonlok at gmail.com>
> ---
>   target/linux/ramips/base-files/etc/board.d/02_network | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
> index 03f718e..c26d77f 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -441,6 +441,7 @@ ramips_setup_macs()
>   		wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR)
>   		;;
>   	gl-mt300n-v2)
> +		lan_mac=$(mtd_get_mac_binary factory 4)
>   		wan_mac=$(mtd_get_mac_binary factory 4)
>   		;;
>   	hc5*61|\
> 

This change looks unnecessary to me. The very same MAC-Address should be 
already assigned via the dts:

88 &ethernet {
89         mtd-mac-address = <&factory 0x4>;
90 };

As far as I remember, the WAN MAC-Address is only set because the switch 
driver autoincrements the base MAC-Address for the second vlan (if not 
for each vlan). Hopefully I don't mix the different switch drivers here, 
at least one of the ramips switch driver does this autoincrement.

Long story short, I either fail hard or this change triggers something 
else which fixes your customers issue.

Mathias



More information about the Lede-dev mailing list