Dan Carpenter
0ea03f795d
staging: r8188eu: Fix a couple scheduling in atomic bugs
...
These allocations are sometimes done while holding a spin_lock so they
have to be atomic. The call tree looks like this:
-> rtw_set_802_11_connect() <- takes a spin_lock
-> rtw_do_join()
-> rtw_sitesurvey_cmd() <-- does a GFP_ATOMIC allocation
-> p2p_ps_wk_cmd()
Fixes: 15865124fe ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/20210812065710.GA31863@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:28:25 +02:00
Larry Finger
0d5e4bfe47
staging: r8188eu: Fix smatch warnings in os_dep/*.c
...
Smatch shows the following:
drivers/staging/r8188eu/os_dep/ioctl_linux.c:1478 rtw_wx_set_essid() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:1479 rtw_wx_set_essid() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:1481 rtw_wx_set_essid() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:1555 rtw_wx_set_rate() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:2596 rtw_wps_start() warn: variable dereferenced before check 'pdata' (see line 2590)
drivers/staging/r8188eu/os_dep/ioctl_linux.c:2790 rtw_p2p_profilefound() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:4846 rtw_set_encryption() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:5628 rtw_mp_efuse_get() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7251 rtw_mp_set() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7255 rtw_mp_set() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7310 rtw_mp_get() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7345 rtw_mp_get() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7349 rtw_mp_get() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/mlme_linux.c:106 rtw_os_indicate_disconnect() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/os_intfs.c:1118 ips_netdrv_open() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/osdep_service.c:37 rtw_atoi() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/recv_linux.c:65 rtw_os_recvbuf_resource_free() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/usb_intf.c:338 rtw_hw_suspend() warn: variable dereferenced before check 'padapter' (see line 327)
drivers/staging/r8188eu/os_dep/usb_intf.c:381 rtw_hw_suspend() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/usb_intf.c:394 rtw_hw_resume() warn: variable dereferenced before check 'padapter' (see line 391)
drivers/staging/r8188eu/os_dep/usb_intf.c:506 rtw_resume() warn: inconsistent indenting
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Link: https://lore.kernel.org/r/20210812015232.23784-4-Larry.Finger@lwfinger.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:28:01 +02:00
Larry Finger
178cd80dc1
staging: r8188eu: Fix smatch problems in hal/*.c
...
Smatch detects the folloring:
drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c:199 ODM_ReadAndConfig_RadioA_1T_8188E() warn: inconsistent indenting
drivers/staging/r8188eu/hal/HalPwrSeqCmd.c:65 HalPwrSeqCmdParsing() warn: inconsistent indenting
drivers/staging/r8188eu/hal/odm.c:225 ODM_DMWatchdog() warn: inconsistent indenting
drivers/staging/r8188eu/hal/odm.c:485 ODM_Write_DIG() warn: inconsistent indenting
drivers/staging/r8188eu/hal/odm.c:485 ODM_Write_DIG() warn: if statement not indented
drivers/staging/r8188eu/hal/odm.c:491 ODM_Write_DIG() warn: if statement not indented
drivers/staging/r8188eu/hal/odm.c:493 ODM_Write_DIG() warn: inconsistent indenting
drivers/staging/r8188eu/hal/odm.c:496 ODM_Write_DIG() warn: if statement not indented
drivers/staging/r8188eu/hal/odm.c:498 ODM_Write_DIG() warn: inconsistent indenting
drivers/staging/r8188eu/hal/odm.c:501 ODM_Write_DIG() warn: if statement not indented
drivers/staging/r8188eu/hal/odm.c:551 odm_DIGbyRSSI_LPS() warn: inconsistent indenting
drivers/staging/r8188eu/hal/Hal8188ERateAdaptive.c:360 odm_ARFBRefresh_8188E() warn: inconsistent indenting
drivers/staging/r8188eu/hal/odm_HWConfig.c:268 odm_RxPhyStatus92CSeries_Parsing() warn: inconsistent indenting
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c:726 hal_EfusePowerSwitch_RTL8188E() warn: inconsistent indenting
drivers/staging/r8188eu/hal/rtl8188e_mp.c:60 Hal_mpt_SwitchRfSetting() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:547 wpa_set_encryption() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:1478 rtw_wx_set_essid() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:1479 rtw_wx_set_essid() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:1481 rtw_wx_set_essid() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:1555 rtw_wx_set_rate() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:2596 rtw_wps_start() warn: variable dereferenced before check 'pdata' (see line 2590)
drivers/staging/r8188eu/os_dep/ioctl_linux.c:2790 rtw_p2p_profilefound() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:4846 rtw_set_encryption() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:5628 rtw_mp_efuse_get() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7055 rtw_mp_thermal() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7251 rtw_mp_set() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7255 rtw_mp_set() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7310 rtw_mp_get() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7345 rtw_mp_get() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7349 rtw_mp_get() warn: inconsistent indenting
drivers/staging/r8188eu/hal/usb_halinit.c:856 rtl8188eu_hal_init() warn: inconsistent indenting
drivers/staging/r8188eu/hal/usb_halinit.c:859 rtl8188eu_hal_init() warn: inconsistent indenting
drivers/staging/r8188eu/hal/usb_halinit.c:862 rtl8188eu_hal_init() warn: inconsistent indenting
drivers/staging/r8188eu/hal/usb_halinit.c:887 rtl8188eu_hal_init() warn: inconsistent indenting
drivers/staging/r8188eu/hal/usb_halinit.c:915 rtl8188eu_hal_init() warn: inconsistent indenting
drivers/staging/r8188eu/hal/usb_halinit.c:925 rtl8188eu_hal_init() warn: inconsistent indenting
drivers/staging/r8188eu/hal/usb_halinit.c:929 rtl8188eu_hal_init() warn: inconsistent indenting
drivers/staging/r8188eu/hal/usb_ops_linux.c:263 usb_writeN() warn: inconsistent indenting
drivers/staging/r8188eu/hal/usb_ops_linux.c:568 usb_read_port() warn: inconsistent indenting
`
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
drivers/staging/r8188eu/hal/usb_halinit.c:1887:17: warning: mixing declarations and code
drivers/staging/r8188eu/hal/usb_ops_linux.c:519:25: error: typename in expression
Link: https://lore.kernel.org/r/20210812015232.23784-3-Larry.Finger@lwfinger.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:28:01 +02:00
Larry Finger
4d50f76395
staging: r8188eu: Fix Smatch warnings for core/*.c
...
Smatch reports the following problems:
drivers/staging/r8188eu/core/rtw_br_ext.c:655 nat25_db_handle() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_cmd.c:436 rtw_sitesurvey_cmd() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_cmd.c:450 rtw_sitesurvey_cmd() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_led.c:330 SwLedBlink2() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:359 SwLedBlink2() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:538 SwLedBlink4() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:567 SwLedBlink4() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:685 SwLedBlink5() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:771 SwLedControlMode1() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:819 SwLedControlMode1() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:845 SwLedControlMode1() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_led.c:1574 LedControl8188eu() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme.c:420 is_same_network() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme.c:986 rtw_joinbss_update_stainfo() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme.c:1162 rtw_joinbss_event_prehandle() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme.c:1858 rtw_restruct_sec_ie() error: uninitialized symbol 'authmode'.
drivers/staging/r8188eu/core/rtw_mlme.c:1869 rtw_restruct_sec_ie() error: uninitialized symbol 'authmode'.
drivers/staging/r8188eu/core/rtw_mlme_ext.c:401 _mgt_dispatcher() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme_ext.c:3210 is_matched_in_profilelist() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme_ext.c:4351 dump_mgntframe_and_wait() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme_ext.c:4374 dump_mgntframe_and_wait_ack() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mlme_ext.c:7378 _linked_rx_signal_strehgth_display() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mp.c:694 SetPacketTx() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_mp.c:900 _rtw_mp_xmit_priv() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_p2p.c:1130 process_p2p_group_negotation_req() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_recv.c:188 rtw_free_recvframe() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_recv.c:499 portctrl() error: uninitialized symbol 'ether_type'.
drivers/staging/r8188eu/core/rtw_recv.c:507 portctrl() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_recv.c:722 sta2sta_data_frame() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_recv.c:1601 amsdu_to_msdu() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_security.c:283 rtw_seccalctkipmic() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_security.c:1116 aes_cipher() warn: for statement not indented
drivers/staging/r8188eu/core/rtw_security.c:1213 rtw_aes_encrypt() warn: inconsistent indenting
rivers/staging/r8188eu/core/rtw_sta_mgt.c:18 _rtw_init_stainfo() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_sta_mgt.c:475 rtw_get_bcmc_stainfo() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_wlan_util.c:65 cckratesonly_included() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_wlan_util.c:1150 should_forbid_n_rate() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_wlan_util.c:1401 check_assoc_AP() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_wlan_util.c:1403 check_assoc_AP() warn: inconsistent indenting
drivers/staging/r8188eu/core/rtw_xmit.c:805 rtw_make_wlanhdr() warn: if statement not indented
drivers/staging/r8188eu/core/rtw_xmit.c:1691 rtw_br_client_tx() warn: inconsistent indenting
drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c:199 ODM_ReadAndConfig_RadioA_1T_8188E() warn: inconsistent indenting
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Link: https://lore.kernel.org/r/20210812015232.23784-2-Larry.Finger@lwfinger.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:28:00 +02:00
Fabio M. De Francesco
221abd4d47
staging: r8188eu: Remove no more necessary definitions and code
...
Remove no more necessary further 5GHz related code, along with no
more used definitions of macro and variables.
Acked-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com >
Link: https://lore.kernel.org/r/20210812002519.23678-4-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:25:47 +02:00
Fabio M. De Francesco
9f68048346
staging: r8188eu: Remove code related to unsupported channels
...
Remove all code related to unsupported channel
bandwidths. rtl8188eu* NICs work only on 20 and
40 Mhz channels.
Acked-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com >
Link: https://lore.kernel.org/r/20210812002519.23678-3-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:25:47 +02:00
Fabio M. De Francesco
1fee0cc939
staging: r8188eu: Remove all 5GHz network types
...
Remove all 5Ghz network types. r8188eu works on
802.11bgn standards and on 2.4Ghz band.
Acked-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com >
Link: https://lore.kernel.org/r/20210812002519.23678-2-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:25:47 +02:00
Martin Kaiser
e7dd1a58ce
staging: r8188eu: remove CONFIG_USB_HCI from Makefile
...
We already depend on USB. There's no need to set CONFIG_USB_HCI in the
Makefile.
Some other Realtek drivers use #ifdef CONFIG_USB_HCI in their code, the
r8188 driver doesn't.
Acked-by: Phillip Potter <phil@philpotter.co.uk >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20210811201450.31366-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:23:02 +02:00
Martin Kaiser
a1c95234d6
staging: r8188eu: use proper way to build a module
...
It seems that for now, we can only build this driver as a module.
Use the same mechanism as other drivers (such as rtl8723bs or the
deprecated rtl8188eu) to enforce building as a module, i.e. depend on m
in Kconfig instead of setting CONFIG_R8188EU = m in the Makefile.
If we set CONFIG_R8188EU in the Makefile, this setting will not be visible
in .config.
Acked-by: Phillip Potter <phil@philpotter.co.uk >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20210811201450.31366-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:23:02 +02:00
Martin Kaiser
ef32cccc7f
staging: r8188eu: (trivial) remove a duplicate debug print
...
Keep the one that shows the wakeup capability.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20210811201450.31366-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:23:02 +02:00
Martin Kaiser
86d90d776e
staging: r8188eu: remove unused function parameters
...
rtw_usb_if1_init and chip_by_usb_id do not need a
struct usb_device_id parameter.
Acked-by: Phillip Potter <phil@philpotter.co.uk >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20210811201450.31366-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:23:02 +02:00
Martin Kaiser
b8a59fed6b
staging: r8188eu: remove unused efuse hal components
...
struct hal_data_8188e contains some components related to efuses which
are not used for rl8188eu.
Acked-by: Phillip Potter <phil@philpotter.co.uk >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20210811201450.31366-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:23:02 +02:00
Dee-Jay Anthony Logozzo
959aabedcd
staging: gdm724x: Place macro argument within parentheses
...
Place the macro arguments within parentheses to avoid precedence issues.
This solves the following checkpatch.pl warnings
CHECK: Macro argument 'len' may be better as '(len)' to avoid precedence issues
+#define ND_NLMSG_S_LEN(len) (len + ND_IFINDEX_LEN)
CHECK: Macro argument 'nlh' may be better as '(nlh)' to avoid precedence issues
+#define ND_NLMSG_R_LEN(nlh) (nlh->nlmsg_len - ND_IFINDEX_LEN)
Signed-off-by: Dee-Jay Anthony Logozzo <dj@djl.id.au >
Link: https://lore.kernel.org/r/20210811134132.5240-1-dj@djl.id.au
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-12 10:21:50 +02:00
Tuo Li
25ee7e89d4
staging: rtl8192e: rtl_core: Fix possible null-pointer dereference in _rtl92e_pci_disconnect()
...
The variable dev is checked in:
if (dev)
This indicates that it can be NULL. If so, a null-pointer dereference will
occur:
priv = rtllib_priv(dev);
However, the value of priv is not used in the remaining part of this
function. Thus the else-branch can be removed to fix this posible
null-pointer dereference.
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn >
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Tuo Li <islituo@gmail.com >
Link: https://lore.kernel.org/r/20210811031135.4110-1-islituo@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:43:44 +02:00
Nathan Chancellor
3a330ece23
staging: r8188eu: os_dep: Hoist vmalloc.h include into osdep_service.h
...
After commit 71f09c5ae9 ("staging: r8188eu: Remove wrapper around
vfree"), the driver fails to build on Hexagon due to an implicit
declaration in several different files:
drivers/staging/r8188eu/core/rtw_mlme.c:129:3: error: implicit
declaration of function 'vfree'
[-Werror,-Wimplicit-function-declaration]
vfree(pmlmepriv->free_bss_buf);
^
1 error generated.
Previously, vfree() was only called in osdep_service.c, which includes
vmalloc.h for vmalloc() and vfree(). Now, the driver relies on vfree()
getting implicitly included from another file.
Hoist the vmalloc.h include from osdep_service.c to osdep_service.h so
that the driver continues to build fine on all architectures.
Fixes: 71f09c5ae9 ("staging: r8188eu: Remove wrapper around vfree")
Acked-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Nathan Chancellor <nathan@kernel.org >
Link: https://lore.kernel.org/r/20210811005505.3953122-1-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:42:32 +02:00
Yang Yingliang
e3027f25c6
staging: r8188eu: Use GFP_ATOMIC under spin lock
...
A spin lock is taken in __nat25_db_network_insert() and
update_BCNTIM() is called under spin lock so we should
use GFP_ATOMIC in both place.
Fixes: 15865124fe ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Reported-by: Hulk Robot <hulkci@huawei.com >
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Acked-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com >
Link: https://lore.kernel.org/r/20210810125314.2182112-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:42:08 +02:00
Larry Finger
dcda94c941
staging: r8188eu: Replace BITn with BIT(n)
...
The driver uses BITn instead of BIT(n). All such usage is converted.
Note that this patch does not address any warnings that checkpatch
will find. These include missing space around operators and lines
that are too long. These problems will be addressed in a separate
patch.
Acked-by: Phillip Potter <phil@philpotter.co.uk >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Link: https://lore.kernel.org/r/20210810180511.8986-1-Larry.Finger@lwfinger.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:41:38 +02:00
Phillip Potter
987219ad34
staging: r8188eu: remove lines from Makefile that silence build warnings
...
Remove the several lines from the Makefile that append EXTRA_CFLAGS options
to silence build warnings about unused variables, unused functions and such
like. This will enable cleanup of missed warnings, and easier spotting
of future such problems.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20210810235047.177883-9-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:41:04 +02:00
Phillip Potter
6be20b17ff
staging: r8188eu: remove unused variable from rtw_init_recv_timer
...
Remove unused variable from rtw_init_recv_timer function in
os_dep/recv_linux.c
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20210810235047.177883-8-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:41:04 +02:00
Phillip Potter
8268010e8f
staging: r8188eu: remove unused variable from rtw_init_drv_sw
...
Remove unused variable from rtw_init_drv_sw function in
os_dep/os_intfs.c
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20210810235047.177883-7-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:41:04 +02:00
Phillip Potter
fdd46ffbe4
staging: r8188eu: remove unused variable from rtl8188e_init_dm_priv
...
Remove unused variable from the rtl8188e_init_dm_priv function in
hal/rtl8188e_dm.c
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20210810235047.177883-6-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:41:04 +02:00
Phillip Potter
aab8704730
staging: r8188eu: remove rtw_mfree_sta_priv_lock function
...
Remove rtw_mfree_sta_priv_lock function from rtw_sta_mgt.c, as it does
nothing and contains an unused variable.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20210810235047.177883-5-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:41:04 +02:00
Phillip Potter
d60489b697
staging: r8188eu: remove unused label from recv_indicatepkt_reorder
...
Remove unused goto label from recv_indicatepkt_reorder function in
core/rtw_recv.c
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20210810235047.177883-4-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:41:03 +02:00
Phillip Potter
085f11874b
staging: r8188eu: remove unused oid_null_function function
...
Remove unused oid_null_function function from include/rtw_ioctl.h
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20210810235047.177883-3-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:41:03 +02:00
Phillip Potter
ba4b1d7cdd
staging: r8188eu: remove unused functions from os_dep/ioctl_linux.c
...
Remove unused functions that are now no longer called as a result of the
removal of rtw_ioctl in a previous patch. This includes functions not
directly called from rtw_ioctl, but anything in that specific
call-chain.
Acked-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20210810235047.177883-2-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-11 09:41:03 +02:00
Phillip Potter
ae7471cae0
staging: r8188eu: remove rtw_ioctl function
...
Remove rtw_ioctl function from os_dep/ioctl_linux.c, its declaration
in include/osdep_intf.h, and finally its inclusion as the value of the
.ndo_do_ioctl member of struct net_device_ops rtw_netdev_ops in
os_dep/os_intfs.c.
The e-mail from Arnd Bergmann at:
https://lore.kernel.org/linux-next/CAK8P3a0WRMNmBmBDerZ0nWPdFZKALnxrj-uUFBkTP-MOtv48vg@mail.gmail.com
explains the justification for this approach. Essentially, changes from
net-next make the existing function and its use of SIOCDEVPRIVATE ioctls
unworkable without changes.
Functions called from rtw_ioctl that are now no longer accessible will
be cleaned up in further patches. Additionally, once these changes have
made their way downstream to the staging branch, we can modify and
reconnect rtw_android_priv_cmd via ndo_siocdevprivate in struct
net_device_ops.
Suggested-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20210810074504.957-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:21:35 +02:00
Michael Straube
1c69b0a861
staging: r8188eu: remove remaining unnecessary parentheses in core dir
...
Remove remaining unnecessary parentheses in core dir reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-18-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:06 +02:00
Michael Straube
a8165f872b
staging: r8188eu: remove unnecessary parentheses in core/rtw_cmd.c
...
Remove unnecessary parentheses in core/rtw_cmd.c reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-17-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:06 +02:00
Michael Straube
6cd1603cc2
staging: r8188eu: remove unnecessary parentheses in core/rtw_ioctl_set.c
...
Remove unnecessary parentheses in core/rtw_ioctl_set.c reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-16-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
4fdda47ee4
staging: r8188eu: remove unnecessary parentheses in core/rtw_io.c
...
Remove unnecessary parentheses in core/rtw_io.c reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-15-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
9355adf7e5
staging: r8188eu: remove unnecessary parentheses in core/rtw_pwrctrl.c
...
Remove unnecessary parentheses in core/rtw_pwrctrl.c reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-14-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
79c35b7451
staging: r8188eu: remove unnecessary parentheses in core/rtw_recv.c
...
Remove unnecessary parentheses in core/rtw_recv.c reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-13-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
e05b0ea4eb
staging: r8188eu: remove unnecessary parentheses in core/rtw_sta_mgt.c
...
Remove unnecessary parentheses in core/rtw_sta_mgt.c reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-12-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
f9f527d09a
staging: r8188eu: remove unnecessary parentheses in core/rtw_xmit.c
...
Remove unnecessary parentheses in core/rtw_xmit.c reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-11-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
a8962b247a
staging: r8188eu: remove unnecessary parentheses in core/rtw_mlme.c
...
Remove unnecessary parentheses in core/rtw_mlme.c reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-10-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
e293639ec5
staging: r8188eu: clean up comparsions to true/false
...
Clean up some comparsions to true/false to clear chackpatch warnings.
WARNING: Unnecessary parentheses - maybe == should be = ?
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-9-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
7bc4f399dc
staging: r8188eu: remove unnecessary parentheses in core/rtw_p2p.c
...
Remove unnecessary parentheses in core/rtw_p2p.c.
Most of them reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-8-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
f6cf663a72
staging: r8188eu: remove unnecessary parentheses in core/rtw_led.c
...
Remove unnecessary parentheses in core/rtw_led.c reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-7-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
b5f7cd5fdf
staging: r8188eu: remove unnecessary parentheses in core/rtw_wlan_util.c
...
Remove unnecessary parentheses in core/rtw_wlan_util.c reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
b79f4e8450
staging: r8188eu: remove unnecessary parentheses in core/rtw_ap.c
...
Remove unnecessary parentheses in core/rtw_ap.c reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
3b522a11b5
staging: r8188eu: remove unnecessary parentheses in core/rtw_mlme_ext.c
...
Remove unnecessary parentheses in core/rtw_mlme_ext.c.
Most of them reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:05 +02:00
Michael Straube
6839ff57ba
staging: r8188eu: remove unnecessary parentheses in hal dir
...
Remove unnecessary parentheses in the hal directory reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:04 +02:00
Michael Straube
76cdbbc582
staging: r8188eu: remove unnecessary parentheses in os_dep dir
...
Remove unnecessary parentheses in the os_dep directory reported by
checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20210809165007.23204-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:20:04 +02:00
Saurav Girepunje
7929cc5298
staging: rtl8723bs: os_dep: remove unused variable
...
Remove below unused static variable from os_intfs.c
rtw_enusbss
rtw_hwpdn_mode
rtw_hwpwrp_detect
Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com >
Link: https://lore.kernel.org/r/20210807102232.6674-5-saurav.girepunje@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:15:14 +02:00
Saurav Girepunje
3bb8fa376b
staging: rtl8192e: rtl8192e: rtl_core: remove unused global variable
...
Remove unused global variable channels from rtl_core.c
Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com >
Link: https://lore.kernel.org/r/20210807102232.6674-4-saurav.girepunje@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:15:14 +02:00
Martin Kaiser
2abc0000d2
staging: r8188eu: remove the RT_TRACE macro
...
We've deleted all RT_TRACE calls. The macro itself can now be removed
as well.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20210807153636.11712-13-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:14:20 +02:00
Martin Kaiser
ac338b17bb
staging: r8188eu: remove unused DEBUG_OID macro
...
The DEBUG_OID macro is not used and can be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20210807153636.11712-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:14:20 +02:00
Martin Kaiser
da2aa1ecad
staging: r8188eu: use IW_HANDLER to declare wext handlers
...
Use the IW_HANDLER macro to declare the handler functions for
wext ioctls. We don't have to skip unused ioctl numbers manually.
The same modification was applied to the deprecated rtl8188eu driver in
commit af249fce39 ("staging: rtl8188eu: use IW_HANDLER to declare wext
handlers").
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20210807153636.11712-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:14:19 +02:00
Martin Kaiser
a8357683db
staging: r8188eu: remove RT_TRACE prints from xmit_linux.c
...
We should use the standard mechanism for debug prints. Remove the prints
that use driver-specific macros.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20210807153636.11712-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:14:19 +02:00
Martin Kaiser
8be55d7a30
staging: r8188eu: remove RT_TRACE prints from recv_linux.c
...
We should use the standard mechanism for debug prints. Remove the prints
that use driver-specific macros.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20210807153636.11712-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-08-10 12:14:19 +02:00