summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek
AgeCommit message (Collapse)AuthorFilesLines
2016-09-03rtl8xxxu: Introduce fops bitflag indicating type of thermal meterJes Sorensen4-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>
2016-09-03rtl8xxxu: Convert flags in rtl8xxxu_fileops to bitflagsJes Sorensen1-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>
2016-09-03rtl8xxxu: Use flag to indicate whether device has TX report timer supportJes Sorensen3-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>
2016-09-03rtl8xxxu: Add interrupt bit definitions for gen2 partsJes Sorensen1-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>
2016-09-03rtl8xxxu: Add bit definitions for REG_FPGA0_TX_INFOJes Sorensen1-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>
2016-09-03rtl8xxxu: Simplify code setting TX buffer boundaryJes Sorensen1-7/+1
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>
2016-09-03rtl8xxxu: Remove now obsolete rtl8xxxu_old_init_queue_reserved_page()Jes Sorensen1-28/+2
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>
2016-09-03rtl8xxxu: Switch 8192cu/8188cu devices to use ↵Jes Sorensen1-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>
2016-09-03rtl8xxxu: Switch 8723a to use new rtl8xxxu_init_queue_reserved_page() routineJes Sorensen1-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>
2016-09-03rtl8xxxu: Add TX page defines for 8723bJes Sorensen2-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>
2016-09-03rtl8xxxu: Add TP-Link TL-WN823N v2 to list of supported devicesJes Sorensen1-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>
2016-09-03rtl8xxxu: Fix error handling if rtl8xxxu_init_device() failsJes Sorensen1-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>
2016-09-03rtl8xxxu: Mark 0x2001:0x3308 as testedJes Sorensen1-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>
2016-09-03rtl8xxxu: Mark 0x20f4:0x648b as testedJes Sorensen1-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>
2016-09-03rtlwifi: rtl8723ae: Fix leak in _rtl8723e_read_adapter_info()Christian Engelmayer1-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>
2016-09-03rtlwifi: rtl8192de: Fix leak in _rtl92de_read_adapter_info()Christian Engelmayer1-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>
2016-09-03rtlwifi: remove superfluous conditionHeinrich Schuchardt1-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>
2016-08-13net: wireless: realtek: rtlwifi: usb: don't print error when allocating urb ↵Wolfram Sang1-7/+1
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>
2016-07-19rtlwifi: don't add include path for rtl8188eeArnd Bergmann1-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>
2016-07-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo1-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
2016-07-08rtlwifi: rtl8723ae: Clean up the hardware info routineLarry Finger1-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>
2016-07-08rtlwifi: rtl8192de: Convert driver to use common hardware info routineLarry Finger1-62/+15
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>
2016-07-08rtlwifi: rtl8821ae: Convert driver to use common hardware info routineLarry Finger1-73/+11
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>
2016-07-08rtlwifi: rtl8723be: Convert driver to use common hardware info routineLarry Finger1-62/+12
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>
2016-07-08rtlwifi: rtl8723ae: Convert driver to use common hardware info routineLarry Finger1-65/+11
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>
2016-07-08rtlwifi: rtl8192ee: Convert driver to use common hardware info routineLarry Finger1-61/+12
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>
2016-07-08rtlwifi: rtl8188ee: Convert driver to use common hardware info routineLarry Finger1-63/+13
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>
2016-07-08rtlwifi: rtl8192cu: Convert driver to use common hardware info routineLarry Finger1-46/+15
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>
2016-07-08rtlwifi: rtl8192ce: Convert driver to use common hardware info routineLarry Finger1-71/+12
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>
2016-07-08rtlwifi: Create common routine to get hardware infoLarry Finger2-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>
2016-07-08rtlwifi: Fix typo in printkMasanari Iida7-7/+7
This patch fix spelling typos found in drivers/net/wireless/realtek. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: gen1: Add module parameters to adjust DMA aggregation parametersJes Sorensen1-0/+28
This allows the user to specify DMA aggregation timout and block count. Blocks are presumably always 512 bytes, so the minimum block count is 6 for 802.11 packets. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: gen1: Set aggregation timeout (REG_RXDMA_AGG_PG_TH + 1) as wellJes Sorensen1-2/+9
gen2 chips as well as 8188eu seems to use this register for setting DMA timeout threshold values, however the 8192cu is using REG_USB_DMA_AGG_TO. Set both to be on the safe side. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: Make DMA aggregation optional by setting a module parameterJes Sorensen1-2/+9
Let the default to off until we have more data on the right default tuning values. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: Enable aggregation for rtl8192cu/rtl8188cu/rtl8188ruJes Sorensen1-0/+2
This enables aggregation on rtl8192cu and derivative parts. This uses the same parameters as for rtl8723au. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: Enable aggregation for rtl8723auJes Sorensen3-0/+37
Implement rtl8xxxu_gen1_init_aggregation(). Aggregation should be the same for all gen1 parts. We may want to allow for tuning parameters in the fileopes struct. For now this is based allocating 16KB RX buffers, leaving 16000 bytes for actual packets, and the rest for the skb overhead. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: Adjust RX skb size to include space for phystatsJes Sorensen1-3/+4
The old allocation didn't leave space for phystats in the buffer, allowing the packet to be rejected if a frame size of size IEEE80211_MAX_FRAME_LEN was received. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: Allocate larger RX skbs when aggregation is enabledJes Sorensen2-4/+11
This adds support for allocating larger skbs for devices which indicate they support it. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: Add support for aggregated RX packets on gen1 partsJes Sorensen1-34/+69
This implements support for demuxing aggregated RX packets on gen1 devices, using the rxdesc16 format. So far this has only been tested with rtl8723au devices. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: Correct rxdesc16 definitionJes Sorensen1-2/+4
This corrects the definition of rxdesc16 to correctly specify pkt_cnt for aggregated packets. This is based on the code of the vendor rtl8723au driver, as opposed to the struct definitions they use. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: Obtain ieee80211_rx_status within parse_rx_desc()Jes Sorensen2-12/+8
When handling aggregated packets, we'll get a new ieee80211_rx_status for each cloned skb, so passing in the pointer from the outside doesn't make sense. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: Move skb delivery into parse_tx_desc() handlerJes Sorensen1-54/+50
This is another prepatory patch to be able to handle aggregated RX packets. In order to avoid adding a prototype, this also moves the rtl8723bu_handle_c2h() function. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: Set all ieee80211_rx_status values in parse_rx_desc()Jes Sorensen1-5/+12
This needs to be handled locally in the parse_rx_desc() function in order to be able to handle aggregated packets in the future. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtlwifi: Add missing newlines to RT_TRACE callsJoe Perches33-60/+60
RT_TRACE does not add a newline to the end of a message and always emits at KERN_DEBUG so these are susceptible to message interleaving from other processes without the newline. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtlwifi: Create _rtl_dbg_trace function to reduce RT_TRACE code sizeJoe Perches2-8/+34
This debugging macro can expand to a lot of code. Make it a function to reduce code size. (x86-64 defconfig w/ all rtlwifi drivers and allyesconfig) $ size drivers/net/wireless/realtek/rtlwifi/built-in.o* text data bss dec hex filename 900083 200499 1907 1102489 10d299 drivers/net/wireless/realtek/rtlwifi/built-in.o.defconfig.new 1113597 200499 1907 1316003 1414a3 drivers/net/wireless/realtek/rtlwifi/built-in.o.defconfig.old 1746879 453503 8512 2208894 21b47e drivers/net/wireless/realtek/rtlwifi/built-in.o.new 2051965 503311 8512 2563788 271ecc drivers/net/wireless/realtek/rtlwifi/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: Reduce console noise when removing the kernel moduleJes Sorensen1-1/+1
USB urbs will return with a status != 0 when rmmod'ing the driver. No need to fill the log with messages from rtl8xxxu_int_complete() Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-08rtl8xxxu: remove unneeded assignmentsLuis de Bethencourt1-2/+0
reg_eac and reg_ecc are only used if candidate is bigger than 0, and in that case new values will be given to them. Removing the unused assignments. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05rtlwifi: rtl8821ae: Fix potential race conditionLarry Finger1-0/+2
Flag rfchange_inprogress in struct rtl_ps_ctl is protected by a spinlock in most routines but not in rtl8821ae_dm_watchdog() which could lead to a race condition. The necessary locking to prevent this condition is added. Reported-by: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05rtlwifi: rtl8723ae: Fix potential race conditionLarry Finger1-0/+2
Flag rfchange_inprogress in struct rtl_ps_ctl is protected by a spinlock in most routines but not in rtl8723e_dm_watchdog(), which could lead to a race condition. The necessary locking to prevent this condition is added. Reported-by: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-05rtlwifi: rtl8723be: Fix potential race conditionLarry Finger1-0/+2
Flag rfchange_inprogress in struct rtl_ps_ctl is protected by a spinlock in most routines but not in rtl8723be_dm_watchdog(), which could lead to a race condition. The necessary locking to prevent this condition is added. Reported-by: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Pavel Andrianov <andrianov@ispras.ru> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>