aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
Commit message (Collapse)AuthorAgeFilesLines
* mac80211: brcmfmac: fix PCIe reset crash and WARNINGlede-17.01Rafał Miłecki2019-11-194-1/+85
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit cde8c2f2fba019c4cd3b9f6ad463ff86cc783061)
* mac80211: brcmfmac: backport more kernel 5.4 changesRafał Miłecki2019-09-098-10/+284
| | | | | | | | Patch getting RAM info got upstreamed. A debugging fs entry for testing reset feature was added. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 681acdcc54d2e59135bb706c38bed942f74ccf74)
* mac80211: brcm: improve brcmfmac debugging of firmware crashesRafał Miłecki2019-07-282-1/+39
| | | | | | | This provides a complete console messages dump. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit f51e2d031e8125632487d2a0f56b9fa31b71e54f)
* mac80211: brcm: update brcmfmac 5.4 patchesRafał Miłecki2019-07-2811-25/+33
| | | | | | | Use commits from wireless-drivers-next.git. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 95745e26b319c630a49d2b8284f8afeaa30506da)
* mac80211: brcmfmac: backport fixes from kernel 5.4Rafał Miłecki2019-07-2211-2/+511
| | | | | | | | | | This fixes: 1) Crash during USB disconnect 2) Crash in brcmf_txfinalize() on rmmod with packets queued 3) Some errors in exit path Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 8231f67218e584be61d32b24bd17cc55e500638c)
* mac80211: brcmfmac: backport previously skipped USB fixesRafał Miłecki2019-07-223-1/+342
| | | | | | They were skipped due to missing BCDC patches that are backported now. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport BCDC layer changes from kernel 4.12Rafał Miłecki2019-07-2243-147/+1390
| | | | | | | | Those changes are needed for backporting more recent crash fixes. There are quite many BCDC patches but it's hopefully a very well tested code by now. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: rename v4.12 patches to allow more backportsRafał Miłecki2019-07-228-0/+0
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: Update to version 4.4.182Hauke Mehrtens2019-06-181-0/+65
| | | | | | | | | | | | | | | | | | | | | | | Fixes: - CVE-2019-11479 - CVE-2019-11478 - CVE-2019-11477 - CVE-2019-11833 - CVE-2019-11091 - CVE-2018-12126 - CVE-2018-12130 - CVE-2018-12127 - CVE-2019-3882 - CVE-2019-6974 - CVE-2019-3819 - CVE-2019-7221 - CVE-2019-7222 - CVE-2019-3701 - CVE-2018-19985 - CVE-2018-1120 And probably more Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mac80211: brcmfmac: backport important fixes from kernel 5.2Rafał Miłecki2019-06-169-2/+423
| | | | | | | | | | | 1) Crash/Oops fixes 2) One-line patch for BCM43456 support 3) Fix communication with some specific FullMAC firmwares 4) Potential fix for "Invalid packet id" errors 5) Important helper for reporting FullMAC firmware crashes Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 2cd234d96bd772119363a77a35bffa6a4931613e)
* mac80211: brcmfmac: really add early fw crash recoveryRafał Miłecki2019-04-186-0/+271
| | | | | | | | | Previous commit backported USB fixes instead of firmware crash recovery patches. Fixes: eaef74279c8f ("mac80211: brcmfmac: early work on FullMAC firmware crash recovery") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 2d2e615dee0421e126af9d4ebd49a720e341e3af)
* mac80211: brcmfmac: early work on FullMAC firmware crash recoveryRafał Miłecki2019-04-186-0/+335
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 02aed76968d60d254ab9d0d8768f0c54dbfc6d9d)
* mac80211: brcmfmac: backport 5.0 & 5.1 important changes/fixesRafał Miłecki2019-02-2619-8/+6625
| | | | | | | | | This backports the most important brcmfmac commits that: 1) Fix some bugs 2) Help debugging bugs Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit d32bbd747733de5daeb63a8f2c1307f612422f87)
* mac80211: brcmfmac: pick few 4.17 cleanups required for further fixesRafał Miłecki2019-02-259-7/+633
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: fix a possible NULL pointer dereferenceRafał Miłecki2019-02-111-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit 83bcacb5215c21e1894fbe3d651d83948479ce91)
* mac80211: brcmfmac: fix use-after-free & possible NULL pointer dereferenceRafał Miłecki2019-01-081-2/+2
| | | | | | | | | | | 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> (cherry picked from commit 529c95cc15dc9fcc7709400cc921f2a3c03cd263)
* mac80211: brcmfmac: add 2 more recent changesRafał Miłecki2018-11-093-0/+112
| | | | | | | | | | First one is a fix for reporting channels to the user space. Important for users as they could try setting invalid channel and fail to start an interface. Later is a support for newer FullMAC chipset firmwares. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmutil: backport chanspec debugging patchRafał Miłecki2018-11-071-0/+83
| | | | | | It helps debugging possible WARN-ings. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport the latest 4.20 changesRafał Miłecki2018-11-073-0/+187
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit b50f162b3cce3d95874e4394f4765413f58765f1)
* mac80211: brcmfmac: rename 4.20 backport patchesRafał Miłecki2018-11-073-0/+0
| | | | | | Include kernel version to help tracking changes. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: add iw command wrapper with error loggingRafał Miłecki2018-11-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit ffa80bf5a784a34b81e32144669f30560780bdb6)
* mac80211: brcmfmac: backport first important changes from the 4.20Rafał Miłecki2018-09-123-0/+170
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: fix compilation with SDIO supportRafał Miłecki2018-08-171-2/+12
| | | | | | | | | This fixes following error when compiling with CONFIG_BRCMFMAC_SDIO=y: drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:1100:23: error: 'sdiod' undeclared (first use in this function) brcmf_dev_coredump(&sdiod->func1->dev); Fixes: 9d8940c5b92f ("mac80211: brcmfmac: backport important changes from the 4.18") Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport patch setting WIPHY_FLAG_HAVE_AP_SMERafał Miłecki2018-08-168-2/+36
| | | | | | | It's an important hint for authenticator (e.g. hostapd) about hardware capabilities. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport important changes from the 4.19Rafał Miłecki2018-08-168-2/+472
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport important changes from the 4.18Rafał Miłecki2018-08-169-2/+393
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport important changes from the 4.16Rafał Miłecki2018-08-163-1/+74
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport important changes from the 4.15Rafał Miłecki2018-08-165-1/+100
| | | | | | | | Two more patches that may be worth backporting in the future: fdd0bd88ceae brcmfmac: add CLM download support cc124d5cc8d8 brcmfmac: fix CLM load error for legacy chips when user helper is enabled Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport important changes from the 4.14Rafał Miłecki2018-08-167-5/+250
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport important changes from the 4.13Rafał Miłecki2018-08-169-4/+259
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport important changes from the 4.12Rafał Miłecki2018-08-1614-5/+613
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport use-after-free fix from 4.11Rafał Miłecki2018-08-162-1/+62
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: group 4.11 backport patchesRafał Miłecki2018-08-166-0/+0
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: rt2x00: no longer use TXOP_BACKOFF for probe framesDaniel Golle2018-06-152-1/+46
| | | | | | | | Import a revert-commit from Stanislaw Gruszka which significantly improves WiFi performance on rt2x00 based hardware. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry-picked from commit f4a639a3d7d40b4f63c431c2d554c479fbcc6b74)
* mac80211: brcmfmac: add support for BCM4366E chipsetRafał Miłecki2018-04-032-1/+47
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: brcmfmac: backport commit dropping IAPP packets by defaultRafał Miłecki2018-03-212-1/+158
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mac80211: don't pass the hostapd ctrl iface in adhocAntonio Quartulli2017-12-131-2/+8
| | | | | | | | 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> (cherry picked from commit 0da54fa6428ea98d31b49f5d9a4a272214f5d188)
* mac80211: gracefully handle preexisting VIFJo-Philipp Wich2017-12-131-0/+6
| | | | | | | | | | | | | | | | | | | | | 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 8301e613655c2d95fa5430a1a57d92d966fdc70b 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> (cherry picked from commit 4a033475453b63d0d5ae41489e7c395882567698)
* mac80211: Fix race condition leading to wifi interfaces not coming up at ↵Vittorio Gambaletta2017-12-131-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | boot sometimes. In the drv_mac80211_setup function, mac80211_interface_cleanup is called to ask the kernel to delete all existing interfaces for the phy that is being configured via netlink. Later in the first function, mac80211_prepare_vif is called to set up the new interfaces as required. But sometimes, when mac80211_prepare_vif (and so the relevant `iw phy x interface add y` command) runs, the kernel might still be cleaning up the old interface with the same ifname. It usually takes very few time to do that; possibly a few milliseconds of sleep in the script after detecting this error condition could be enough, but the busybox sh does not support sub-second sleep intervals. When this happens, iw obviously fails to create the new interface; and the following message is printed in the system log, followed by subsequent failure messages from hostapd in case this would have been an AP interface. Tue Mar 14 04:21:57 2017 daemon.notice netifd: radio1 (2767): command failed: Too many open files in system (-23) This was a long-standing issue existing since at least OpenWrt Backfire, and today I finally managed to debug and (hopefully) solve it. It was happening very few times on most devices; but it was happening a lot more frequently on fast platforms with multiple radios, such as the powerpc-based dual-ath9k-radio tl-wdr4900-v1. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net> (cherry picked from commit 8301e613655c2d95fa5430a1a57d92d966fdc70b)
* mac80211: backport kernel fix for CVE-2017-13080Stijn Tintel2017-10-171-0/+81
| | | | | Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 2f701194c29da50bfda968a83c6609843f74a7f4)
* mac80211: Update wireless-regdb to master-2017-03-07Ryan Mounce2017-10-161-12/+19
| | | | | | | | | | | | | | | | | The short log of changes since the 2016-06-10 release is below. Jouni Malinen (1): wireless-regdb: Remove DFS requirement for India (IN) Ryan Mounce (1): wireless-regdb: Update rules for Australia (AU) and add 60GHz rules Seth Forshee (2): wireless-regdb: Update 5 GHz rules for Canada wireless-regdb: update regulatory.bin based on preceding changes Signed-off-by: Ryan Mounce <ryan@mounce.com.au> (cherry picked from commit 8b12e62e9cd6ba2e3bb2e7f2555180df0173c7c6)
* brcmfmac: backport length check in brcmf_cfg80211_escan_handler()Felix Fietkau2017-10-161-0/+63
| | | | | | Fixes CVE-2017-0786 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* treewide: fix shellscript syntax errors/typosLorenzo Santina2017-09-132-2/+2
| | | | | | | | | 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>
* mac80211, hostapd: always explicitly set beacon intervalMatthias Schiffer2017-05-272-5/+7
| | | | | | | | | | | | | | | | 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>
* mac80211: rt2800: fix mt7620 E2 channel registersTomislav Požega2017-05-021-0/+41
| | | | | | | | 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]
* mac80211: rt2800: fix mt7620 vco calibration registersTomislav Požega2017-05-021-0/+50
| | | | | | | | | | 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]
* mac80211: rt2x00: fix MT7620 LNA gain and VCO-after-ALCDaniel Golle2017-05-022-0/+88
| | | | | | | 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>
* mac80211: rt2x00: import upstream changes and rebase our patchesDaniel Golle2017-05-0249-189/+1676
| | | | | | | | 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>
* rt2x00: mt7620: make fixes requested upstreamDaniel Golle2017-05-021-170/+674
| | | | | | | | Introduce RT6352 instead of matching against RF7620. Clean up channel setting rfvals. Port bandwidth filter calibration. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* rt2x00: mt7620: yet another beauty sessionDaniel Golle2017-05-021-171/+524
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So here is another round of improvements for MT7620 WiFi. This commit fixes a few significant issues related to TX_PWR_CFG_x and TX_ALC and also makes the code more readable by adding register descriptions for things added for MT7620 and use the usual bit-field access macros and the now defined macros instead of plain bit-ops and magic numbers. Properly describe EEPROM_TARGET_POWER at word 0x68 (== byte 0xD0) and thereby fix internal TXALC which would otherwise just read out-of-bounds of the EEPROM map. Split-out tx-power/ALC related stuff into an additional function. Fix VCO calibration, it was carried out properly in the channel switching but incomplete in the actual VCO calibration function. Also there is no need to trigger VCO calibration in channel switching, the VCO calibration function is already being called at this point. Remove it from channel switching function to avoid redundant code. The TX power calibration differs significantly from all other Mediatek/Ralink chips: They finally allow 0.5dB steps stored as 8-bit values for (almost) each bitrate -- and promptly ran out of space and for some reason didn't want to change the EEPROM layout. The hence opted for a scheme of sharing values for some adjecent bitrates and a highly over-complicated (or obfuscated?) way to populate the TX_PWR_CFG_x registers with the values stored in the EEPROM. The code here now looks much less complicated than what you see in the vendor's driver, however, it does the exact same thing: bGpwrdeltaMinus is a constant and always TRUE, hence half of the code was dead. Gpwrdelta is always 0 (rather than using the value read from the EEPROM). What remains is some very grotesque effort to avoid 0x20, probably some hardware bug related to some misunderstanding of what a singed 8-bit value is (imagine: if it was a signed 6-bit value then someone could believe that 0x20 == 0x0). And then they didn't clean it up once they later on anandonned that whole story of having a constant offset for 40 MHz channels and just set the offset to be constant 0 -- there is no effort for avoiding 0x20 for the 20 MHz values stored in the EEPROM, hence that's probably just a forbidden value in the EEPROM specs and won't appear anyway... Anyway, the whole thing felt like solving some college math test where in the end everything cancels out and the result equals 0 ;) To make sure that channel bandwidth power compensation really doesn't need to be taken care of, output a warning when the corresponding value stored in the EEPROM is non-zero. Also there is no apparent reason to refrain from initializing RFCSR register 13, it doesn't fail what-so-ever. Signed-off-by: Daniel Golle <daniel@makrotopia.org>