Commit Graph

1067 Commits (master)

Author SHA1 Message Date
Vijayakumar Durai d0b969eee8 mac80211: rt2x00: do not increment sequence number while re-transmitting
Currently STA+AP re-transmitting the management frames with
incremented sequence number if hardware is assigning the sequence.

Fix is to assign the sequence number for Beacon by hardware
and for other Management frames software will assign the
sequence number

Signed-off-by: Vijayakumar Durai <vijayakumar.durai1@vivint.com>
5 years ago
Hauke Mehrtens 4590af2065 mac80211: Activate DRIVER_11W_SUPPORT for more capable drivers
ieee80211w support is only activated in hostapd when at least one
capable driver is build into the image. Many drivers which are capable
of ieee80211 (MFP) and have the MFP_CAPABLE set in the driver are still
missing the DRIVER_11W_SUPPORT dependency. Add this to more driver
capable of ieee80211w.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Felix Fietkau c6caa7a27a mac80211: add a fix to prevent unsafe queue wake calls during restart
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Felix Fietkau 82d306b595 mac80211: backport tx queue start/stop fix
Among other things, it fixes a race condition on calling ieee80211_restart_hw

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Daniel Golle 98f86e61ea mac80211: rt2x00: cleanup ePA, RXIQ and TX-LOFT code
consolidate patch 651-rt2x00-remove-unneccesary-code.patch.
fixup the most obvious whitespace problems in RXIQ and TX-LOFT code.
always backup registers bbpr1, bbpr4, bbpr241 and bbpr242 to avoid
compiler warning about them being potentially uninitialized.
no functional changes (intended)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 7cf6e11721 mac80211: rt2x00: patch tracking cosmetics
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Sven Eckelmann 4beed12d85 mac80211: ath10k: fix incorrect multicast/broadcast rate setting
If no mcast_rate is set for the wifi-iface then there is no rate_idx (0)
set for the bss. This breaks for example 5GHz meshpoint interfaces because
0 maps to a CCK rate (11Mbit/s).

Fixes: db90c243a0 ("mac80211: update to version based on 4.19-rc4")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
5 years ago
Hauke Mehrtens b1c614784d mac80211: Add WDS / 4addr fix for ath10k supported devices
This should fix the WDS / 4addr mode with ath10k and probably other
devices.
This patch was found here: https://patchwork.kernel.org/patch/10692383/

Fixes: d9eefa7a70 ("mac80211: rebase ontop of v4.18.5")
Reported-by: Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Stanislaw Gruszka 426ffc563a mac80211: rt2x00: fix crash on release_firmware
Fix crash due to passing invalid r2x00dev->eeprom_file pointer to
release_firmware(). Since we copy eeprom data with EEPROM_SIZE
in rt2800_read_eeprom() we can use eeprom_file->size as marker
if the file was crated by request_firmware().

Acked-by: Kristian Evensen <kristian.evensen@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
5 years ago
Rafał Miłecki 2d139450a3 mac80211: backport more brcmfmac changes queued for the 5.1
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Arnout Vandecappelle (Essensium/Mind) 2e0f41e73a hostapd: add Multi-AP patches and config options
Cherry-pick Multi-AP commits from uptream:
 9c06f0f6a hostapd: Add Multi-AP protocol support
 5abc7823b wpa_supplicant: Add Multi-AP backhaul STA support
 a1debd338 tests: Refactor test_multi_ap
 bfcdac1c8 Multi-AP: Don't reject backhaul STA on fronthaul BSS
 cb3c156e7 tests: Update multi_ap_fronthaul_on_ap to match implementation
 56a2d788f WPS: Add multi_ap_subelem to wps_build_wfa_ext()
 83ebf5586 wpa_supplicant: Support Multi-AP backhaul STA onboarding with WPS
 66819b07b hostapd: Support Multi-AP backhaul STA onboarding with WPS
 8682f384c hostapd: Add README-MULTI-AP
 b1daf498a tests: Multi-AP WPS provisioning

Add support for Multi-AP to the UCI configuration. Every wifi-iface gets
an option 'multi_ap'. For APs, its value can be 0 (multi-AP support
disabled), 1 (backhaul AP), 2 (fronthaul AP), or 3 (fronthaul + backhaul
AP). For STAs, it can be 0 (not a backhaul STA) or 1 (backhaul STA, can
only associate with backhaul AP).

Also add new optional parameter to wps_start ubus call of
wpa_supplicant to indicate that a Multi-AP backhaul link is required.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
5 years ago
Daniel Golle 8554982e1f mac80211: rt2x00: replace pending by merged patches
Those have by now been merged into wireless-drivers-next:
 17ae2acd1a6f rt2x00: remove unneeded check
 5991a2ecd070 rt2x00: remove confusing AGC register
 9ad3b5565445 rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band
 7aca14885ede rt2800: enable TX_PIN_CFG_RFRX_EN only for MT7620
 c7ff1bfeaf1c rt2800: comment and simplify AGC init for RT6352

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle d4c999bb89 mac80211: rt2x00: backport accepted and pending patches from upstream
backport from wireless-drivers-next, replacing some existing patches in
our tree (marked with '=' are those which were already present):
 f483039cf51a rt2x00: use simple_read_from_buffer()
=5c656c71b1bf rt2800: move usb specific txdone/txstatus routines to rt2800lib
=0b0d556e0ebb rt2800mmio: use txdone/txstatus routines from lib
=5022efb50f62 rt2x00: do not check for txstatus timeout every time on tasklet
=adf26a356f13 rt2x00: use different txstatus timeouts when flushing
=0240564430c0 rt2800: flush and txstatus rework for rt2800mmio
 6eba8fd22352 rt2x00: rt2400pci: mark expected switch fall-through
 10bb92217747 rt2x00: rt2500pci: mark expected switch fall-through
 916e6bbcfcff rt2x00: rt2800lib: mark expected switch fall-throughs
 641dd8068ecb rt2x00: rt61pci: mark expected switch fall-through
 750afb08ca71 cross-tree: phase out dma_zalloc_coherent()
=c2e28ef7711f rt2x00: reduce tx power to nominal level on RT6352
 a4296994eb80 rt2x00: Work around a firmware bug with shared keys
 2587791d5758 rt2x00: no need to check return value of debugfs_create functions

pending on linux-wireless:
 rt2x00: remove unneeded check
 rt2x00: remove confusing AGC register
 rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band
 rt2800: enable TX_PIN_CFG_RFRX_EN only for MT7620
 rt2800: comment and simplify AGC init for RT6352
 rt2x00: do not print error when queue is full
 rt2800: partially restore old mmio txstatus behaviour
 rt2800: new flush implementation for SoC devices
 rt2800: move txstatus pending routine
 rt2800mmio: fetch tx status changes
 rt2800mmio: use timer and work for handling tx statuses timeouts
 rt2x00: remove last_nostatus_check
 rt2x00: remove not used entry field
 rt2x00mmio: remove legacy comment

While at it also rename some existing patches now that there are
separate folders with patches for each driver to make things a bit
nicer to handle.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Deng Qingfang f5db5742e4 iw: update to 5.0.1
Refresh patches

MIPS IPK size increases:
iw-tiny: +3k
iw-full: +10k

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
[Remove sha256, nan, bloom, measurements and ftm from tiny version]
[sync nl80211 between backports and iw]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens d48a8ed40d mac80211: update to version 4.19.23-1
This updates mac80211 to backports version 4.19.23-1 which includes all
the stable fixes from kernel 4.19.23.
The removed patches are included in this version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Rafał Miłecki 9485ea721e mac80211: brcmfmac: backport early changes queued for the Linux 5.1
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki 0994e65c6a mac80211: brcmfmac: backport remaining patches from the Linux 5.0
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Sven Eckelmann 2b51d8591f mac80211: ath10k: support for management rate control
Issues a wmi command to firmware when multicast rate change is received with the
new BSS_CHANGED_MCAST_RATE flag.  Also fixes the incorrect fixed_rate setting
for CCK rates which got introduced with addition of ath10k_rates_rev2 enum.

By default the firmware uses 1Mbps and 6Mbps rate for management packets
in 2G and 5G bands respectively. But when the user selects different
basic rates from the userspace, we need to send the management
packets at the lowest basic rate selected by the user.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
5 years ago
Rafał Miłecki 83bcacb521 mac80211: brcmfmac: fix a possible NULL pointer dereference
This fixes a possible crash in the brcmf_fw_request_nvram_done():
[   31.687293] Backtrace:
[   31.689760] [<c004fb4c>] (__wake_up_common) from [<c004fc38>] (__wake_up_locked+0x1c/0x24)
[   31.698043]  r10:c6794000 r9:00000009 r8:00000001 r7:bf54dda0 r6:a0000013 r5:c78e7d38
[   31.705928]  r4:c78e7d3c r3:00000000
[   31.709528] [<c004fc1c>] (__wake_up_locked) from [<c00502a8>] (complete+0x3c/0x4c)
[   31.717148] [<c005026c>] (complete) from [<bf54590c>] (brcmf_fw_request_nvram_done+0x5c8/0x6a4 [brcmfmac])
[   31.726818]  r7:bf54dda0 r6:c6794000 r5:00001990 r4:c6782380
[   31.732544] [<bf545344>] (brcmf_fw_request_nvram_done [brcmfmac]) from [<c0204e40>] (request_firmware_work_func+0x38/0x60)
[   31.743607]  r10:00000008 r9:c6bdd700 r8:00000000 r7:c72c3cd8 r6:c67f4300 r5:c6bda300
[   31.751493]  r4:c67f4300
[   31.754046] [<c0204e08>] (request_firmware_work_func) from [<c0034458>] (process_one_work+0x1e0/0x318)
[   31.763365]  r4:c72c3cc0
[   31.765913] [<c0034278>] (process_one_work) from [<c0035234>] (worker_thread+0x2f4/0x448)
[   31.774107]  r10:00000008 r9:00000000 r8:c6bda314 r7:c72c3cd8 r6:c6bda300 r5:c6bda300
[   31.781993]  r4:c72c3cc0
[   31.784545] [<c0034f40>] (worker_thread) from [<c003984c>] (kthread+0x100/0x114)
[   31.791949]  r10:00000000 r9:00000000 r8:00000000 r7:c0034f40 r6:c72c3cc0 r5:00000000
[   31.799836]  r4:c735dc00 r3:c79ed540
[   31.803438] [<c003974c>] (kthread) from [<c00097d0>] (ret_from_fork+0x14/0x24)
[   31.810672]  r7:00000000 r6:00000000 r5:c003974c r4:c735dc00
[   31.816378] Code: e5b53004 e1a07001 e1a06002 e243000c (e5934000)
[   31.822487] ---[ end trace a0ffbb07a810d503 ]---

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Daniel Golle f9850e9d2c mac80211: rt2x00: remove patch causing low tx power
Remove 980-rt2x00-reduce-power-consumption-on-mt7620.patch which in
combination with the most recently added patch reportedly causes TX
power to be too weak.

"without patches rssi on receiver is ~ -23dBm with 980 about -35dBm,
with both patches drops below -40dBm. with 987 only ~-28dBm"

We may need to reconsider this once we have implemented TSSI.

Fixes: cdb58b2bfe ("mac80211: rt2x00: reduce tx power to nominal level on RT6352")
Reported-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle cdb58b2bfe mac80211: rt2x00: reduce tx power to nominal level on RT6352
Current implementation of RT6352 support provides too high tx power
at least on iPA/eLNA devices. Reduce amplification of variable gain
amplifier by 6dB to match board target power of 17dBm.
Transmited signal strength with this patch is similar to that of
stock firmware or pandorabox firmware. Throughput measured with iperf
improves. Device tested: Xiaomi Miwifi Mini.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Felix Fietkau e1496d631e mac80211: fix an issue with allocated tailroom for encrypted mgmt packets
Fixes kernel warnings and connectivity issues in encrypted mesh networks

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Oever González 69aa1c5ac0 mac80211: ath: add extra 'regulatory domains'
This patch adds several country codes to the regd.h and regd_common.h
files in order to support devices whose country codes are not present in
the original list.

Without this patch, all devices whose manufacturer programmed any of these
code in their EEPROM will run without wireless interfaces.

Signed-off-by: Oever González <notengobattery@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [matched signed-off]
5 years ago
Christian Lamparter 13251aa92b mac80211: ath10k: remove "ath10k: fix otp failure result" patch
Initially this patch was introduced as a quick fix following
the removal of 936-ath10k_skip_otp_check.patch which caused
multiple ath10k pcie devices in various ipq806x and ar71xx/ath79
targets to malfunction.

Thankfully, the affected devices have been updated to utilize
the pre-caldata method. And finally with the switch to ath10k-ct,
which never had the patch or any reports of similar issues, I
think it's time to remove this patch since it is no longer needed.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Felix Fietkau c8280e6e14 mac80211: add support for indicating missing tx A-MPDU length
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Rafał Miłecki adc8b374e3 mac80211: brcmfmac: backport fixes from the 5.0-rc1
This fixes:
1) Getting STA info with newer firmwares
2) Getting DMI / UEFI / OF data
3) Possible memory corruption in firmware loading code

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki df57d71a1a mac80211: brcmfmac: trivial patches rename to use v5.0
This matches Linus releasing 5.0-rc1 in place of 4.21-rc1.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 529c95cc15 mac80211: brcmfmac: fix use-after-free & possible NULL pointer dereference
1) Using fwctx variable after brcmf_fw_request_done() was executed meant
   accessing freed memory.
2) Using fwctx->completion for the wait_for_completion_timeout() call
   could reuslt in NULL pointer dereference on fw loading error or if
   brcmf_fw_request_done() was executed quickly enough.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Felix Fietkau 488af51f81 mac80211: add ABI_VERSION to fix rebuild of dependent packages after upgrades
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Daniel F. Dickinson 8d2a9e8027 ath9k: Avoid OF no-eeprom quirks when no qca,no-eeprom
Based on the process of discovery in
https://github.com/openwrt/openwrt/pull/1613, it has become clear
that (at least) the PowerCloud System CR5000 was unable to get
working 5GHz wireless (PCIe) because AH_USE_EEPROM was unconditionally
masked out, not only when qca,noeeprom was in the DTS.

This patch moves mask AH_USE_EEPROM into the if ... qca,noeeprom
OF test.

Thanks to Christian Lampartar (@chunkeey) for the heavy lifting and help.

Patch has been prepared for upstream and will be submitted after review
by @chunkeey and @xdarklight.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
6 years ago
Koen Vandeputte 4b60ea236e mac80211: backport upstream fixes
d350a0f43118 nl80211: fix memory leak if validate_pae_over_nl80211() fails
a50e5fb8db83 mac80211: fix a kernel panic when TXing after TXQ teardown

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Hauke Mehrtens ac5a6acbb1 mac80211: Update to version 4.19.7-1
This updates the backports package used in mac80211 to version 4.19.7-1
which is based on kernel 4.19.7. This integrates all the stable fixes
introduces in this kernel version.

The deleted patches are not needed any more because they are either
included in the upstream Linux kernel 4.19.7 or in backports 4.19.7-1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Mathias Kresin d35f2a5565 ath9k: register GPIO chip for OF targets
This partitialy reverts commit ccab68f2d3.

Registering the GPIO chip without a parent device completely breaks the
ath9k GPIOs for device tree targets.

As long as boards using the devicetree don't have the gpio-controller
property set for the ath9k node, the unloading of the driver works as
expected.

Register the GPIO chip with the ath9k device as parent only for OF
targets to find a trade-off between the needs of driver developers and
the broken LEDs and buttons seen by users.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Stijn Tintel f208f77811 mac80211: fix brcmfmac on brcm2708
An upstream change broke brcmfmac when loaded with modparam roamoff=1.
As we are carrying a patch that enables roamoff by default on the
brcm2708 target to improve stability, wireless is currently broken
there. Add a patch to fix brcmfmac with roamoff=1.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
6 years ago
Felix Fietkau 5ffacceb7b mac80211: fix reordering of buffered broadcast packets
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 3879fc2b1a mac80211: fix spurious disconnections with powersave clients
Affects all drivers using ieee80211_tx_status_noskb, e.g. ath9k and mt76

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Rafał Miłecki 4d5b0efc09 mac80211: brcmfmac: backport the last accepted 4.21 changes
It's a typo fix & patch that helps debugging possible WARN-ings.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 3eab6b8275 mac80211: brcmfmac: backport NVRAM loading improvements
This adds support for storing board specific NVRAM files as firmware.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 5932eb690f mac80211: brcmfmac: backport firmware loading cleanup
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki b50f162b3c mac80211: brcmfmac: backport the latest 4.20 changes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki f7a3459ab9 mac80211: brcmfmac: rename 4.20 backport patches
Include kernel version to help tracking changes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Koen Vandeputte 5ac34818f9 ath9k: fix dynack in IBSS mode
Currently, dynack was only tested upstream using AP/STA mode.
Testing it on IBSS, showed that late-ack detection was broken.

This is caused due to dynack using Association Request/Response
frames for late-ack detection, which IBSS does not use.
Also allowing Authentication frames here solves this.

A second issue also got fixed, which was also seen AP/STA mode:

When a station was added, the estimated value would be exponentially averaged
using 0 as a starting point.

This means that on larger distances, the ack timeout was still not high
enough before synchronizing would run out of late-ack's for estimation.

Fix this by using the initial estimated value as a baseline
and only start averaging in the following estimation rounds.

Test setup:
- 2x identical devices:  RB912UAG-5HPnD + 19dB sector
- IBSS
- 2x2 802.11an (ar9340), HT20, long GI
- RSSI's  -70 / -71
- Real distance: 23910 meter

Results (60s iperf runs):

Fixed coverage class 54 (up to 24300m):
* 21.5 Mbits/sec

Dynack:
* 28.9 Mbits/sec

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Hauke Mehrtens 9fcfcd49f8 mac80211: hermes-pcmcia: add missing dependency to kmod-pcmcia-core
This fixes a build problem on x86.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Felix Fietkau e220ffb533 mac80211: fix A-MSDU packet handling with TCP retransmission
Improves local TCP throughput and fixes use-after-free bugs that could lead
to crashes.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Daniel Engberg 6e6e7adc8c mac80211: Use @KERNEL alias instead of hardlink
Use @KERNEL alias provided by toolchain instead of relying on a specific site.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years ago
Felix Fietkau 502bcd93fe mac80211: move marvell packaging code to marvell.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 2804a7f13e mac80211: move intel packaging code to intel.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 1f14ac9a0c mac80211: move realtek packaging code to realtek.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 7f984dab1c mac80211: move broadcom packaging code to broadcom.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau bde8ddf1ad mac80211: move atheros/qca packaging code to ath.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau ece90fc9df mac80211: move rt2x00 packaging code to ralink.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau fe6606c7ba mac80211: remove duplicated lines for building packages, use PKG_DRIVERS instead
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 93db9a65da mac80211: fix management frame protection issue with mt76 (and possibly other drivers)
Software crypto wasn't working for management frames because the flag
indicating management frame crypto was missing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Hauke Mehrtens 92a96dd662 mac80211: fix ipw200 build with kernel < 4.10
The __change_mtu() function is only compiled when
CPTCFG_IPW2200_PROMISCUOUS is set, more it to the general area.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens 2a64c7ea74 mac80211: Use backports-4.19-rc5-1.tar.xz
This is an official release with some minor changes compared to the
unofficial 4.19-rc4-1 we used before.
* added bcma and ssb again, which is removed in OpenWrt
* fix to build with kernel 4.19
* other minor fixes not relevant for Openwrt.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens 4fcbad1aa0 mac80211: fix compile warning in 986-rt2x00-add-TX-LOFT-calibration.patch
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens ec684ce193 mac80211: Add patches which were added later
These patches were added after the new matches structure for the
mac80211 package was created. All the deleted patches are already
integrated in kernel 4.19-rc4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens db90c243a0 mac80211: update to version based on 4.19-rc4
This updates mac80211 to backports based on kernel 4.19-rc4.

I plan to integrate all the patches which are in this tar into upstream
backports soon.

I used the backports generated from this code:
https://github.com/hauke/backports/commits/wip2

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Daniel Golle de1c58a64b mac80211: rt2x00: add experimental patches from Stanislaw Gruszka
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle c837c41a76 mac80211: rt2x00: remove obsolete patch
According to Stanislaw Gruszka the patch
    600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch
should be dropped.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Tomislav Požega d449233fd2 mac80211: rt2x00: add TX LOFT calibration
Add TX LOFT calibration from mtk driver.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
6 years ago
Tomislav Požega 5d1620f29c mac80211: rt2x00: add RXIQ calibration
Add RXIQ calibration found in mtk driver. With old openwrt builds this gets us ~8Mbps more of RX bandwidth (test with iPA/eLNA layout).
Please try if this makes any difference among various board/RF layouts.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
6 years ago
Tomislav Požega e125b6abb2 mac80211: rt2x00: add RXDCOC calibration
Add RXDCOC calibration code from mtk driver. Please try if this makes any difference among various board/RF layouts.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
6 years ago
Tomislav Požega 061541f207 mac80211: rt2x00: add r calibration
Add r calibration code as found in mtk driver.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
6 years ago
Tomislav Požega 66929e3414 mac80211: rt2x00: add RF self TXDC calibration
Add TX self calibration based on mtk driver.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
6 years ago
Tomislav Požega 6044682b83 mac80211: rt2x00: write registers required for reducing power consumption
Write registers required for reducing power consumption like the vendor
driver does when ADJUST_POWER_CONSUMPTION_SUPPORT is set.
This helps devices to sync at better TX/RX rates and improves overall
performance.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: edited commit message]
6 years ago
John Crispin d9eefa7a70 mac80211: rebase ontop of v4.18.5
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Felix Fietkau a32a70f4f2 ath9k: add back support for using tx99 with active monitor interfaces
Fixes controlling bitrate

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 7decdf923a mac80211: fix tx queue allocation for active monitor interfaces
Fixes a crash with drivers like ath9k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau ccab68f2d3 ath9k: fix unloading the module
Registering a GPIO chip with the ath9k device as parent prevents unload,
because the gpiochip core increases the module use count.
Unfortunately, the only way to avoid this at the moment seems to be to
register the GPIO chip without a parent device

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Rafał Miłecki b3d441c5f7 mac80211: brcmfmac: backport CYW89342 support & fixes from 4.20
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki ffa80bf5a7 mac80211: add iw command wrapper with error logging
Currently it's close to impossible to tell what part of mac80211 setup
went wrong. Errors logged into system log look like this:
radio0 (6155): command failed: No error information (-524)
radio0 (6155): command failed: Not supported (-95)
radio0 (6155): command failed: I/O error (-5)
radio0 (6155): command failed: Too many open files in system (-23)

With this commit change it's getting clear:
command failed: No error information (-524)
Failed command: iw dev wlan0 del
command failed: Not supported (-95)
Failed command: iw phy phy0 set antenna_gain 0
command failed: I/O error (-5)
Failed command: iw phy phy0 set distance 0
command failed: Too many open files in system (-23)
Failed command: iw phy phy0 interface add wlan0 type __ap

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Koen Vandeputte 77024a9d95 mac80211: backport upstream fixes
Backport most significant upstream fixes (excl. hwsim fixes)
Refreshed all patches.

Contains important fixes for CSA (Channel Switch Announcement)
and A-MSDU frames.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Felix Fietkau d9792152fd ath9k: fix setting up tx99 with a monitor mode interface
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Antonio Silverio 672c430d6e mac80211: mwl8k: Expand non-DFS 5G channels
Add non-DFS 5G upper channels (149-165) besides existed 4 lower channels
(36, 40, 44, 48).

Signed-off-by: Antonio Silverio <menion@gmail.com>
6 years ago
Rafał Miłecki fecbd91c7c mac80211: brcmfmac: backport patch for per-firmware features
This allows driver to support features that can't be dynamically
discovered.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Sven Eckelmann ef39d0079b mac80211: ath10k: Limit available channels via DT ieee80211-freq-limit
Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in
the RX and TX path. These filtered channel can in theory still be used by
the hardware but the signal strength is reduced so much that it makes no
sense.

There is already a DT property to limit the available channels but ath10k
has to manually call this functionality to limit the currrently set wiphy
channels further.

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
6 years ago
Rafał Miłecki c0608c6a27 mac80211: brcmfmac: backport 4.19 patches preparing monitor mode support
Monitor mode isn't supported yet with brcmfmac, it's just an early work.
This also prepares brcmfmac to work stable with new firmwares which use
updated struct for passing STA info.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki b26214adb5 mac80211: backport brcmfmac fixes & debugging helpers from 4.18
The most important is probably regression fix in handling platform
NVRAM. That bug stopped hardware from being properly calibrated breaking
e.g. 5 GHz for Netgear R8000.

Other than that it triggers memory dumps when experiencing firmware
problems which is important for debugging purposes.

Fixes: 7e8eb7f309 ("mac80211: backport brcmfmac firmware & clm_blob loading rework")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Ansuel Smith 2dcd955aea mac80211: backport and update patches for ath10k
This commit refreshes and updates the VHT160 ath10k support fix patches
and adds a number of backports from ath-next:

 * 8ed05ed06fca ath10k: handle tdls peer events
 * 229329ff345f ath10k: wmi: modify svc bitmap parsing for wcn3990
 * 14d65775687c ath10k: advertise TDLS wider bandwidth support for 5GHz
 * bc64d05220f3 ath10k: debugfs support to get final TPC stats for 10.4 variants
 * 8b2d93dd2261 ath10k: Fix kernel panic while using worker (ath10k_sta_rc_update_wk)
 * 4b190675ad06 ath10k: fix kernel panic while reading tpc_stats
 * be8cce96f14d ath10k: add support to configure channel dwell time
 * f40105e67478 ath: add support to get the detected radar specifications
 * 6f6eb1bcbeff ath10k: DFS Host Confirmation
 * 260e629bbf44 ath10k: fix memory leak of tpc_stats
 * 38441fb6fcbb ath10k: support use of channel 173
 * 2e9bcd0d7324 ath10k: fix spectral scan for QCA9984 and QCA9888 chipsets

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[move backported patches in the 3xx number space, bring in upstream order,
 replace incomplete patch files with git format-patch ones, rewrite commit
 message, fix subject]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Koen Vandeputte 8b42a260ed mac80211: Expose support for ath9k Dynack
Enables support for Dynack feature.

When a remote station is far away, we need to compensate for the distance
by allowing more time for an ACK to arrive back before issueing a retransmission.
Currently, it needs to be set fixed to indicate the maximum distance the remote
station will ever be.

While this mostly works for static antennae, it introduces 2 issues:
- If the actual distance is less, speed is reduced due to a lot of wates wait-time
- If the distance becomes greater, retries start to occur and comms can get lost.

Allowing to set it dynamically using dynack ensures the best possible tradeoff
between speed vs distance.

This feature is currently only supported in ath9k.
it is also disabled by default.

Enabling it can be done in 2 ways:
- issue cmd:  iw phy0 set distance auto
- sending the NL80211_ATTR_WIPHY_DYN_ACK flag to mac80211 driver using netlink

Disabling it can be done by providing a valid fixed value.

To give an idea of a practical example:

In my usecase, we have mesh wifi device installed on ships/platforms.
Currently, the coverage class is set at 12000m fixed.

When a vessel moved closer (ex. 1500m), the measured link capacity was a lot
lower compared to setting the coverage class fixed to 1500m

Dynack completely solved this, nearly providing double the bandwidth at closer range
compared to the fixed setting of 12000m being used.

Also when a vessel sailed to a distance greater than the fixed setting,
communication was lost as the ACK's never arrived within the max allowed timeframe.

Actual distance: 6010m
iperf 60s run avg

Fixed 12150m:  31 Mbit/s
Dynack:        58 Mbit/s

Fixed 6300m:   51 Mbit/s
Dynack:        59 Mbit/s

Fixed 3000m:   13 Mbit/s  (lots of retries)
Dynack:        58 Mbit/s

Actual distance: 1504m
iperf 60s run avg

Fixed 12150m:  31 Mbit/s
Dynack:        86 Mbit/s

Fixed 6300m:   55 Mbit/s
Dynack:        87 Mbit/s

Fixed 3000m:   67 Mbit/s
Dynack:        87 Mbit/s

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Sven Eckelmann 87493dac11 mac80211: initialize sinfo in cfg80211_get_station
Most of the implementations behind cfg80211_get_station will not initialize
sinfo to zero before manipulating it. For example, the member "filled",
which indicates the filled in parts of this struct, is often only modified
by enabling certain bits in the bitfield while keeping the remaining bits
in their original state. A caller without a preinitialized sinfo.filled can
then no longer decide which parts of sinfo were filled in by
cfg80211_get_station (or actually the underlying implementations).

cfg80211_get_station must therefore take care that sinfo is initialized to
zero. Otherwise, the caller may tries to read information which was not
filled in and which must therefore also be considered uninitialized. In
batadv_v_elp_get_throughput's case, an invalid "random" expected throughput
may be stored for this neighbor and thus the B.A.T.M.A.N V algorithm may
switch to non-optimal neighbors for certain destinations.

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
6 years ago
John Crispin d8981133b2 mac80211: make rtl8xxxu buils again
we only wanted to drop rtl8xxxue support

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
John Crispin 66c5696cdf mac80211: rtl8xxxu: drop support patches
After a very enlightening but unfortunately far too short exchange with Jes
we mutually agreed to drop the patches. They are unfortunately not ready
yet.

Acked-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Stijn Tintel 34e22653ac mac80211: enable ath10k LED support by default
Commit 61d57a2f88 adds ath10k LED
support, but doesn't add an option to actually enable it.

After enabling this option, a LED named ath10k-phy0 appears in sysfs,
and a trigger can be assigned to it. Since 60deb3cdef the default set
trigger is the tpt one.

Enable it by default, as most devices using ath10k chips shouldn't be
severely space-constrained. There are likely many devices that can
benefit from having it enabled, like my testing device.

Before:
   text    data     bss     dec     hex filename
 245311    8899      16  254226   3e112 ath10k_core.ko

After:
   text    data     bss     dec     hex filename
 245979    8899      16  254894   3e3ae ath10k_core.ko

Tested on a D-Link DAP-2695-A1 (ar71xx).

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
6 years ago
Mathias Kresin 60deb3cdef mac80211: ath10k: use tpt LED trigger by default
Use the tpt LED trigger for each created phy led. Ths way LEDs attached
to the ath10k GPIO pins are indicating the phy status and blink on
traffic.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
John Crispin cac1a4be66 mac80211: drop 355-ath9k-limit-retries-for-powersave-response-frames.patch
several people reported this bug to be causing drop out issues

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Ansuel Smith 134e832814 mac80211: ath10k fix vht160 firmware crash
When the 160mhz width is selected the ath10k firmware crash. This fix this problem.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
6 years ago
Ansuel Smith 61d57a2f88 mac80211: ath10k add leds support
This adds support for leds handled by the wireless chipset.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
6 years ago
Rafał Miłecki c446e38c86 mac80211: backport brcmfmac changes from kernel 4.18
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 7e8eb7f309 mac80211: backport brcmfmac firmware & clm_blob loading rework
It backports remaining brcmfmac changes from 4.17.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 3c8bb92655 mac80211: backport brcmfmac data structure rework
It backports brcmfmac commits from kernel 4.17.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 0da9303e5b mac80211: backport "brcmfmac: cleanup and some rework" from 4.17
It was described by Arend as:

> This series is intended for 4.17 and includes following:
>
>  * rework bus layer attach code.
>  * remove duplicate variable declaration.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Sven Eckelmann 4270847a2c mac80211: ath10k: Allow to enable the thermal code of ath10k
Some ath10k firmware versions allow to access the chip internal a
temperature sensor and allow to reduce the amount of the time when the card
is allowed to send. The latter is required on devices which tend to
overheat.

An userspace service has to read
/sys/class/ieee80211/phy*/device/hwmon/hwmon*/temp1_input regularly and
then decide how much the device has to be throttled. This can be done by
writing to /sys/class/ieee80211/phy*/device/cooling_device/cur_state. By
default it is not throttled (0) but it can be throttled up to 100(%).

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
6 years ago
Daniel Golle f4a639a3d7 mac80211: rt2x00: no longer use TXOP_BACKOFF for probe frames
Import a revert-commit from Stanislaw Gruszka which significantly
improves WiFi performance on rt2x00 based hardware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
John Crispin 83fb9ec5e0 ath79: make ahb wifi work
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Daniel Golle 96f4792fdb mac80211: refactor non-{sae,dfs} mesh initialization
Refactor mesh initialization into a separate function, do some cleaning
on the way to make the code more readable.
Changes:
 * Move iw mesh setup to new mac80211_setup_mesh()
 * fallback on 'ssid' parameter in case 'mesh_id' isn't set
 * move setting of freq variable to shared code as it is needed for
   both, the wpa_supplicant and the iw based setup.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Sven Eckelmann 547042398a mac80211: Re-enable encrypted 11s meshpoint
The commit 574e4377fa ("mac80211: properly setup mesh interface") uses
the variable $wpa to decide whether encrypted meshpoint is requested by the
user or not. But the variable $wpa will only be set correctly after the
function wireless_vif_parse_encryption is called.

Fixes: 574e4377fa ("mac80211: properly setup mesh interface")
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
6 years ago
Daniel Golle 574e4377fa mac80211: properly setup mesh interface
Setup wpa_supplicant for encrypted mesh or when using DFS channels and
adjust interface setup to pass fixed frequency for mesh mode.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Sandeep Sheriker Mallikarjun 441c26da6a kernel: fix build error for external kernel.
fixed build error when external kernel is selected from menuconfig.
The patches present in target/linux/generic does not gets applied
to external kernel and build fails while compiling mac82011 &
regmap-core kernel modules. as a fix added check in Makefile for
CONFIG_EXTERNAL_KERNEL_TREE present or not.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
6 years ago
Thomas Hebb 751746c736 mac80211: update patch to read ath10k variant from DT
This patch was revised upstream before being merged, and OpenWrt's copy
was never updated to reflect the revision.

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
[refreshed patches]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Daniel Golle 465d4bc538 mac80211: pass down noscan to wpa_supplicant
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Leon M. George 3a6c3c9c1c mac80211: join 5GHz checks
Before this commit, devices supporting both 2.4GHz and 5GHz would be
configured for 2.4GHz by default - unless they have VHT capabilities.

With this commit, channel 36 is only set when the frequency is supported.
VHT isn't checked unless that is the case.

Signed-off-by: Leon M. George <leon@georgemail.eu>
6 years ago
Stefan Lippers-Hollmann 8267a0b234 mac80211: ipw2200-fw: fix download mirror(s)
bughost.org hasn't existed for 6-8 years, add a couple of current
mirrors to avoid the fallback to http://mirror2.openwrt.org/sources/.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
6 years ago
Stefan Lippers-Hollmann 18fe577530 mac80211: ipw2100-fw: fix download mirror(s)
bughost.org hasn't existed for 6-8 years, add a couple of current
mirrors to avoid the fallback to http://mirror2.openwrt.org/sources/.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
6 years ago
Stefan Lippers-Hollmann a330ecebf5 mac80211: ath10k: Suppress "Unknown eventid: 36925" warnings
Merge upstream patch from Sathishkumar Muruganandam
<murugana@codeaurora.org> for OpenWrt's backports package:
https://lkml.kernel.org/r/<1522049641-19521-1-git-send-email-murugana@codeaurora.org>
Commit-ID: 606204bb863fa3b0bb54929d79b4dc46338f9180

* FW has Smart Logging feature enabled by default for detecting failures
* and processing FATAL_CONDITION_EVENTID (36925 - 0x903D) back to host.
*
* Since ath10k doesn't implement the Smart Logging and FATAL CONDITION
* EVENT processing yet, suppressing the unknown event ID warning by moving
* this under ATH10K_DBG_WMI.
*
* Simulated the same issue by having associated STA powered off when
* ping flood was running from AP backbone. This triggerd STA KICKOUT
* in AP followed by FATAL CONDITION event 36925.
*
* Issue was reproduced and verified in below DUT
* ------------------------------------------------
* AP mode of OpenWRT QCA9984 running 6.0.8 with FW ver 10.4-3.5.3-00053
*
* Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
6 years ago
Hauke Mehrtens 51e4868fc9 mac80211: Fix loading of rsi_sdio module
When CONFIG_PM was not set rsi_sdio_reinit_device() was not compiled
into the driver but referenced.
This is a backport form the mainline Linux kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Evgeniy Didin 36314c12c0 mac80211: add RedPine RS9113 module support
RedPine RS9113 wireless module requires rsi91x driver to be built
and linux-firmware/rsi/rs9113_wlan_qspi.rps to be installed.
Also we add patch for successful compilation of rsi91x driver.

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: John Crispin <john@phrozen.org>
6 years ago
Daniel Golle e633b21c14 Revert "mac80211: pass hostapd control socket to mesh-mode supplicant"
This reverts commit 1356a66f94.
The change breaks wpa_supplicant.conf generation, more work is needed
to fix mesh+AP.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle 1356a66f94 mac80211: pass hostapd control socket to mesh-mode supplicant
Unlike when operating in Ad-Hoc mode, we apparently need to pass the
hostapd control socket interface to wpa_supplicant when using 802.11s
mesh mode.

There also seems to still be something wrong with the logic setting
channel and (v)htmode parameters...

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Rafał Miłecki 0f1a1489a6 mac80211: backport brcmfmac fixes from 4.16
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Felix Fietkau e062bd8563 mac80211: avoid changing skb truesize in A-MSDU aggregation
Should fix recently reported data corruption issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Christian Lamparter e713b5ba6f mac80211: ath10k: search all IEs for variant before falling back
This patch adds the patch that was posted to ath10k-devel ML:
<https://patchwork.kernel.org/patch/10233491/>
|From: Thomas Hebb <tommyhebb@gmail.com>
|Subject: [PATCH] ath10k: search all IEs for variant before falling back
|Date: Wed, 21 Feb 2018 11:43:39 -0500
|[...]
|This patch fixes the issue by first searching the entire file for the ID
|with variant, and searching for the fallback ID only if that search
|fails. It also includes some code cleanup in the area, as
|ath10k_core_fetch_board_data_api_n() no longer does its own string
|mangling to remove the variant from an ID, instead leaving that job to a
|new flag passed to ath10k_core_create_board_name().
|
|I've tested this patch on a QCA4019 and verified that the driver behaves
|correctly for 1) both fallback and variant BDFs present, 2) only fallback
|BDF present, and 3) no matching BDFs present.
|
|Fixes: 1657b8f84ed9 ("ath10k: search SMBIOS for OEM board file extension")
|Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>

Note: 937-ath10k-calibration-variant.patch has been reassigned a new 081
number, as it now ships with upstream.... But also because this patch
requires the change in ath10k_core_create_board_name().

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
John Crispin 54b275c8ed ipq40xx: add target
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Felix Fietkau 916277a033 mac80211: minstrel: make short preamble CCK available when not used at connect time
The BSS short preamble state can change without rate control
update notification.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 6011f7bcf0 mac80211: fix a tx queue memory accounting error
Fixes rare hard to trigger tx hangs after some time

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 11d70f0600 mac80211: avoid sampling rates that are too slow, improves throughput
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Rafał Miłecki 9046e921af mac80211: brcmfmac: better logging of firmware api errors
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 9543fb1ecd mac80211: brcmfmac: backport remaining changes from 4.16
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 8d78cccc6e mac80211: brcmfmac: enlarge caps buffer & final sdio restructuring
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 66bdf62a2a mac80211: brcmfmac: restructuring sdio access functions - take 2
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki bb04b7ced7 mac80211: brcmfmac: restructuring sdio access functions
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki e52e8480ad mac80211: brcmfmac: backport remaining changes from 4.15
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki c29a2a4283 mac80211: brcmfmac: firmware halt and scan cleanup
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 81542331cb mac80211: reorder patches putting backports first
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Felix Fietkau 1f427bd616 mac80211: add a missing check to the last minstrel fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Rafał Miłecki a186c2ab70 mac80211: rename patches accepted upstream
This is to simplify maintenance. It's easy to say now which patches need
some extra work and/or sending upstream. Updating to newer backports
should be also simpler with this.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Felix Fietkau 2389ebbd48 Revert "ath: do not apply broken power limits with ATH_USER_REGD"
This reverts commit 79a768a90f.
Some devices can go over their power limits with this commit, so this
needs to be handled on a case by case basis instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau cc19aa3e71 mac80211: update the A-MSDU fast-rx patch to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau d59c6b53f4 mac80211: add more minstrel fixes
Improves 2.4 GHz throughput

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 55bd80f6d8 mac80211: fix regression introduced by the recent minstrel changes
The cck rates array needs to be initialized for both the minstrel and
the minstrel_ht variant

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau c4c64f5305 mac80211: add an optimization for fast-rx support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau fb1be20d63 mac80211: sync fast-rx patch with updated version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 393661640b mac80211: fix various issues with fast-rx mode
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 848a4abf27 ath9k: merge a RCU fix for station tx cleanup
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau c8d07575e5 mac80211: add minstrel improvements/fixes
- Simplify debugfs code
- Reduce size
- Fix handling of CCK rates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 526921f20e mac80211: round up tx status headroom
Fixes unaligned access exceptions in mt76 when transmitting beacons

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Hauke Mehrtens 80771af83d mac80211: move wifi detect hotplug script to later
Make it easily possible to add a custom script in front of this hotplug
script which adds new devices. This is needed for the mvebu target in
which we want to migrate the old configuration before new devices are
getting detected.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Matthias Schiffer bf1032d71f
mac80211: replace revert for 11s compatiblity with upstream fix
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
Matthias Schiffer d58c8f4029
mac80211: revert "wireless: set correct mandatory rate flags"
Revert upstream commit 1bd773c077de "wireless: set correct mandatory rate
flags", as it breaks 11s interoperability: nodes can only associate when
neither or both have this patch. As this is a regression from released
versions, revert to the old code for now.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
Felix Fietkau 166741240a mac80211: mesh: drop frames appearing to be from us
Upstream backport to fix issues arising from devices with duplicate MAC
addresses

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau e2c0e904c0 ath9k: discard undersized packets
Sometimes the hardware will push small packets that trigger a WARN_ON
in mac80211. Discard them early to avoid this issue.

Reported-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 765599cb0e mac80211: remove support code for authsae
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Matthias Schiffer e9fa0b9f3a
ath9k, ath10k(-ct): move spectral scan support under a separate config symbol
Backport patches that separate spectral scan support from general debugfs
support of ath9k/ath10k; this allows to remove the dependency on
KERNEL_RELAY from these driver packages even with debugfs enabled and
avoids the memory footprint of the relay buffers allocated by ath9k/ath10k
even when they aren't used at all.

The KERNEL_RELAY dependency is moved to a new config symbol that enables
spectral scan support in these drivers.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Sven Eckelmann f39fc67c8e mac80211: ath10k: search DT for BDF variant info
Board Data File (BDF) is loaded upon driver boot-up procedure. The right
board data file is identified on QCA4019 using bus, bmi-chip-id and
bmi-board-id.

The problem, however, can occur when the (default) board data file cannot
fulfill the vendor requirements and it is necessary to use a different
board data file.

This problem was solved for SMBIOS by adding a special SMBIOS type 0xF8.
Something similar has to be provided for systems without SMBIOS but with
device trees. No solution was specified by QCA and therefore a new one has
to be found for ath10k.

The device tree requires addition strings to define the variant name

    wifi@a000000 {
    	status = "okay";
    	qcom,ath10k-calibration-variant = "RT-AC58U";
    };

    wifi@a800000 {
    	status = "okay";
    	qcom,ath10k-calibration-variant = "RT-AC58U";
    };

This would create the boarddata identifiers for the board-2.bin search

 *  bus=ahb,bmi-chip-id=0,bmi-board-id=16,variant=RT-AC58U
 *  bus=ahb,bmi-chip-id=0,bmi-board-id=17,variant=RT-AC58U

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Zoltan HERPAI 1f8585cf99 merge: ssid: update default ssid
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
7 years ago
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
Daniel Golle 399d5cf532 mac80211: rt2x00: import upstream changes and rebase our patches
Some of our local patches have been accepted upstream. And there are
some more relevant changes (mostly for rt2800usb). Import them and
rebase our remaining local patches on top.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Hannu Nyman c69a89fe23 mac80211: ath10k: allow failure getting board id via otp
ath10k tries to fetch board id via otp, but that fails for many chips
like QCA988x, QCA9984 etc. Recent commit cc189c0b7f removed the earlier
hack that had allowed QCA radios to work, as that hack was incompatible
with the new wifi chips being introduced to the source tree.

Restore functionality for the existing wifi chips by modifying the
return value of the 'board id via otp' function to a value that is recognised
as a harmless error, so that name evaluation continues by using the board file.

Patch originally suggested by Christian Lamparter in forum discussion.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
7 years ago
Felix Fietkau 09ae540cd4 ath9k: fix power limits on init
The tx power applied by set_txpower is limited by the CTL (conformance
test limit) entries in the EEPROM. These can change based on the user
configured regulatory domain.
Depending on the EEPROM data this can cause the tx power to become too
limited, if the original regdomain CTLs impose lowr limits than the CTLs
of the user configured regdomain.

To fix this issue, set the initial channel limits without any CTL
restrictions and only apply the CTL at run time when setting the channel
and the real tx power.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 79a768a90f ath: do not apply broken power limits with ATH_USER_REGD
If a device uses the default EEPROM code, typically only the main CTLs
are valid, and they do not apply properly when switching to a different
regulatory domain. If the regdomain deviates from the EEPROM one, force
the world roaming regdomain to ensure that power limits are sane

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