aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-11-08Merge tag 'mac80211-next-for-net-next-2019-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-nextDavid S. Miller1-7/+7
Johannes Berg says: ==================== Some relatively small changes: * typo fixes in docs * APIs for station separation using VLAN tags rather than separate wifi netdevs * some preparations for upcoming features (802.3 offload and airtime queue limits (AQL) * stack reduction in ieee80211_assoc_success() * use DEFINE_DEBUGFS_ATTRIBUTE in hwsim ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2019-11-08mac80211_hwsim: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fopszhong jiang1-7/+7
It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file operation rather than DEFINE_SIMPLE_ATTRIBUTE. It is detected with the help of coccinelle. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Link: https://lore.kernel.org/r/1572404462-45462-1-git-send-email-zhongjiang@huawei.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-11-05Merge tag 'wireless-drivers-next-2019-11-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-nextDavid S. Miller160-2515/+8520
Kalle Valo says: ==================== wireless-drivers-next patches for 5.5 First set of patches for 5.5. The most active driver here clearly is rtw88, lots of patches for it. More quiet on other drivers, smaller fixes and cleanups all over. This pull request also has a trivial conflict, the report and example resolution here: https://lkml.kernel.org/r/20191031111242.50ab1eca@canb.auug.org.au Major changes: rtw88 * add deep power save support * add mac80211 software tx queue (wake_tx_queue) support * enable hardware rate control * add TX-AMSDU support * add NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 support * add power tracking support * add 802.11ac beamformee support * add set_bitrate_mask support * add phy_info debugfs to show Tx/Rx physical status * add RFE type 3 support for 8822b ath10k * add support for hardware rfkill on devices where firmware supports it rtl8xxxu * add bluetooth co-existence support for single antenna iwlwifi * Revamp the debugging infrastructure ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2019-11-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netDavid S. Miller18-166/+357
The only slightly tricky merge conflict was the netdevsim because the mutex locking fix overlapped a lot of driver reload reorganization. The rest were (relatively) trivial in nature. Signed-off-by: David S. Miller <davem@davemloft.net>
2019-11-01Merge tag 'wireless-drivers-2019-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-driversDavid S. Miller16-139/+305
Kalle Valo says: ==================== wireless-drivers fixes for 5.4 Third set of fixes for 5.4. Most of them are for iwlwifi but important fixes also for rtlwifi and mt76, the overflow fix for rtlwifi being most important. iwlwifi * fix merge damage on earlier patch * various fixes to device id handling * fix scan config command handling which caused firmware asserts rtlwifi * fix overflow on P2P IE handling * don't deliver too small frames to mac80211 mt76 * disable PCIE_ASPM * fix buffer DMA unmap on certain cases ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2019-10-31mt7601u: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fopszhong jiang1-1/+1
It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file operation rather than DEFINE_SIMPLE_ATTRIBUTE. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Acked-by: Jakub Kicinski <kubakici@wp.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31rtlwifi: rtl8821ae: Drop condition with no effectSaurav Girepunje1-2/+0
As the "else if" and "else" branch body are identical the condition has no effect. So drop the "else if" condition. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31b43: dma: Fix use true/false for bool type variableSaurav Girepunje1-2/+2
use true/false for bool type variables assignment. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31b43: main: Fix use true/false for bool typeSaurav Girepunje1-3/+3
use true/false on bool type variable assignment. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31rtlwifi: rtl8192c: Drop condition with no effectSaurav Girepunje1-2/+0
As the "else if" and "else" branch body are identical the condition has no effect. So drop the "else if" condition. Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31rtw88: remove redundant null pointer check on arraysColin Ian King1-1/+1
The checks to see if swing_table->n or swing_table->p are null are redundant since n and p are arrays and can never be null if swing_table is non-null. I believe these are redundant checks and can be safely removed, especially the checks implies that these are not arrays which can lead to confusion. Addresses-Coverity: ("Array compared against 0") Fixes: c97ee3e0bea2 ("rtw88: add power tracking support") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31rtw88: avoid FW info floodYan-Hsuan Chuang2-17/+10
The FW info was printed everytime driver is powered on, such as leaving IDLE state. It will flood the kernel log. Move the FW info printing to callback when FW is loaded, so that will only be printed once when device is probed. Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31rtw88: fix potential read outside array boundaryTzu-En Huang3-11/+19
The level of cckpd is from 0 to 4, and it is the index of array pd_lvl[] and cs_lvl[]. However, the length of both arrays are 4, which is smaller than the possible maximum input index. Enumerate cck level to make sure the max level will not be wrong if new level is added in future. Fixes: 479c4ee931a6 ("rtw88: add dynamic cck pd mechanism") Signed-off-by: Tzu-En Huang <tehuang@realtek.com> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31rtw88: rearrange if..else statements for rx rate indexesYan-Hsuan Chuang1-8/+6
Driver just memset() rx_status to 0 before assigning rate indexes. And driver could never hit the 'else' because the driver checks if 'pkt_stat->rate >= DESC_RATEMCS0', so the 'else' statement can be removed. Also rearrange the if..else statements because DESC_RATEMCS0 is actually larger than DESC_RATE1M ~ DESC_RATE54M, move the check of 'pkt_stat->rate >= DESC_RATEMCS0' to the last to keep an increasing order. Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31rtw88: use rtw_phy_pg_cfg_pair struct, not arraysYan-Hsuan Chuang4-202/+199
Use proper struct for BB PG tables. TODO: we need to find a way to store the tables that have condition values. Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31rtw88: 8822b: add RFE type 3 supportYan-Hsuan Chuang3-1/+647
Some of the modules use RFE type 3, add corresponding tables for them. Tested-by: G.schlmm <g.schlmm@googlemail.com> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31rtw88: fix sparse warnings for power trackingYan-Hsuan Chuang2-2/+2
sparse warnings: drivers/net/wireless/realtek/rtw88/rtw8822b.c:1440:6: sparse: sparse: symbol 'rtw8822b_pwr_track' was not declared. Should it be static? drivers/net/wireless/realtek/rtw88/rtw8822c.c:1008:6: sparse: sparse: symbol 'rtw8822c_pwrtrack_init' was not declared. Should it be static? Fixes: c97ee3e0bea2 ("rtw88: add power tracking support") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-31rtw88: fix sparse warnings for DPKYan-Hsuan Chuang1-2/+2
sparse warnings: drivers/net/wireless/realtek/rtw88/rtw8822c.c:2871:6: sparse: sparse: symbol 'rtw8822c_dpk_cal_coef1' was not declared. Should it be static? drivers/net/wireless/realtek/rtw88/rtw8822c.c:3112:6: sparse: sparse: symbol 'rtw8822c_dpk_track' was not declared. Should it be static? Fixes: 5227c2ee453d ("rtw88: 8822c: add SW DPK support") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-30iwlwifi: fw api: support new API for scan config cmdAyala Beker4-10/+61
The API was reduced to include only knowledge currently needed by the FW scan logic, the rest is legacy. Support the new, reduced version. Using the old API with newer firmwares (starting from iwlwifi-*-50.ucode, which implements and requires the new API version) causes an assertion failure similar to this one: [ 2.854505] iwlwifi 0000:00:14.3: 0x20000038 | BAD_COMMAND Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-30mt76: dma: fix buffer unmap with non-linear skbsLorenzo Bianconi2-4/+7
mt76 dma layer is supposed to unmap skb data buffers while keep txwi mapped on hw dma ring. At the moment mt76 wrongly unmap txwi or does not unmap data fragments in even positions for non-linear skbs. This issue may result in hw hangs with A-MSDU if the system relies on IOMMU or SWIOTLB. Fix this behaviour properly unmapping data fragments on non-linear skbs. Fixes: 17f1de56df05 ("mt76: add common code shared between multiple chipsets") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-30mt76: mt76x2e: disable pcie_aspm by defaultLorenzo Bianconi4-0/+51
On same device (e.g. U7612E-H1) PCIE_ASPM causes continuous mcu hangs and instability. Since mt76x2 series does not manage PCIE PS states, first we try to disable ASPM using pci_disable_link_state. If it fails, we will disable PCIE PS configuring PCI registers. This patch has been successfully tested on U7612E-H1 mini-pice card Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-28net: Fix various misspellings of "connect"Geert Uytterhoeven1-2/+2
Fix misspellings of "disconnect", "disconnecting", "connections", and "disconnected". Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Kalle Valo <kvalo@codeaurora.org> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-10-28net: Fix misspellings of "configure" and "configuration"Geert Uytterhoeven3-3/+3
Fix various misspellings of "configuration" and "configure". Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-10-25Merge tag 'iwlwifi-next-for-kalle-2019-10-18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-nextKalle Valo38-897/+2553
Patches intended for v5.5 * Revamp the debugging infrastructure; * Some udpdates to FW API commands; * Fix max amsdu value calculation; * Small updates in the debugging infra; * Some new helper functions; * A few clean-ups; * Other small fixes and improvements;
2019-10-25rtw88: fix GENMASK_ULL for u64Yan-Hsuan Chuang1-1/+1
This fixes compile warning: In file included from include/linux/bitops.h:5:0, from include/linux/kernel.h:12, from include/asm-generic/bug.h:19, from arch/mips/include/asm/bug.h:42, from include/linux/bug.h:5, from include/net/mac80211.h:16, from drivers/net/wireless/realtek/rtw88/main.h:8, from drivers/net/wireless/realtek/rtw88/main.c:5: drivers/net/wireless/realtek/rtw88/main.c: In function 'rtw_update_rate_mask': include/linux/bits.h:23:11: warning: right shift count is negative [-Wshift-count-negative] (~UL(0) >> (BITS_PER_LONG - 1 - (h)))) ^ drivers/net/wireless/realtek/rtw88/main.c:622:17: note: in expansion of macro 'GENMASK' u64 cfg_mask = GENMASK(63, 0); ^~~~~~~ Reported-by: kbuild test robot <lkp@intel.com> Fixes: f39e9bd49a3d ("rtw88: add set_bitrate_mask support") Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com> Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-25iwlwifi: rx: use new api to get band from rx mpduTova Mussai4-2/+34
The FW introduce new API to get the band from the rx mpdu, use this new API. Signed-off-by: Tova Mussai <tova.mussai@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: nvm: create function to convert channel index to nl80211_bandTova Mussai1-9/+17
Create function to convert channel index to nl80211_band and use it. Signed-off-by: Tova Mussai <tova.mussai@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: mvm: Invert the condition for OFDM rateTova Mussai3-7/+9
OFDM rate used for all bands except to band 2.4 which use CCK rate. Inverting the condition help that in future we won't need to expand the condition for more bands. Signed-off-by: Tova Mussai <tova.mussai@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: mvm: create function to convert nl80211 band to phy bandTova Mussai3-20/+25
Create the function and use it. Signed-off-by: Tova Mussai <tova.mussai@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: use vzalloc to allocate dumping memory regionsShahar S Matityahu1-6/+6
During dump flow, the driver allocates spaces to store the memory regions that will be included in the dump. These regions can be very large so in order to avoid allocation failure, use vzalloc instead. The kmalloc uses GFP_KERNEL and the driver does not make any use of the fact that the memory is contiguous so the same functionality is maintained. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: add user trigger supportShahar S Matityahu1-0/+3
Allow to fire user trigger in ini mode Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: mvm: add notification for missed VAPLior Cohen3-0/+44
A missed VAP notification will be sent from umac when the station is out of sync with its associated non-transmitted BSSID. The notification will be sent only if the transmitted BSSID is an EMA-AP one. The driver will consider this notification as connection loss. Signed-off-by: Lior Cohen <lior2.cohen@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: mvm: fix old-style declarationYueHaibing1-2/+2
There expect the 'static' keyword to come first in a declaration, and we get warnings like this with "make W=1": drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:427:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:434:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: mvm: use the new session protection commandEmmanuel Grumbach7-11/+331
The firmware has now a new session protection command. This new API allows the firmware to manage the protection needed for association. It'll also remove the event when the association is complete. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: mvm: remove leftover rs_remove_sta_debugfs() prototypeJohannes Berg1-4/+0
This prototype is no longer used, remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: mvm: add support for new version for D0I3_END_CMDHaim Dreyfuss4-1/+67
During D3 state there are some flows which requires FW reset. Add new API to support it. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: mvm: consider ieee80211 station max amsdu valueMordechay Goodstein2-2/+13
debugfs amsdu_len sets only the max_amsdu_len for ieee80211 station so take it into consideration while getting max amsdu Fixes: af2984e9e625 ("iwlwifi: mvm: add a debugfs entry to set a fixed size AMSDU for all TX packets") Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: support FW notification dumping in case of missed beaconShahar S Matityahu2-1/+3
Pass the FW notification packet to the dump collection flow to allow the driver to include it in the dump file if requested. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: remove old API and some related codeShahar S Matityahu3-250/+2
Remove unused code of the old debug ini API. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: rename external debug configuration fileShahar S Matityahu1-1/+1
Rename the external configuration file to align to the debug SAS. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: support FW response/notification region typeShahar S Matityahu3-2/+86
Allow the driver to collect FW response/notification region type during dump and allow triggering dump collection for a given FW response/notification. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: support domain changing via debugfsShahar S Matityahu2-0/+40
Allow to change or read the debug domain bitmap at runtime via fw_dbg_domain debugfs. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: add periodic trigger new API supportShahar S Matityahu2-1/+106
Enable periodic trigger. Allows the driver to trigger dump collection in constant intervals. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: implement monitor allocation flowShahar S Matityahu1-1/+248
Allow allocating fragmented buffers for several allocation IDs. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: implement time point handlingShahar S Matityahu7-14/+323
Calculate active triggers list and implement time points handling. Also allow to override the debug domain via iwl-dbg-cfg.ini by setting FW_DBG_DOMAIN field. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: add TLV allocation new API supportShahar S Matityahu6-37/+256
Add new debug TLVs API preprocessing. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: use new API in dump infoShahar S Matityahu6-46/+68
Make dump info region use new API. debug_info_tlv_list list will be initialize in a future patch once the driver will start using it. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: add error tables dumping supportShahar S Matityahu2-2/+70
Allow to collect error table data. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg_ini: add monitor dumping supportShahar S Matityahu10-54/+440
Allow collecting monitor data in ini debug mode. Implement both SMEM and DRAM monitor regions dumping. For DRAM monitor, support DBGC1, DBGC2 and DBGC3 and support several DRAM fragments per DBGC. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-25iwlwifi: dbg: remove multi buffers infraShahar S Matityahu3-75/+56
Legacy DRAM monitor does not support multi buffers. Remove this infra. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>