From 3591733d287446edbeb14bbc36fb6f23a9f8cefd Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Mon, 11 Jul 2011 08:56:03 +0900 Subject: [PATCH] rtl8192e: Remove WIRELESS_EXT macro checks Signed-off-by: Mike McCormack --- drivers/staging/rtl8192e/rtl_core.c | 7 ---- drivers/staging/rtl8192e/rtl_wx.c | 21 +++--------- drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 24 -------------- drivers/staging/rtl8192e/rtllib_rx.c | 3 +- drivers/staging/rtl8192e/rtllib_wx.c | 35 +------------------- 5 files changed, 7 insertions(+), 83 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl_core.c index d62bfb5aea18..fd21c253d6e7 100644 --- a/drivers/staging/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl_core.c @@ -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) { diff --git a/drivers/staging/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl_wx.c index 79ac60decbed..cc6bcc6b023f 100644 --- a/drivers/staging/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl_wx.c @@ -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, }; diff --git a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c index 366c94325a70..b75b2b4f4f9a 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c @@ -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) diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 7f033815f242..9d8b2770b0ee 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -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; } diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c index 7f3f5b05840c..0855ad8a0f6e 100644 --- a/drivers/staging/rtl8192e/rtllib_wx.c +++ b/drivers/staging/rtl8192e/rtllib_wx.c @@ -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; } -- 2.39.5