1. 15 Aug, 2021 8 commits
  2. 13 Aug, 2021 4 commits
  3. 12 Aug, 2021 14 commits
    • Dan Carpenter's avatar
      staging: r8188eu: scheduling in atomic in rtw_createbss_cmd() · 626520f4
      Dan Carpenter authored
      A couple of the callers are holding spinlocks so this allocation has to
      be atomic.  One spinlock is in rtw_set_802_11_connect() but the simpler
      spinlock to review is when this function is called from
      rtw_surveydone_event_callback().
      
      Fixes: 15865124 ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Link: https://lore.kernel.org/r/20210812065852.GB31863@kiliSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      626520f4
    • Dan Carpenter's avatar
      staging: r8188eu: Fix a couple scheduling in atomic bugs · 0ea03f79
      Dan Carpenter authored
      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: 15865124 ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Link: https://lore.kernel.org/r/20210812065710.GA31863@kiliSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0ea03f79
    • Larry Finger's avatar
      staging: r8188eu: Fix smatch warnings in os_dep/*.c · 0d5e4bfe
      Larry Finger authored
      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: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Link: https://lore.kernel.org/r/20210812015232.23784-4-Larry.Finger@lwfinger.netSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0d5e4bfe
    • Larry Finger's avatar
      staging: r8188eu: Fix smatch problems in hal/*.c · 178cd80d
      Larry Finger authored
      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: default avatarLarry 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.netSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      178cd80d
    • Larry Finger's avatar
      staging: r8188eu: Fix Smatch warnings for core/*.c · 4d50f763
      Larry Finger authored
      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: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Link: https://lore.kernel.org/r/20210812015232.23784-2-Larry.Finger@lwfinger.netSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4d50f763
    • Fabio M. De Francesco's avatar
      staging: r8188eu: Remove no more necessary definitions and code · 221abd4d
      Fabio M. De Francesco authored
      Remove no more necessary further 5GHz related code, along with no
      more used definitions of macro and variables.
      Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarFabio M. De Francesco <fmdefrancesco@gmail.com>
      Link: https://lore.kernel.org/r/20210812002519.23678-4-fmdefrancesco@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      221abd4d
    • Fabio M. De Francesco's avatar
      staging: r8188eu: Remove code related to unsupported channels · 9f680483
      Fabio M. De Francesco authored
      Remove all code related to unsupported channel
      bandwidths. rtl8188eu* NICs work only on 20 and
      40 Mhz channels.
      Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarFabio M. De Francesco <fmdefrancesco@gmail.com>
      Link: https://lore.kernel.org/r/20210812002519.23678-3-fmdefrancesco@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9f680483
    • Fabio M. De Francesco's avatar
      staging: r8188eu: Remove all 5GHz network types · 1fee0cc9
      Fabio M. De Francesco authored
      Remove all 5Ghz network types. r8188eu works on
      802.11bgn standards and on 2.4Ghz band.
      Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarFabio M. De Francesco <fmdefrancesco@gmail.com>
      Link: https://lore.kernel.org/r/20210812002519.23678-2-fmdefrancesco@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1fee0cc9
    • Martin Kaiser's avatar
      staging: r8188eu: remove CONFIG_USB_HCI from Makefile · e7dd1a58
      Martin Kaiser authored
      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: default avatarPhillip Potter <phil@philpotter.co.uk>
      Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
      Link: https://lore.kernel.org/r/20210811201450.31366-5-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e7dd1a58
    • Martin Kaiser's avatar
      staging: r8188eu: use proper way to build a module · a1c95234
      Martin Kaiser authored
      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: default avatarPhillip Potter <phil@philpotter.co.uk>
      Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
      Link: https://lore.kernel.org/r/20210811201450.31366-4-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a1c95234
    • Martin Kaiser's avatar
    • Martin Kaiser's avatar
      staging: r8188eu: remove unused function parameters · 86d90d77
      Martin Kaiser authored
      rtw_usb_if1_init and chip_by_usb_id do not need a
      struct usb_device_id parameter.
      Acked-by: default avatarPhillip Potter <phil@philpotter.co.uk>
      Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
      Link: https://lore.kernel.org/r/20210811201450.31366-2-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      86d90d77
    • Martin Kaiser's avatar
      staging: r8188eu: remove unused efuse hal components · b8a59fed
      Martin Kaiser authored
      struct hal_data_8188e contains some components related to efuses which
      are not used for rl8188eu.
      Acked-by: default avatarPhillip Potter <phil@philpotter.co.uk>
      Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
      Link: https://lore.kernel.org/r/20210811201450.31366-1-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b8a59fed
    • Dee-Jay Anthony Logozzo's avatar
      staging: gdm724x: Place macro argument within parentheses · 959aabed
      Dee-Jay Anthony Logozzo authored
      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: default avatarDee-Jay Anthony Logozzo <dj@djl.id.au>
      Link: https://lore.kernel.org/r/20210811134132.5240-1-dj@djl.id.auSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      959aabed
  4. 11 Aug, 2021 12 commits
  5. 10 Aug, 2021 2 commits