summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek
Commit message (Collapse)AuthorAgeFilesLines
* rtlwifi: Add explicit values to hw_variables enumLarry Finger2016-09-271-104/+104
| | | | | | | | The entries in this enum may be referenced in debug output. Adding explicit values simplifies the lookup. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: Add HAL_DEF_WOWLAN case to *_get_hw() routinesLarry Finger2016-09-277-0/+14
| | | | | | | | | | | Only rtl8821ae implements WOWLAN; however, the other drivers may receive a call requesting information about this mode. The other drivers need to ignore the request rather than logging that the default branch of the switch statement has been reached. Reported by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: Add switch variable to 'switch case not processed' messagesJoe Perches2016-09-2738-123/+128
| | | | | | | | | Help along debugging by showing what switch/case variable is not being processed in these messages. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Stop log spam from each successful interruptLarry Finger2016-09-262-1/+3
| | | | | | | | | | | | | | As soon as debugging is turned on, the logs are filled with messages reporting the interrupt status. As this quantity is usually zero, this output is not needed. In fact, there will be a report if the status is not zero, thus the debug line in question could probably be deleted. Rather than taking that action, I have changed it to only be printed when the newly added RTL8XXXU_DEBUG_INTERRUPT bit is set in the debug mask. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Use a struct rtl8xxxu_fileops * in rtl8xxxu_init_device()Jes Sorensen2016-09-261-18/+19
| | | | | | | This saves some 217, or about, derefences of priv->fops. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Clean up llt_init() APIJes Sorensen2016-09-262-6/+9
| | | | | | | | | | Remove last_tx_page argument from the llt_init() function. The rtl8xxxu_fileops structure contains the correct TX_TOTAL_PAGE_NUM value for the device, and rtl8xxxu_auto_llt_table() doesn't need to know the value in the first place. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Fix off by one error calculating pubqJes Sorensen2016-09-261-1/+1
| | | | | | | | This was detected tracing the 8188eu driver, but doesn't seem to make any difference when using it. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Implement 8192e specific power down sequenceJes Sorensen2016-09-172-1/+144
| | | | | | | | This powers down the 8192e correctly, or at least to the point where the firmware will load again, when reloading the driver module. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: rtl818x: constify local structuresJulia Lawall2016-09-148-8/+8
| | | | | | | | | | | | | | | | | | For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches <joe@perches.com>. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: fix spelling mistake "firmare" -> "firmware"Colin Ian King2016-09-141-2/+2
| | | | | | | | Trivial fix to spelling mistakes in dev_dbg message. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Reset device on module unload if still attachedJes Sorensen2016-09-141-0/+5
| | | | | | | | If the USB dongle is still attached, reset it on module unload to avoid scans failing when reloading the driver. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi/rtl8192de: Fix print format stringOleg Drokin2016-09-031-3/+3
| | | | | | | | | | | %ul was likely meant as %lu to print an unsigned long, not an unsigned with a letter l at the end. But in fact the value printed is u32 anyway, so just drop the l completely. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: Fix missing country code for Great BritainLarry Finger2016-09-031-1/+3
| | | | | | | | | | | | | Some RTL8821AE devices sold in Great Britain have the country code of 0x25 encoded in their EEPROM. This value is not tested in the routine that establishes the regulatory info for the chip. The fix is to set this code to have the same capabilities as the EU countries. In addition, the channels allowed for COUNTRY_CODE_ETSI were more properly suited for China and Israel, not the EU. This problem has also been fixed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Make rtl8xxxu_ampdu_action less chattyHans de Goede2016-09-031-5/+5
| | | | | | | | | | | On my home network rtl8xxxu is spamming the log with IEEE80211_AMPDU_RX_START / IEEE80211_AMPDU_RX_STOP every few seconds turn these messages into debug messages. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> [kvalo@codeaurora.org: fix commit title] Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: gen1: Fix non static symbol warningWei Yongjun2016-09-031-1/+1
| | | | | | | | | | | Fixes the following sparse warning: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:898:1: warning: symbol 'rtl8xxxu_gen1_h2c_cmd' was not declared. Should it be static? Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Split filling of TX descriptors into separate functionsJes Sorensen2016-09-036-89/+125
| | | | | | | | | | | | | Split the filling of TX descriptors into a generic portion used on all devices, and format specific helper functions provided in the fops structure. This also cleaned up some mess, even if non harmful, in the handling of txdesc40 descriptors, where the code randomly would switch between the pointer to tx_desc and tx_desc40. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Determine need for shore preamble before updating TX descriptorsJes Sorensen2016-09-031-5/+7
| | | | | | | | Another patch to move this detection out of the code handling the TX descriptor update. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Determine the need for SGI before handling specific TX desc formatsJes Sorensen2016-09-031-6/+8
| | | | | | | | In order to be able to split out the TX descriptor handling code, determine in advance the need to mark SGI. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Simplify calculating of hw value used for setting TX rateJes Sorensen2016-09-031-3/+4
| | | | | | | | | Calculating the value in one place rather than using one calculation in one place and a different one for management frames in another location makes little sense. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Introduce fops bitflag indicating type of thermal meterJes Sorensen2016-09-034-1/+4
| | | | | | | | Do not rely on TX descriptor size to determine the thermal meter type. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Convert flags in rtl8xxxu_fileops to bitflagsJes Sorensen2016-09-031-2/+2
| | | | | | | This leaves space for a few more flags within the same space. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Use flag to indicate whether device has TX report timer supportJes Sorensen2016-09-033-3/+4
| | | | | | | | | Use a fileops flag to indicate whether the device has TX report timer support. This will make it easier to include future devices such as 8188eu to use the TX report timer. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Add interrupt bit definitions for gen2 partsJes Sorensen2016-09-031-0/+56
| | | | | | | | These are primarily needed for SDIO/PCI parts, but the vendor driver still sets them for some USB devices. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Add bit definitions for REG_FPGA0_TX_INFOJes Sorensen2016-09-031-0/+4
| | | | | | | This adds TX antenna selection bit defines for OFDM mode. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Simplify code setting TX buffer boundaryJes Sorensen2016-09-031-7/+1Star
| | | | | | | | With all devices now offering fops->total_page_num, get rid of the if mess for setting the TX buffer boundary. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Remove now obsolete rtl8xxxu_old_init_queue_reserved_page()Jes Sorensen2016-09-031-28/+2Star
| | | | | | | | Switching over the old devices to use the new function allows us to get rid of this legacy. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Switch 8192cu/8188cu devices to use ↵Jes Sorensen2016-09-031-0/+4
| | | | | | | | | | rtl8xxxu_init_queue_reserved_page() This was the last user of the old rtl8xxxu_old_init_queue_reserved_page() which can now be removed. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Switch 8723a to use new rtl8xxxu_init_queue_reserved_page() routineJes Sorensen2016-09-031-0/+4
| | | | | | | | | This changes the pub-queue value written to REQ_RQPN, however the old code used a hard coded minimum value assuming there would always be an active lo-queue, even when no USB EP was found for it. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Add TX page defines for 8723bJes Sorensen2016-09-032-0/+10
| | | | | | | | This switches the 8723b driver to use the new rtl8xxxu_init_queue_reserved_page() function. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Add TP-Link TL-WN823N v2 to list of supported devicesJes Sorensen2016-09-031-0/+7
| | | | | | | | | This is an rtl8192eu based dongle (the v1 is an rtl8192cu). Reported and tested by Myckel Habets. Reported-by: Myckel Habets <myckel@sdf.lonestar.org> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Fix error handling if rtl8xxxu_init_device() failsJes Sorensen2016-09-031-3/+17
| | | | | | | | | | For some reason we lost the code bailing if rtl8xxxu_init_device() returned an error. This catches the error and also cleans up the error handling. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Mark 0x2001:0x3308 as testedJes Sorensen2016-09-031-2/+7
| | | | | | | | D-Link DWA-121 is reported as working. Reported-by: Stefano Bravi <stefanobravi69@libero.it> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Mark 0x20f4:0x648b as testedJes Sorensen2016-09-031-2/+7
| | | | | | | | Successfully tested by Jocelyn Mayer Reported-by: J. Mayer <l_indien@magic.fr> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info()Christian Engelmayer2016-09-031-1/+1
| | | | | | | | | | In case of (rtlhal->oem_id != RT_CID_DEFAULT), the function directly returns and leaks the already allocated hwinfo memory. Go through the correct exit path. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: rtl8192de: Fix leak in _rtl92de_read_adapter_info()Christian Engelmayer2016-09-031-1/+2
| | | | | | | | | In case rtl_get_hwinfo() fails, the function directly returns and leaks the already allocated hwinfo memory. Go through the correct exit path. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtlwifi: remove superfluous conditionHeinrich Schuchardt2016-09-031-1/+1
| | | | | | | | | If sta == NULL, the changed line will not be reached. So no need to check that sta != NULL here. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* net: wireless: realtek: rtlwifi: usb: don't print error when allocating urb ↵Wolfram Sang2016-08-131-7/+1Star
| | | | | | | | | | fails kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtlwifi: don't add include path for rtl8188eeArnd Bergmann2016-07-191-1/+1
| | | | | | | | | | For rtl8188ee, we pass -Idrivers/net/wireless/rtlwifi/ to gcc, however that directy no longer exists, so evidently this option is no longer required here and can be removed to avoid a warning when building with 'make W=1' or 'gcc -Wmissing-include-dirs' Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo2016-07-101-1/+1
|\ | | | | | | | | | | | | | | This is to fix some conflicts in iwlwifi. Conflicts: drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c drivers/net/wireless/intel/iwlwifi/mvm/scan.c
| * rtl8xxxu: fix typo on variable name, compare against correct variableColin Ian King2016-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | path_b_ok is being assigned but immediately after path_a_ok is being compared to the value 0x03. This appears to be a typo on the variable name, compare path_b_ok instead. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | rtlwifi: rtl8723ae: Clean up the hardware info routineLarry Finger2016-07-081-114/+117
| | | | | | | | | | | | | | | | This driver contains some complicated if ... else if ... else constructions. These are replaced by switch statements to improve readability. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | rtlwifi: rtl8192de: Convert driver to use common hardware info routineLarry Finger2016-07-081-62/+15Star
| | | | | | | | | | | | | | | | | | | | The driver for RTL8192DE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | rtlwifi: rtl8821ae: Convert driver to use common hardware info routineLarry Finger2016-07-081-73/+11Star
| | | | | | | | | | | | | | | | | | | | The driver for RTL8821AE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | rtlwifi: rtl8723be: Convert driver to use common hardware info routineLarry Finger2016-07-081-62/+12Star
| | | | | | | | | | | | | | | | | | | | The driver for RTL8723BE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | rtlwifi: rtl8723ae: Convert driver to use common hardware info routineLarry Finger2016-07-081-65/+11Star
| | | | | | | | | | | | | | | | | | | | The driver for RTL8723AE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | rtlwifi: rtl8192ee: Convert driver to use common hardware info routineLarry Finger2016-07-081-61/+12Star
| | | | | | | | | | | | | | | | | | | | The driver for RTL8192EE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | rtlwifi: rtl8188ee: Convert driver to use common hardware info routineLarry Finger2016-07-081-63/+13Star
| | | | | | | | | | | | | | | | | | | | The driver for RTL8188EE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | rtlwifi: rtl8192cu: Convert driver to use common hardware info routineLarry Finger2016-07-081-46/+15Star
| | | | | | | | | | | | | | | | | | | | The driver for RTL8192CU chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | rtlwifi: rtl8192ce: Convert driver to use common hardware info routineLarry Finger2016-07-081-71/+12Star
| | | | | | | | | | | | | | | | | | | | The driver for RTL8192CE chips is converted to use the common routine for getting the hardware information. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | rtlwifi: Create common routine to get hardware infoLarry Finger2016-07-082-0/+80
| | | | | | | | | | | | | | | | | | | | | | All of the rtlwifi family of drivers have a similar routine that acquires the hardware info from efuse and initializes a number of variables in the driver's private area. A common routine is created for all drivers to use. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>