From 9a713e56c8633dc44e4c558e3d45564f91528655 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Mon, 8 May 2023 13:43:39 +0200 Subject: [PATCH] init-ifupdown: virtwlans: generalize function to check virtual wireless MACs Also this commit removes the virtual wireless MACs verification on ccmp1 platforms Signed-off-by: Arturo Buzarra --- .../init-ifupdown/init-ifupdown-1.0/virtwlans | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown-1.0/virtwlans b/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown-1.0/virtwlans index c508c50c8..622d105f8 100644 --- a/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown-1.0/virtwlans +++ b/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown-1.0/virtwlans @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2017-2019, Digi International Inc. +# Copyright (c) 2017-2023, Digi International Inc. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@ -17,7 +17,7 @@ [ "$IFACE" = "wlan1" ] || exit 0 -if [ "$MODE" = "start" ]; then +check_virtual_wlan_macs() { # Check for default MAC addresses if [ -s "/proc/device-tree/wireless/mac-address1" ] && [ -s "/proc/device-tree/wireless/mac-address2" ] && @@ -26,6 +26,13 @@ if [ "$MODE" = "start" ]; then else echo "[WARN] Using default MAC addresses for virtual interfaces, please program them referring to the Digi U-Boot Documentation" fi +} + +if [ "$MODE" = "start" ]; then + # On ccmp1, there are not virtual wireless MACs, so skip the verification. + if ! grep -qs '\' /proc/device-tree/compatible; then + check_virtual_wlan_macs + fi if [ ! -d "/sys/class/net/wlan1" ]; then # This will create a second wireless network device