diff options
author | Yogesh Hegde <yogi.kernel@gmail.com> | 2023-04-24 23:34:07 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-08 16:07:31 +0200 |
commit | 3a4d000ae7fefe8d85fe54db373624dfb9b64c66 (patch) | |
tree | adb034159abe91be24b5880968cee6fa8db9bb86 /drivers/staging/rtl8192e | |
parent | 77f2760e7111ddcfb3ab1eb7d242ec38ed9480e2 (diff) |
staging: rtl8192e: Remove unused rf_set_sens variable
The rf_set_sens variable is declared but never set, so it is always NULL.
This commit cleans up the unused rf_set_sens variable and removes the
associated code that relied on it.
Specifically, the following changes have been made:
- Removed the `range->sensitivity` assignment, which was never used.
- Removed the sensitivity level get implementation, which always returns
an error code.
- Removed the sensitivity level set implementation, which always returns
an error code.
- Removed the `rf_set_sens` variable.
Suggested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5a9767fab76b1836ea7881994ffb3593c1ab12bf.1682358035.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 19 |
2 files changed, 2 insertions, 18 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 285dac32c074..08145e1f814c 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -231,7 +231,6 @@ struct r8192_priv { struct rt_stats stats; struct iw_statistics wstats; - short (*rf_set_sens)(struct net_device *dev, short sens); u8 (*rf_set_chan)(struct net_device *dev, u8 ch); struct rx_desc *rx_ring[MAX_RX_QUEUE]; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index cb28288a618b..cc1af367f37d 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -311,10 +311,6 @@ static int _rtl92e_wx_get_range(struct net_device *dev, /* ~130 Mb/s real (802.11n) */ range->throughput = 130 * 1000 * 1000; - if (priv->rf_set_sens != NULL) - /* signal level threshold range */ - range->sensitivity = priv->max_sens; - range->max_qual.qual = 100; range->max_qual.level = 0; range->max_qual.noise = 0; @@ -813,10 +809,7 @@ static int _rtl92e_wx_get_sens(struct net_device *dev, { struct r8192_priv *priv = rtllib_priv(dev); - if (priv->rf_set_sens == NULL) - return -1; /* we have not this support for this radio */ - wrqu->sens.value = priv->sens; - return 0; + return -1; } static int _rtl92e_wx_set_sens(struct net_device *dev, @@ -831,15 +824,7 @@ static int _rtl92e_wx_set_sens(struct net_device *dev, return 0; mutex_lock(&priv->wx_mutex); - if (priv->rf_set_sens == NULL) { - err = -1; /* we have not this support for this radio */ - goto exit; - } - if (priv->rf_set_sens(dev, wrqu->sens.value) == 0) - priv->sens = wrqu->sens.value; - else - err = -EINVAL; - + err = -1; exit: mutex_unlock(&priv->wx_mutex); |