staging: r8188eu: brfoffbyhw is always false
authorMartin Kaiser <martin@kaiser.cx>
Sat, 18 Sep 2021 13:57:21 +0000 (15:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 14:25:20 +0000 (16:25 +0200)
As a consequence of the bHWPwrPindetect removal, brfoffbyhw is never set
to true any more. Remove the variable and code that depends on
brfoffbyhw == true.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210918135722.23976-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/include/rtw_pwrctrl.h
drivers/staging/r8188eu/os_dep/ioctl_linux.c
drivers/staging/r8188eu/os_dep/usb_intf.c

index 28e4041acb98ed4c9ff14629c02bb7e80d73e576..a77fb76a0b097f3a33c06ae4948657a93c02d3f8 100644 (file)
@@ -114,7 +114,6 @@ struct pwrctrl_priv {
        u8              wepkeymask;
        u8              bHWPowerdown;/* if support hw power down */
        u8              bkeepfwalive;
-       u8              brfoffbyhw;
 };
 
 #define rtw_get_ips_mode_req(pwrctrlpriv) \
index ac218da94ce5c078b525007555439da232c622c2..a76cb7bd6390edb3d44949a18249f1c2ab5e4909 100644 (file)
@@ -1289,11 +1289,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
        int wait_status;
        struct  wifidirect_info *pwdinfo = &padapter->wdinfo;
 
-       if (padapter->pwrctrlpriv.brfoffbyhw && padapter->bDriverStopped) {
-               ret = -EINVAL;
-               goto exit;
-       }
-
        if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) {
                /*      P2P is enabled */
                wait_for_surveydone = 200;
@@ -1336,8 +1331,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
        wrqu->data.length = ev - extra;
        wrqu->data.flags = 0;
 
-exit:
-
        return ret;
 }
 
index 306325818a9ad0951bd4d850a326aca69d0145d1..25dc9084738093807ff4f308d4110972244e52d9 100644 (file)
@@ -305,7 +305,6 @@ int rtw_hw_resume(struct adapter *padapter)
                netif_wake_queue(pnetdev);
 
        pwrpriv->bkeepfwalive = false;
-       pwrpriv->brfoffbyhw = false;
 
        pwrpriv->rf_pwrstate = rf_on;
        pwrpriv->bips_processing = false;