summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)Author
2018-01-17rtlwifi: btcoex: Remove typedef statementsLarry Finger
Each of these typedefs are only referenced in a single location later in this header. Thus, they are easily removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: btcoex: Remove global variables from btcoexPing-Ke Shih
Remove global variables, so btcoexist can support multiple instances simultaneously. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: btcoex: Add power_on_setting routinePing-Ke Shih
After mac power-on sequence, wifi will start to work so notify btcoex the event to configure registers especially related to antenna. This will not only help to assign antenna but also to yield better user experience. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: unlink bss when un-associationTsang-Shian Lin
When AP change bandwidth setting from 20M to 40M, STA may use old 20M AP information to association with AP. Driver unlink bss in the .bss_info_changed of ieee80211_ops to make sure that later scan can get correct AP bandwidth capability. Signed-off-by: Tsang-Shian Lin <thlin@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: fix scan channel 1 fail after IPSPing-Ke Shih
If there is no connection, driver will enter IPS state. Meanwhile, it fails to scan channel 1 by the command 'iw dev wlan0 scan freq 2412', because hardware channel setting lose after IPS. Thus, restore channel setting from hw->conf.channel set by last rtl_op_config(). Signed-off-by: Tim Lee <timlee@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17rtlwifi: Use mutex to replace spin_lock to protect IPS and LPSPing-Ke Shih
Enter/leavel IPS and LPS are large critical section, and they can't use sleep function because running in atomic-context, which own a spin_lock. In commit ba9f93f82aba ("rtlwifi: Fix enter/exit power_save"), it moves LPS functions to thread-context, so this commit can simply change LPS's spin lock to mutex. Considering IPS functions, rtl_ips_nic_on() may be called by TX tasklet (softirq-context) that check whether packet is auth frame. Fortunately, current mac80211 will ask driver to leave IPS using op_config with changed flag IEEE80211_CONF_CHANGE_IDLE, before issuing auth frame, so IPS functions can run in thread-context and use mutex to protect critical section, too. Also, this commit removes some useless spin locks. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi()Lorenzo Bianconi
Verify wcid is not NULL before dereferencing the pointer to initialize txwi rate/power info Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e") Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-17mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()Lorenzo Bianconi
Initialize mt76_txq pointer after ieee80211_txq pointer check. Remove space after the pointer cast Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e") Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-16Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.gitKalle Valo
ath.git patches for 4.16. Major changes: ath9k * add MSI support (not enabled by default yet)
2018-01-16mwifiex: resolve reset vs. remove()/shutdown() deadlocksBrian Norris
Commit b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()") resolves races between driver reset and removal, but it introduces some new deadlock problems. If we see a timeout while we've already started suspending, removing, or shutting down the driver, we might see: (a) a worker thread, running mwifiex_pcie_work() -> mwifiex_pcie_card_reset_work() -> pci_reset_function() (b) a removal thread, running mwifiex_pcie_remove() -> mwifiex_free_adapter() -> mwifiex_unregister() -> mwifiex_cleanup_pcie() -> cancel_work_sync(&card->work) Unfortunately, mwifiex_pcie_remove() already holds the device lock that pci_reset_function() is now requesting, and so we see a deadlock. It's necessary to cancel and synchronize our outstanding work before tearing down the driver, so we can't have this work wait indefinitely for the lock. It's reasonable to only "try" to reset here, since this will mostly happen for cases where it's already difficult to reset the firmware anyway (e.g., while we're suspending or powering off the system). And if reset *really* needs to happen, we can always try again later. Fixes: b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()") Cc: <stable@vger.kernel.org> Cc: Xinming Hu <huxm@marvell.com> Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-16Revert "mwifiex: cancel pcie/sdio work in remove/shutdown handler"Brian Norris
This reverts commit b713bbf1471b56b572ce26bd02b81a85c2b007f4. The "fix" in question does not actually fix all related problems, and it also introduces new deadlock possibilities. Since commit b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()"), the race in question is actually resolved (PCIe reset cannot happen at the same time as remove()). Instead, this "fix" just introduces a deadlock where mwifiex_pcie_card_reset_work() is waiting on device_lock, which is held by PCIe device remove(), which is waiting on...mwifiex_pcie_card_reset_work(). The proper thing to do is just to fix the deadlock. Patch for this will come separately. Cc: Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-16rtlwifi: btcoexist: remove redundant variable fw_ps_stateColin Ian King
Variable fw_ps_state is assigned a value but it is never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:736:2: warning: Value stored to 'fw_ps_state' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-16ath10k: fix recently introduced checkpatch warningsKalle Valo
Checkpatch found these issues: drivers/net/wireless/ath/ath10k/ce.h:324: Please use a blank line after function/struct/union/enum declarations drivers/net/wireless/ath/ath10k/core.c:1321: Please don't use multiple blank lines drivers/net/wireless/ath/ath10k/htt.h:1859: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-16ath10k: remove redundant -ve check against u32 integer sizeColin Ian King
Variable section_table.size is a u32 and so cannot be less than zero, hence the less than zero check is redundant and can be removed. Detected by CoverityScan, CID#1463855 ("Unsigned compared against 0") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-16ath10k: fix spelling mistake: "addrress" -> "address"Colin Ian King
Trivial fix to spelling mistake in warning message text. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-16ath10k: add sanity check to ie_len before parsing fw/board ieRyan Hsu
Validate ie_len after the alignment padding before access the buffer to avoid potential overflow. Signed-off-by: Ryan Hsu <ryanhsu@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-16ath9k: add a quirk to set use_msi automaticallyAceLan Kao
Some platform(BIOS) blocks legacy interrupts (INTx), and only allows MSI for WLAN device. So adding a quirk to list those machines and set use_msi automatically. Adding the following platforms to the quirk. Dell Inspiron 24-3460 Dell Inspiron 3472 Dell Inspiron 14-3473 Dell Vostro 3262 Dell Vostro 15-3572 Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-16ath9k: add MSI supportRussell Hu
On new Intel platforms like ApolloLake, legacy interrupt mechanism (INTx) is not supported, so WLAN modules are not working because interrupts are missing, therefore this patch is to add MSI support to ath9k. With module paremeter "use_msi=1", ath9k driver would try to use MSI instead of INTx. Signed-off-by: Russell Hu <rhu@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-15Merge tag 'wireless-drivers-next-for-davem-2018-01-13' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.16 Here are patches which have been accumulating over the holidays and after the New Year. Business as usual and nothing special really standing out. But what's noteworthy here is that Larry Finger is stepping down as the rtlwifi maintainer. He has been maintaining rtlwifi since it was applied back in 2010 in commit 0c8173385e54 ("rtl8192ce: Add new driver") and it has been no easy role trying to juggle between the vendor, demanding upstream community and users. So big thank you to Larry for all his efforts! ath10k * more preparation work for wcn3990 support * add memory dump to firmware coredump files wil6210 * support scheduled scan * support 40-bit DMA addresses qtnfmac * support MAC address based access control * support for radar detection and Channel Availibility Check (CAC) mwifiex * firmware coredump for usb devices rtlwifi * Larry Finger steps down as the maintainer and Ping-Ke Shih becomes the new maintainer * add debugfs interfaces to dump register and btcoex status, and also write registers and h2c ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-11Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
BPF alignment tests got a conflict because the registers are output as Rn_w instead of just Rn in net-next, and in net a fixup for a testcase prohibits logical operations on pointers before using them. Also, we should attempt to patch BPF call args if JIT always on is enabled. Instead, if we fail to JIT the subprogs we should pass an error back up and fail immediately. Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-11b43: Replace mdelay with usleep_range in b43_radio_2057_init_postJia-Ju Bai
b43_radio_2057_init_post is not called in an interrupt handler nor holding a spinlock. The function mdelay in it can be replaced with usleep_range, to reduce busy wait. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-11brcmfmac: Use zeroing memory allocator than allocator/memsetHimanshu Jha
Use dma_zalloc_coherent for allocating zeroed memory and remove unnecessary memset function. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Suggested-by: Luis R. Rodriguez <mcgrof@kernel.org> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-11brcmfmac: rename brcmf_sdiod_buff_{read,write}() functionsArend Van Spriel
Rename functions to brcmf_sdio_skbuff_{read,write}() as we pass an skbuff to this function. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-11brcmfmac: add comment block in brcmf_sdio_buscore_read()Arend Van Spriel
In brcmf_sdio_buscore_read() there is some special handling upon register access to chipid register of the chipcommon core. Add comment explaining why it is done here. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-11brcmfmac: Remove array of functionsArend Van Spriel
Replace the array of functions with a pair of pointers to the relevant functions. Signed-off-by: Ian Molton <ian@mnementh.co.uk> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-11Merge tag 'iwlwifi-next-for-kalle-2017-12-20' of ↵Kalle Valo
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Third batch of updates for v4.16 * Small cleanups in the new rate-scaling code; * Some improvements in debugging; * New FW API changes; * Fix a bug where we got a false-positive warning; * Fix forced quota debugfs functionality;
2018-01-11Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.gitKalle Valo
ath.git patches for 4.16. Major changes: ath10k * more preparation work for wcn3990 support * add memory dump to firmware coredump files wil6210 * support scheduled scan * support 40-bit DMA addresses
2018-01-10Merge tag 'wireless-drivers-for-davem-2018-01-09' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.15 Hopefully the last set of fixes for 4.15. iwlwifi * fix DMA mapping regression since v4.14 wcn36xx * fix dynamic power save which has been broken since the driver was commited ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-09qtnfmac: support MAC address based access controlVasily Ulyanov
This allows a running AP to blacklist STAs by their MAC addresses respecting the configured policy (either accept or deny unless listed). It can be setup on .start_ap or with .set_mac_acl commands. Signed-off-by: Vasily Ulyanov <vulyanov@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09qtnfmac: keeping track of "generation" for STA infoIgor Mitsyanko
Keep generation in per-VIF data structure and increment it whenever STA list is changed. Use generation value to fill struct station_info when required. Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09qtnfmac: modify GET_STA_STATS cmd format for back/forward compatibilityIgor Mitsyanko
A set of per-STA statistics can potentially change quite often. To ensure backwards and forward compatibility, modify GET_STA_STATS command format: - introduce two TLV types - first TLV is a variable-sized bitmap of statistics values that are filled by firmware - second TLV is a structure with statistics itself Only values specified in first TLV are valid. Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09qtnfmac: fill wiphy's extended capabilitiesVasily Ulyanov
These are needed to inform userspace about features the hardware supports (e.g. BSS Transition Management 802.11v) Signed-off-by: Vasily Ulyanov <vulyanov@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09qtnfmac: fix rssi data passed to wireless coreSergey Matyukevich
Fix RSSI values passed to wireless core by qtnfmac driver: - fix RSSI values in scan results: driver registers wiphy with CFG80211_SIGNAL_TYPE_MBM signal type, so mBm should be passed using DBM_TO_MBM macro - accompany firmware changes fixing RSSI values in received mgmt frames update qlink message format and pass correct signed values to core Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09qtnfmac: check for passed channel being NULL in MGMT_TX commandIgor Mitsyanko
Parameters passed into .mgmt_tx callback may have a NULL channel in case userspace wants to send a frame on current channel. Make sure this case is handled, pass "freq==0" in case channel is not specififed to tell wlan device to use current channel. Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09qtnfmac: change default interface mode from AP to STAIgor Mitsyanko
To mimic mac80211 behaviour, change default interface type from AP to STA. Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09qtnfmac: add support for radar detection and CACIgor Mitsyanko
Implement two parts of radar handling logic: - cfg80211 .start_radar_detect callback to allow nl80211 to initiate CAC - radar event to allow wlan device to advertize CAC and radar events Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09qtnfmac: pass complete channel data between driver and firmwareSergey Matyukevich
Center frequency is not enough to describe the channel in HT and VHT modes. For 40MHz and 80MHz channels both primary channel and center frequency should be specified in order to qualify channel completely. This change adds primary channel info into qlink_chandef structure. Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09qtnfmac: check that MAC exists in regulatory notifierIgor Mitsyanko
It is possible that regulatory notifier is called before MAC data was allocated. We need to verify that MAC data exists before trying to send a regulatory change event. Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09wcn36xx: fix incorrect assignment to msg_body.min_ch_timeColin Ian King
The second assignment to msg_body.min_ch_time is incorrect, it should actually be to msg_body.max_ch_time. Thanks to Bjorn Andersson for identifying the correct way to fix this as my original fix was incorrect. Detected by CoverityScan, CID#1463042 ("Unused Value") Fixes: 2f3bef4b247e ("wcn36xx: Add hardware scan offload support") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09ath10k: bugfix: add USB case in ath10k_core_probe_fwErik Stromdahl
It was accidentally left out from the switch statement and target info was not queried. Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com> [kvalo@codeaurora.org: add commit log] Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09ath10k: remove unused prototypeErik Stromdahl
The function does not exist and thus, the prototype can be removed. Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09ath10k: fix spelling errorErik Stromdahl
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09wil6210: remove reference to preset_chandefLior David
The field preset_chandef of wireless_dev must not be accessed by the driver because it is private to cfg80211. Store the monitor channel locally in wil6210_priv instead. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09wil6210: remove leftover "FIXME"sDedy Lansky
"FIXME: IRQ mask debug" and "FIXME: interrupts enabled - for debug" can be removed because wil6210_debug_irq_mask() is now considered production feature. "FIXME FW can transmit only ucast frames to peer" and "FIXME real ring_id instead of hard coded 0" can be removed because FW/HW already support multicast transmission. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09wil6210: prevent parallel suspend and dump collectionMaya Erez
Suspend and crash dump operations can happen simultaneously in case there is a FW assert during the suspend procedure or when SSR calls all the devices crashdump callbacks. To prevent that, a new flag is added, indicating that the dumps collection is in progress, in order to allow the suspend/reset decline if the dumps collection already started. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09wil6210: set platform features based on FW capabilitiesMaya Erez
In some cases the platform should be aware of the FW capabilities to decide which feature to enable. For example, FW can control the external REF clock for power saving. Driver should notify the platform about that, to allow platform power management optimization. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09wil6210: add platform capabilities bitmapMaya Erez
Add get_capa callback to platform ops to allow reading the platform capabilities. Supported capabilities: - Keeping 11ad connection during suspend - T_POWER_ON 0 support - Usage of external clock Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09wil6210: support 40bit DMA addressesLazar Alexei
Add the option to support 40bit addresses since some platforms may not support 48bits but support 40bits Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-09wil6210: support Scheduled scanDedy Lansky
Add support for sched_scan_start/stop by sending PNO commands to FW. Driver reports max_sched_scan_reqs and invokes cfg80211_sched_scan_results upon receiving WMI_SCHED_SCAN_RESULT_EVENTID from FW. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-01-08rt2x00: Fix a typo in printkMasanari Iida
This patch fix a typo in rt2800lib.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>