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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>