OSDN Git Service

staging: rtl8192e: Remove wireless mode WIRELESS_MODE_N_5G
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Mon, 27 Mar 2023 21:03:14 +0000 (23:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Mar 2023 11:34:39 +0000 (13:34 +0200)
Remove WIRELESS_MODE_N_5G from equations as it is not supported by
hardware and to improve readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/fdefd4d706493fa3f080550d31eb5bea3f4e1a7e.1679949171.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c

index 689a5e1..7506d7e 100644 (file)
@@ -581,8 +581,7 @@ static void _rtl92e_refresh_support_rate(struct r8192_priv *priv)
 {
        struct rtllib_device *ieee = priv->rtllib;
 
-       if (ieee->mode == WIRELESS_MODE_N_24G ||
-           ieee->mode == WIRELESS_MODE_N_5G) {
+       if (ieee->mode == WIRELESS_MODE_N_24G) {
                memcpy(ieee->reg_dot11ht_oper_rate_set,
                       ieee->reg_ht_supp_rate_set, 16);
                memcpy(ieee->reg_dot11tx_ht_oper_rate_set,
index d458087..b5f4d02 100644 (file)
@@ -296,8 +296,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
        if (pra->rate_adaptive_disabled)
                return;
 
-       if (!(priv->rtllib->mode == WIRELESS_MODE_N_24G ||
-           priv->rtllib->mode == WIRELESS_MODE_N_5G))
+       if (priv->rtllib->mode != WIRELESS_MODE_N_24G)
                return;
 
        if (priv->rtllib->state == RTLLIB_LINKED) {
@@ -971,8 +970,7 @@ void rtl92e_dm_restore_state(struct net_device *dev)
 
        if (priv->rate_adaptive.rate_adaptive_disabled)
                return;
-       if (!(priv->rtllib->mode == WIRELESS_MODE_N_24G ||
-             priv->rtllib->mode == WIRELESS_MODE_N_5G))
+       if (priv->rtllib->mode != WIRELESS_MODE_N_24G)
                return;
        ratr_value = reg_ratr;
        ratr_value &= ~(RATE_ALL_OFDM_2SS);