Commit Graph

999 Commits

Author SHA1 Message Date
Mateusz Kulikowski 435009bba4 staging: rtl8192e: Fix log spamming in rtl8192_hard_data_xmit
This patch fixes issue generated by commit ca93dcba3a
("staging: rtl8192e: Remove assert() macro")

One negation was missed in conversion, therefore
asserted message was always printed.
For 1MB file downloaded via http, ~500 messages
were generated.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:56:55 -07:00
Joe Perches ee233d3e19 staging: rtl8192e: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Miscellanea:

o Reflow alignments

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:51:56 -07:00
Mateusz Kulikowski 08582d83e5 staging: rtl8192e: Rework EEPROM handling code
Card configuration is stored in SPI EEPROM (93c46 or 93c56)
working in 128|256x16 mode.
Communication is handled using GPIO bitbang.

>From behaviour perspective, delay after read was removed.
It is not needed as we wait after reading GPIO mapped to
PCI-E register - it should have no side effects.

According to sample EEPROM datasheet (AT93Cx6), max frequency for
worst case scenario (1.8V supply) is 250kHZ (vs. 1MHz for 5V).
Driver generates ~50kHZ clock - margin should be big enough
even for devices from other vendors.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03 17:46:43 -07:00
Mateusz Kulikowski 948fa942dc staging: rtl8192e: probe: iounmap mmio when probe fails
In case of probe failure, io memory was not released properly.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:21:37 -07:00
Mateusz Kulikowski cb7cca3ae8 staging: rtl8192e: Drop large switch in rtl92e_config_rf
The same steps were made for each RF path independently.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:21:37 -07:00
Mateusz Kulikowski 976a06cc89 staging: rtl8192e: Fix IW_IOCTL macro
Macro caused checkpatch complaints - replace [] braces with ()
and use [] braces as array initializers.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:21:37 -07:00
Mateusz Kulikowski 90959c3dfc staging: rtl8192e: Remove phy_RF8256_Config_ParaFile
Merge function into rtl92e_config_rf as having them
separated gives no benefit.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:21:37 -07:00
Mateusz Kulikowski 72f1f75257 staging: rtl8192e: Simplify rtl92e_set_bandwidth
Move phy version check outside of the loop.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:21:37 -07:00
Mateusz Kulikowski 99d4f5d236 staging: rtl8192e: Simplify rtl92e_is_halfn_supported_by_ap
Function should return struct member - no extra logic is needed.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:21:37 -07:00
Mateusz Kulikowski 2937a5d272 staging: rtl8192e: MgntActSet_RF_State: remove ProtectOrNot parameter
It is set at the very beginning of function to a constant value.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:21:37 -07:00
Mateusz Kulikowski f2d4d4e1e2 staging: rtl8192e: Remove rtl8192_data_hard_resume
Function is empty; rtllib checks if handler is NULL.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:21:37 -07:00
Mateusz Kulikowski f971e9f3ba staging: rtl8192e: Remove rtl8192_data_hard_stop
Function is empty; rtllib checks if handler is NULL.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:21:37 -07:00
Mateusz Kulikowski 45f57357f2 staging: rtl8192e: Remove ActUpdateChannelAccessSetting
Function is empty and called only once.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:21:36 -07:00
Mateusz Kulikowski 74214e526e staging: rtl8192e: Remove rtl8192_phy_updateInitGain
Function is empty and called only once.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:21:36 -07:00
Dan Carpenter a9cf7250ba staging: rtl8192e: don't just print an error and continue
I was looking at how TOTAL_CAM_ENTRY is used and I saw this code.  We
print an error but continue writing "EntryNo" to a register as if it
were valid.  "EntryNo" is controlled by the user in rtl8192_ioctl() so
it definitely can be invalid.  I'm not positive what happens with the
invalid data but it can't be good.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:18:43 -07:00
Dan Carpenter d1f0f3118e Staging: rtl8192e: array overflow in rtl92e_set_swcam()
"EntryNo" is comes from the user in the ioctl and it's a number between
0-255.  The ieee->swcamtable[] array only has 32 elements so it can
result in memory corruption.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:18:43 -07:00
Ioan-Adrian Ratiu 5143f7a3e9 staging: rtl8192e: rtllib: fix macro style issue
Remove macro and use explicit case statements. Code is a little
longer but clearer. Checkpatch.pl does not complain anymore.

Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:37:46 -07:00
Mateusz Kulikowski ab74359822 staging: rtl8192e: Rename init_hal_dm
Use naming schema found in other rtlwifi devices.
Rename init_hal_dm to rtl92e_dm_init.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:26 -07:00
Mateusz Kulikowski b8216b690d staging: rtl8192e: Rename init_firmware
Use naming schema found in other rtlwifi devices.
Rename init_firmware to rtl92e_init_fw.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:26 -07:00
Mateusz Kulikowski d66e938e1b staging: rtl8192e: Rename rtllib_ips_leave_wq
Use naming schema found in other rtlwifi devices.
Rename rtllib_ips_leave_wq to rtl92e_rtllib_ips_leave_wq.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:26 -07:00
Mateusz Kulikowski bf135a16c5 staging: rtl8192e: Rename rtllib_ips_leave
Use naming schema found in other rtlwifi devices.
Rename rtllib_ips_leave to rtl92e_rtllib_ips_leave.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:26 -07:00
Mateusz Kulikowski c34b29f7c8 staging: rtl8192e: Rename rtl8192_hw_wakeup_wq
Use naming schema found in other rtlwifi devices.
Rename rtl8192_hw_wakeup_wq to rtl92e_hw_wakeup_wq.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:25 -07:00
Mateusz Kulikowski 43bcb3b4c7 staging: rtl8192e: Rename rtl8192_hw_wakeup
Use naming schema found in other rtlwifi devices.
Rename rtl8192_hw_wakeup to rtl92e_hw_wakeup.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:25 -07:00
Mateusz Kulikowski feb257e5f9 staging: rtl8192e: Rename rtl8192_hw_to_sleep
Use naming schema found in other rtlwifi devices.
Rename rtl8192_hw_to_sleep to rtl92e_enter_sleep.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:25 -07:00
Mateusz Kulikowski bcdcc1ea06 staging: rtl8192e: Rename rtl8192_hw_sleep_wq
Use naming schema found in other rtlwifi devices.
Rename rtl8192_hw_sleep_wq to rtl92e_hw_sleep_wq.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:25 -07:00
Mateusz Kulikowski 9c4a55d1da staging: rtl8192e: Rename LeisurePSLeave
Use naming schema found in other rtlwifi devices.
Rename LeisurePSLeave to rtl92e_leisure_ps_leave.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:25 -07:00
Mateusz Kulikowski 04197ef2bd staging: rtl8192e: Rename LeisurePSEnter
Use naming schema found in other rtlwifi devices.
Rename LeisurePSEnter to rtl92e_leisure_ps_enter.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:25 -07:00
Mateusz Kulikowski a514c798ee staging: rtl8192e: Rename IPSLeave_wq
Use naming schema found in other rtlwifi devices.
Rename IPSLeave_wq to rtl92e_ips_leave_wq.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:24 -07:00
Mateusz Kulikowski 2ab2aba29e staging: rtl8192e: Rename IPSLeave
Use naming schema found in other rtlwifi devices.
Rename IPSLeave to rtl92e_ips_leave.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:24 -07:00
Mateusz Kulikowski 410d6fc983 staging: rtl8192e: Rename IPSEnter
Use naming schema found in other rtlwifi devices.
Rename IPSEnter to rtl92e_ips_enter.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:24 -07:00
Mateusz Kulikowski 3683dc1f08 staging: rtl8192e: Rename rtl8192E_suspend
Use naming schema found in other rtlwifi devices.
Rename rtl8192E_suspend to rtl92e_suspend.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:24 -07:00
Mateusz Kulikowski 0ba6623df9 staging: rtl8192e: Rename rtl8192E_resume
Use naming schema found in other rtlwifi devices.
Rename rtl8192E_resume to rtl92e_resume.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:24 -07:00
Mateusz Kulikowski e250592ed9 staging: rtl8192e: Rename rtl8192_pci_findadapter
Use naming schema found in other rtlwifi devices.
Rename rtl8192_pci_findadapter to rtl92e_check_adapter.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:24 -07:00
Mateusz Kulikowski 68cb7b7a59 staging: rtl8192e: Rename eprom_read
Use naming schema found in other rtlwifi devices.
Rename eprom_read to rtl92e_eeprom_read.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:24 -07:00
Mateusz Kulikowski 2e3ba83a49 staging: rtl8192e: Rename init_rate_adaptive
Use naming schema found in other rtlwifi devices.
Rename init_rate_adaptive to rtl92e_init_adaptive_rate.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:24 -07:00
Mateusz Kulikowski 8e1e64bb66 staging: rtl8192e: Rename hal_dm_watchdog
Use naming schema found in other rtlwifi devices.
Rename hal_dm_watchdog to rtl92e_dm_watchdog.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:24 -07:00
Mateusz Kulikowski 33059f5435 staging: rtl8192e: Rename dm_txpower_trackingcallback
Use naming schema found in other rtlwifi devices.
Rename dm_txpower_trackingcallback to rtl92e_dm_txpower_tracking_wq.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:23 -07:00
Mateusz Kulikowski 3cd4db70c6 staging: rtl8192e: Rename dm_rf_pathcheck_workitemcallback
Use naming schema found in other rtlwifi devices.
Rename dm_rf_pathcheck_workitemcallback to rtl92e_dm_rf_pathcheck_wq.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:23 -07:00
Mateusz Kulikowski 25c01ec36e staging: rtl8192e: Rename dm_restore_dynamic_mechanism_state
Use naming schema found in other rtlwifi devices.
Rename dm_restore_dynamic_mechanism_state to rtl92e_dm_restore_state.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:23 -07:00
Mateusz Kulikowski 5a9f18cfed staging: rtl8192e: Rename dm_initialize_txpower_tracking
Use naming schema found in other rtlwifi devices.
Rename dm_initialize_txpower_tracking to rtl92e_dm_init_txpower_tracking.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:23 -07:00
Mateusz Kulikowski 7842c2d58d staging: rtl8192e: Rename dm_init_edca_turbo
Use naming schema found in other rtlwifi devices.
Rename dm_init_edca_turbo to rtl92e_dm_init_edca_turbo.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:23 -07:00
Mateusz Kulikowski 59e84dc363 staging: rtl8192e: Rename dm_cck_txpower_adjust
Use naming schema found in other rtlwifi devices.
Rename dm_cck_txpower_adjust to rtl92e_dm_cck_txpower_adjust.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:23 -07:00
Mateusz Kulikowski 090e8a4d99 staging: rtl8192e: Rename dm_backup_dynamic_mechanism_state
Use naming schema found in other rtlwifi devices.
Rename dm_backup_dynamic_mechanism_state to rtl92e_dm_backup_state.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:22 -07:00
Mateusz Kulikowski fd9e317184 staging: rtl8192e: Rename deinit_hal_dm
Use naming schema found in other rtlwifi devices.
Rename deinit_hal_dm to rtl92e_dm_deinit.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:22 -07:00
Mateusz Kulikowski 6dee0c884a staging: rtl8192e: Rename write_nic_word
Use naming schema found in other rtlwifi devices.
Rename write_nic_word to rtl92e_writew.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:22 -07:00
Mateusz Kulikowski 8ea541001b staging: rtl8192e: Rename write_nic_dword
Use naming schema found in other rtlwifi devices.
Rename write_nic_dword to rtl92e_writel.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:22 -07:00
Mateusz Kulikowski d8ae196769 staging: rtl8192e: Rename write_nic_byte
Use naming schema found in other rtlwifi devices.
Rename write_nic_byte to rtl92e_writeb.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:21 -07:00
Mateusz Kulikowski 97ef450b86 staging: rtl8192e: Rename rtl819x_update_rxsignalstatistics8190pci
Use naming schema found in other rtlwifi devices.
Rename rtl819x_update_rxsignalstatistics8190pci to
rtl92e_update_rx_statistics.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:21 -07:00
Mateusz Kulikowski 7879efc5a6 staging: rtl8192e: Rename rtl819x_UpdateRxPktTimeStamp
Use naming schema found in other rtlwifi devices.
Rename rtl819x_UpdateRxPktTimeStamp to rtl92e_update_rx_pkt_timestamp.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:26:21 -07:00
Mateusz Kulikowski f54f10bfa1 staging: rtl8192e: Rename rtl819x_translate_todbm
Use naming schema found in other rtlwifi devices.
Rename rtl819x_translate_todbm to rtl92e_translate_to_dbm.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 21:24:23 -07:00