From: Arne Fitzenreiter Date: Wed, 10 Nov 2021 07:04:58 +0000 (+0000) Subject: xradio: update get mac address from dts function X-Git-Tag: v2.27-core162~76^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50fe4e50f3a90ed60d5e27cd8880d0994fd7254d;p=ipfire-2.x.git xradio: update get mac address from dts function Signed-off-by: Arne Fitzenreiter --- diff --git a/lfs/xradio b/lfs/xradio index d65756b3e3..1f92f69754 100644 --- a/lfs/xradio +++ b/lfs/xradio @@ -82,6 +82,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/xradio/fix-transmit-of-tkip-encrypted-packets.patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/xradio/fix-missing-wpa1-2-sequence-numbers-for-group.patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/xradio/report-mic-fails-to-kernel-and-correct-iv-str.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/xradio/eth_platform_get_mac_address.patch cd $(DIR_APP) && CONFIG_WLAN_VENDOR_XRADIO=m \ make $(MAKETUNING) -C /lib/modules/$(KVER)-$(VERSUFIX)/build/ M=$(DIR_APP)/ modules diff --git a/src/patches/xradio/eth_platform_get_mac_address.patch b/src/patches/xradio/eth_platform_get_mac_address.patch new file mode 100644 index 0000000000..bc1733e63e --- /dev/null +++ b/src/patches/xradio/eth_platform_get_mac_address.patch @@ -0,0 +1,41 @@ +diff -Naur xradio-354e8c32e7948d46a63796d0ca266b1f702999b0.org/main.c xradio-354e8c32e7948d46a63796d0ca266b1f702999b0/main.c +--- xradio-354e8c32e7948d46a63796d0ca266b1f702999b0.org/main.c 2020-05-02 17:17:06.000000000 +0000 ++++ xradio-354e8c32e7948d46a63796d0ca266b1f702999b0/main.c 2021-11-07 10:30:26.153851399 +0000 +@@ -12,7 +12,7 @@ + + #include + #include +-#include ++#include + #include + + #include "xradio.h" +@@ -501,9 +501,8 @@ + u8 b; /* MRK 5.5a */ + struct ieee80211_hw *dev; + struct xradio_common *hw_priv; +- unsigned char randomaddr[ETH_ALEN]; +- const unsigned char *addr = NULL; +- ++ unsigned char addr[ETH_ALEN]; ++ int ret; + //init xradio_common + dev = xradio_init_common(sizeof(struct xradio_common)); + if (!dev) { +@@ -517,12 +516,12 @@ + + // fill in mac addresses + if (hw_priv->pdev->of_node) { +- addr = of_get_mac_address(hw_priv->pdev->of_node); ++ ret = eth_platform_get_mac_address(hw_priv->pdev, addr); + } +- if (!addr) { ++ ++ if (ret<0) { + dev_warn(hw_priv->pdev, "no mac address provided, using random\n"); +- eth_random_addr(randomaddr); +- addr = randomaddr; ++ eth_random_addr(addr); + } + for (b = 0; b < XRWL_MAX_VIFS; b++) { /* MRK 5.5a */ + memcpy(hw_priv->addresses[b].addr, addr, ETH_ALEN);