Commit Graph

45 Commits

Author SHA1 Message Date
Thomas Gleixner
5b497af42f treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of version 2 of the gnu general public license as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 64 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141901.894819585@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:36:38 +02:00
Jes Sorensen
1ee83789fc rtl8xxxu: Update author/maintainer contact info
Update copyright year and email address.

Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-01-20 11:49:01 +02:00
Jes Sorensen
f1785fbf7c rtl8xxxu: Implement 8192e specific power down sequence
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>
2016-09-17 18:16:19 +03:00
Jes Sorensen
0b09628948 rtl8xxxu: Add interrupt bit definitions for gen2 parts
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-03 19:57:19 +03:00
Jes Sorensen
dce7548fd9 rtl8xxxu: Add bit definitions for REG_FPGA0_TX_INFO
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-03 19:57:18 +03:00
Jes Sorensen
08eca32ebc rtl8xxxu: Add additional documentation for RX DMA registers
This also renames REG_USB_AGG_{TO,TH} to REG_USB_AGG_{TIMEOUT,THRESH}

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29 18:44:32 +03:00
Jes Sorensen
e4ac0a8ac8 rtl8xxxu: Add bit definitions for REG_USB_SPECIAL_OPTION
Documentation for enabling USB aggregation and whether to select
interrupt or bulk delivery of interrupt events.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-06-29 18:44:31 +03:00
Jes Sorensen
eb18806261 rtl8xxxu: Update copyright statement to include 2016
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-15 21:38:10 +03:00
Jes Sorensen
bd8fe40cc4 rtl8xxxu: Use descriptive bits for setting RX paths for 1T2R parts
This reduce the use of magic values a little.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-15 21:36:37 +03:00
Jes Sorensen
89c2a097df rtl8xxxu: Implement generic init_queue_reserved_page() function
Longer term we should switch all the chips over to use this function
instead of the random chip specific ifdef hacks.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-15 21:36:25 +03:00
Jes Sorensen
28e460b02c rtl8xxxu: Adjust AFE crystal value on 8192eu
Adjust AFE before enabling PLL on 8192eu, probably also needed for
8723bu.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-14 15:45:30 +03:00
Jes Sorensen
f991f4e914 rtl8xxxu: Implement IQK calibration for 8192eu
8192eu has it's own IQK calibration procedure, and notably uses
undocumented RF register 0x56 in the process.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-14 15:45:29 +03:00
Jes Sorensen
b052b7fc7d rtl8xxxu: Implement 8192eu device specific quirks
Set REG_QUEUE_CTRL and REG_ACLK_MON for 8192eu.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-14 15:45:27 +03:00
Jes Sorensen
3021e51f2b rtl8xxxu: Set REG_USB_HRPWM for 8192eu
The vendor driver set register 0xfe58 REG_USB_HWPWM in it's init
sequence for 8192eu. Do the same here.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-14 15:45:25 +03:00
Jes Sorensen
931d927825 rtl8xxxu: Update some register definitions
Improve descriptive names of some registers and add some additional
registers only found on nextgen chips.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-07 19:41:17 +03:00
Jes Sorensen
430b454c5a rtl8xxxu: Flush FIFO before powering down devices
This should help when reloading the driver for 8723bu devices

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:20 +02:00
Jes Sorensen
fe37d5f644 rtl8xxxu: Implement device specific power_off function
Implment 8723bu specific device power down, and make power_off() a
fileops function.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:20 +02:00
Jes Sorensen
37f44dc79a rtl8xxxu: Use define for REG_PWR_DATA bits
Use the bit define rather than hard code the value for REG_PWR_DATA bits.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:19 +02:00
Jes Sorensen
541bca7f5d rtl8xxxu: RF_T_METER is different on the newer chips
Provide RF_T_METER register location for nextgen chips.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:10 +02:00
Jes Sorensen
9c79bf95d0 rtl8xxxu: Implement init_statistics for 8723bu
Vendor driver implements this for 8723b and 8821 series

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:10 +02:00
Jes Sorensen
3e88ca447a rtl8xxxu: Setup RX aggregation
This initializes RX DMA aggregation on 8723bu. We should do this for
all parts eventually, and also init TX aggregation.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:10 +02:00
Jes Sorensen
7e9567ff98 rtl8xxxu: Add REG_DWBCN1_CTRL_8723B define
List yet another new register found on the 8723b.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:09 +02:00
Jes Sorensen
c369060441 rtl8xxxu: Initialize burst parameters for 8723bu
Implement burst parameter sequence for 8723bu parts. Eventually this
should be moved into device specific sections.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:08 +02:00
Jes Sorensen
42836db1f6 rtl8xxxu: Implement 8723bu power on sequence
This implements the 8723bu specific power on sequence as it is
different from that of the 8723au chips.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:06 +02:00
Jes Sorensen
3ca7b32c9d rtl8xxxu: Improve 8723bu init code
Implement additional init sequence code for the 8723bu.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:03 +02:00
Jes Sorensen
f37e9228ae rtl8xxxu: Initial rtl8723bu_init_bt() code
This should initialize the antennas on the 8723bu, but so far I am
still not receiving anything :( More work is needed.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:03 +02:00
Jes Sorensen
c3f9506f23 rtl8xxxu: Initial implementation of rtl8723bu_config_channel()
This is a first stab of implementing rtl8723bu_config_channel(). For
now this will only do 20MHz channels.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:02 +02:00
Jes Sorensen
e1547c535e rtl8xxxu: First stab at adding IQK calibration for 8723bu parts
The 8723bu also has it's own IQK calibration process. This is similar
in flow, but still different enough to warrent it's own
implementation, at least for now.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:01 +02:00
Jes Sorensen
c6594ffd46 rtl8xxxu: Add a couple of new register definitions
This adds some additional register definitions for 8723bu, as well as
a bit define for USB RXDMA aggregation in REG_RXDMA_AGG_PG_TH.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:01 +02:00
Jes Sorensen
14d8856082 rtl8xxxu: Add some missing register definitions for 8723bu
This introduces additional register definitions for newer generation
chips.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:28:57 +02:00
Jes Sorensen
99ad16cbea rtl8xxxu: Init REG_HIMR[01] for 8192eu parts
The newer generation chips have different interrupt registers.
Initialize this correct registers on 8192eu.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:28:55 +02:00
Jes Sorensen
b63d0aaca6 rtl8xxxu: Kludge to drop incorrect USB OUT EP for 8192EU
The 8192eu (and some other parts) will report an incorrect USB OUT
EP. This tells the chip to drop it - as per the vendor driver.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:28:54 +02:00
Jes Sorensen
74b99bed87 rtl8xxxu: Add rtl8xxxu_auto_llt_table()
Newer chips can auto load the LLT table, it is no longer necessary to
build it manually in the driver.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:28:53 +02:00
Jes Sorensen
c05a9dbfb2 rtl8xxxu: Implment rtl8192eu_power_on()
This implements the rtl8192eu power on sequence, and splits it off
from the rtl8192cu/rtl8723au power on sequence.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:28:53 +02:00
Jes Sorensen
0e5d435a61 rtl8xxxu: Identify chip vendors correctly
This identifies the chip vendors correctly and also picks the correct
firmware for rtl8192eu.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:28:52 +02:00
Jes Sorensen
5b22a111aa rtl8xxxu: Add missing bit define for REG_APS_FSMCO
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-25 11:55:44 +02:00
Bruno Randolf
b40027ba8d rtl8xxxu: Document REG_RXFLTMAP registers
Add comments describing how REG_RXFLTMAP0, REG_RXFLTMAP1 and REG_RXFLTMAP2
work.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-25 11:55:36 +02:00
Jes Sorensen
ce6f2e3669 rtl8xxxu: Add REG_OFDM0_RX_D_SYNC_PATH definitions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-25 11:55:31 +02:00
Jes Sorensen
29c2139cd0 rtl8xxxu: Add mbox extension register definitions for 8723B
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-25 11:55:30 +02:00
Jes Sorensen
af9e4d6d9d rtl8xxxu: Add definitions for antenna selection registers for 8723BU
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-25 11:55:29 +02:00
Jes Sorensen
22229fcb48 rtl8xxxu: Add more RCR bits
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-25 11:55:26 +02:00
Jes Sorensen
cecfd3cb29 rtl8xxxu: Add REG_TX_REPORT_* defines
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-25 11:55:25 +02:00
Jes Sorensen
f076977537 rtl8xxxu: Define SYS_CFG_SW_OFFLOAD_EN
This is needed for chips with IOL support.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-25 11:55:24 +02:00
Jes Sorensen
0635f8cede rtl8xxxu: Add RQPN_[NE]PQ_SHIFT values
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-02-25 11:55:23 +02:00
Jes Sorensen
26f1fad29a New driver: rtl8xxxu (mac80211)
This is an alternate driver for a number of Realtek WiFi USB devices,
including RTL8723AU, RTL8188CU, RTL8188RU, RTL8191CU, and RTL8192CU.
It was written from scratch utilizing the Linux mac80211 stack.

After spending months cleaning up the vendor provided rtl8723au
driver, which comes with it's own 802.11 stack included, I decided to
rewrite this driver from the bottom up.

Many thanks to Johannes Berg for 802.11 insights and help and Larry
Finger for help with the vendor driver.

The full git log for the development of this driver can be found here:
git git://git.kernel.org/pub/scm/linux/kernel/git/jes/linux.git
    branch rtl8723au-mac80211

This driver is still under development, but has proven to be very
stable for me. It currently supports station mode only. It has support
for OFDM and CCK rates. It does lack certain features found in the
staging driver, such as power management, AMPDU, and 40MHz channel
support. In addition it does not support AD-HOC, AP, and monitor mode
support at this point.

The driver is known to work with the following devices:
Lenovo Yoga (rtl8723au)
TP-Link TL-WN823N (rtl8192cu)
Etekcity 6R (rtl8188cu)
Daffodil LAN03 (rtl8188cu)
Alfa AWUS036NHR (rtl8188ru)

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-10-21 10:53:29 +03:00