Commit graph

577025 commits

Author SHA1 Message Date
David S. Miller 798fee4803 linux-can-next-for-4.6-20160310
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABCgAGBQJW4T63AAoJED07qiWsqSVq36MIAIqx00Qqk73/erXp1kWGx4QH
 3jv26HzjmEP6fxBFeduNMMT/jgcNhXkrDru8LhJPGcoOqftdJOaHB38J+DEXYjNZ
 jwnKEc4rVPd4o8z6ApoXHS72nucYus4L/5JSWx5nmiNJ3pW1j2Xnb3HfcInt5XyK
 pwZPedfriKmPxmSH0Gvn82imyGaiJ/63GNYse2BwsdZZrff3nTG+nFFj2cHpeTSR
 oQEvXQUBtjk/4lPCyR0rf1C8ZMMxh/L8ovDTFTE0p9asupcEEbc8LIPLy8ZqM8Zo
 KzC/3eCbgCgPiwqqgBLUJXHjTviwb/1AHfZ4KtnpLaqyuyomSAXaUEITAp2n5Ns=
 =+E/w
 -----END PGP SIGNATURE-----

Merge tag 'linux-can-next-for-4.6-20160310' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
pull-request: can-next 2016-03-10

this is a pull request of 5 patch for net-next/master.

Marek Vasut contributes 4 patches for the ifi CAN driver, which makes
it work on real hardware. There is one patch by Ramesh Shanmugasundaram
for the rcar_can driver that adds support for the 3rd generation IP
core.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10 12:41:33 -05:00
Robert Baldyga 079c2652e5 MAINTAINERS: nfc: s3fwrn5: Add second maintainer
Add Krzysztof Opasiak as maintainer of S3FWRN5 driver.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2016-03-10 17:16:22 +01:00
Jes Sorensen ccfe1e8532 rtl8xxxu: Temporarily disable 8192eu device init
To reduce the patch volume, temporariliy disable 8192eu device init.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:21 +02:00
Jes Sorensen 7d4ccb8bae rtl8xxxu: Use correct 8051 reset function for 8723b parts
8723b needs more action, so implement support for device specific
reset functions.

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 145428ec7c rtl8xxxu: Print a warning if flushing the FIFO fails
Only print a warning if the FIFO flush fails, as opposed to printing
the status unconditionally.

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 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 fc89a41fa6 rtl8xxxu: Implement 8723bu specific disable_rf() function
Powering up the 8723bu RF should probably be matched by the ability to
power it down again.

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 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 0290e7d0fd rtl8xxxu: convert rtl8723bu_init_bt() into rtl8723b_enable_rf()
rtl8723bu_init_bt() is effectively the function enabling RF, so name
it appropriately.

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 6979494adf rtl8xxxu: Remove unncessary semicolon
This removes an superfluous semicolon.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
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 87957081b7 rtl8xxxu: Pass RX rate to rx_parse_phystats and enable phystats for rtl8723bu
rtl8xxxu_rx_parse_phystats() only needs the RX rate to determine
whether to handle the stats as CCK or not. Parsing in the rate rather
than the rx descriptor elimantes the need to handle multiple rx
descriptor formats in the function.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:18 +02:00
Jes Sorensen 55a18dd180 rtl8xxxu: Process C2H RA_REPORT events for 8723bu
Handle RA_REPORTS events for 8723bu to not have them show up as
unhandled.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:18 +02:00
Jes Sorensen 739dc9f2f5 rtl8xxxu: Dump contents of unhandled C2H events
Dump the contents of unhandled C2H events. We should be handling all
expected events, so this is debugging help in case an unexpected event
happens.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:18 +02:00
Jes Sorensen 7d794eaa85 rtl8xxxu: Report media status using the correct H2C command for 8723bu
Implement support for nextgen devices reporting connectition to the
firmware.

The H2C API for reporting connection to the firmware is different
between the two device generations. Use the fileops structure to
determine which one to call.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:18 +02:00
Jes Sorensen f653e69009 rtl8xxxu: Implement basic 8723b specific update_rate_mask() function
Support for setting bandwidth and VHT parameters is still missing

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:17 +02:00
Jes Sorensen 80b30b2af5 rtl8xxxu: Define 8723b H2C ramask command structure
Define H2C command structure for setting the rate mask.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:17 +02:00
Jes Sorensen e975b87caf rtl8xxxu: Do not parse RX descriptor info for C2H packets
C2H events are delivered as RX packets on 8723bu/8192eu. When
receiving a C2H event, do not parse the rest of the RX descriptor as
the info isn't valid.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:17 +02:00
Jes Sorensen 4c68360714 rtl8xxxu: Improve handling of txdesc32 vs txdesc40 handling
Further correct the handling of 40 byte TX descriptors.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:17 +02:00
Jes Sorensen 2c6670b2a8 rtl8xxxu: TX RTS rate is word 4 for 8723a
Correct the setting of TX RTS for 8723a generation chips. In addition
update documentation to match that this is part of data word 4, note
data word 5.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:16 +02:00
Jes Sorensen 2098bfb5f3 rtl8723au: Update TX descriptor words 4 and 5 definitions
TX data words 4 and 5 differ significantly between 32 byte and 40 byte
descriptors.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:16 +02:00
Jes Sorensen cc2646d4be rtl8xxxu: Set sequence number correctly for 40 byte TX descriptors
SEQ changed location in the 40 byte TX descriptor. Set it correctly.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:16 +02:00
Jes Sorensen a40ace4f01 rtl8xxxu: Set the correct TX descriptor bits for agg and break on 8723b
Fixup victim of the relocated bits for AGG_ENABLE/AGG_BREAK in the 40
byte TX descriptor

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:16 +02:00
Jes Sorensen ce2d1dbbb4 rtl8xxxu: Add more 40 byte TX desc bit definitions
Add additional bit definitions for 40 byte TX descriptors, and rename
bits for 32 byte descriptors that are located differently in the 40
byte descriptor format.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:15 +02:00
Jes Sorensen 0249258db4 rtl8xxxu: Add additional tx descriptor bits for data word 0
This adds documentation for some additional bits in TX descriptor word
0.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:15 +02:00
Jes Sorensen 5e00d5034a rtl8xxxu: Do not unconditionally print debug info in rtl8723bu_handle_c2h()
Reduce the log level in rtl8723bu_handle_c2h()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:15 +02:00
Jes Sorensen 179e174256 rtl8xxxu: Handle 40 byte TX descriptors for rtl8723bu
Note the descriptor checksum is still only calculated over the initial
32 bytes of the descriptor, ignoring the last 8 bytes of the
descriptor.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:15 +02:00
Jes Sorensen 80491a1f3c rtl8xxxu: Add definition for 8723bu tx descriptor
Newer generation chips use a 40 byte TX descriptor, compared to the
32 byte descriptor used on older chips.

This adds the definition for the 40 byte descriptor.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:14 +02:00
Jes Sorensen 72143b9e94 rtl8xxxu: Set the correct thermal meter register for 8723bu
Older chips use RF register 0x24 to set the thermal meter. Newer chips
use register 0x42.

This change makes sure to set the correct thermal meter register
depending on the chip.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:14 +02:00
Jes Sorensen 1d3cc44ddd rtl8xxxu: Set 8723bu MCS TX power
This adds the missing support for setting MCS TX power rates on 8723bu.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:14 +02:00
Jes Sorensen 54bed43f3a rtl8xxxu: Set 8723bu TX power for CCK and OFDM rates
This implements support for setting TX power for CCK and OFDM rates on
8723bu. MCS rates is still pending.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:14 +02:00
Jes Sorensen 3be2699908 rtl8xxxu: Parse efuse power indices for 8723bu
This should (hopefully) parse the power indices correctly 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:13 +02:00
Jes Sorensen 21db997330 rtl8xxxu: Bump TX power arrays to handle larger channel groups
Newer generation chips have more channels groups. In order to carry
the larger arrays in common structures, bump the array sizes to
match.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:13 +02:00
Jes Sorensen 3e84f93861 rtl8xxxu: Use size of source pointer when copying efuse data
Some newer chips have more channel groups in their efuse parameter
tables, so use the size of the source, rather than the destination
when copying them out. This avoids copying garbage when increasing the
common array sizes.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:13 +02:00
Jes Sorensen e796dab4b9 rtl8xxxu: Introduce set_tx_power() fileop and a new 8723b dummy derivative
The 8723b series is significantly different from the older generation
in this sense. So far the 8723b version doesn't do anything useful.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:13 +02:00
Jes Sorensen 4a0d7db531 rtl8xxxu: Correct struct rtl8723bu_efuse to list power bases correctly
Correct TX power definitions in rtl8723bu_efuse

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:12 +02:00
Jes Sorensen db08de9443 rtl8xxxu: Do not use hard-wired RF enable settings for 8723bu
These settings simply block the 8723bu, for now leave an empty
function.

With this change we can finally communicate with aliens using the
8723bu!

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:12 +02:00
Jes Sorensen a3a5dac6b1 rtl8xxxu: Setup coex table correctly (hopefully)
Use the same values as the vendor driver when setting up the BTCOEX
table for 8723bu.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:12 +02:00
Jes Sorensen 59b743979c rtl8xxxu: Use REG_RFE_CTRL_ANTA_SRC rather than hard coded value
Another case where we should use the register name rather than the
hard coded value when accessing it.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:11 +02:00
Jes Sorensen 120e627f65 rtl8xxxu: Use name for REG_RFE_BUFFER rather than hard coded value
Register 0x0944 is REG_RFE_BUFFER. Use the name rather than hard coded
value when accessing it.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:11 +02:00
Jes Sorensen 499cfc02a0 rtl8xxxu: 8723bu: REG_BT_COEX_TABLE4 is only 8 bits
The BT_COEX_TABLE register list contains 3 32 bit registers and one 8
bit register. Hence, use rtl8xxxu_write8() when writing the 8 bit
register.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 15:29:11 +02:00
Jes Sorensen fc1c89b340 rtl8xxxu: Set WLAN_ACT_CONTROL per vendor driver setting
The initial code set the wrong setting in WLAN_ACT_CONTROL 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:11 +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 f2a4163a22 rtl8xxxu: Add missing blank space in front of bracket
Keep the automated tools happy

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 2f109c8e51 rtl8xxxu: Group chip quirks together
Group chip quirks together instead of having them scattered all over
in the init code.

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 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 5ac61789e8 rtl8xxxu: 8723bu lock phy after RF init
Set PHY lock after running the RF init sequence on 8723bu.

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 1ea8e846c9 rtl8xxxu: Call device specific _config_channel()
Having a version for the newer chips without calling it doesn't do
much good.....

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