diff mbox series

[OpenWrt-Devel] brcm2708: Tethering by default

Message ID 20180519100901.26896-1-christo.nedev@gmail.com
State Changes Requested
Delegated to: John Crispin
Headers show
Series [OpenWrt-Devel] brcm2708: Tethering by default | expand

Commit Message

Christo Nedev May 19, 2018, 10:09 a.m. UTC
Why?

Pi Zero and Zero W have no LAN port!
For W radio is disabled by default!
Pi 3 b+ has no working WIFI!

So it is handy to have tethering by defult and nightmer without!

Signed-off-by: Christo Nedev <christo.nedev@gmail.com>
---
 target/linux/brcm2708/Makefile                          |  1 +
 target/linux/brcm2708/base-files/etc/board.d/02_network | 13 ++++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

Comments

Alberto Bursi May 19, 2018, 1:15 p.m. UTC | #1
On 19/05/2018 12:09, Christo Nedev wrote:
> Why?
>
> Pi Zero and Zero W have no LAN port!
> For W radio is disabled by default!
> Pi 3 b+ has no working WIFI!
>
> So it is handy to have tethering by defult and nightmer without!
>
>

usb0 interface is used by USB-to-ethernet adapters or smartphone 
tethering, and they need drivers to work. Just adding the interface does 
not have any effect.

I think it makes more sense to enable the wifi on the raspi zero and 
zero W by default.

Raspi 3 have an ethernet port and it works, I think there is no need to 
add usb0 interface. Many devices have only ethernet ports in OpenWrt.

Also, since you are active on these devices, it seems that the wifi on 
the Pi 3 B+ only needs firmware files extracted from Raspbian to work, 
maybe you can add that too?
See this post 
https://forum.lede-project.org/t/raspberry-pi-3-b-openwrt-lede-image/13066/32

-Alberto
diff mbox series

Patch

diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile
index 244513dfc6..5ee0c9a21a 100644
--- a/target/linux/brcm2708/Makefile
+++ b/target/linux/brcm2708/Makefile
@@ -25,6 +25,7 @@  include $(INCLUDE_DIR)/target.mk
 DEFAULT_PACKAGES += \
 	brcm2708-gpu-fw \
 	kmod-usb-hid \
+	kmod-usb-net kmod-usb-net-cdc-ether kmod-usb-net-rndis \
 	kmod-sound-core kmod-sound-arm-bcm2835 \
 	kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
 	brcmfmac-firmware-43430-sdio kmod-brcmfmac wpad-mini
diff --git a/target/linux/brcm2708/base-files/etc/board.d/02_network b/target/linux/brcm2708/base-files/etc/board.d/02_network
index c8449bb78f..c70f234312 100755
--- a/target/linux/brcm2708/base-files/etc/board.d/02_network
+++ b/target/linux/brcm2708/base-files/etc/board.d/02_network
@@ -14,14 +14,25 @@  case "$board" in
 raspberrypi,model-b |\
 raspberrypi,model-b-plus |\
 raspberrypi,model-b-rev2 |\
-raspberrypi,2-model-b |\
+raspberrypi,2-model-b)
+	ucidef_set_interface_lan "eth0"
+	ucidef_set_interface_wan "usb0"
+	;;
+
 raspberrypi,3-model-b |\
 raspberrypi,3-model-b-plus)
 	ucidef_set_interface_lan "eth0"
+	ucidef_set_interface_lan "wlan0"
+	ucidef_set_interface_wan "usb0"
+	;;
+
+raspberrypi,model-zero)
+	ucidef_set_interface_lan "usb0"
 	;;
 
 raspberrypi,model-zero-w)
 	ucidef_set_interface_lan "wlan0"
+	ucidef_set_interface_lan "usb0"
 	;;
 esac