[09/11] staging: rtl8192e: Remove rf_chip in _rtl92e_get_supported_wireless_mode

Message ID e2db309dea3208560337376fec26fa5cfba93848.1679732276.git.philipp.g.hortmann@gmail.com
State New
Headers
Series staging: rtl8192e: Remove variable priv->rf_chip from driver |

Commit Message

Philipp Hortmann March 25, 2023, 8:36 a.m. UTC
  priv->rf_chip is initialized to RF_8256 and never changed. Remove
condition in function _rtl92e_get_supported_wireless_mode as it is dead
code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
  

Patch

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 3244aef12c05..8e4e939d7617 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -595,23 +595,9 @@  static void _rtl92e_refresh_support_rate(struct r8192_priv *priv)
 
 static u8 _rtl92e_get_supported_wireless_mode(struct net_device *dev)
 {
-	struct r8192_priv *priv = rtllib_priv(dev);
 	u8 ret = 0;
 
-	switch (priv->rf_chip) {
-	case RF_8225:
-	case RF_8256:
-	case RF_6052:
-	case RF_PSEUDO_11N:
-		ret = (WIRELESS_MODE_N_24G | WIRELESS_MODE_G | WIRELESS_MODE_B);
-		break;
-	case RF_8258:
-		ret = (WIRELESS_MODE_A | WIRELESS_MODE_N_5G);
-		break;
-	default:
-		ret = WIRELESS_MODE_B;
-		break;
-	}
+	ret = (WIRELESS_MODE_N_24G | WIRELESS_MODE_G | WIRELESS_MODE_B);
 	return ret;
 }