summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
Commit message (Collapse)AuthorAgeFilesLines
* rtl8xxxu: Enable aggregation for rtl8723auJes Sorensen2016-07-081-0/+1
| | | | | | | | | | | 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>
* rtl8xxxu: Allocate larger RX skbs when aggregation is enabledJes Sorensen2016-07-081-0/+2
| | | | | | | | 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>
* rtl8xxxu: Correct rxdesc16 definitionJes Sorensen2016-07-081-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>
* rtl8xxxu: Obtain ieee80211_rx_status within parse_rx_desc()Jes Sorensen2016-07-081-6/+3
| | | | | | | | | 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>
* rtl8xxxu: Remove the now obsolete mbox_ext_reg info from rtl8xxxu_fileopsJes Sorensen2016-05-031-2/+0
| | | | | | | | With two different h2c_cmd() functions, mbox_ext_reg and mbox_ext_width are no longer needed. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: rtl8xxxu_prepare_calibrate() is never used on gen1Jes Sorensen2016-05-031-1/+1
| | | | | | | | Rename it to rtl8xxxu_gen2_prepare_calibrate() and remove the calls to it from rtl8xxxu_gen1_phy_iq_calibrate() Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Split rtl8723a_h2c_cmd() into a gen1 and a gen2 versionJes Sorensen2016-05-031-1/+2
| | | | | | | | | | The H2C API is completely different between gen1 and gen2 parts, so there is little point trying to treat this as a generic function. All calls to *_h2c_cmd() will always come from a gen1 or a gen2 specific function. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Rename rtl8723a_disabled_to_emu() to rtl8xxxu_disabled_to_emu()Jes Sorensen2016-05-031-1/+1
| | | | | | | | This function is generic to most of the chips, so change the name to reflect this. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: move rtl8188[cr] and rtl8192c related code into rtl8xxxu_8192c.cJes Sorensen2016-05-031-0/+1
| | | | | | | | | This moves the code for rtl8188c, rtl8188r, and rtl8192c into it's own file. This is purely a code moving exercise, there is no change to the code itself. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: move rtl8723a related code into rtl8xxxu_8723a.cJes Sorensen2016-05-031-0/+17
| | | | | | | | | | | | This moves the rtl8723a code into it's own file. This is purely a code moving exercise, no code changes. This device specific file is a lot smaller since the gen1 chips (8723a, 8188c, 8188r, 8192c) share a lot more common code than the gen2 chips. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: move rtl8723b related code into rtl8xxxu_8723b.cJes Sorensen2016-05-031-0/+7
| | | | | | | | | | This moves the rtl8723b code into it's own file. This is purely a code moving exercise, no functional changes. This did expose rtl723a_h2c_cmd() as a function that should be refactored into a gen1 and a gen2 version. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: move rtl8192e related code into rtl8xxxu_8192e.cJes Sorensen2016-05-031-0/+53
| | | | | | | | This moves the rtl8192e code into it's own file. This is purely a code moving exercise, no code changes. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Fix 8188RU supportJes Sorensen2016-04-151-0/+1
| | | | | | | | | | The 8188RU does not like PAPE to be enabled, while all the other gen1 parts seem to require it. This makes the RTL8188RU able to associate for me. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Add TX power base values for gen1 partsJes Sorensen2016-04-151-0/+26
| | | | | Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Update copyright statement to include 2016Jes Sorensen2016-04-151-1/+1
| | | | | Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Move PHY RF init into device specific functionsJes Sorensen2016-04-151-0/+1
| | | | | | | | | Load the RF table in init_phy_rf(), which allows for applying device specific RF hacks in the same place. Getting rid of more ugly if () clutter. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Split USB quirks into gen1 and gen2 quirksJes Sorensen2016-04-151-0/+1
| | | | | | | | This removes a bunch of if () spaghetti and re-applies the USB bus quirks for 8188/8192 that had gotten lost. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Make PBP tuning a fileops parameterJes Sorensen2016-04-151-0/+2
| | | | | | | | Rather than scattering the code with #ifdefs, use the fileops structure to hold device specific PBP values. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Do not backup RF_MODE_AG when it's never being usedJes Sorensen2016-04-151-1/+0
| | | | | | | | This was expired by the vendor driver, but we never ended up using the backed up value. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Store device specific TRXFF boundary in the fileopsJes Sorensen2016-04-151-0/+1
| | | | | | | This removes another case of ugly if () clutter Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Split rtl8xxxu_init_phy_bb() into device specific functionsJes Sorensen2016-04-151-0/+1
| | | | | | | | | This reduces the if () clutter. Longer term it probably makes sense to split this between gen1 (8723au/8188cu/8192cu) and gen2 (8192eu/8723bu) devices. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Name RX descriptor types rxdesc16/rxdesc24Jes Sorensen2016-04-151-2/+3
| | | | | | | | This caught a bug where too little memory was allocated for RX urbs for parts using 24 byte RX descriptors Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Implement generic init_queue_reserved_page() functionJes Sorensen2016-04-151-0/+9
| | | | | | | | 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>
* rtl8xxxu: Correctly parse 8192eu efuseJes Sorensen2016-04-141-22/+16
| | | | | | | | The 8192eu efuse only has power data for path A and B. It follows the same layout as 8723bu. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Set TX page boundaries for 8192euJes Sorensen2016-04-141-0/+1
| | | | | | | The 8192eu also has it's own TRXFF boundary value to set. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Add MAC init table for 8192euJes Sorensen2016-04-141-0/+1
| | | | | | | | The 8192eu requires a different MAC init table. Add the missing table and specify the table to use in the fileops structure. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Use enums for chip version numbersJes Sorensen2016-04-071-1/+25
| | | | | | | | With support for more chips being added, use an enum to specify the chip version. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: TXDESC_SHORT_GI is txdesc32 onlyJes Sorensen2016-04-071-1/+1
| | | | | | | This is no short GI bit in the txdesc40 format. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Correct txdesc40 gid definitionJes Sorensen2016-04-071-1/+1
| | | | | | | txdesc40 dword2 gid is a 6 bit field, not a single bit Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Rename TX descriptor bits to map them to 32/40 byte descriptorsJes Sorensen2016-04-071-49/+49
| | | | | | | | | With the size based naming of TX descriptors. Change the bit definition namings to indicate which descriptor format they match, rather than having a device name in the bit name. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Change name of struct tx_desc to be more decriptiveJes Sorensen2016-04-071-2/+2
| | | | | | | | | There are two major types of TX descriptor formats for the RTL parts, the old 32 byte descriptor, and the newer 40 byte descriptor used by the 8723bu, 8192eu, and 88xx series. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Use correct 8051 reset function for 8723b partsJes Sorensen2016-03-101-0/+1
| | | | | | | | 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>
* rtl8xxxu: Implement device specific power_off functionJes Sorensen2016-03-101-0/+1
| | | | | | | | 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>
* rtl8xxxu: Implement 8723bu specific disable_rf() functionJes Sorensen2016-03-101-0/+1
| | | | | | | | 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>
* rtl8xxxu: convert rtl8723bu_init_bt() into rtl8723b_enable_rf()Jes Sorensen2016-03-101-1/+0
| | | | | | | | 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>
* rtl8xxxu: Process C2H RA_REPORT events for 8723buJes Sorensen2016-03-101-0/+11
| | | | | | | | 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>
* rtl8xxxu: Report media status using the correct H2C command for 8723buJes Sorensen2016-03-101-0/+8
| | | | | | | | | | | | 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>
* rtl8xxxu: Implement basic 8723b specific update_rate_mask() functionJes Sorensen2016-03-101-1/+15
| | | | | | | 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>
* rtl8xxxu: Define 8723b H2C ramask command structureJes Sorensen2016-03-101-1/+10
| | | | | | | 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>
* rtl8xxxu: Improve handling of txdesc32 vs txdesc40 handlingJes Sorensen2016-03-101-2/+5
| | | | | | | 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-101-2/+2
| | | | | | | | | 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-101-10/+22
| | | | | | | | 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-101-2/+6
| | | | | | | 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: Add more 40 byte TX desc bit definitionsJes Sorensen2016-03-101-3/+24
| | | | | | | | | 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: Handle 40 byte TX descriptors for rtl8723buJes Sorensen2016-03-101-1/+2
| | | | | | | | | 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: Parse efuse power indices for 8723buJes Sorensen2016-03-101-15/+28
| | | | | | | | 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: Introduce set_tx_power() fileop and a new 8723b dummy derivativeJes Sorensen2016-03-101-0/+2
| | | | | | | | 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>