]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8188eu: remove code valid only for 5 GHz
authorMichael Straube <straube.linux@gmail.com>
Thu, 24 Oct 2019 15:59:18 +0000 (17:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Oct 2019 03:17:15 +0000 (23:17 -0400)
Remove code valid only for 5 GHz, according to the TODO.

- find and remove remaining code valid only for 5 GHz. Most of the obvious
  ones have been removed, but things like channel > 14 still exist.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20191024155918.13399-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_ap.c
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c

index 9aa44c921acabef03820453e053009e9c92f8e9f..88e42cc1d8377dfef17014223eebdb4886d8bea7 100644 (file)
@@ -440,15 +440,9 @@ static void update_bmc_sta(struct adapter *padapter)
                                tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value(psta->bssrateset[i] & 0x7f);
                }
 
-               if (pcur_network->Configuration.DSConfig > 14) {
-                       /* force to A mode. 5G doesn't support CCK rates */
-                       network_type = WIRELESS_11A;
-                       tx_ra_bitmap = 0x150; /*  6, 12, 24 Mbps */
-               } else {
-                       /* force to b mode */
-                       network_type = WIRELESS_11B;
-                       tx_ra_bitmap = 0xf;
-               }
+               /* force to b mode */
+               network_type = WIRELESS_11B;
+               tx_ra_bitmap = 0xf;
 
                raid = networktype_to_raid(network_type);
                init_rate = get_highest_rate_idx(tx_ra_bitmap & 0x0fffffff) & 0x3f;
index ec5835d1aa8ce0be9bf3b22c45aa0b095993dd9f..710c33fd49658160f89d46c4afb7e93033a48d7c 100644 (file)
@@ -148,17 +148,10 @@ static char *translate_scan(struct adapter *padapter,
                else
                        snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bg");
        } else {
-               if (pnetwork->network.Configuration.DSConfig > 14) {
-                       if (ht_cap)
-                               snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11an");
-                       else
-                               snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11a");
-               } else {
-                       if (ht_cap)
-                               snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11gn");
-                       else
-                               snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11g");
-               }
+               if (ht_cap)
+                       snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11gn");
+               else
+                       snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11g");
        }
 
        start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_CHAR_LEN);
@@ -650,17 +643,10 @@ static int rtw_wx_get_name(struct net_device *dev,
                        else
                                snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bg");
                } else {
-                       if (pcur_bss->Configuration.DSConfig > 14) {
-                               if (ht_cap)
-                                       snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11an");
-                               else
-                                       snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11a");
-                       } else {
-                               if (ht_cap)
-                                       snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
-                               else
-                                       snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
-                       }
+                       if (ht_cap)
+                               snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
+                       else
+                               snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11g");
                }
        } else {
                snprintf(wrqu->name, IFNAMSIZ, "unassociated");