aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2019-01-25iwlwifi: wrt: add to dump number of lmacs, lmac1 and umac error idShahar S Matityahu5-10/+30
Add to the dump the number of lmacs, the error id of the umac and the error id of lmac1, if supported. In case the reason for the dump trigger is not an assert the error id is zero. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: pcie: make array 'prop' static, shrinks object sizeColin Ian King1-1/+1
Don't populate the array prop on the stack but instead make it static. Makes the object code smaller by 30 bytes: Before: text data bss dec hex filename 80138 15382 576 96096 17760 drivers/net/wireless/intel/iwlwifi/pcie/trans.o After: text data bss dec hex filename 79948 15542 576 96066 17742 drivers/net/wireless/intel/iwlwifi/pcie/trans.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-22wlcore: sdio: Fixup power on/off sequenceUlf Hansson1-8/+7
During "wlan-up", we are programming the FW into the WiFi-chip. However, re-programming the FW doesn't work, unless a power cycle of the WiFi-chip is made in-between the programmings. To conform to this requirement and to fix the regression in a simple way, let's start by allowing that the SDIO card (WiFi-chip) may stay powered on (runtime resumed) when wl12xx_sdio_power_off() returns. The intent with the current code is to treat this scenario as an error, but unfortunate this doesn't work as expected, so let's fix this. The other part is to guarantee that a power cycle of the SDIO card has been completed when wl12xx_sdio_power_on() returns, as to allow the FW programming to succeed. However, relying solely on runtime PM to deal with this isn't sufficient. For example, userspace may prevent runtime suspend via sysfs for the device that represents the SDIO card, leading to that the mmc core also keeps it powered on. For this reason, let's instead do a brute force power cycle in wl12xx_sdio_power_on(). Fixes: 728a9dc61f13 ("wlcore: sdio: Fix flakey SDIO runtime PM handling") Signed-off-by: Ulf Hansson <[email protected]> Tested-by: Tony Lindgren <[email protected]> Tested-by: Anders Roxell <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-22mt76: avoid scheduling tx queues for powersave stationsFelix Fietkau1-0/+5
In case a tx queue wake call arrives after a client has transitioned to powersave, make sure that the queue is not kept active until the client has left powersave mode Signed-off-by: Felix Fietkau <[email protected]>
2019-01-22mt76: fix per-chain signal strength reportingFelix Fietkau1-1/+1
Fix an off-by-one error that resulted in not reporting the signal strength for the first chain Signed-off-by: Felix Fietkau <[email protected]>
2019-01-21mt76: do not report out-of-range rx nssLorenzo Bianconi1-4/+10
Take into account device rx stream in mt76x02_mac_process_rate in order to not report wrong number of rx spatial stream to mac80211. The issue has been reported on mt76x0 device which is 1x1:1 however the hw sometimes reports rx nss equal to 2 Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-19virt_wifi: remove set but not used variable 'w_priv'YueHaibing1-2/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/virt_wifi.c: In function 'virt_wifi_net_device_stop': drivers/net/wireless/virt_wifi.c:432:31: warning: variable 'w_priv' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2019-01-19virt_wifi: remove duplicated include from virt_wifi.cYueHaibing1-5/+0
Remove duplicated include. Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2019-01-19virt_wifi: fix error return code in virt_wifi_newlink()Wei Yongjun1-1/+3
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: c7cdba31ed8b ("mac80211-next: rtnetlink wifi simulation device") Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2019-01-19mac80211_hwsim: check that n_limits makes senseJohannes Berg1-0/+5
Under certain circumstances, radios created via netlink could have n_limits be zero and no possible interface types, which makes no sense. Reject this early to prevent a WARN_ON() in cfg80211. Fixes: 99e3a44bac37 ("mac80211_hwsim: allow setting iftype support") Reported-by: [email protected] Signed-off-by: Johannes Berg <[email protected]>
2019-01-17mt76: add channel switch announcement supportFelix Fietkau4-2/+57
Use the appropriate mac80211 callbacks after beacon transmission Signed-off-by: Felix Fietkau <[email protected]>
2019-01-17mt76: fix signedness of rx status signal fieldFelix Fietkau1-1/+1
It is usually negative, so it needs to be signed. Signed-off-by: Felix Fietkau <[email protected]>
2019-01-17mt76: fix rssi ewma trackingFelix Fietkau2-2/+4
The generic EWMA code cannot deal with negative numbers, so convert signal to a positive number before adding it Fixes mt76x2 AGC tuning Signed-off-by: Felix Fietkau <[email protected]>
2019-01-17mt76: move mt76x02_phy_get_min_avg_rssi to mt76 coreFelix Fietkau10-65/+62
This will be used by mt7603 as well Signed-off-by: Felix Fietkau <[email protected]>
2019-01-17mt76: move mt76x02_get_txpower to mt76 coreFelix Fietkau8-24/+25
It will be reused by mt7603 later Signed-off-by: Felix Fietkau <[email protected]>
2019-01-17mt76: set IEEE80211_HW_NEEDS_UNIQUE_STA_ADDR flagFelix Fietkau1-0/+1
The hardware does not deal with multiple WCID entries for the same station properly. Set IEEE80211_HW_NEEDS_UNIQUE_STA_ADDR to avoid those cases Signed-off-by: Felix Fietkau <[email protected]>
2019-01-17mt76: fix tx status reporting for non-probing framesFelix Fietkau5-9/+11
On MT76x2, the hardware does not report tx status in the FIFO register, if the packet id is 0. Change the allocation of packet IDs to use 0 for no-ack packets, 1 for non-probing packets and 2-255 for packets with tx status requested. Fixes rate control issues Signed-off-by: Felix Fietkau <[email protected]>
2019-01-16iwlwifi: make IWLWIFI depend on CFG80211Luca Coelho1-1/+2
Since IWLWIFI doesn't depend on MAC80211 anymore, it needs to depend on CFG80211, because it uses a few symbols from it. Add the dependency on CFG80211 accordingly. Additionally, make IWLWIFI_LEDS depend on IWLMVM or IWLDVM, since it doesn't need mac80211 but must be used for these. Fixes: aca432f06b8a ("iwlwifi: make MVM and DVM depend on MAC80211") Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-11mt76: add led support to mt76x0e driverLorenzo Bianconi4-77/+82
Move mt76x02 led support in mt76x02-lib module in order to add tpt led trigger to mt76x0e driver Tested-by: LGA1150 <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: use proper name for __MT76x02_H macroLorenzo Bianconi1-3/+3
Use proper name for __MT76x02_H macro in mt76x02.h Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: dma: avoid indirect call in mt76_dma_tx_queue_skbLorenzo Bianconi1-1/+1
Call mt76_dma_add_buf routine directly in mt76_dma_tx_queue_skb and avoid indirect call if not necessary Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: make const array 'data' static, shrinks object sizeColin Ian King1-1/+1
Don't populate the const array 'data' on the stack but instead make it static. Makes the object code smaller by 78 bytes: Before: text data bss dec hex filename 5438 1080 0 6518 1976 mediatek/mt76/mt76x2/usb_mcu.o After: text data bss dec hex filename 5296 1144 0 6440 1928 mediatek/mt76/mt76x2/usb_mcu.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: mmio: introduce mt76x02_check_tx_hang watchdogLorenzo Bianconi8-1/+140
Port mt76x02_check_tx_hang watchdog from vendor driver in order to perform a device reset when tx mac/dma logic hangs. Tx mac/dma stuck has been observed when the device is heavy loaded or in a noisy environment. Moreover introduce wdt delayed work in order to run tx_hang watchdog. For the moment run mt76x02_check_tx_hang watchdog just on mt76x2 devices since the issue has not been observed on mt76x0 driver yet Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: dma: do not build skb if reported len does not fit in buf_sizeLorenzo Bianconi1-8/+7
Precompute data length in order to avoid to allocate the related skb data structure if reported length does not fit in queue buf_size Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: mac: minor optimizations in mt76x02_mac_tx_rate_valLorenzo Bianconi1-4/+2
Do not set bw variable to zero for legacy rates since it is already initialized to zero. Moreover set nss to 1 just for legacy rates since nss will be properly set for VHT/HT rates Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: add energy detect CCA support to mt76x{0,2}e driversLorenzo Bianconi9-0/+111
Ported from the reference driver. Should fix compliance with ETSI regulatories on preventing transmission while energy detect values are above the threshold. The code has been tested using an ath9k device running tx99 as noise generator Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76x2: init: set default value for MT_TX_LINK_CFGLorenzo Bianconi1-0/+1
Update default value for MT_TX_LINK_CFG according to vendor driver Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: dfs: run mt76x02_dfs_set_domain atomicallyLorenzo Bianconi1-0/+2
Grab mt76_dev mutex in mt76x02_dfs_set_domain since it runs concurrently with mt76x{0,2}_set_channel routines Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76x2: add static qualifier to mt76x2_init_hardwareLorenzo Bianconi2-2/+1
Add static qualifier to mt76x2_init_hardware routine since it is used just in pci_init.c Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76x0: configure MT_VHT_HT_FBK_CFG1Stanislaw Gruszka1-0/+1
Configure MT_VHT_HT_FBK_CFG1 values similar like vendor driver. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76x02: set protection according to ht operation elementStanislaw Gruszka4-0/+90
Configure protection based on information that are provided to us either by remote AP or by hostapd via HT operation IE. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76x02: fixup MT_PROT_RATE_* definesStanislaw Gruszka1-3/+3
On new mt76 chips, phy mode is configured by last 3 bits of rate value. Hence OFDM bit is marked by 0x2000 instead of 0x4000. Acked-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76x02: do not set protection on set_rts_threshold callbackStanislaw Gruszka3-17/+3
Use set_rts_threshold calback to enable/disable threshold only for legacy traffic. Protection for HT and VHT traffic is defined by HT operation element and it's provided by remote AP or by hostapd. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76x0: pci: fix ACS supportLorenzo Bianconi1-0/+8
Fix Automatic Channel Selection (ACS) support in mt76x0e driver configuring properly MT_CH_TIME_CFG register Fixes: 6250318694ca ("mt76x0: pci: add get_survey support") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: usb: avoid queue/status spinlocks while passing tx status to mac80211Lorenzo Bianconi1-4/+6
As already done for pcie code in commit 79d1c94c9c78 ("mt76: avoid queue/status spinlocks while passing tx status to mac80211") make sure that no tx related spinlocks are taken during the ieee80211_tx_status call Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: mac: run mt76x02_mac_work routine atomicallyLorenzo Bianconi1-0/+4
Grab mt76_dev mutex in mt76x02_mac_work handler since it runs concurrently with mt76x{0,2}_set_channel routines Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: fix typo in mt76x02_check_mac_err routineLorenzo Bianconi1-2/+2
Reconfigure properly MT_MAC_SYS_CTRL register after mac sw-reset in mt76x02_check_mac_err routine Fixes: 73556561ab9f ("mt76x0: use mt76x02_mac_work as stats handler") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: Add missing include of linux/module.hHauke Mehrtens1-0/+1
MODULE_FIRMWARE() is used in usb_mcu.c and provided by linux/module.h, but this header file is not directly included. This causes problems in backports with some kernel versions. Add the missing include. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: usb: do not build the skb if reported len does not fit in buf_sizeLorenzo Bianconi1-6/+4
Precompute data length in order to avoid to allocate the related skb data structure if reported length does not fit in queue buf_size Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: dma: remove napi from mt76_dma_rx_fill signatureLorenzo Bianconi1-4/+4
Remove napi from mt76_dma_rx_fill routine signature since it is a leftover of a previous implementation and it is no longer used Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: request tx status for powersave released EOSP packetFelix Fietkau1-1/+2
Allows mac80211 to keep track of the service period Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: throttle transmission of buffered multicast packetsFelix Fietkau1-2/+3
Avoids drowning out regular transmissions Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11mt76: add size check for additional rx fragmentsFelix Fietkau1-0/+8
So far the code only validates the buffer size of the first skb. Extend this check to cover additional fragments as well, in case the size is corrupted during a DMA reset. Signed-off-by: Felix Fietkau <[email protected]>
2019-01-10ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()Kangjie Lu1-3/+1
ath6kl_wmi_cmd_send could fail, so let's return its error code upstream. Signed-off-by: Kangjie Lu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-10ath9k: Avoid OF no-EEPROM quirks without qca,no-eepromDaniel F. Dickinson1-3/+3
ath9k_of_init() function[0] was initially written on the assumption that if someone had an explicit ath9k OF node that "there must be something wrong, why would someone add an OF node if everything is fine"[1] (Quoting Martin Blumenstingl <[email protected]>) "it turns out it's not that simple. with your requirements I'm now aware of two use-cases where the current code in ath9k_of_init() doesn't work without modifications"[1] The "your requirements" Martin speaks of is the result of the fact that I have a device (PowerCloud Systems CR5000) has some kind of default - not unique mac address - set and requires to set the correct MAC address via mac-address devicetree property, however: "some cards come with a physical EEPROM chip [or OTP] so "qca,no-eeprom" should not be set (your use-case). in this case AH_USE_EEPROM should be set (which is the default when there is no OF node)"[1] The other use case is: the firmware on some PowerMac G5 seems to add a OF node for the ath9k card automatically. depending on the EEPROM on the card AH_NO_EEP_SWAP should be unset (which is the default when there is no OF node). see [3] After this patch to ath9k_of_init() the new behavior will be: if there's no OF node then everything is the same as before if there's an empty OF node then ath9k will use the hardware EEPROM (before ath9k would fail to initialize because no EEPROM data was provided by userspace) if there's an OF node with only a MAC address then ath9k will use the MAC address and the hardware EEPROM (see the case above) with "qca,no-eeprom" EEPROM data from userspace will be requested. the behavior here will not change [1] Martin provides additional background on EEPROM swapping[1]. Thanks to Christian Lamparter <[email protected]> for all his help on troubleshooting this issue and the basis for this patch. [0]https://elixir.bootlin.com/linux/v4.20-rc7/source/drivers/net/wireless/ath/ath9k/init.c#L615 [1]https://github.com/openwrt/openwrt/pull/1645#issuecomment-448027058 [2]https://github.com/openwrt/openwrt/pull/1613 [3]https://patchwork.kernel.org/patch/10241731/ Fixes: 138b41253d9c ("ath9k: parse the device configuration from an OF node") Reviewed-by: Martin Blumenstingl <[email protected]> Tested-by: Martin Blumenstingl <[email protected]> Signed-off-by: Daniel F. Dickinson <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-10brcmfmac: Use firmware_request_nowarn for the clm_blobHans de Goede1-1/+1
The linux-firmware brcmfmac firmware files contain an embedded table with per country allowed channels and strength info. For recent hardware these versions of the firmware are specially build for linux-firmware, the firmware files directly available from Cypress rely on a separate clm_blob file for this info. For some unknown reason Cypress refuses to provide the standard firmware files + clm_blob files it uses elsewhere for inclusion into linux-firmware, instead relying on these special builds with the clm_blob info embedded. This means that the linux-firmware firmware versions often lag behind, but I digress. The brcmfmac driver does support the separate clm_blob file and always tries to load this. Currently we use request_firmware for this. This means that on any standard install, using the standard combo of linux-kernel + linux-firmware, we will get a warning: "Direct firmware load for ... failed with error -2" On top of this, brcmfmac itself prints: "no clm_blob available (err=-2), device may have limited channels available". This commit switches to firmware_request_nowarn, fixing almost any brcmfmac device logging the warning (it leaves the brcmfmac info message in place). Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-10brcmfmac: fix system warning message during wowl suspendLo-Hsiang Lo1-0/+5
There is a system warning message, warn_slowpath-fmt, during suspend while using supplicant join AP and enable wowl feature by IW command. It's caused by brcmf_pno_remove_request path can't find the reqid. This fix will not go to remove pno request function if there is no pno scan. Acked-by: Arend van Spriel <[email protected]> Signed-off-by: Lo-Hsiang Lo <[email protected]> Signed-off-by: Chi-Hsien Lin <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-10rsi: add support for hardware scan offloadPrameela Rani Garnepudi6-0/+261
With the current approach of scanning, roaming delays are observed. Firmware has support for back ground scanning. To get this advantage, mac80211 hardware scan is implemented, which decides type of scan to do based on connected state. When station is in not connected, driver returns with special value 1 to trigger software scan in mac80211. In case of connected state, background scan will be triggered. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Siva Rebbagondla <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-10brcmfmac: add a check for the status of usb_registerKangjie Lu1-1/+5
usb_register() may fail, so let's check its status and issue an error message if it fails. Signed-off-by: Kangjie Lu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-10cw1200: drop useless LIST_HEADJulia Lawall1-1/+0
Drop LIST_HEAD where the variable it declares has never been used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier x; @@ - LIST_HEAD(x); ... when != x // </smpl> Fixes: a910e4a94f692 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets") Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Kalle Valo <[email protected]>