summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
Commit message (Collapse)AuthorAgeFilesLines
* rtl8xxxu: Fix trailing semicolonLuis de Bethencourt2018-01-241-1/+1
| | | | | | | | | The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt <luisbg@kernel.org> Acked-by: Jes Sorensen <Jes.Sorensen@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Update author/maintainer contact infoJes Sorensen2017-01-201-1/+1
| | | | | | | Update copyright year and email address. Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Pass tx_info to fill_txdesc in order to have access to retry countJes Sorensen2016-11-251-12/+15
| | | | | | | | | | | | | | | In order to obtain retry count for a given rate we need to pass the full struct ieee80211_tx_info to the function setting the rate in he TX descriptor. This uncovered a huge bug where the old code would use struct ieee80211_rate.flags to test for rate parameters, which is always zero, instead of the flags value from struct ieee80211_tx_rate. Time to find a brown paper bag :( Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Obtain RTS rates from mac80211Jes Sorensen2016-11-251-3/+3
| | | | | | | | | Use the mac80211 provided rate for RTS rather than the hard coded 24Mbps as suggested by the vendor drivers. Reported-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Fix big-endian problem reporting mactimeJes Sorensen2016-11-251-2/+2
| | | | | | | | The full RX descriptor is converted so converting tsfl again would return it to it's original endian value. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Stop log spam from each successful interruptLarry Finger2016-09-261-0/+1
| | | | | | | | | | | | | | As soon as debugging is turned on, the logs are filled with messages reporting the interrupt status. As this quantity is usually zero, this output is not needed. In fact, there will be a report if the status is not zero, thus the debug line in question could probably be deleted. Rather than taking that action, I have changed it to only be printed when the newly added RTL8XXXU_DEBUG_INTERRUPT bit is set in the debug mask. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Clean up llt_init() APIJes Sorensen2016-09-261-3/+3
| | | | | | | | | | Remove last_tx_page argument from the llt_init() function. The rtl8xxxu_fileops structure contains the correct TX_TOTAL_PAGE_NUM value for the device, and rtl8xxxu_auto_llt_table() doesn't need to know the value in the first place. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Split filling of TX descriptors into separate functionsJes Sorensen2016-09-031-0/+12
| | | | | | | | | | | | | Split the filling of TX descriptors into a generic portion used on all devices, and format specific helper functions provided in the fops structure. This also cleaned up some mess, even if non harmful, in the handling of txdesc40 descriptors, where the code randomly would switch between the pointer to tx_desc and tx_desc40. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Introduce fops bitflag indicating type of thermal meterJes Sorensen2016-09-031-0/+1
| | | | | | | | Do not rely on TX descriptor size to determine the thermal meter type. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Convert flags in rtl8xxxu_fileops to bitflagsJes Sorensen2016-09-031-2/+2
| | | | | | | This leaves space for a few more flags within the same space. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Use flag to indicate whether device has TX report timer supportJes Sorensen2016-09-031-0/+1
| | | | | | | | | Use a fileops flag to indicate whether the device has TX report timer support. This will make it easier to include future devices such as 8188eu to use the TX report timer. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rtl8xxxu: Add TX page defines for 8723bJes Sorensen2016-09-031-0/+6
| | | | | | | | This switches the 8723b driver to use the new rtl8xxxu_init_queue_reserved_page() function. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* 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/+3Star
| | | | | | | | | 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/+0Star
| | | | | | | | 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/+0Star
| | | | | | | | 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/+16Star
| | | | | | | | 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/+0Star
| | | | | | | | 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>