]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
rtl8192e: Remove WIRELESS_EXT macro checks
authorMike McCormack <mikem@ring3k.org>
Sun, 10 Jul 2011 23:56:03 +0000 (08:56 +0900)
committerLarry Finger <Larry.Finger@lwfinger.net>
Wed, 24 Aug 2011 01:03:45 +0000 (20:03 -0500)
Signed-off-by: Mike McCormack <mikem@ring3k.org>
drivers/staging/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtl_wx.c
drivers/staging/rtl8192e/rtllib_crypt_tkip.c
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_wx.c

index d62bfb5aea188b64f2cecfb926e34016a00d797b..fd21c253d6e7995b33377449fe84573d9e8fbaf7 100644 (file)
@@ -3564,12 +3564,7 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev,
        dev->hard_start_xmit = rtllib_xmit;
 #endif
 
-#if WIRELESS_EXT >= 12
-#if WIRELESS_EXT < 17
-        dev->get_wireless_stats = r8192_get_wireless_stats;
-#endif
         dev->wireless_handlers = (struct iw_handler_def *) &r8192_wx_handlers_def;
-#endif
        dev->ethtool_ops = &rtl819x_ethtool_ops;
 
        dev->type = ARPHRD_ETHER;
@@ -3817,8 +3812,6 @@ static int __init rtl8192_pci_module_init(void)
 #endif
        printk(KERN_INFO "\nLinux kernel driver for RTL8192E WLAN cards\n");
        printk(KERN_INFO "Copyright (c) 2007-2008, Realsil Wlan Driver\n");
-       RT_TRACE(COMP_INIT, "Initializing module");
-       RT_TRACE(COMP_INIT, "Wireless extensions version %d", WIRELESS_EXT);
 
        error = rtl_create_debugfs_root();
        if (error) {
index 79ac60decbed515869f6a857cb58052bbd937ba4..cc6bcc6b023f759055128a30f5f1f3b7d8fb4f92 100644 (file)
@@ -480,10 +480,8 @@ static int rtl8192_wx_get_range(struct net_device *dev,
        }
        range->num_frequency = val;
        range->num_channels = val;
-#if WIRELESS_EXT > 17
        range->enc_capa = IW_ENC_CAPA_WPA|IW_ENC_CAPA_WPA2|
                          IW_ENC_CAPA_CIPHER_TKIP|IW_ENC_CAPA_CIPHER_CCMP;
-#endif
        range->scan_capa = IW_SCAN_CAPA_ESSID | IW_SCAN_CAPA_TYPE;
 
         /* Event capability (kernel + driver) */
@@ -521,7 +519,6 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
        if (priv->rtllib->LinkDetectInfo.bBusyTraffic == true)
                return -EAGAIN;
 
-#if WIRELESS_EXT > 17
        if (wrqu->data.flags & IW_SCAN_THIS_ESSID)
        {
                struct iw_scan_req* req = (struct iw_scan_req*)b;
@@ -531,7 +528,6 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
                        memcpy(ieee->current_network.ssid, req->essid, req->essid_len);
                }
        }
-#endif
 
        down(&priv->wx_sem);
 
@@ -1018,8 +1014,6 @@ exit:
        return err;
 }
 
-#if (WIRELESS_EXT >= 18)
-
 static int r8192_wx_set_enc_ext(struct net_device *dev,
                                         struct iw_request_info *info,
                                         union iwreq_data *wrqu, char *extra)
@@ -1176,7 +1170,6 @@ static int r8192_wx_set_mlme(struct net_device *dev,
        up(&priv->wx_sem);
        return ret;
 }
-#endif
 
 static int r8192_wx_set_gen_ie(struct net_device *dev,
                                         struct iw_request_info *info,
@@ -1303,13 +1296,11 @@ static iw_handler r8192_wx_handlers[] =
         IW_IOCTL(SIOCGIWENCODE) = r8192_wx_get_enc,
         IW_IOCTL(SIOCSIWPOWER) = r8192_wx_set_power,
         IW_IOCTL(SIOCGIWPOWER) = r8192_wx_get_power,
-#if (WIRELESS_EXT >= 18)
-               IW_IOCTL(SIOCSIWGENIE) = r8192_wx_set_gen_ie,
-               IW_IOCTL(SIOCGIWGENIE) = r8192_wx_get_gen_ie,
-               IW_IOCTL(SIOCSIWMLME) = r8192_wx_set_mlme,
-               IW_IOCTL(SIOCSIWAUTH) = r8192_wx_set_auth,
-               IW_IOCTL(SIOCSIWENCODEEXT) = r8192_wx_set_enc_ext,
-#endif
+       IW_IOCTL(SIOCSIWGENIE) = r8192_wx_set_gen_ie,
+       IW_IOCTL(SIOCGIWGENIE) = r8192_wx_get_gen_ie,
+       IW_IOCTL(SIOCSIWMLME) = r8192_wx_set_mlme,
+       IW_IOCTL(SIOCSIWAUTH) = r8192_wx_set_auth,
+       IW_IOCTL(SIOCSIWENCODEEXT) = r8192_wx_set_enc_ext,
 };
 
 /*
@@ -1502,8 +1493,6 @@ struct iw_handler_def  r8192_wx_handlers_def={
        .private = r8192_private_handler,
        .num_private = sizeof(r8192_private_handler) / sizeof(iw_handler),
        .num_private_args = sizeof(r8192_private_args) / sizeof(struct iw_priv_args),
-#if WIRELESS_EXT >= 17
        .get_wireless_stats = r8192_get_wireless_stats,
-#endif
        .private_args = (struct iw_priv_args *)r8192_private_args,
 };
index 366c94325a70f03915ec70fd86d95f899c7ae467..b75b2b4f4f9a5d34e8acd0d7e0b4766575c33130 100644 (file)
@@ -586,7 +586,6 @@ static int rtllib_michael_mic_add(struct sk_buff *skb, int hdr_len, void *priv)
 }
 
 
-#if WIRELESS_EXT >= 18
 static void rtllib_michael_mic_failure(struct net_device *dev,
                                       struct rtllib_hdr_4addr *hdr,
                                       int keyidx)
@@ -607,29 +606,6 @@ static void rtllib_michael_mic_failure(struct net_device *dev,
        wrqu.data.length = sizeof(ev);
        wireless_send_event(dev, IWEVMICHAELMICFAILURE, &wrqu, (char *) &ev);
 }
-#elif WIRELESS_EXT >= 15
-static void rtllib_michael_mic_failure(struct net_device *dev,
-                                      struct rtllib_hdr_4addr *hdr,
-                                      int keyidx)
-{
-       union iwreq_data wrqu;
-       char buf[128];
-
-       /* TODO: needed parameters: count, keyid, key type, TSC */
-       sprintf(buf, "MLME-MICHAELMICFAILURE.indication(keyid=%d %scast addr="
-               MAC_FMT ")", keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni",
-               MAC_ARG(hdr->addr2));
-       memset(&wrqu, 0, sizeof(wrqu));
-       wrqu.data.length = strlen(buf);
-       wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf);
-}
-#else /* WIRELESS_EXT >= 15 */
-static inline void rtllib_michael_mic_failure(struct net_device *dev,
-                                             struct rtllib_hdr_4addr *hdr,
-                                             int keyidx)
-{
-}
-#endif /* WIRELESS_EXT >= 15 */
 
 static int rtllib_michael_mic_verify(struct sk_buff *skb, int keyidx,
                                     int hdr_len, void *priv, struct rtllib_device* ieee)
index 7f033815f2429d8e2c0d85452690e5a5bcd8534d..9d8b2770b0ee8f94bc1c73b245c017279ed885b6 100644 (file)
@@ -1818,11 +1818,10 @@ int rtllib_rx_Monitor(struct rtllib_device *ieee, struct sk_buff *skb,
                hdrlen += 4;
        }
 
-#if WIRELESS_EXT > 15
        rtllib_monitor_rx(ieee, skb, rx_stats, hdrlen);
        ieee->stats.rx_packets++;
        ieee->stats.rx_bytes += skb->len;
-#endif
+
        return 1;
 }
 
index 7f3f5b05840cd537acc4462760155706d59c965f..0855ad8a0f6e703b84ac41229a348c2ae4753a4e 100644 (file)
@@ -195,36 +195,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee,
        iwe.u.data.length = p - custom;
        if (iwe.u.data.length)
                start = iwe_stream_add_point_rsl(info, start, stop, &iwe, custom);
-#if (WIRELESS_EXT < 18)
-       if (ieee->wpa_enabled && network->wpa_ie_len){
-               char buf[MAX_WPA_IE_LEN * 2 + 30];
-               u8 *p = buf;
-               p += sprintf(p, "wpa_ie=");
-               for (i = 0; i < network->wpa_ie_len; i++) {
-                       p += sprintf(p, "%02x", network->wpa_ie[i]);
-               }
-
-               memset(&iwe, 0, sizeof(iwe));
-               iwe.cmd = IWEVCUSTOM;
-               iwe.u.data.length = strlen(buf);
-               start = iwe_stream_add_point_rsl(info, start, stop, &iwe, buf);
-        }
-
-       if (ieee->wpa_enabled && network->rsn_ie_len){
-               char buf[MAX_WPA_IE_LEN * 2 + 30];
-
-               u8 *p = buf;
-               p += sprintf(p, "rsn_ie=");
-               for (i = 0; i < network->rsn_ie_len; i++) {
-                       p += sprintf(p, "%02x", network->rsn_ie[i]);
-               }
 
-               memset(&iwe, 0, sizeof(iwe));
-               iwe.cmd = IWEVCUSTOM;
-               iwe.u.data.length = strlen(buf);
-               start = iwe_stream_add_point_rsl(info, start, stop, &iwe, buf);
-        }
-#else
        memset(&iwe, 0, sizeof(iwe));
        if (network->wpa_ie_len)
        {
@@ -255,7 +226,6 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee,
                iwe.u.data.length = network->wzc_ie_len;
                start = iwe_stream_add_point_rsl(info, start, stop, &iwe, buf);
         }
-#endif
 #endif
 
        /* Add EXTRA: Age to display seconds since last beacon/probe response
@@ -531,7 +501,7 @@ int rtllib_wx_get_encode(struct rtllib_device *ieee,
 
        return 0;
 }
-#if (WIRELESS_EXT >= 18)
+
 int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
                                struct iw_request_info *info,
                                union iwreq_data *wrqu, char *extra)
@@ -850,11 +820,9 @@ int rtllib_wx_set_auth(struct rtllib_device *ieee,
        }
        return 0;
 }
-#endif
 
 int rtllib_wx_set_gen_ie(struct rtllib_device *ieee, u8 *ie, size_t len)
 {
-#if (WIRELESS_EXT >= 18 )
        u8 *buf;
        u8 eid, wps_oui[4]={0x0,0x50,0xf2,0x04};
 
@@ -896,6 +864,5 @@ int rtllib_wx_set_gen_ie(struct rtllib_device *ieee, u8 *ie, size_t len)
                ieee->wpa_ie = NULL;
                ieee->wpa_ie_len = 0;
        }
-#endif
        return 0;
 }