aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-05-29net: remove unnecessary genlmsg_cancel() callsYueHaibing1-1/+0
the message be freed immediately, no need to trim it back to the previous size. Inspired by commit 7a9b3ec1e19f ("nl80211: remove unnecessary genlmsg_cancel() calls") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-2/+2
Lots of easy overlapping changes in the confict resolutions here. Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-23mac80211: Support adding duration for prepare_tx() callbackIlan Peer2-2/+7
There are specific cases, such as SAE authentication exchange, that might require long duration to complete. For such cases, add support for indicating to the driver the required duration of the prepare_tx() operation, so the driver would still be able to complete the frame exchange. Currently, indicate the duration only for SAE authentication exchange, as SAE authentication can take up to 2000 msec (as defined in IEEE P802.11-REVmd D1.0 p. 3504). As the patch modified the prepare_tx() callback API, also modify the relevant code in iwlwifi. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-05-23Merge remote-tracking branch 'net-next/master' into mac80211-nextJohannes Berg181-1542/+5687
Bring in net-next which had pulled in net, so I have the changes from mac80211 and can apply a patch that would otherwise conflict. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-05-22mac80211_hwsim: Fix radio dump for radio idx 0Andrew Zaborowski1-2/+2
Since 6335698e24ec11e1324b916177da6721df724dd8 the radio with idx of 0 will not get dumped in HWSIM_CMD_GET_RADIO because of the last_idx checks. Offset cb->args[0] by 1 similarly to what is done in nl80211.c. Fixes: 6335698e24ec ("mac80211_hwsim: add generation count for netlink dump operation") Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-05-17Merge tag 'wireless-drivers-next-for-davem-2018-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-nextDavid S. Miller177-1480/+5548
Kalle Valo says: ==================== wireless-drivers-next patches for 4.18 The first pull request for 4.18. As usual new features and bug fixes but nothing really special. I also merged wireless-drivers due to an iwlwifi patch dependency. Major changes: iwlwifi * implement Traffic Condition Monitor and use it for scan, BT coex and to detect when the AP doesn't support UAPSD properly * some more work for the 22000 family of devices; * introduce AMSDU rate control offload qtnfmac * DFS offload support rsi * roaming enhancements * increase max supported aggregation subframes * don't advertise 5 GHz support if the device doesn't support it brcmfmac * add support for BCM4366E chipset * add support for bcm43364 wireless chipset ath10k * enable temperature reads for QCA6174 and QCA9377 * add firmware memory dump support for QCA9984 * continue adding WCN3990 support via SNOC bus ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-15brcmfmac: fix initialization of struct cfg80211_inform_bss variableFranky Lin1-1/+1
This patch fixes a sparse warning "Using plain integer as NULL pointer" about cfg80211_inform_bss structure initialization. Reported-by: kbuild test robot <lkp@intel.com> Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-15b43: fix transmit failure when VT is switchedTaketo Kabe1-7/+7
Setup: Using BCM4306 rev.03 chip based CardBus wireless card. IRQ is shared with yenta (cardbus bridge) and i915 (display) driver. For firmware, installed latest but dated openfwwf 5.2 (http://netweb.ing.unibs.it/~openfwwf/) How-to-reproduce: Do "ssh <NetBSD-remotehost>", then "ls -lR /" to generate traffic, then repeatedly switch VTs by Alt-F1<>Alt-F2. Eventually (within a minute) the card stops working. You can receive traffic but no transmission. For unknown reason it doesn't occur when just generating traffic by "ssh <remotehost> ls -lR /". With CONFIG_B43_DEBUG=y kernel config, when it stops, the debug message shows kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 148, but got 180 The slot offset I observed so far was always 32. When err_out2 is not set to make error messages successive, the debug output will be like this: kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 148 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 150 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 120 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 152 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 122 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 154 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 124 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 156 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 126 The TX ring alternates between 2 sequences; the ring seems to be completely confused. Controller restart is needed. Workaround(1): This problem doesn't occur when using propriatory firmware you will extract by b43-fwcutter, so it may be a bug in openfwwf firmware, as the comment in the b43_dma_handle_txstatus() suggests. I wasn't able to find a bug in the terse openfwwf code though. Workaround(2): Using "pio=1" option to not use DMA makes this problem to not occur. Description of the patch: This patch will forcibly reset the controller to make it work again. Very kludgy and doesn't look right, but the traffic will continue to flow. Signed-off-by: Taketo Kabe <kabe@sra-tohoku.co.jp> Reviewed-by: Michael Buesch <m@bues.ch> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-15rsi: Set wowlan flag while writing wowlan config parametersSiva Rebbagondla1-1/+1
As wowlan enable flag did not set, while writing wowlan parameters to card using rsi_send_vap_dynamic_update, which results firmware is unable to set wowlan configurations. Hence, setting wowlan flag before sending parameters. Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-15rsi: reset hibernate_resume flag to work hibernate resume in coex mode.Siva Rebbagondla1-0/+1
In coex mode, observed hibernate resume is not working properly, as the hibernate_resume flag is not getting reset in rsi_coex_recv_pkt(), when common card ready indication received from firmware. Hence resetting hibernate_resume flag in this function. Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-15rsi: Add null check for virtual interfaces in wowlan configSanjay Kumar Konduri1-1/+6
When the "poweroff" command is executed after wowlan enabled, we have observed a system crash. In the system "poweroff" sequence, network-manager is sent to inactive state by cleaning up the network interfaces, using rsi_mac80211_remove_interface() and when driver tries to access those network interfaces in rsi_wowlan_config() which was invoked by SDIO shutdown, results in a crash. Added a NULL check before accessing the network interfaces in rsi_wowlan_config(). Signed-off-by: Sanjay Kumar Konduri <sanjay.konduri@redpinesignals.com> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-15brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flagRafał Miłecki1-0/+1
brcmfmac is a FullMAC driver and it implements/uses cfg80211 interface for stations management. At the same time it doesn't receive or pass up management frames. This flag indicates that authenticator doesn't have to subscribe to or handle management frames. Some authenticators (e.g. hostapd) were working with brcmfmac thanks to some extra assumptions. This commit clears up the situation. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-12rsi: fix spelling mistake: "thead" -> "thread"Colin Ian King1-1/+1
Trivial fix to spelling mistake in rsi_dbg debug message text Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-12mt76x2: add a polling delay in mt76x2_mac_stop routineLorenzo Bianconi1-5/+5
Add a usleep_range in mt76x2_mac_stop routine in order to add a polling delay checking values of MT_MAC_STATUS and IBI_R12 registers Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Acked-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-12wireless-drivers: Dynamically allocate struct station_infoToke Høiland-Jørgensen6-48/+91
Since the addition of the TXQ stats to cfg80211, the station_info struct has grown to be quite large, which results in warnings when allocated on the stack. Fix the affected places to do dynamic allocations instead. Fixes: 52539ca89f36 ("cfg80211: Expose TXQ stats and parameters to userspace") Reviewed-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-10Merge tag 'mac80211-for-davem-2018-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211David S. Miller1-0/+1
Johannes Berg says: ==================== We only have a few fixes this time: * WMM element validation * SAE timeout * add-BA timeout * docbook parsing * a few memory leaks in error paths ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-09mwifiex: increase TX threashold to avoid TX timeout during ED MAC testGanapathi Bhat1-2/+2
While carrying energy detection(ED) tests, the chip will stop transmission upon detecting an energy in the connected channel. As a feedback, driver will stop dequeuing TX packets and due to which wmm_tx_pending keep incremeting. Once wmm_tx_pending reaches 100, driver calls netif_tx_stop_queue(). If TX ques is not restarted within 5(watchdog_timeo) seconds, it will result in TX timeout. The ED test is carried out for one minute and the current threshold of 100 is easily overcome by the traffic, cuasing TX timeouts. To fix this increase the threshold to 400. Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-09mwifiex: delete unneeded includeJulia Lawall1-1/+0
Nothing that is defined in 11ac.h is referenced in cmdevt.c. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-09brcmfmac: Add support for bcm43364 wireless chipsetSean Lanigan1-0/+1
Add support for the BCM43364 chipset via an SDIO interface, as used in e.g. the Murata 1FX module. The BCM43364 uses the same firmware as the BCM43430 (which is already included), the only difference is the omission of Bluetooth. However, the SDIO_ID for the BCM43364 is 02D0:A9A4, giving it a MODALIAS of sdio:c00v02D0dA9A4, which doesn't get recognised and hence doesn't load the brcmfmac module. Adding the 'A9A4' ID in the appropriate place triggers the brcmfmac driver to load, and then correctly use the firmware file 'brcmfmac43430-sdio.bin'. Signed-off-by: Sean Lanigan <sean@lano.id.au> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-09rtlwifi: remove duplicate definition of antenna number for btcoexPing-Ke Shih2-7/+2
Two enumerations bt_total_ant_num and bt_ant_num are identical, so one can be removed. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-07mac80211_hwsim: fix a possible memory leak in hwsim_new_radio_nl()YueHaibing1-0/+1
'hwname' should be freed before leaving from the error handling cases, otherwise it will cause mem leak Fixes: cb1a5bae5684 ("mac80211_hwsim: add permanent mac address option for new radios") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-05-04mt76x2: fix avg_rssi estimationLorenzo Bianconi1-2/+4
Add leftover filter coefficients in IIR rssi estimation Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e") Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Acked-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-04ipw2200: fix spelling mistake: "functionalitis" -> "functionalities"Colin Ian King1-1/+1
Trivial fix to spelling mistake in module parameter description text Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-04mt76x2: remove unnecessary break in mt76x2_mac_process_tx_rate()Lorenzo Bianconi1-1/+0
Remove unnecessary break statement in the default case of bw switch block in mt76x2_mac_process_tx_rate routine Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-04rtlwifi: fix spelling mistake: "dismatch" -> "mismatch"Colin Ian King3-3/+3
Trivial fix to spelling mistake in RT_TRACE message text. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-04rt2x00: check against flushing empty queueStanislaw Gruszka3-2/+4
We have check if queue is not empty when start flushing queues on by mac80211 callback, but we also can start flushing queues by internal driver calls. So move check into rt2x00queue_flush_queue() to assure we do not flush empty queue anytime. Additionally add warning if we start to kick empty queue as in such situation we set wrong index in the HW queue, what can confuse the HW and have various negative consequences. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-05-04rt2x00: call sta_add/remove directly in rt2800Stanislaw Gruszka6-22/+16
Only rt2800 subdriver of rt2x00 implement sta_add() and sta_remove(), we do not need generic version of those. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30brcmfmac: coarse support for PCIe shared structure rev7Franky Lin2-6/+23
Revision 7 of PCIe dongle interface increases the item size of tx and rx complete rings to accommodate extra payload for new feature. This patch simply bump up the size of these two rings without adding the support for utilizing the new space. This makes brcmfmac compatible with rev7 firmware. Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30brcmfmac: add hostready indicationFranky Lin1-2/+12
A hostready signal is introduced to inform firmware through mailbox doorbell1 when common ring initialized or D3 exited. Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30brcmfmac: constify firmware mapping tablesArend Van Spriel5-5/+5
The information in the firmware mapping does not need to be modified so it can be static const. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30brcmfmac: use nl80211_band directly to get ieee80211 channelFranky Lin1-4/+4
The enum nl80211_band used to retrieve wiphy->bands is the same as wiphy->bands->band which is checked by wiphy_register(). So it can be used directly as parameter of ieee80211_channel_to_frequency(). Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30brcmfmac: reports boottime_ns while informing bssFranky Lin1-13/+13
Provides a timestamp in bss information so user space can see when the bss info was updated. Since tsf is not available from the dongle events boottime is reported instead. Reported-by: Dmitry Shmidt <dimitrysh@google.com> Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30brcmfmac: check p2pdev mac address uniquenessArend Van Spriel1-0/+7
The mac address for p2pdev must be different from the primary interface due to firmware requirement. Add an explicit check for this requirement if user-space provides a mac address. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by: Franky Lin <franky.lin@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30ipw2100: fix spelling mistake: "decsribed" -> "described"Colin Ian King2-2/+2
Trivial fix to spelling mistake in comment and in the ord_data text Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30rt2x00: fix spelling mistake in various macros, UKNOWN -> UNKNOWNColin Ian King1-8/+8
Rename several macros that contain mispellings of UNKNOWN Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30rsi_91x: fix uninitialized variableGustavo A. R. Silva1-3/+4
There is a potential execution path in which variable ret is returned without being properly initialized previously. Fix this by storing the value returned by function rsi_usb_master_reg_write into _ret_. Addresses-Coverity-ID: 1468407 ("Uninitialized scalar variable") Fixes: 16d3bb7b2f37 ("rsi: disable fw watchdog timer during reset") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30rsi_91x: fix structurally dead codeGustavo A. R. Silva1-8/+8
Function rsi_hal_key_config returns before reaching code at line 922 if (status), hence this code is structurally dead. Fix this by storing the value returned by rsi_hal_load_key into _status_ for its further evaluation and use. Addresses-Coverity-ID: 1468409 ("Structurally dead code") Fixes: 4fd6c4762f37 ("rsi: roaming enhancements") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30wlcore: sdio: allow pm to handle sdio powerEyal Reizer1-21/+6
pm_runtime handles sdio power on and power off transitions. An old workaround for trying to control the power explicitly from the driver was in fact causing failures on suspend/resume as the mmc layer already power the module on resume. In case of resume pm_runtime_get sync returns a positive device's usage count causing the driver to try an re-initialize an already initialized device. This was causing sdio bus failure on resume. Remove this manual power on/off sequence as it is in-fact not needed. Signed-off-by: Eyal Reizer <eyalr@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30qtnfmac: fix qtnf_netdev_hard_start_xmit()'s return typeLuc Van Oostenryck1-1/+1
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Reviewed-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30net: wireless: b43legacy: Replace GFP_ATOMIC with GFP_KERNEL in dma_tx_fragmentJia-Ju Bai1-1/+1
dma_tx_fragment() is never called in atomic context. dma_tx_fragment() is only called by b43legacy_dma_tx(), which is only called by b43legacy_tx_work(). b43legacy_tx_work() is only set a parameter of INIT_WORK() in b43legacy_wireless_init(). Despite never getting called from atomic context, dma_tx_fragment() calls alloc_skb() with GFP_ATOMIC, which does not sleep for allocation. GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL, which can sleep and improve the possibility of sucessful allocation. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30mwifiex: keep user configured mac address during changing virtual interfaceXinming Hu1-1/+4
During changing virtual interface, keep using previous net device mac address. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30mwifiex: always configure firmware mac address during changing virtual interfaceXinming Hu1-4/+0
When interface type changed, firmware using a new connction pointer. We need Re-configure the mac address. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30mwifiex: make firmware mac address consistent with host configurationXinming Hu3-19/+26
For user configurated mac address, directly set to firmware with no change. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30mwifiex: fix mwifiex_hard_start_xmit()'s return typeLuc Van Oostenryck1-1/+1
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30mt76: check for pending reset before attempting to schedule txFelix Fietkau1-0/+4
The check within mt76_txq_send_burst is not enough, as it happens after a first frame has already been queued up Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30mt76: add rcu locking around tx schedulingFelix Fietkau1-0/+2
Fixes a reported lockdep error in mac80211: [ 179.867321] ============================= [ 179.871510] WARNING: suspicious RCU usage [ 179.875528] 4.14.32 #0 Not tainted [ 179.878924] ----------------------------- [ 179.882981] backports-2017-11-01/net/mac80211/tx.c:594 suspicious rcu_dereference_check() usage! [ 179.891785] [ 179.891785] other info that might help us debug this: [ 179.891785] [ 179.899824] [ 179.899824] rcu_scheduler_active = 2, debug_locks = 1 [ 179.906343] 2 locks held by ksoftirqd/0/7: [ 179.910479] #0: (&(&q->lock)->rlock){+.-.}, at: [<86b207a4>] mt76_dma_tx_cleanup+0x64/0x354 [mt76] [ 179.919734] #1: (&(&fq->lock)->rlock){+.-.}, at: [<87238410>] ieee80211_tx_dequeue+0x54/0xc3c [mac80211] [ 179.929890] [ 179.929890] stack backtrace: [ 179.934257] CPU: 0 PID: 7 Comm: ksoftirqd/0 Not tainted 4.14.32 #0 [ 179.940421] Stack : 00000000 00000000 00000000 00000000 80e0fce2 00000036 00000000 00000000 [ 179.948864] 87c3d24c 80696377 8061039c 00000000 00000007 00000001 87c5db78 6534689d [ 179.957306] 00000000 00000000 80e10000 87c5da74 00000001 0000015a 00000007 00000000 [ 179.965748] 00000000 806a0000 000e4171 00000000 00000000 00000000 ffffffff 00000001 [ 179.974189] 806c0000 8692b240 86b000d0 87316fe4 00000001 802c9a68 00000000 80700000 [ 179.982632] ... [ 179.985104] Call Trace: [ 179.987582] [<80010a48>] show_stack+0x58/0x100 [ 179.992040] [<804c2c58>] dump_stack+0xe8/0x170 [ 179.996868] [<87234a04>] ieee80211_tx_h_select_key+0xa8/0x5b8 [mac80211] [ 180.004299] [<87238d44>] ieee80211_tx_dequeue+0x988/0xc3c [mac80211] [ 180.011048] [<86b230dc>] mt76_txq_schedule+0x110/0x3a4 [mt76] [ 180.016821] [<86b209d0>] mt76_dma_tx_cleanup+0x290/0x354 [mt76] [ 180.022777] [<86be2e60>] mt7603_tx_tasklet+0x40/0x6c [mt7603e] [ 180.028637] [<80037058>] tasklet_action+0x110/0x1ec [ 180.033532] [<804e1dac>] __do_softirq+0x164/0x35c [ 180.038235] [<80037174>] run_ksoftirqd+0x40/0x84 [ 180.042870] [<800580c8>] smpboot_thread_fn+0x1a8/0x1d8 [ 180.048023] [<800542e8>] kthread+0x130/0x144 [ 180.052297] [<8000b1f8>] ret_from_kernel_thread+0x14/0x1c Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30mt76: add rcu locking in tid reorder functionFelix Fietkau1-2/+4
Avoids having the tid or station entry disappear prematurely. Also cancel the reorder work earlier to avoid further processing delayed by waiting for the lock to be released Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30mt76: fix concurrent rx calls on A-MPDU releaseFelix Fietkau3-0/+4
Add a spinlock in mt76_rx_complete. Without this, multiple stats updates could happen in parallel, which can lead to deadlocks. There are probably more corner cases fixed by this change. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-30mt76x2: fix is_mt7612 routineLorenzo Bianconi1-2/+1
Fix is_mt7612 routine since asic version is set in mt76_dev revision field and not in mt76x2_dev one. Moreover remove mt76x2_dev rev field since it is never used in the driver Fixes: 7bc04215a66b ('mt76: add driver code for MT76x2e') Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Acked-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-04-27Merge tag 'wireless-drivers-for-davem-2018-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-driversDavid S. Miller8-62/+138
Kalle Valo says: ==================== wireless-drivers fixes for 4.17 A few fixes for 4.17 but nothing really special. The new ETSI WMM parameter support for iwlwifi is not technically a bugfix but important for regulatory compliance. iwlwifi * use new ETSI WMM parameters from regulatory database * fix a regression with the older firmware API 31 (eg. 31.560484.0) brcmfmac * fix a double free in nvmam loading fails rtlwifi * yet another fix for ant_sel module parameter ==================== Signed-off-by: David S. Miller <davem@davemloft.net>