drivers: eth: gmac: Use correct iface for gPTP over VLAN
drivers: eth: gmac: Use correct iface for gPTP over VLAN

This commit fixes a memory leak happening when both gPTP and VLAN are
enabled.

It also moves the get_iface function up in the file so it is accessible
earlier without a redundant function declaration.

Signed-off-by: Tomasz Gorochowik <265c7c25eca9aa9127910457b0aea7e793d329f1@antmicro.com>

galak/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,kraj/zephyr,explora26/zephyr,nashif/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,ldts/zephyr,explora26/zephyr,punitvara/zephyr,finikorg/zephyr,explora26/zephyr,finikorg/zephyr,ldts/zephyr,punitvara/zephyr,Vudentz/zephyr,kraj/zephyr,finikorg/zephyr,galak/zephyr,nashif/zephyr,ldts/zephyr,galak/zephyr,Vudentz/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,kraj/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,explora26/zephyr,ldts/zephyr,Vudentz/zephyr,punitvara/zephyr,explora26/zephyr,punitvara/zephyr,Vudentz/zephyr,kraj/zephyr,punitvara/zephyr,ldts/zephyr,nashif/zephyr,nashif/zephyr,finikorg/zephyr,Vudentz/zephyr,kraj/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr