Commit Graph

25 Commits (4a6795409d1520fd3da3e909a8bcf9d7fd0927bb)

Author SHA1 Message Date
Jo-Philipp Wich a03d6d2fab broadcom-wl: don't inherit lock descriptor in nas process
Add a local hack to prevent the Broadcom WPA authenticator process from
inheriting the lock descriptor 1000 used to prevent concurrent executions
of the init script.

Without this fix, repeated invocations of /etc/init.d/network, e.g. for
obtaining the enabled state, would hang forever.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years ago
Zoltan HERPAI 1f8585cf99 merge: ssid: update default ssid
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 years ago
Christian Lamparter 5f8f8a3661 base-files, mac80211, broadcom-wl: wifi detection and configuration
Currently, the wifi detection script is executed as part of
the (early) boot process. Pluggable wifi USB devices, which
are inserted at a later time are not automatically
detected and therefore they don't show up in LuCI.

A user has to deal with wifi detection manually, or restart
the router.

However, the current "sleep 1" window - which the boot
process waits for wifi devices to "settle down" - is too
short to detect wifi devices for some routers anyway.

For example, this can happen with USB WLAN devices on the
WNDR4700. This is because the usb controller needs to load
its firmware from UBI and initialize, before it can operate.

The issue can be seen on a BT HomeHub 5A as well as soon as
the caldata are on an ubi volume. This is because the ath9k
card has to be initialized by owl-loader first. Which has to
wait for the firmware extraction script to retrieve the pci
initialization values inside the caldata.

This patch moves the wifi configuration to hotplug scripts.
For mac80211, the wifi configuration will now automatically
run any time a "ieee80211" device is added. Likewise
broadcom-wl's script checks for new "net" devices which
have the "wl$NUMBER" moniker.

Issues with spawning multiple interface configuration - in
case the detection script is run concurrently - have been
resolved by using a named section for the initial
configuration. Concurrent configuration scripts will now
simply overwrite the same existing configuration.

A workaround which preserves the "sleep 1" window for just
the first boot has been added. This allows the existing
brcm47xx boot and mvebu uci-default scripts to correctly
setup the initial mac addresses and regulatory domain.

And finally, the patch renames the "wifi detect" into
"wifi config". As the script no longer produces any output
that has to be redirected or appended to the configuration
file.

Thanks to Martin Blumenstingl for helping with the implementation
and testing of the patch.

Acked-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Christian Lamparter 5e35b4562f base-files, mac80211, broadcom-wl: use uci to populate wireless config
Previously, wifi detect simply dumped its generated wireless
configuration to STDOUT. A second step was needed to append
the configuration to /etc/config/wireless (or create it, if
it didn't exist).

With this patch, The wifi detection script will now use uci
to update the wireless configuration directly.

This patch also makes the initially created wifi-iface a
named section ('default_radio$X' for mac80211 and
'default_wl$X' for broadcom). With this change, uci will
not print the cfgHASH to STDOUT (which would now corrupt
the wireless configuration). It will also prevent adding
duplicated wifi interface configurations, if the wifi
configuration is run concurrently.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
8 years ago
John Crispin fa69553900 branding: add LEDE branding
Signed-off-by: John Crispin <blogic@openwrt.org>
8 years ago
Steven Barth e07959cade package: replace ifconfig-usage with ip
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46832
9 years ago
Hauke Mehrtens 46dd362bde broadcom-wl: add interface after bridge is up
Without this patch adding the wifi device to the bridge may fail
because the bridge is not already configured when the wifi device gets
configured. This patch makes broadcom-wl wait till the bridge is ready.

This fixes #17262

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 46749
9 years ago
Hauke Mehrtens 9893aa395c broadcom-wl: fix bash comparison error
This fixes #17495

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 46746
9 years ago
Jo-Philipp Wich aeecc6ec12 broadcom-wl: align with mac80211 config
- Support HT40 instead of HT40+/HT40- like mac80211
 - Enable 11n if htmode is HT20 or HT40

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43063
10 years ago
Hauke Mehrtens 8af860e186 broadcom-wl: add default tx and rx antennas
This adds default tx and rx antennas, so that LuCI shows automatic as the default radio option for the antennas.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 42085
10 years ago
Hauke Mehrtens d6c7ab2358 broadcom-wl: improve setting leddc
Use leddc value from other routers and improve the script.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 41519
10 years ago
Hauke Mehrtens 4ec8908669 broadcom-wl: fix led support
Some devices have an nvram setting, which make broadcom-wl turn of the
led all the time. When the driver is switched on and we find such a
setting we replace it with a better value.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 41518
10 years ago
Felix Fietkau 5858557160 broadcom-wl: bring interfaces up, do not rely on netifd doing it
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40749
10 years ago
Hauke Mehrtens 1f9a4fee5a broadcom-wl: support 'wds' interfaces on 'wl1' device
Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38764
11 years ago
Hauke Mehrtens df493faf12 broadcom-wl: support more virtual interfaces
Read the number of virtual interfaces to support from the device
capabilities; as some newer devices can support up to 16.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38759
11 years ago
Hauke Mehrtens c926edd72d broadcom-wl: improve device cleanup
Move all device cleanup to "disable_broadcom".

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38758
11 years ago
Hauke Mehrtens 3c2904bfb8 broadcom-wl: add support for setting H/W address
Some devices initialize with a default address (common to all H/W).
The address needs to be changeable so that a unique address can be
assigned to each AP.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38757
11 years ago
Hauke Mehrtens 4ba2f2f731 broadcom-wl: eliminate 'invalid command' when setting ssid
Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38756
11 years ago
Hauke Mehrtens 5b4c8c4cc8 broadcom-wl: clean up variable definitions (broadcom.sh)
Specify variables as 'local' where appropriate

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38755
11 years ago
Hauke Mehrtens aa6a5baf88 broadcom-wl: simplify processing of 'hwmode'
Default gmode to "GOnly" unless explicitly overwridden.  This corrects
processing for 11ng to specify "GOnly" for gmode instead of "Auto"
(which translated to "bg").

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38754
11 years ago
Hauke Mehrtens d1c55bb33e broadcom-wl: shutdown 'nas' when 'wl' device is disabled
'nas' must be shutdown independently for each 'wl' device to properly
support devices with multiple radios.  Do the shutdown when the device
is disabled instead of when it is brought up.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38753
11 years ago
Hauke Mehrtens 091d80bea7 broadcom-wl: use a single instance of 'nas' per 'wl' device
A single instance of 'nas' can support multiple interfaces; there's
no need to run multiple instances.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38752
11 years ago
Hauke Mehrtens cac4ccca2f broadcom-wl: change interface names
'netifd' treats all devices with a "." in their name as vlan devices.
Modify the name of virtual/WDS interfaces created by broadcom-wl to use
a "-" instead of a ".", so they will be treated as simple devices
by 'netifd'.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38748
11 years ago
Hauke Mehrtens e12b5ec8df broadcom-wl: Add 'N' mode support to broadcom-wl
This is partly based on patches sent by Łukasz Kwestarz (See https://lists.openwrt.org/pipermail/openwrt-devel/2012-March/014356.html).

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37802
11 years ago
John Crispin 4ebf19b48f packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37007
11 years ago