summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek
Commit message (Collapse)AuthorAgeFilesLines
* wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple driversAndrew Zaborowski2017-03-063-0/+6
| | | | | | | | | | | | | | Set the NL80211_EXT_FEATURE_CQM_RSSI_LIST wiphy extended feature wholesale in all mac80211-based drivers that do not set the IEEE80211_VIF_BEACON_FILTER flags on their interfaces. mac80211 will be processing supplied RSSI values in ieee80211_rx_mgmt_beacon and will detect when the thresholds set by ieee80211_set_cqm_rssi_range_config are crossed. Remaining (few) drivers need code to enable the firmware to monitor the thresholds. This is mostly only compile-tested. Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* scripts/spelling.txt: add "aligment" pattern and fix typo instancesMasahiro Yamada2017-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | Fix typos and add the following to the scripts/spelling.txt: aligment||alignment I did not touch the "N_BYTE_ALIGMENT" macro in drivers/net/wireless/realtek/rtlwifi/wifi.h to avoid unpredictable impact. I fixed "_aligment_handler" in arch/openrisc/kernel/entry.S because it is surrounded by #if 0 ... #endif. It is surely safe and I confirmed "_alignment_handler" is correct. I also fixed the "controler" I found in the same hunk in arch/openrisc/kernel/head.S. Link: http://lkml.kernel.org/r/1481573103-11329-8-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtlwifi: btcoexist: Fix if == else warnings in halbtc8723b1ant.cLarry Finger2017-02-151-20/+4Star
| | | | | | | | | | | The 0-DAY kernel test infrastructure reports the following: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:1875:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:2253:3-5: WARNING: possible condition with no effect (if == else) Reported-by: kbuild-all@01.org Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: btcoexist: Fix if == else warnings in halbtc8821a1ant.cLarry Finger2017-02-151-15/+3Star
| | | | | | | | | | | The 0-DAY kernel test infrastructure reports the following: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c:1771:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c:2126:3-5: WARNING: possible condition with no effect (if == else) Reported-by: kbuild-all@01.org Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: btcoexist: Fix if == else warnings in halbtc8821a2ant.cLarry Finger2017-02-151-161/+24Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 0-DAY kernel test infrastructure reports the following: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3023:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3035:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3037:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3047:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3075:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3085:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3129:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3141:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3143:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3153:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3179:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3181:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3192:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2677:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2833:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2847:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2857:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2885:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2895:3-5: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2940:1-3: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2788:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2391:2-4: WARNING: possible condition with no effect (if == else) drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2417:2-4: WARNING: possible condition with no effect (if == else) Reported-by: kbuild-all@01.org Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: btcoexist: fix semicolon.cocci warningsJulia Lawall2017-02-151-1/+1
| | | | | | | | | | | | Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* Merge tag 'wireless-drivers-next-for-davem-2017-02-09' of ↵David S. Miller2017-02-1050-2664/+3132
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.11 Mostly smaller changeds and fixes all over, nothing really major standing out. Major changes: iwlwifi * work on support for new A000 devices continues * fix 802.11w, which was failing to due an IGTK bug ath10k * add debugfs file peer_debug_trigger for debugging firmware ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtlwifi: Move items out of rtl_pci_priv and rtl_usb_privLarry Finger2017-02-0821-286/+261Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 6773386f977c ("rtlwifi: rtl8192c-common: Fix "BUG: KASAN:"), a BUG detected when CONFIG_KASAN=y was fixed by reordering the layouts of struct rtl_pci_priv, and struct rtl_usb_priv so that the variables used by both PCI and USB drivers have the same offsets in both structs. The better fix of relocating the critical variables into struct rtl_priv was deferred as these changes do not have to be applied to stable kernels. This change also removes CamelCase variables with pLed0 => pled0. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: rtl8192c-common: Fix "BUG: KASAN:Larry Finger2017-02-072-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernels built with CONFIG_KASAN=y report the following BUG for rtl8192cu and rtl8192c-common: ================================================================== BUG: KASAN: slab-out-of-bounds in rtl92c_dm_bt_coexist+0x858/0x1e40 [rtl8192c_common] at addr ffff8801c90edb08 Read of size 1 by task kworker/0:1/38 page:ffffea0007243800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x8000000000004000(head) page dumped because: kasan: bad access detected CPU: 0 PID: 38 Comm: kworker/0:1 Not tainted 4.9.7-gentoo #3 Hardware name: Gigabyte Technology Co., Ltd. To be filled by O.E.M./Z77-DS3H, BIOS F11a 11/13/2013 Workqueue: rtl92c_usb rtl_watchdog_wq_callback [rtlwifi] 0000000000000000 ffffffff829eea33 ffff8801d7f0fa30 ffff8801c90edb08 ffffffff824c0f09 ffff8801d4abee80 0000000000000004 0000000000000297 ffffffffc070b57c ffff8801c7aa7c48 ffff880100000004 ffffffff000003e8 Call Trace: [<ffffffff829eea33>] ? dump_stack+0x5c/0x79 [<ffffffff824c0f09>] ? kasan_report_error+0x4b9/0x4e0 [<ffffffffc070b57c>] ? _usb_read_sync+0x15c/0x280 [rtl_usb] [<ffffffff824c0f75>] ? __asan_report_load1_noabort+0x45/0x50 [<ffffffffc06d7a88>] ? rtl92c_dm_bt_coexist+0x858/0x1e40 [rtl8192c_common] [<ffffffffc06d7a88>] ? rtl92c_dm_bt_coexist+0x858/0x1e40 [rtl8192c_common] [<ffffffffc06d0cbe>] ? rtl92c_dm_rf_saving+0x96e/0x1330 [rtl8192c_common] ... The problem is due to rtl8192ce and rtl8192cu sharing routines, and having different layouts of struct rtl_pci_priv, which is used by rtl8192ce, and struct rtl_usb_priv, which is used by rtl8192cu. The problem was resolved by placing the struct bt_coexist_info at the head of each of those private areas. Reported-and-tested-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> # 4.0+ Cc: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoexist: Convert halbtcoutsrc.c to use standard debuggingLarry Finger2017-02-073-16/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtcoutsrc.c to use the standard routines. It also deletes the definitions of the now-unused debugging macros, and turns on compilation of all the routines in btcoexist. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoexist: Convert halbtc8821a2ant.c to use standard debuggingLarry Finger2017-02-071-504/+571
| | | | | | | | | | | | | | | | | | | | The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtc8821a2ant.c to use the standard routines. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoexist: Convert halbtc8821a1ant.c to use standard debuggingLarry Finger2017-02-071-418/+480
| | | | | | | | | | | | | | | | | | | | The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtc8821a1ant.c to use the standard routines. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoexist: Convert halbtc8723b2ant.c to use standard debuggingLarry Finger2017-02-071-466/+527
| | | | | | | | | | | | | | | | | | | | The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtc8723b2ant.c to use the standard routines. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoexist: Convert halbtc8723b1ant.c to use standard debuggingLarry Finger2017-02-071-384/+443
| | | | | | | | | | | | | | | | | | | | The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtc8723b1ant.c to use the standard routines. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoexist: Convert halbtc8192e2ant.c to use standard debuggingLarry Finger2017-02-071-111/+126
| | | | | | | | | | | | | | | | | | | | The routines in btcoexist use different debugging routines than are used in the other drivers. This patch converts halbtc8192e2ant.c to use the standard routines. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: rtl8821ae: Fix typo in symbol for bandwidth numbersLarry Finger2017-02-072-9/+9
| | | | | | | | | | | | | | | | | | In several places, "BANDWITH" is used when "BANDWIDTH" should have been used. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: Add work queue for c2h cmd.Ping-Ke Shih2017-02-0712-13/+160
| | | | | | | | | | | | | | | | btcoex needs to sleep, thus it must run in thread context. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: rtl8723be: fix ant_sel codePing-Ke Shih2017-02-071-1/+5
| | | | | | | | | | | | | | | | | | When ant_sel is set, we need to fill single_ant_path to select correct antenna path. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoex: move bt_type declarationPing-Ke Shih2017-02-072-5/+5
| | | | | | | | | | | | | | | | | | Routine rtl_get_hwpg_bt_type() is better in halbtcoutsrc.c than in rtl_btc.c. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: rtl8723be: btcoex: add package_type function to btcoexPing-Ke Shih2017-02-076-3/+54
| | | | | | | | | | | | | | | | The new code handles the package-type of the chip. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: move btcoex's ant_num declarationPing-Ke Shih2017-02-074-12/+15
| | | | | | | | | | | | | | | | | | File halbtcoutsrc.c is a better place for routine rtl_get_hwpg_ant_num() than file rtl_btc.c. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: rtl8723be: btcoexist: Add single_ant_pathPing-Ke Shih2017-02-074-0/+8
| | | | | | | | | | | | | | | | | | | | | | Some devices with RTL8732BE wifi/Bluetooth adapters are shipped with only a single antenna. On a subset of these, the EEPROM is incorectly coded to indicate the wrong connection. The resulting problems have been fixed for wifi. This change handles them for BT. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoexist: Change logging in halbtc8192e2ant.cLarry Finger2017-02-072-429/+417Star
| | | | | | | | | | | | | | | | | | | | | | | | | | This routine uses its own debugging macros These are changed to use the the recently rewritten RT_TRACE macro. There are also some renamed variables that were missed in the previous step. The only functional change is that some debugging statements have been dropped based on the final code supplied by Realtek. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: btcoexist: Add vendor definition for new btcoexistPing-Ke Shih2017-02-072-0/+10
| | | | | | | | | | | | | | | | Routine halbtc_get() will need to be able to get the vendor ID. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: Add a new enumeration value to btc_set_typePing-Ke Shih2017-02-071-0/+1
| | | | | | | | | | | | | | | | The new value is needed for future capability. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: Set retry limit depends on vif type.Ping-Ke Shih2017-02-073-3/+28
| | | | | | | | | | | | | | | | | | | | We assign different retry limit according to vif type, because it can boost performance in field. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: shaofu <shaofu@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: Fix programing CAM content sequence.Ping-Ke Shih2017-02-071-3/+3
| | | | | | | | | | | | | | | | | | | | There is a potential race condition when the control byte of a CAM entry is written first. Write in reverse order to correct the condition. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: shaofu <shaofu@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2017-02-071-2/+7
|\ \ | |/ |/| | | | | | | | | | | The conflict was an interaction between a bug fix in the netvsc driver in 'net' and an optimization of the RX path in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtlwifi: rtl8192ce: Fix loading of incorrect firmwareJurij Smakov2017-01-311-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit cf4747d7535a ("rtlwifi: Fix regression caused by commit d86e64768859, an error in the edit results in the wrong firmware being loaded for some models of the RTL8188/8192CE. In this condition, the connection suffered from high ping latency, slow transfer rates, and required higher signal strengths to work at all See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853073, https://bugzilla.opensuse.org/show_bug.cgi?id=1017471, and https://github.com/lwfinger/rtlwifi_new/issues/203 for descriptions of the problems. This patch fixes all of those problems. Fixes: cf4747d7535a ("rtlwifi: Fix regression caused by commit d86e64768859") Signed-off-by: Jurij Smakov <jurij@wooyd.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> # 4.9+ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | Merge tag 'wireless-drivers-next-for-davem-2017-02-01' of ↵David S. Miller2017-02-0134-737/+365Star
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.11 It's nice to see rt2x00 development has becoming active, for example adding support for a new chip version. Also wcn36xx has been converted to use the recently merged QCOM_SMD subsystem. Otherwise new features and fixes it lots of drivers. Major changes: iwlwifi * some more work in preparation for A000 family support * add support for radiotap timestamps * some work on our firmware debugging capabilities wcn36xx * convert to a proper QCOM_SMD driver (from the platform_driver interface) ath10k * VHT160 support * dump Copy Engine registers during firmware crash * search board file extension from SMBIOS wil6210 * add disable_ap_sme module parameter rt2x00 * support RT3352 with external PA * support for RT3352 with 20MHz crystal * add support for RT5350 WiSoC brcmfmac * add support for BCM43455 sdio device rtl8xxxu * add support for D-Link DWA-131 rev E1, TP-Link TL-WN822N v4 and others ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | rtlwifi: rtl_usb: Fix for URB leaking when doing ifconfig up/downMichael Schenk2017-01-281-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the function rtl_usb_start we pre-allocate a certain number of urbs for RX path but they will not be freed when calling rtl_usb_stop. This results in leaking urbs when doing ifconfig up and down. Eventually, the system has no available urbs. Signed-off-by: Michael Schenk <michael.schenk@albis-elcon.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtlwifi: rtl8192cu: Convert driver to use common macrosLarry Finger2017-01-202-163/+132Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These drivers use a set of complicated macros to extract and insert information for the RX and TX descriptors. Driver rtl8192cu had a different set than was used for the PCI-based drivers. To simplify the code, rtl8192cu is switched to use the common version. In the process, two errors in those common macros were found and fixed. Besides simplifying the code, there is an additional benefit. We have no BE hardware to test the PCI driver, but using the common macros provides an additional test for the validity of many endian-sensitive operations. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtlwifi: rtl8192cu: Calculate descriptor checksum correctly for BELarry Finger2017-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver requires a checksum for the descriptors so that the wifi chip is assured that the USB transmission was correct. These entries are little-endian, but the driver was always using cpu order in the calculation. As a result, the driver failed on BE hardware. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtlwifi: Download firmware as bytes rather than as dwordsLarry Finger2017-01-209-381/+85Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The firmware is read from disk as a little-endian byte string. The code that loads the firmware into the device transfers it as 4-byte quantities. The routines that write multi-byte quantities on BE hardware assume that the data are in CPU order, and automatically do the conversion to the LE order required by the device. As a result, the firmware is transmitted incorrectly. Rather than do multiple byte swaps on the data, the download routine is revised to transmit bytes rather than dwords. Although the number of I/O operations is increased, the firmware is not often loaded. All drivers have the same bug, and use essentially the same code to download firmware. These routines have been moved into rtlwifi. Some CamelCase variables have been renamed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtlwifi: Remove debugging entry in sysfsLarry Finger2017-01-203-68/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the kernel provides access to module parameters through entries in /sys/module/<driver>/parameters/, there is no need for a private interface. Thus the existing code for setting the debug level is removed. Reported-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtlwifi: Convert COMP_XX entries into a proper debugging maskLarry Finger2017-01-2015-105/+70Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The debugging macros contain a parameter COMP_XX that could be used as a mask; however, the code turns all these various bits on at the same time. This change implements them as a proper mask, and adds module parameters to set the mask at load time. The current name "debug" for the debug level has been changed to "debug_level" to better differentiate it from "debug_mask". The debug routines have also been changed to interrogate the structure that is loaded at entry time. As a result, the structure rtl_debug is no longer needed, and all references to it are deleted. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtlwifi: Redo debugging macros RTPRINT and RT_PRINT_DATALarry Finger2017-01-202-24/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These two debugging formss implement debugging using rather complicated macro constructions. These are replaced with compiled code that is easier to understand. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtl8xxxu: Update author/maintainer contact infoJes Sorensen2017-01-207-8/+8
| | | | | | | | | | | | | | | | | | | | | Update copyright year and email address. Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtl8xxxu: Add additional USB IDs for rtl8192eu devicesAxel Köllhofer2017-01-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | These IDs originate from the vendor driver Signed-off-by: Axel Köllhofer <AxelKoellhofer@web.de> Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtl8xxxu: Add USB ID for D-Link DWA-131 rev E1 (rtl8192eu)Axel Köllhofer2017-01-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was tested by David Patiño. Reported-by: David Patiño <davidpatino82@gmail.com> Signed-off-by: Axel Köllhofer <AxelKoellhofer@web.de> Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtl8xxxu: Add another 8192eu device to the USB listJes Sorensen2017-01-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WN822N v4 (2357:0108) Reported-by: Gregory Auzanneau <linux@reolight.net> Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtl8xxxu: Mark 8192eu device 0x0bda:0x818b as testedJes Sorensen2017-01-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Device reported as working fine, so tell the driver not to warn about it being untested. Reported-by: Aex Aey <aexaey@gmail.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | rtlwifi: rtl8192de: Remove a pointless gotoLarry Finger2017-01-171-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit c93ac39da0064 ("rtlwifi: Remove some redundant code), a goto statement was inadvertently left in the code. Fixes: c93ac39da0064 ("rtlwifi: Remove some redundant code) Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2017-01-111-0/+1
|\ \ \ | |/ / |/| / | |/ | | | | | | Two AF_* families adding entries to the lockdep tables at the same time. Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtlwifi: rtl_usb: Fix missing entry in USB driver's private dataLarry Finger2016-12-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | These drivers need to be able to reference "struct ieee80211_hw" from the driver's private data, and vice versa. The USB driver failed to store the address of ieee80211_hw in the private data. Although this bug has been present for a long time, it was not exposed until commit ba9f93f82aba ("rtlwifi: Fix enter/exit power_save"). Fixes: ba9f93f82aba ("rtlwifi: Fix enter/exit power_save") Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | Merge tag 'wireless-drivers-next-for-davem-2017-01-02' of ↵David S. Miller2017-01-0274-813/+541Star
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.11 The most notable change here is the inclusion of airtime fairness scheduling to ath9k. It prevents slow clients from hogging all the airtime and unfairly slowing down faster clients. Otherwise smaller changes and cleanup. Major changes: ath9k * cleanup eeprom endian handling * add airtime fairness scheduling ath10k * fix issues for new QCA9377 firmware version * support dev_coredump() for firmware crash dump * enable channel 169 on 5 GHz band ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtlwifi: fix spelling mistake: "encrypiton" -> "encryption"Colin Ian King2017-01-011-1/+1
| | | | | | | | | | | | | | trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: fix spelling mistake: "contry" -> "country"Colin Ian King2016-12-301-1/+1
| | | | | | | | | | | | | | | | trivial fix to spelling mistake in RT_TRACE message 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>
| * rtlwifi: Fix alignment issuesPing-Ke Shih2016-12-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The addresses of Wlan NIC registers are natural alignment, but some drivers have bugs. These are evident on platforms that need natural alignment to access registers. This change contains the following: 1. Function _rtl8821ae_dbi_read() is used to read one byte from DBI, thus it should use rtl_read_byte(). 2. Register 0x4C7 of 8192ee is single byte. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * rtlwifi: Remove some redundant codeLarry Finger2016-12-307-57/+11Star
| | | | | | | | | | | | | | | | | | | | | | | | | | The symbol DBG_EMERG is no longer used and is removed. In a number of places, the code has redundant messages. For example, if the failure for the firmware to run is logged, it is not necessary to log that the firmware has been started. In addition, extraneous braces are removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>