summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* rtl8xxxu: Improve handling of txdesc32 vs txdesc40 handlingJes Sorensen2016-03-102-38/+92
| | | | | | | 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>
* rtl8xxxu: TX RTS rate is word 4 for 8723aJes Sorensen2016-03-102-3/+4
| | | | | | | | | 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>
* rtl8723au: Update TX descriptor words 4 and 5 definitionsJes Sorensen2016-03-102-15/+28
| | | | | | | | 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>
* rtl8xxxu: Set sequence number correctly for 40 byte TX descriptorsJes Sorensen2016-03-102-10/+22
| | | | | | | 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>
* rtl8xxxu: Set the correct TX descriptor bits for agg and break on 8723bJes Sorensen2016-03-101-3/+16
| | | | | | | | 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>
* rtl8xxxu: Add more 40 byte TX desc bit definitionsJes Sorensen2016-03-102-6/+28
| | | | | | | | | 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>
* rtl8xxxu: Add additional tx descriptor bits for data word 0Jes Sorensen2016-03-101-0/+4
| | | | | | | | 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>
* rtl8xxxu: Do not unconditionally print debug info in rtl8723bu_handle_c2h()Jes Sorensen2016-03-101-9/+9
| | | | | | | 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>
* rtl8xxxu: Handle 40 byte TX descriptors for rtl8723buJes Sorensen2016-03-102-13/+25
| | | | | | | | | 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>
* rtl8xxxu: Add definition for 8723bu tx descriptorJes Sorensen2016-03-101-0/+16
| | | | | | | | | | 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>
* rtl8xxxu: Set the correct thermal meter register for 8723buJes Sorensen2016-03-101-1/+5
| | | | | | | | | | | 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>
* rtl8xxxu: Set 8723bu MCS TX powerJes Sorensen2016-03-101-2/+12
| | | | | | | 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>
* rtl8xxxu: Set 8723bu TX power for CCK and OFDM ratesJes Sorensen2016-03-101-1/+22
| | | | | | | | 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>
* rtl8xxxu: Parse efuse power indices for 8723buJes Sorensen2016-03-102-15/+71
| | | | | | | | 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>
* 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>
OpenPOWER on IntegriCloud