Commit Graph

771 Commits (34bbbbf9c3b39e7b2d81df590aad5cdbd00280d6)

Author SHA1 Message Date
Felix Fietkau 111b499024 mac80211: tweak TSQ settings
Latencies can be much higher on wifi devices, especially with
aggregation. Tune the network stack setting introduced in the previous
commit to account for that.
This commit reintroduces the previously reverted one with a fix for the
crash issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 47fa8654a1 Revert "mac80211: tweak TSQ settings"
This reverts commit 2dc485250d.
This patch needs some additional checks in order to avoid overwriting
unrelated fields for request sockets.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 6a6dc94e0c mac80211: fix a race condition that could lead to a use-after-free on a timer
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 9247864b6e mac80211: fix netlink family id for nl80211 messages
Fixes responses for nl80211 calls

Reported-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Luis Araneda 1c139d664b mac80211: enable brcmfmac's SDIO support on sunxi target
Needed to support some SDIO connected cards, like AMPAK modules

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
7 years ago
Felix Fietkau 2dc485250d mac80211: tweak TSQ settings
Latencies can be much higher on wifi devices, especially with
aggregation. Tune the network stack setting introduced in the previous
commit to account for that

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau f9fa266faf mac80211: update to wireless-testing 2017-11-01
The wireless regdb is now loaded via firmware loading, CRDA support and
built-in regdb support have been removed.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau d91494eedf hostapd: rework frequency/ht/vht selection for ibss/mesh
- Remove obsolete patch chunks regarding fixed_freq
- Instead of patching in custom HT40+/- parameters, use the standard
config syntax as much as possible.
- Use fixed_freq for mesh
- Fix issues with disabling obss scan when using fixed_freq on mesh

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Antonio Quartulli 0da54fa642 mac80211: don't pass the hostapd ctrl iface in adhoc
Passing the ctrl iface to wpa_supplicant will automatically cause wpa_supplicant
to send "STOP_AP" messages to the hostapd. This breaks the AP interfaces.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
7 years ago
Mathias Kresin 8d3857a347 ath9k: unset the default LED pin if used by platform buttons
Unset the default LED gpio pin if the same gpio pin is used by a button
defined via platform button. It prevents the change of the GPIO value
on wireless up/down or wireless traffic.

Fixes: FS#1129

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Jonas Gorski 3689f7c8ef mac80211: ath10k: 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 1dcd8e7cf1 mac80211: backport fixes for fix for CVE-2017-13080
Backport two fixes for the fix of CVE-2017-13080, preventing side channel
attacks and making it work for TKIP.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Stijn Tintel 2f701194c2 mac80211: backport kernel fix for CVE-2017-13080
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Hauke Mehrtens 08bbb804c8 mac80211: ath6kl: add missing usb-core dependency to kmod-ath6kl-usb
This fixes a build problem with many targets.

Fixes 618ed77a17 ("mac80211: add ath6kl kernel modules")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Ben Whitten 618ed77a17 mac80211: add ath6kl kernel modules
Allow board to include the ath6kl kernel modules.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
7 years ago
Felix Fietkau 5bd006aa26 mac80211: fix tx power regression
Revert an accidental change that was introduced by having an old version
of the patch in my git tree, which was merged in 609208597b

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 609208597b mac80211: update to wireless-testing 2017-10-06
Rework the code to get rid of some extra kernel module dependencies
introduced in the last update.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Hauke Mehrtens ba1aedafeb mac80211: fix compile error on PowerPC (PPC_85xx)
Including linux/interrupt.h in linux/hrtimer.h causes this error message
on PowerPC builds on x86, ARM and MIPS it works:

  CC [M]  /backports-4.14-rc2-1/compat/main.o
In file included from /backports-4.14-rc2-1/backport-include/linux/printk.h:5:0,
                 from ./include/linux/kernel.h:13,
                 from /backports-4.14-rc2-1/backport-include/linux/kernel.h:3,
                 from ./include/linux/list.h:8,
                 from /backports-4.14-rc2-1/backport-include/linux/list.h:3,
                 from ./include/linux/module.h:9,
                 from /backports-4.14-rc2-1/backport-include/linux/module.h:3,
                 from /backports-4.14-rc2-1/compat/main.c:1:
./include/linux/ratelimit.h: In function 'ratelimit_state_exit':
./include/linux/ratelimit.h:62:11: error: dereferencing pointer to incomplete type 'struct task_struct'
    current->comm, rs->missed);
           ^
./include/linux/printk.h:279:37: note: in definition of macro 'pr_warning'
  printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
                                     ^
./include/linux/ratelimit.h:61:3: note: in expansion of macro 'pr_warn'
   pr_warn("%s: %d output lines suppressed due to ratelimiting\n",
   ^

The backport of the hrtimer_start() functions needs the
linux/interrupt.h because some parts are defined there. Fix this by
moving the hrtimer_start() backport to the linux/interrupt.h backport
header file.

Fixes: a8f63a0717f5: ("mac80211: update to backports-4.14-rc2")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens a8f63a0717 mac80211: update to backports-4.14-rc2
This updates mac80211 to backprots-4.14-rc2.
This was compile and runtime tested with ath9k, ath10k and b43
with multiple stations and ieee80211w and in different scenarios by many
other people.

To create the backports-4.14-rc2-1.tar.xz use this repository:
https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git
from tag v4.14-rc2-1

Then run this:
./gentree.py --git-revision v4.14-rc2 --clean  <path to linux repo> ../backports-4.14-rc2-1

This also adapts the ath10k-ct and mt76 driver to the changed cfg80211
APIs and syncs the nl80211.h file in iw with the new version from
backports-4.14-rc2.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 45d0b88e44 mac80211: make iwlwifi select AC support
Some NICs supported by this driver support ieee80211 AC.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens aa00d11526 linux-firmware: pack Intel iwl FW separately
Do not create one big package with all the Intel firmware files
supported by the iwlwifi driver, but use a separate package for each
chip.

This also updates some 7000 and 8000 series firmware files to more
recent version. The older versions shipped are not supported by the
current driver any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Hauke Mehrtens 1b2c93988f mac80211: add dev_coredumpm() function
dev_coredumpm() was added with kernel 4.7, but it is used by iwlwifi.
When the dev coredump framework form compat-wireless is used this is not
a problem because it already contains this, but this is deactivated if
the build system finds out that it is already included in the kernel we
compile against. This option was now activated by the bluetooth driver
btmrvl. Having dev coredump in the kernel adds about 400 bytes to the
lzma compressed kernel for brcm47xx.

This is copied from a more recent backports version to add the
dev_coredumpm() function when the internal core devdump is not used.

Fixes: a5922f6 ("kernel: bluetooth: add marvell sdio bluetooth module")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Lorenzo Santina fd84ecda7d treewide: fix shellscript syntax errors/typos
Fix multiple syntax errors in shelscripts (of packages only)
These errors were causing many conditions to not working properly

Signed-off-by: Lorenzo Santina <lorenzo.santina@edu.unito.it>
[increase PKG_RELEASE, drop command substitution from directip.sh]
Signed-off-by: Mathias Kresin <dev@kresin.em>
7 years ago
Toke Høiland-Jørgensen 76c3a033f6 ath10k: Re-enable intermediate softqueues for all devices
The upstream ath10k driver disables the intermediate softqueues for some
devices. This patch reverts that behaviour and always enables the
softqueues (and associated bufferbloat fixes). We have had reports of people
running this with good results:
https://lists.bufferbloat.net/pipermail/make-wifi-fast/2017-September/001497.html

This also refreshes mac80211 patches.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
7 years ago
Felix Fietkau ea72f22bdf ath9k: fix regression in multicast buffering fix
Update the more data flag on the last frame, but tx from the first frame
on.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 35868234e7 ath9k: fix typo in US tx power reduction fix
Use max_t instead of min_t to prevent the value from going below zero

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 22a74ed310 ath9k: fix more-data flag for buffered multicast packets
The flag needs to be cleared for the last packet in the list, not the
first one. Fixes some issues with multicast packet loss for powersave
clients connected to an ath9k AP.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 9b6585b11a ath9k: adjust tx power reduction for US regulatory domain
FCC regulatory rules allow for up to 3 dBi antenna gain. Account for
this in the EEPROM based tx power reduction code.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 45572fe831 mac80211: refresh patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Pavel Kubelun 025cb640cd ath10k: increase bmi timeout to fix OTP on qca99xx boards and add bmi identification through pre-cal file
Backporting upstream patches.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [refresh, rename patches]
7 years ago
Felix Fietkau c6c1f6a548 mac80211: use KERNEL_MAKEOPTS
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Hans Ulli Kroll ce7681d328 mac80211: add support for rtl8821ae pcie adapter
Add support for Realtek RTL8821AE/RTL8812AE PCIe adapter.
This device supports 802.11ac and bluetooth

testet on PC Engines APU with AP and STA mode

Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
7 years ago
Daniel Golle 5e5499c612 mac80211: rt2x00: remove unneccessary code
Use chanreg and dccal helpers to reduce the size of ePA code.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: fixed white-space so patch applies]
7 years ago
Jo-Philipp Wich 4a03347545 mac80211: gracefully handle preexisting VIF
Gracefully handle cases where the to-be-created wireless interface already
exists on the system which might commonly happen with non-multi-SSID capable
wireless drivers.

This fixes commit 8301e61365 which caused
previously ignored "Too many open files in system (-23)" errors to fail the
wireless setup procedure.

With the updated approach we'll still try recreating the vif after one
second if the first attempt to do so failed with ENFILE but we will now
consider the operation successfull if a second attempt still yields ENFILE
with the requested ifname already existing on the system.

Fixes FS#664, FS#704.

Suggested-by: Vittorio Gambaletta <openwrt@vittgam.net>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Matthias Schiffer 1a16cb9c67
mac80211, hostapd: always explicitly set beacon interval
One of the latest mac80211 updates added sanity checks, requiring the
beacon intervals of all VIFs of the same radio to match. This often broke
AP+11s setups, as these modes use different default intervals, at least in
some configurations (observed on ath9k).

Instead of relying on driver or hostapd defaults, change the scripts to
always explicitly set the beacon interval, defaulting to 100. This also
applies the beacon interval to 11s interfaces, which had been forgotten
before. VIF-specific beacon_int setting is removed from hostapd.sh.

Fixes FS#619.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Chris Blake ad0c1d3a31 mac80211: Backport AR934x OTP Patch
Merged upstream in https://patchwork.kernel.org/patch/9572541/, this
patch fixes the OTP offset used by the AR934x and AR955X to properly
enable reading from the OTP.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
7 years ago
Daniel Golle 61cfc8075b mac80211: rt2x00: add incomplete support for external PA on MT7620
Do as the vendor driver does -- however, some devices apparently
patched support for external PA into the driver similar to how it was
done on Rt3352, using EEPROM_NIC_CONF1 rather than EEPROM_NIC_CONF2,
hence we check for both fields. Somehow the vendor driver also no
longer offers the option of only one of the TX paths having an external
PA (which was probably to weird to ever be implemented in practise,
though it doesn't seem like a particularly bad idea to me). Do the same
in rt2x00 and enable support for external PA on both TX paths whenever
it is set for TX0 in EEPROM.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Daniel Golle 3d71d1d9a9 mac80211: rt2x00: reorder patches and prepare for MT7620 external PA
Import change to make external PA capability consistent with the
vendor driver instead of having the logic inverted.
While at it, apply patches in the same order as they got merged
upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Tomislav Požega e209988a17 mac80211: rt2800: fix mt7620 E2 channel registers
update RF register 47 and 54 values according to vendor driver

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: moved changes into a separate patch]
7 years ago
Tomislav Požega d2f864f7bf mac80211: rt2800: fix mt7620 vco calibration registers
Use register values from init LNA function instead of the ones from
restore LNA function. Apply register values based on rx path
configuration.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: moved changes into a separate patch]
7 years ago
Felix Fietkau 00b32b8326 mac80211: fix kconfig recursive dependency warning
Make brcmfmac depend on !TARGET_uml.
Technically, brcmfmac could be built for uml because only SDIO support
won't work on that target. However, selectively avoiding the dependency
propagation of !TARGET_uml from kmod-mmc to avoid including a reference
to BRCMFMAC_SDIO doesn't work.

In practice, brcmfmac is completely useless on uml, so let's just
disable it there.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Daniel Golle 97d1c49cac mac80211: rt2x00: fix MT7620 LNA gain and VCO-after-ALC
This should fix issues with bad RX as well as AP not coming up and/or
scanning failing.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Jonas Gorski 7d4147d869 mac80211: add rt2x00 debug symbols to PKG_CONFIG_DEPENDS
Chaning these symbols require a recompilation of the modules, so make the
system aware of it.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Jonas Gorski 5ba8185866 mac80211: manually apply dependencies to prevent a recoursive one
Apply the !UML dependency to both the symbol and the DEPENDS so there is
no recursive dependency anymore.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Matthias Fritzsche 796629207b mac80211: conistent wireless.wiki.kernel.org
Change all the URLs to wireless.wiki.kernel.org to have
the same protocol, domain and path.

Signed-off-by: Matthias Fritzsche <txt.file@txtfile.eu>
7 years ago
Mathias Kresin 4a4c00e7c4 ath9k: drop obsolete patch
Now that the wireless LEDs are added via platform leds this patch isn't
required any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin b06559e5b7 ath9k: ignore led_pin if ath9k GPIO controller is used with DT
Don't setup the default led pin if the ath9k GPIO controller is used
via device tree to prevent collision. In case any of the pins exposed
by the ath9k is used, the phyNtpt trigger needs to be set in userspace.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 20b45df7eb ath9k: enable GPIO chip only if requested via DT
In case that the atheros device tree binding is used, enable access to
the GPIO chip only if the gpio-controller device tree parameter is used
for the ath9k node.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 192f0a3db8 ath9k: unset the default LED pin if used by platform leds
Unset the default LED gpio pin if the same gpio pin is used by a LED
defined via platform LED. This prevents that the default led trigger
gets assigned to this LED and the GPIO value gets changed on
wifi up/down in case the led is not used for signaling the wifi state.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Felix Fietkau cffeb31107 mac80211: backport an upstream fix for queue start/stop handling
Fixes issues with 802.11s

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago