summaryrefslogtreecommitdiffstats
path: root/drivers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rtl8xxxu: Bump TX power arrays to handle larger channel groupsJes Sorensen2016-03-101-9/+16
| | | | | | | | | 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>
* rtl8xxxu: Use size of source pointer when copying efuse dataJes Sorensen2016-03-101-17/+17
| | | | | | | | | | 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>
* rtl8xxxu: Introduce set_tx_power() fileop and a new 8723b dummy derivativeJes Sorensen2016-03-102-2/+34
| | | | | | | | 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>
* rtl8xxxu: Correct struct rtl8723bu_efuse to list power bases correctlyJes Sorensen2016-03-102-15/+18
| | | | | | | Correct TX power definitions in rtl8723bu_efuse Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Do not use hard-wired RF enable settings for 8723buJes Sorensen2016-03-102-1/+10
| | | | | | | | | | | 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>
* rtl8xxxu: Setup coex table correctly (hopefully)Jes Sorensen2016-03-101-5/+9
| | | | | | | | 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>
* rtl8xxxu: Use REG_RFE_CTRL_ANTA_SRC rather than hard coded valueJes Sorensen2016-03-101-2/+2
| | | | | | | | 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>
* rtl8xxxu: Use name for REG_RFE_BUFFER rather than hard coded valueJes Sorensen2016-03-101-4/+4
| | | | | | | | 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>
* rtl8xxxu: 8723bu: REG_BT_COEX_TABLE4 is only 8 bitsJes Sorensen2016-03-101-1/+1
| | | | | | | | | 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>
* rtl8xxxu: Set WLAN_ACT_CONTROL per vendor driver settingJes Sorensen2016-03-101-1/+1
| | | | | | | | 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>
* rtl8xxxu: RF_T_METER is different on the newer chipsJes Sorensen2016-03-101-6/+7
| | | | | | | 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>
* rtl8xxxu: Implement init_statistics for 8723buJes Sorensen2016-03-103-0/+35
| | | | | | | 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>
* rtl8xxxu: Add missing blank space in front of bracketJes Sorensen2016-03-101-1/+1
| | | | | | | Keep the automated tools happy Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Setup RX aggregationJes Sorensen2016-03-103-0/+25
| | | | | | | | 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>
* rtl8xxxu: Group chip quirks togetherJes Sorensen2016-03-101-13/+15
| | | | | | | | 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>
* rtl8xxxu: Add REG_DWBCN1_CTRL_8723B defineJes Sorensen2016-03-101-0/+2
| | | | | | | 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>
* rtl8xxxu: 8723bu lock phy after RF initJes Sorensen2016-03-101-0/+7
| | | | | | | 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>
* rtl8xxxu: Call device specific _config_channel()Jes Sorensen2016-03-101-1/+1
| | | | | | | | 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>
* rtl8xxxu: Initialize burst parameters for 8723buJes Sorensen2016-03-102-1/+37
| | | | | | | | 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>
* rtl8xxxu: Set RX boundary for 8723buJes Sorensen2016-03-101-1/+4
| | | | | | | Set the correct TRXFF boundary for 8723bu. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Do not set FPGA0_TX_INFO for 8723bu and use a larger PBP page sizeJes Sorensen2016-03-101-3/+8
| | | | | | | | The vendor driver does not set FPGA0_TX_INFO here. In additiona the 8723bu can handler a larger PBP page size. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Do queue init in same order as 8723bu vendor driverJes Sorensen2016-03-101-31/+37
| | | | | | | | Reorganize the init sequence in order to be able to compare to the 8723bu vendor driver's init sequence. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: 80M spur hack is for 8723au onlyJes Sorensen2016-03-101-5/+6
| | | | | | | Only apply the 80M spur hack for 8723au parts. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Init H2C command register for 8723buJes Sorensen2016-03-101-2/+17
| | | | | | | | | | In addition make register read/write flow match closer to vendor driver flow. This is mainly to be able to compare the register write log with the vendor driver, and can be optimized later once 8723bu support is working. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Another 8723bu magic register set during initJes Sorensen2016-03-101-0/+5
| | | | | | | No indication of what register 0xa3 does anywhere in the vendor source. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Another 8723bu patch for rtl8xxxu_init_phy_bb()Jes Sorensen2016-03-101-6/+9
| | | | | | | | This function is going to need to be split up into chip specific variants. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Handle XTAL_K value in efuse specific locationJes Sorensen2016-03-102-3/+14
| | | | | | | | | Retrieve the XTAL_K value in the parse_efuse() functions as it's location various on a per device basis. For parts that do not provide an XTAL_K value, skip setting it. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Additional fixes for 8723buJes Sorensen2016-03-101-7/+18
| | | | | | | | Additional tweaks to further map the init sequence for the 8723bu to that of the vendor driver. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Setup LLT before downloading firmwareJes Sorensen2016-03-101-9/+20
| | | | | | | This matches the order of the 8723bu vendor driver Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Implement 8723bu power on sequenceJes Sorensen2016-03-102-5/+189
| | | | | | | | 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>
* rtl8xxxu: Do not set REG_AFE_XTAL_CTRL on 8723buJes Sorensen2016-03-101-9/+12
| | | | | | | | The 8723bu does not like REG_AFE_XTAL_CTRL being set, so skip this for now, to match the vendor driver. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Issue BT_INFO commandJes Sorensen2016-03-102-7/+15
| | | | | | | Issue a BT_INFO command to verify the status of BT/WiFi settings. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Handle BT register writes and MP_OPER eventsJes Sorensen2016-03-102-4/+89
| | | | | | | | 8723bu BT registers are written via the mailbox interface. Add support for writing these and corresponding C2H event responses. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Initial functionality to handle C2H events for 8723buJes Sorensen2016-03-102-1/+87
| | | | | | | | The 64 bit mailbox commands also provide a different method for mailbox command responses (C2H events). Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Handle 8723bu style rx descriptorsJes Sorensen2016-03-102-30/+103
| | | | | | | | This adds code to parse the new RX descriptor format used by the 8723bu/8192eu parts. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Add rtl8723bu (nextgen) rx descriptor definitionJes Sorensen2016-03-101-0/+125
| | | | | | | | The nextgen chips use a slightly different RX descriptor format. This adds support for the new format. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Set the right type for ps tdma on 8723buJes Sorensen2016-03-101-1/+1
| | | | | | | | Use the correct type when setting PS TDMA for 8723bu. This matches the vendor driver. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Do not ignore wlan activity on 8723buJes Sorensen2016-03-102-0/+9
| | | | | | | | The 8723bu is a WiFi/BT combo part. When initializing it for WiFi, make sure to tell it not to ignore WiFi activity. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Improve 8723bu init codeJes Sorensen2016-03-103-9/+49
| | | | | | | 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>
* rtl8xxxu: Remove unused variableJes Sorensen2016-03-101-1/+1
| | | | | | | Remove an unused variable to make the compiler happy. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Initial rtl8723bu_init_bt() codeJes Sorensen2016-03-103-6/+98
| | | | | | | | 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>
* rtl8xxxu: Initial implementation of rtl8723bu_config_channel()Jes Sorensen2016-03-103-0/+149
| | | | | | | | 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>
* rtl8xxxu: rtl8192eu: Map out EFUSE TX power areaJakub Sitnicki2016-03-102-15/+17
| | | | | | | | | | | TX power values are laid out differently in EFUSE found in RTL8192EU & RTL8188EU devices. TX power indices and differences for each RF path are not interleaved (A, B, A, B), as in other chips, but follow one another (A, B, C, D). Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Remove backing up certain registers, which was never usedJes Sorensen2016-03-102-17/+0
| | | | | | | | This was inspired by the vendor driver, but in the end never used for anything. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Do LC calibration before IQK calibrationJes Sorensen2016-03-101-2/+2
| | | | | | | | This matches the flow of the vendor driver for newer hardware, and doesn't seem to cause issues for the older parts. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Handle S0S1 register in lc_calibrate()Jes Sorensen2016-03-102-0/+8
| | | | | | | | Newer chips (8723bu/8192eu) has S0S1 settings which needs to be dealt with during LC calibration. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: First stab at adding IQK calibration for 8723bu partsJes Sorensen2016-03-103-2/+827
| | | | | | | | | 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>
* rtl8xxxu: Add a couple of new register definitionsJes Sorensen2016-03-101-0/+6
| | | | | | | | 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>
* rtl8xxxu: Make rtl8xxxu_add_path_on() use device specific init valuesJes Sorensen2016-03-102-3/+25
| | | | | | | | rtl8192cu/rtl8188cu/rtl8723au use the same values, but 8723bu and 8192eu have their own. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Use correct formatting type to print sizeof()Jes Sorensen2016-03-101-1/+1
| | | | | | | Usual gcc i386 issue reported by kbuildbot Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>