[v2] fff-wireless: No initial setup of dummy interfaces

Submitted by Adrian Schmutzler on Nov. 19, 2017, 4:20 p.m.

Details

Message ID 1511108418-2679-1-git-send-email-freifunk@adrianschmutzler.de
State Superseded
Headers show

Commit Message

Adrian Schmutzler Nov. 19, 2017, 4:20 p.m.
This removes the dummy WiFi interfaces set up during first boot.

Note that we have to set up the phys, since the default settings
provided by LEDE include disabled=1!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

---

Changes in v2:
- Do not delete phy setup, because then the router has no WiFi
  after startup (disabled=1 is default)

This patch has to be applied after the ETH0MAC patch!
---
 src/packages/fff/fff-wireless/Makefile                         |  2 +-
 .../fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless    | 10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/packages/fff/fff-wireless/Makefile b/src/packages/fff/fff-wireless/Makefile
index c15b2f1..6c62449 100644
--- a/src/packages/fff/fff-wireless/Makefile
+++ b/src/packages/fff/fff-wireless/Makefile
@@ -1,7 +1,7 @@ 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fff-wireless
-PKG_VERSION:=0.0.2
+PKG_VERSION:=5
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
diff --git a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless b/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless
index 7e2fcf9..860f47f 100644
--- a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless
+++ b/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless
@@ -17,16 +17,6 @@  for phy in $(iw phy | awk '/^Wiphy/{ print $2 }'); do
 		echo "Can't create radio for $phy"
 		exit 1
 	fi
-
-	if ! wifiAddAP "$radio" "do.not.use" "mesh" "ap" "0" ; then
-		echo "Can't add AP interface on $radio."
-		exit 1
-	fi
-
-	if ! wifiAddMesh "$radio" "mesh.do.not.use" ; then
-		echo "Can't add Mesh interface on $radio."
-		exit 1
-	fi
 done
 
 # vim: set noexpandtab:tabstop=4

Comments

Adrian Schmutzler Nov. 20, 2017, 10:31 a.m.
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

> -----Original Message-----
> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On Behalf
> Of Adrian Schmutzler
> Sent: Sonntag, 19. November 2017 17:20
> To: franken-dev@freifunk.net
> Subject: [PATCH v2] fff-wireless: No initial setup of dummy interfaces
> 
> This removes the dummy WiFi interfaces set up during first boot.
> 
> Note that we have to set up the phys, since the default settings provided
by
> LEDE include disabled=1!
> 
> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> 
> ---
> 
> Changes in v2:
> - Do not delete phy setup, because then the router has no WiFi
>   after startup (disabled=1 is default)
> 
> This patch has to be applied after the ETH0MAC patch!
> ---
>  src/packages/fff/fff-wireless/Makefile                         |  2 +-
>  .../fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless    | 10
> ----------
>  2 files changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/src/packages/fff/fff-wireless/Makefile
> b/src/packages/fff/fff-wireless/Makefile
> index c15b2f1..6c62449 100644
> --- a/src/packages/fff/fff-wireless/Makefile
> +++ b/src/packages/fff/fff-wireless/Makefile
> @@ -1,7 +1,7 @@
>  include $(TOPDIR)/rules.mk
> 
>  PKG_NAME:=fff-wireless
> -PKG_VERSION:=0.0.2
> +PKG_VERSION:=5
>  PKG_RELEASE:=1
> 
>  PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
> diff --git
> a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless
> b/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless
> index 7e2fcf9..860f47f 100644
> --- a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless
> +++ b/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-wirele
> +++ ss
> @@ -17,16 +17,6 @@ for phy in $(iw phy | awk '/^Wiphy/{ print $2 }'); do
>  		echo "Can't create radio for $phy"
>  		exit 1
>  	fi
> -
> -	if ! wifiAddAP "$radio" "do.not.use" "mesh" "ap" "0" ; then
> -		echo "Can't add AP interface on $radio."
> -		exit 1
> -	fi
> -
> -	if ! wifiAddMesh "$radio" "mesh.do.not.use" ; then
> -		echo "Can't add Mesh interface on $radio."
> -		exit 1
> -	fi
>  done
> 
>  # vim: set noexpandtab:tabstop=4
> --
> 2.7.4
> 
> --
> franken-dev mailing list
> franken-dev@freifunk.net
> http://lists.freifunk.net/mailman/listinfo/franken-dev-freifunk.net
Fabian Blaese Nov. 21, 2017, 9:24 p.m.
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Tim Niemeyer Dec. 22, 2017, 2:02 p.m.
Hi

Reviewed-by: Tim Niemeyer <tim@tn-x.org>

Aber erst muss der evaluate eth0mac patch drin sein, dafür würde ich
mir die angesprochene Änderung noch wünschen.

Tim

Am Sonntag, den 19.11.2017, 17:20 +0100 schrieb Adrian Schmutzler:
> This removes the dummy WiFi interfaces set up during first boot.
> 
> Note that we have to set up the phys, since the default settings
> provided by LEDE include disabled=1!
> 
> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> 
> ---
> 
> Changes in v2:
> - Do not delete phy setup, because then the router has no WiFi
>   after startup (disabled=1 is default)
> 
> This patch has to be applied after the ETH0MAC patch!
> ---
>  src/packages/fff/fff-wireless/Makefile                         |  2
> +-
>  .../fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless    | 10
> ----------
>  2 files changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/src/packages/fff/fff-wireless/Makefile
> b/src/packages/fff/fff-wireless/Makefile
> index c15b2f1..6c62449 100644
> --- a/src/packages/fff/fff-wireless/Makefile
> +++ b/src/packages/fff/fff-wireless/Makefile
> @@ -1,7 +1,7 @@
>  include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=fff-wireless
> -PKG_VERSION:=0.0.2
> +PKG_VERSION:=5
>  PKG_RELEASE:=1
>  
>  PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
> diff --git a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-
> fff-wireless b/src/packages/fff/fff-wireless/files/etc/uci-
> defaults/60-fff-wireless
> index 7e2fcf9..860f47f 100644
> --- a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-
> wireless
> +++ b/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-
> wireless
> @@ -17,16 +17,6 @@ for phy in $(iw phy | awk '/^Wiphy/{ print $2 }');
> do
>  		echo "Can't create radio for $phy"
>  		exit 1
>  	fi
> -
> -	if ! wifiAddAP "$radio" "do.not.use" "mesh" "ap" "0" ; then
> -		echo "Can't add AP interface on $radio."
> -		exit 1
> -	fi
> -
> -	if ! wifiAddMesh "$radio" "mesh.do.not.use" ; then
> -		echo "Can't add Mesh interface on $radio."
> -		exit 1
> -	fi
>  done
>  
>  # vim: set noexpandtab:tabstop=4
> -- 
> 2.7.4
>
Tim Niemeyer Aug. 6, 2018, 1:46 p.m.
Hi

Am Sonntag, den 19.11.2017, 17:20 +0100 schrieb Adrian Schmutzler:
> This removes the dummy WiFi interfaces set up during first boot.
> 
> Note that we have to set up the phys, since the default settings
> provided by LEDE include disabled=1!
> 
> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> 
> ---
> 
> Changes in v2:
> - Do not delete phy setup, because then the router has no WiFi
>   after startup (disabled=1 is default)
> 
> This patch has to be applied after the ETH0MAC patch!

Warum muss das nach dem ETH0MAC Patch applied werden, und welcher von
den tausenden ist gemeint?

Tim


> ---
>  src/packages/fff/fff-wireless/Makefile                         |  2
> +-
>  .../fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless    | 10
> ----------
>  2 files changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/src/packages/fff/fff-wireless/Makefile
> b/src/packages/fff/fff-wireless/Makefile
> index c15b2f1..6c62449 100644
> --- a/src/packages/fff/fff-wireless/Makefile
> +++ b/src/packages/fff/fff-wireless/Makefile
> @@ -1,7 +1,7 @@
>  include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=fff-wireless
> -PKG_VERSION:=0.0.2
> +PKG_VERSION:=5
>  PKG_RELEASE:=1
>  
>  PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
> diff --git a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-
> fff-wireless b/src/packages/fff/fff-wireless/files/etc/uci-
> defaults/60-fff-wireless
> index 7e2fcf9..860f47f 100644
> --- a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-
> wireless
> +++ b/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-
> wireless
> @@ -17,16 +17,6 @@ for phy in $(iw phy | awk '/^Wiphy/{ print $2 }');
> do
>  		echo "Can't create radio for $phy"
>  		exit 1
>  	fi
> -
> -	if ! wifiAddAP "$radio" "do.not.use" "mesh" "ap" "0" ; then
> -		echo "Can't add AP interface on $radio."
> -		exit 1
> -	fi
> -
> -	if ! wifiAddMesh "$radio" "mesh.do.not.use" ; then
> -		echo "Can't add Mesh interface on $radio."
> -		exit 1
> -	fi
>  done
>  
>  # vim: set noexpandtab:tabstop=4
> -- 
> 2.7.4
>
Adrian Schmutzler Aug. 6, 2018, 1:51 p.m.
Hallo Tim,

dafür braucht man meinen Umbau der configurenetwork, den separaten ETH0MAC Patch gibt es nicht mehr, weil der irgendwann keinen Sinn mehr gemacht hat.

Mein Umbau der configurenetwork ist aber auch nicht mehr aktuell im PW, ich schicke demnächst eine aktuelle Version und liefere dann die Begründung für diesen Patch nach. (Ich weiß das jetzt nicht mehr auswendig)

Grüße

Adrian

> -----Original Message-----
> From: Tim Niemeyer [mailto:tim@tn-x.org]
> Sent: Montag, 6. August 2018 15:47
> To: Adrian Schmutzler <freifunk@adrianschmutzler.de>; franken-
> dev@freifunk.net
> Subject: Re: [PATCH v2] fff-wireless: No initial setup of dummy interfaces
> 
> Hi
> 
> Am Sonntag, den 19.11.2017, 17:20 +0100 schrieb Adrian Schmutzler:
> > This removes the dummy WiFi interfaces set up during first boot.
> >
> > Note that we have to set up the phys, since the default settings
> > provided by LEDE include disabled=1!
> >
> > Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> >
> > ---
> >
> > Changes in v2:
> > - Do not delete phy setup, because then the router has no WiFi
> >   after startup (disabled=1 is default)
> >
> > This patch has to be applied after the ETH0MAC patch!
> 
> Warum muss das nach dem ETH0MAC Patch applied werden, und welcher von
> den tausenden ist gemeint?
> 
> Tim
> 
> 
> > ---
> >  src/packages/fff/fff-wireless/Makefile                         |  2
> > +-
> >  .../fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless    | 10
> > ----------
> >  2 files changed, 1 insertion(+), 11 deletions(-)
> >
> > diff --git a/src/packages/fff/fff-wireless/Makefile
> > b/src/packages/fff/fff-wireless/Makefile
> > index c15b2f1..6c62449 100644
> > --- a/src/packages/fff/fff-wireless/Makefile
> > +++ b/src/packages/fff/fff-wireless/Makefile
> > @@ -1,7 +1,7 @@
> >  include $(TOPDIR)/rules.mk
> >
> >  PKG_NAME:=fff-wireless
> > -PKG_VERSION:=0.0.2
> > +PKG_VERSION:=5
> >  PKG_RELEASE:=1
> >
> >  PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
> > diff --git a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-
> > fff-wireless b/src/packages/fff/fff-wireless/files/etc/uci-
> > defaults/60-fff-wireless
> > index 7e2fcf9..860f47f 100644
> > --- a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-
> > wireless
> > +++ b/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-
> > wireless
> > @@ -17,16 +17,6 @@ for phy in $(iw phy | awk '/^Wiphy/{ print $2 }');
> > do
> >  		echo "Can't create radio for $phy"
> >  		exit 1
> >  	fi
> > -
> > -	if ! wifiAddAP "$radio" "do.not.use" "mesh" "ap" "0" ; then
> > -		echo "Can't add AP interface on $radio."
> > -		exit 1
> > -	fi
> > -
> > -	if ! wifiAddMesh "$radio" "mesh.do.not.use" ; then
> > -		echo "Can't add Mesh interface on $radio."
> > -		exit 1
> > -	fi
> >  done
> >
> >  # vim: set noexpandtab:tabstop=4
> > --
> > 2.7.4
> >
Adrian Schmutzler Aug. 7, 2018, 9:02 a.m.
Hallo Tim,

zunächst zum Problem:

Das Problem ist, dass wir in configurenetwork folgendes benutzen:

"/sys/class/net/${ETH0MAC}/address"

Dabei ist ETH0MAC ein WLAN-interface, also z.B. w2ap. Daher können wir die nicht löschen, sonst klappt das nicht.

In meinem configurenetwork-Aufräumpatch ist das mit gelöst. Ich schicke eine aktuelle Version heute oder morgen.

Grüße

Adrian

> -----Original Message-----
> From: Tim Niemeyer [mailto:tim@tn-x.org]
> Sent: Montag, 6. August 2018 15:47
> To: Adrian Schmutzler <freifunk@adrianschmutzler.de>; franken-
> dev@freifunk.net
> Subject: Re: [PATCH v2] fff-wireless: No initial setup of dummy interfaces
> 
> Hi
> 
> Am Sonntag, den 19.11.2017, 17:20 +0100 schrieb Adrian Schmutzler:
> > This removes the dummy WiFi interfaces set up during first boot.
> >
> > Note that we have to set up the phys, since the default settings
> > provided by LEDE include disabled=1!
> >
> > Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> >
> > ---
> >
> > Changes in v2:
> > - Do not delete phy setup, because then the router has no WiFi
> >   after startup (disabled=1 is default)
> >
> > This patch has to be applied after the ETH0MAC patch!
> 
> Warum muss das nach dem ETH0MAC Patch applied werden, und welcher
> von den tausenden ist gemeint?
> 
> Tim
> 
> 
> > ---
> >  src/packages/fff/fff-wireless/Makefile                         |  2
> > +-
> >  .../fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless    | 10
> > ----------
> >  2 files changed, 1 insertion(+), 11 deletions(-)
> >
> > diff --git a/src/packages/fff/fff-wireless/Makefile
> > b/src/packages/fff/fff-wireless/Makefile
> > index c15b2f1..6c62449 100644
> > --- a/src/packages/fff/fff-wireless/Makefile
> > +++ b/src/packages/fff/fff-wireless/Makefile
> > @@ -1,7 +1,7 @@
> >  include $(TOPDIR)/rules.mk
> >
> >  PKG_NAME:=fff-wireless
> > -PKG_VERSION:=0.0.2
> > +PKG_VERSION:=5
> >  PKG_RELEASE:=1
> >
> >  PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
> > diff --git a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-
> > fff-wireless b/src/packages/fff/fff-wireless/files/etc/uci-
> > defaults/60-fff-wireless
> > index 7e2fcf9..860f47f 100644
> > --- a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-
> > wireless
> > +++ b/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-
> > wireless
> > @@ -17,16 +17,6 @@ for phy in $(iw phy | awk '/^Wiphy/{ print $2 }');
> > do
> >  		echo "Can't create radio for $phy"
> >  		exit 1
> >  	fi
> > -
> > -	if ! wifiAddAP "$radio" "do.not.use" "mesh" "ap" "0" ; then
> > -		echo "Can't add AP interface on $radio."
> > -		exit 1
> > -	fi
> > -
> > -	if ! wifiAddMesh "$radio" "mesh.do.not.use" ; then
> > -		echo "Can't add Mesh interface on $radio."
> > -		exit 1
> > -	fi
> >  done
> >
> >  # vim: set noexpandtab:tabstop=4
> > --
> > 2.7.4
> >
Adrian Schmutzler Aug. 7, 2018, 10:29 a.m.
Die beiden v5 Patches von Dienstag, 12:30 Uhr beachten. Das löst das ETH0MAC Problem (ordentlich).

> -----Original Message-----
> From: Tim Niemeyer [mailto:tim@tn-x.org]
> Sent: Montag, 6. August 2018 15:47
> To: Adrian Schmutzler <freifunk@adrianschmutzler.de>; franken-
> dev@freifunk.net
> Subject: Re: [PATCH v2] fff-wireless: No initial setup of dummy interfaces
> 
> Hi
> 
> Am Sonntag, den 19.11.2017, 17:20 +0100 schrieb Adrian Schmutzler:
> > This removes the dummy WiFi interfaces set up during first boot.
> >
> > Note that we have to set up the phys, since the default settings
> > provided by LEDE include disabled=1!
> >
> > Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> >
> > ---
> >
> > Changes in v2:
> > - Do not delete phy setup, because then the router has no WiFi
> >   after startup (disabled=1 is default)
> >
> > This patch has to be applied after the ETH0MAC patch!
> 
> Warum muss das nach dem ETH0MAC Patch applied werden, und welcher von
> den tausenden ist gemeint?
> 
> Tim
> 
> 
> > ---
> >  src/packages/fff/fff-wireless/Makefile                         |  2
> > +-
> >  .../fff/fff-wireless/files/etc/uci-defaults/60-fff-wireless    | 10
> > ----------
> >  2 files changed, 1 insertion(+), 11 deletions(-)
> >
> > diff --git a/src/packages/fff/fff-wireless/Makefile
> > b/src/packages/fff/fff-wireless/Makefile
> > index c15b2f1..6c62449 100644
> > --- a/src/packages/fff/fff-wireless/Makefile
> > +++ b/src/packages/fff/fff-wireless/Makefile
> > @@ -1,7 +1,7 @@
> >  include $(TOPDIR)/rules.mk
> >
> >  PKG_NAME:=fff-wireless
> > -PKG_VERSION:=0.0.2
> > +PKG_VERSION:=5
> >  PKG_RELEASE:=1
> >
> >  PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
> > diff --git a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-
> > fff-wireless b/src/packages/fff/fff-wireless/files/etc/uci-
> > defaults/60-fff-wireless
> > index 7e2fcf9..860f47f 100644
> > --- a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-
> > wireless
> > +++ b/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-
> > wireless
> > @@ -17,16 +17,6 @@ for phy in $(iw phy | awk '/^Wiphy/{ print $2 }');
> > do
> >  		echo "Can't create radio for $phy"
> >  		exit 1
> >  	fi
> > -
> > -	if ! wifiAddAP "$radio" "do.not.use" "mesh" "ap" "0" ; then
> > -		echo "Can't add AP interface on $radio."
> > -		exit 1
> > -	fi
> > -
> > -	if ! wifiAddMesh "$radio" "mesh.do.not.use" ; then
> > -		echo "Can't add Mesh interface on $radio."
> > -		exit 1
> > -	fi
> >  done
> >
> >  # vim: set noexpandtab:tabstop=4
> > --
> > 2.7.4
> >