Commit Graph

62 Commits (1634461bd208f4bd108ea5c3d3f1cf9eb56d4a7e)

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
Adrian Schmutzler 23d3fafd87 broadcom-wl: fix compilation with kernel 5.4
This adds two fixes for compilation with kernel 5.4:

1. dev_open from include/linux/netdevice.h needs a second parameter
   since kernel 5.0:
   00f54e68924e ("net: core: dev: Add extack argument to dev_open()")
2. get_ds() macro definition has been dropped since kernel 5.1:
   736706bee329 ("get rid of legacy 'get_ds()' function")
   Since get_ds() has been just a macro before, replace it in
   the driver instead of creating a version switch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler d761b9f211 broadcom-wl: fix compilation with kernel >= 4.15
Since kernel 4.15, init_timer is not available anymore, and has been
replaced by timer_setup. The fixes compilation of wl_linuc.c, which
returned the following errors beforehand (line-wrapped manually):

.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c: In function 'wl_init_timer':
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2576:2: error: implicit
	declaration of function 'init_timer'; did you mean 'init_timers'?
	[-Werror=implicit-function-declaration]
  init_timer(&t->timer);
  ^~~~~~~~~~
  init_timers
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2577:10: error:
	'struct timer_list' has no member named 'data'
  t->timer.data = (ulong) t;
          ^
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2578:20: error: assignment
	to 'void (*)(struct timer_list *)' from incompatible pointer type
	'void (*)(ulong)' {aka 'void (*)(long unsigned int)'}
	[-Werror=incompatible-pointer-types]
  t->timer.function = wl_timer;

This should fix build of several devices on bcm63xx with testing
kernel (4.19).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Tomasz Maciej Nowak 9c6b6abdcd kernel: replace SUBDIRS with M in package recipes
The SUBDIRS variable has been removed in kernel 5.4, and was deprecated
since the beginnig of kernel git history in favour of M or KBUILD_EXTMOD.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years ago
Adrian Schmutzler e7bfda2c24 brcm63xx: rename target to bcm63xx
This change makes the names of Broadcom targets consistent by using
the common notation based on SoC/CPU ID (which is used internally
anyway), bcmXXXX instead of brcmXXXX.
This is even used for target TITLE in make menuconfig already,
only the short target name used brcm so far.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 8fe5ad5d33 brcm47xx: rename target to bcm47xx
This change makes the names of Broadcom targets consistent by using
the common notation based on SoC/CPU ID (which is used internally
anyway), bcmXXXX instead of brcmXXXX.
This is even used for target TITLE in make menuconfig already,
only the short target name used brcm so far.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Jo-Philipp Wich 74739c4228 treewide: fix syntax errors exposed after kconfig update
After commit e82a4d9cfb ("config: regenerate *_shipped sources") the mconf
parser became more strict as a side effect and started to spew a series of
warnings when evaluating our generated kconfig sources:

  tmp/.config-package.in:705:warning: ignoring unsupported character '@'

The root cause of these warnings is a wrong use of the @SYMBOL dependency
syntax in various Makefile. Fix the corresponding Makefiles by turning
`@SYM||@SYM2` expressions into the proper `@(SYM||SYM2)` form.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Jonas Gorski 592472f60f broadcom-wl: fix compilation with 4.14
The last_rx field was removed from net_device. Since the field wasn't
used by the generic subsystem, and the driver only writes to it, just
remove the usage.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
6 years ago
Zoltan HERPAI 1f8585cf99 merge: ssid: update default ssid
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 years ago
Karl Vogel 76378c6b9f build: use KERNEL_MAKE_FLAGS for kernel file compilations
The build system already defines KERNEL_CROSS which defaults to TARGET_CROSS.
Make use of this variable for kernel makefiles.

Signed-off-by: Karl Vogel <karl.vogel@gmail.com>
7 years ago
Jonas Gorski 7eda0d2272 broadcom-wl: switch to AutoProbe
Now that we have working module dependency generation, we can switch to
AutoProbe and let modprobe handle loading required modules.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 5cee71904f broadcom-wl: reorder kmod build and pass EXTRA_VERSIONS
Reoder the build to build the glue module first and pass the glue module's
Module.symvers to the wl driver builds.

This allows modpost to properly store a wl_glue dependency in the driver.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 557e98ebcc broadcom-wl: define module directories
Define the module subdirs so our build system properly picks up the
Module.symvers.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Hauke Mehrtens db4550c4c8 broadcom-wl: fix compile with kernel 4.9
ENOENT could not be found by the compiler when compiling again kernel
4.9.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Felix Fietkau 720b99215d treewide: clean up download hashes
Replace *MD5SUM with *HASH, replace MD5 hashes with SHA256

Signed-off-by: Felix Fietkau <nbd@nbd.name>
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
Jo-Philipp Wich 24a7ccb056 treewide: replace jow@openwrt.org with jo@mein.io
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau 7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich b04a25491f package: flag further target specific packages as nonshared
Add nonshared flag to package depending on specific targets or subtargets as
there's no guarantee otherwise that they'll be available in the shared repo.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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
Hauke Mehrtens adbb8801ac broadcom-wl: fix section mismatches in broadcom-wl driver
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 46745
9 years ago
Hauke Mehrtens 01435cded6 broadcom-wl: fix build with kernel 4.1
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 46744
9 years ago
Hauke Mehrtens 1772c47c51 broadcom-wl: fix build with musl
This fixes some build problems with musl. The binary only program
nas.exe wants to link against __assert, which is copied from uClibc.

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

SVN-Revision: 46021
9 years ago
Nicolas Thill f4417f7ad8 package/*: replace occurences of 'ln -sf' to '$(LN)'
Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 43205
10 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
Felix Fietkau fc822a4370 broadcom_wl: eliminate compiler error with gcc-4.9-linaro
Attempting to build broadcom_wl (from trunk) with the linaro 4.9.x
toolchain produces the following errors:

<...>/wl_linux.c: In function 'wl_dump_ver':
<...>/wl_linux.c:2302:3: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
   __DATE__, __TIME__, EPI_VERSION_STR);
   ^
<...>/wl_linux.c:2302:13: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
   __DATE__, __TIME__, EPI_VERSION_STR);
             ^
cc1: some warnings being treated as errors

Remove the use of the __DATE__ and __TIME__ macros, as the info is not
really useful.

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

SVN-Revision: 43046
10 years ago
Jonas Gorski 9a24294b02 brcm-wl: use new brcm63xx fallback sprom
This fixes brcm63xx fallback sprom extraction.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 42725
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 8bc5902d72 broadcom-wl: add support for a8xx broadcom devices
Tested on Comtrend VR-3025u (brcm6368 + a8d6-43222).

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

SVN-Revision: 42084
10 years ago
Hauke Mehrtens 189edfef1a broadcom-wl: assign first increased mac address to internal wifi core
When the original mac addresses are not valid assign the first one to
the internal wifi core, this matches the manufacture mac address in
most cases. In addition refresh the patches.

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

SVN-Revision: 41545
10 years ago
Felix Fietkau ecd169b2c6 broadcom-wl: disable mips16 support, fixes build
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41540
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
Hauke Mehrtens 817c56f77c broadcom-wl: fixup mac addresses.
Some series of devices are using the same mac address, which causes
conflicts for these devices we generate a new mac address based on the
base address. This patch adds this functionality to braodcom-wl.

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

SVN-Revision: 41514
10 years ago
Hauke Mehrtens d72ff79546 broadcom-wl: fix build with bcma or ssb deactivated
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 41046
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 5c2f443075 broadcom-wl: version roll
Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38765
11 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 753d52c2a4 broadcom-wl: support probe of 'wds' devices
'nas' requires probe of 'wds' devices to be successful;
so don't fail them.

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

SVN-Revision: 38763
11 years ago
Hauke Mehrtens 697f4a19e5 broadcom-wl: fix crash when starting multiple virtual interfaces
When enabling multiple VIFS, the driver sometimes crashes.  The frequency
of the crash increases as more VIFS are enabled.

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

SVN-Revision: 38762
11 years ago
Hauke Mehrtens b98f77f3d9 broadcom-wl: perform additional cleanup on wl module unload
Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38761
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