Commit Graph

1224 Commits

Author SHA1 Message Date
Mateusz Kulikowski
b0dcce5fbf staging: rtl8192e: _rtl92e_fw_boot_cpu: Remove unneeded goto
Drop ugly label as no resource cleanup is needed.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
91d7b8cf7c staging: rtl8192e: fw: Use netdev_dbg instead of RT_TRACE
Drop legacy logging system.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
15d140664c staging: rtl8192e: Remove _rtl92e_fw_download_code()
Reuse  rtl92e_send_cmd_pkt() instead.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
f4c807d6d5 staging: rtl8192e: Swap firmware endian in _rtl92e_fw_prepare()
Remove endian swap from  _rtl92e_fw_download_code(),
this way it can be replaced with _rtl92e_send_cmd_pkt().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
09b1893831 staging: rtl8192e: Add _rtl92e_fw_prepare
Add function to request and prepare firmware image.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
51dac5f095 staging: rtl8192e: Add _rtl92e_wait_for_fw()
Add function waiting for firmware load/boot;
Remove _rtl92e_is_fw_ready() that is obsolete (can be replaced
with  _rtl92e_wait_for_fw().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
58533b2217 staging: rtl8192e: init_fw: Drop unneded check
rst_opt is always equal to OPT_SYSTEM_RESET in this scope.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
6167a6c88c staging: rtl8192e: Rename rt_firmware::firmware_status to status
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
292f4b47ba staging: rtl8192e: Add rt_fw_blob
rt_fw_blob contains single firmware blob and its size.
Update firmware loading code accordingly.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
c0f6479165 staging: rtl8192e: cmd_pkt: Handle INIT packets
Add support for DESC_PACKET_TYPE_INIT to rtl92e_send_cmd_pkt().
With this generalization, _rtl92e_fw_download_code() may be removed
after slight modification.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
1e7da09afd staging: rtl8192e: Use macro to represent fragmentation threshold
Add CMDPACKET_FRAG_SIZE macro and use it as fragmentation threshold
in send_cmd_pkt functions.
This makes rt_firmware::cmdpacket_frag_thresold and
 rtl92e_init_fw_param() obsolete.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
c008fa83c4 staging: rtl8192e: cmdpkt: Pass data as const void*
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
d15fe3e019 staging: rtl8192e: cmdpkt: Reorder arguments
Use send_cmd_pkt(dev, type, data , size) order to avoid confusion

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
2e74c73c98 staging: rtl8192e: cmdpkt: Simplify argument names
Rename:
codevirtualaddress -> data
buffer_len -> len
packettype -> type

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
1afacec663 staging: rtl8192e: cmdpkt: Use packettype properly
rtl92e_send_cmd_pkt used hardcoded NORMAL packet type.

As it may be used to send other packet types as well - use
provided packet type instead of defaults.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski
62d46eaac6 staging: rtl8192e: rtl_dm: Use proper packet type
rtl92e_send_cmd_packet sends only NORMAL packets, passing
invalid type (even it it's ignored) is confusing.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Ksenija Stanojevic
c1ccdddc2e Staging: rtl8192e: Use module_pci_driver
Use module_pci_driver for drivers whose init and exit functions only
register and unregister, respectively.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:12:48 -07:00
Shivani Bhardwaj
bd60ac14db Staging: rtl8192e: rtllib_softmac: Remove useless cast
Explicit type conversion is not required to remove it.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@

* T x = (T)e;

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:46:48 -07:00
Shraddha Barke
749f3c0500 Staging: rtl8192e: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:54:14 -07:00
Luis de Bethencourt
86dc65b36c staging: rtl8192e: rtl_wx: fix negative noise value
wstats->qual.noise is of type uint8, so it shouldn't be assigned a
negative number. Assigning it 0x100 - 100, which is the equivalent
to -100 dBm when IW_QUAL_DBM is set.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Tested-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:48:15 +02:00
Mateusz Kulikowski
0588da57c4 staging: rtl8192e: Merge/Remove _rtl92e_dm_bb_initialgain_backup
Merge rtl92e_dm_backup_state and _rtl92e_dm_bb_initialgain_backup.
Static function is called only once and dm_backup_state had short body.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:26:07 +02:00
Mateusz Kulikowski
77b6c42e02 staging: rtl8192e: Simplify _rtl92e_calculate_bit_shift
Use ffs instead of iteration. Behaviour of function doesn't change.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:26:07 +02:00
Mateusz Kulikowski
fcf481dbbd staging: rtl8192e: Remove extra braces
Remove extra braces in _rtl92e_dm_check_tx_power_tracking_thermal.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:26:07 +02:00
Mateusz Kulikowski
e7ebb316b3 staging: rtl8192e: Remove _rtl92e_dm_check_pbc_gpio
Function is empty.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:26:07 +02:00
Mateusz Kulikowski
68a707e41f staging: rtl8192e: Remove _rtl92e_silent_reset_mesh
Function is empty.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:26:07 +02:00
Mateusz Kulikowski
ae6d07a5d1 staging: rtl8192e: Fix FSF_MAILING_ADDRESS warnings
Remove FSF address from licenses at the beginning of files.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:26:06 +02:00
Mateusz Kulikowski
4c29207a96 staging: rtl8192e: Fix CONSTANT_COMPARISON warnings
Remove yoda conditions where pointed by checkpatch.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:26:06 +02:00
Mateusz Kulikowski
fc00af0cd0 staging: rtl8192e: Fix SUSPECT_CODE_INDENT warnings
Fix SUSPECT_CODE_INDENT warnings (indentation).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:26:06 +02:00
Mateusz Kulikowski
a2e681faa5 staging: rtl8192e: rtl_wx: Fix BRACES warning
Fix checkpatch BRACES warning.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:26:06 +02:00
Mateusz Kulikowski
713519c710 staging: rtl8192e: Rename dm_ctrl_initgain_byrssi
Use naming schema found in other rtlwifi devices.
Rename dm_ctrl_initgain_byrssi to _rtl92e_dm_ctrl_initgain_byrssi.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:09 +02:00
Mateusz Kulikowski
3270b5074f staging: rtl8192e: Rename firmware_check_ready
Use naming schema found in other rtlwifi devices.
Rename firmware_check_ready to _rtl92e_fw_check_ready.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:09 +02:00
Mateusz Kulikowski
57aac1ce29 staging: rtl8192e: Rename r8192_wx_set_enc
Use naming schema found in other rtlwifi devices.
Rename r8192_wx_set_enc to _rtl92e_wx_set_enc.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:09 +02:00
Mateusz Kulikowski
ea3ab341a2 staging: rtl8192e: Rename dm_tx_update_tssi_weak_signal
Use naming schema found in other rtlwifi devices.
Rename dm_tx_update_tssi_weak_signal to
_rtl92e_dm_tx_update_tssi_weak_signal.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:09 +02:00
Mateusz Kulikowski
264045986f staging: rtl8192e: Rename dm_tx_update_tssi_strong_signal
Use naming schema found in other rtlwifi devices.
Rename dm_tx_update_tssi_strong_signal to
_rtl92e_dm_tx_update_tssi_strong_signal.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:08 +02:00
Mateusz Kulikowski
a19b5d7207 staging: rtl8192e: Rename dm_TXPowerTrackingCallback_TSSI
Use naming schema found in other rtlwifi devices.
Rename dm_TXPowerTrackingCallback_TSSI to
_rtl92e_dm_tx_power_tracking_callback_tssi.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:08 +02:00
Mateusz Kulikowski
721d2f8dfe staging: rtl8192e: Rename dm_TXPowerTrackingCallback_ThermalMeter
Use naming schema found in other rtlwifi devices.
Rename dm_TXPowerTrackingCallback_ThermalMeter to
_rtl92e_dm_tx_power_tracking_cb_thermal.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:08 +02:00
Mateusz Kulikowski
1b97c22064 staging: rtl8192e: Rename dm_txpower_reset_recovery
Use naming schema found in other rtlwifi devices.
Rename dm_txpower_reset_recovery to _rtl92e_dm_tx_power_reset_recovery.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:08 +02:00
Mateusz Kulikowski
07aec67071 staging: rtl8192e: Rename dm_StartSWFsync
Use naming schema found in other rtlwifi devices.
Rename dm_StartSWFsync to _rtl92e_dm_start_sw_fsync.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:08 +02:00
Mateusz Kulikowski
22b5e8cd71 staging: rtl8192e: Rename dm_StartHWFsync
Use naming schema found in other rtlwifi devices.
Rename dm_StartHWFsync to _rtl92e_dm_start_hw_fsync.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:08 +02:00
Mateusz Kulikowski
500344fdc2 staging: rtl8192e: Rename dm_send_rssi_tofw
Use naming schema found in other rtlwifi devices.
Rename dm_send_rssi_tofw to _rtl92e_dm_send_rssi_to_fw.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:08 +02:00
Mateusz Kulikowski
8c0510e739 staging: rtl8192e: Rename dm_rxpath_sel_byrssi
Use naming schema found in other rtlwifi devices.
Rename dm_rxpath_sel_byrssi to _rtl92e_dm_rx_path_sel_byrssi.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:08 +02:00
Mateusz Kulikowski
88a4b242ed staging: rtl8192e: Rename dm_pd_th
Use naming schema found in other rtlwifi devices.
Rename dm_pd_th to _rtl92e_dm_pd_th.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:08 +02:00
Mateusz Kulikowski
199ab04fb1 staging: rtl8192e: Rename dm_Init_WA_Broadcom_IOT
Use naming schema found in other rtlwifi devices.
Rename dm_Init_WA_Broadcom_IOT to _rtl92e_dm_init_wa_broadcom_iot.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:07 +02:00
Mateusz Kulikowski
1078599cbf staging: rtl8192e: Rename dm_InitializeTXPowerTracking_TSSI
Use naming schema found in other rtlwifi devices.
Rename dm_InitializeTXPowerTracking_TSSI to
_rtl92e_dm_initialize_tx_power_tracking_tssi.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:07 +02:00
Mateusz Kulikowski
7b3625cde6 staging: rtl8192e: Rename dm_init_rxpath_selection
Use naming schema found in other rtlwifi devices.
Rename dm_init_rxpath_selectio to _rtl92e_dm_init_rx_path_selection.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:07 +02:00
Mateusz Kulikowski
09de06c9e9 staging: rtl8192e: Rename dm_InitializeTXPowerTracking_ThermalMeter
Use naming schema found in other rtlwifi devices.
Rename dm_InitializeTXPowerTracking_ThermalMeter to
_rtl92e_dm_init_tx_power_tracking_thermal.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:07 +02:00
Mateusz Kulikowski
5578a5660b staging: rtl8192e: Rename dm_initial_gain
Use naming schema found in other rtlwifi devices.
Rename dm_initial_gain to _rtl92e_dm_initial_gain.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:07 +02:00
Mateusz Kulikowski
e1f59c71b4 staging: rtl8192e: Rename dm_init_fsync
Use naming schema found in other rtlwifi devices.
Rename dm_init_fsync to _rtl92e_dm_init_fsync.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:07 +02:00
Mateusz Kulikowski
53f1c5b19c staging: rtl8192e: Rename dm_init_dynamic_txpower
Use naming schema found in other rtlwifi devices.
Rename dm_init_dynamic_txpower to _rtl92e_dm_init_dynamic_tx_power.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:07 +02:00
Mateusz Kulikowski
7dd6581129 staging: rtl8192e: Rename dm_init_ctstoself
Use naming schema found in other rtlwifi devices.
Rename dm_init_ctstoself to _rtl92e_dm_init_cts_to_self.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 03:34:07 +02:00