Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: rtl8192u: Remove old WIRELESS_EXT support

Remove support for building against ancient WIRELESS_EXT versions,
only leaving support for the current version: 22

Signed-off-by: Joel Pelaez Jorge <joelpelaez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Joel Pelaez Jorge and committed by
Greg Kroah-Hartman
e6c1ef6c 244a0341

+4 -65
-14
drivers/staging/rtl8192u/ieee80211/ieee80211.h
··· 354 354 #define ieee80211_wx_get_scan ieee80211_wx_get_scan_rsl 355 355 #define ieee80211_wx_set_encode ieee80211_wx_set_encode_rsl 356 356 #define ieee80211_wx_get_encode ieee80211_wx_get_encode_rsl 357 - #if WIRELESS_EXT >= 18 358 357 #define ieee80211_wx_set_mlme ieee80211_wx_set_mlme_rsl 359 358 #define ieee80211_wx_set_auth ieee80211_wx_set_auth_rsl 360 359 #define ieee80211_wx_set_encode_ext ieee80211_wx_set_encode_ext_rsl 361 360 #define ieee80211_wx_get_encode_ext ieee80211_wx_get_encode_ext_rsl 362 - #endif 363 361 364 362 365 363 typedef struct ieee_param { ··· 388 390 } crypt; 389 391 } u; 390 392 }ieee_param; 391 - 392 - 393 - #if WIRELESS_EXT < 17 394 - #define IW_QUAL_QUAL_INVALID 0x10 395 - #define IW_QUAL_LEVEL_INVALID 0x20 396 - #define IW_QUAL_NOISE_INVALID 0x40 397 - #define IW_QUAL_QUAL_UPDATED 0x1 398 - #define IW_QUAL_LEVEL_UPDATED 0x2 399 - #define IW_QUAL_NOISE_UPDATED 0x4 400 - #endif 401 393 402 394 403 395 // linux under 2.6.9 release may not support it, so modify it for common use ··· 2386 2398 extern int ieee80211_wx_get_encode(struct ieee80211_device *ieee, 2387 2399 struct iw_request_info *info, 2388 2400 union iwreq_data *wrqu, char *key); 2389 - #if WIRELESS_EXT >= 18 2390 2401 extern int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee, 2391 2402 struct iw_request_info *info, 2392 2403 union iwreq_data *wrqu, char *extra); ··· 2398 2411 extern int ieee80211_wx_set_mlme(struct ieee80211_device *ieee, 2399 2412 struct iw_request_info *info, 2400 2413 union iwreq_data *wrqu, char *extra); 2401 - #endif 2402 2414 extern int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len); 2403 2415 2404 2416 /* ieee80211_softmac.c */
+1 -4
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
··· 950 950 951 951 //IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len); 952 952 #ifdef NOT_YET 953 - #if WIRELESS_EXT > 15 954 953 /* Put this code here so that we avoid duplicating it in all 955 954 * Rx paths. - Jean II */ 956 955 #ifdef IW_WIRELESS_SPY /* defined in iw_handler.h */ ··· 963 964 wireless_spy_update(dev, hdr->addr2, &wstats); 964 965 } 965 966 #endif /* IW_WIRELESS_SPY */ 966 - #endif /* WIRELESS_EXT > 15 */ 967 967 hostap_update_rx_stats(local->ap, hdr, rx_stats); 968 968 #endif 969 969 970 - #if WIRELESS_EXT > 15 971 970 if (ieee->iw_mode == IW_MODE_MONITOR) { 972 971 ieee80211_monitor_rx(ieee, skb, rx_stats); 973 972 stats->rx_packets++; 974 973 stats->rx_bytes += skb->len; 975 974 return 1; 976 975 } 977 - #endif 976 + 978 977 if (ieee->host_decrypt) { 979 978 int idx = 0; 980 979 if (skb->len >= hdrlen + 3)
+1 -23
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
··· 194 194 iwe.u.data.length = p - custom; 195 195 if (iwe.u.data.length) 196 196 start = iwe_stream_add_point(info, start, stop, &iwe, custom); 197 - #if (WIRELESS_EXT < 18) 197 + 198 198 if (ieee->wpa_enabled && network->wpa_ie_len){ 199 199 char buf[MAX_WPA_IE_LEN * 2 + 30]; 200 200 // printk("WPA IE\n"); ··· 224 224 iwe.u.data.length = strlen(buf); 225 225 start = iwe_stream_add_point(info, start, stop, &iwe, buf); 226 226 } 227 - #else 228 - memset(&iwe, 0, sizeof(iwe)); 229 - if (network->wpa_ie_len) 230 - { 231 - char buf[MAX_WPA_IE_LEN]; 232 - memcpy(buf, network->wpa_ie, network->wpa_ie_len); 233 - iwe.cmd = IWEVGENIE; 234 - iwe.u.data.length = network->wpa_ie_len; 235 - start = iwe_stream_add_point(info, start, stop, &iwe, buf); 236 - } 237 - memset(&iwe, 0, sizeof(iwe)); 238 - if (network->rsn_ie_len) 239 - { 240 - char buf[MAX_WPA_IE_LEN]; 241 - memcpy(buf, network->rsn_ie, network->rsn_ie_len); 242 - iwe.cmd = IWEVGENIE; 243 - iwe.u.data.length = network->rsn_ie_len; 244 - start = iwe_stream_add_point(info, start, stop, &iwe, buf); 245 - } 246 - #endif 247 227 248 228 249 229 /* Add EXTRA: Age to display seconds since last beacon/probe response ··· 505 525 } 506 526 EXPORT_SYMBOL(ieee80211_wx_get_encode); 507 527 508 - #if (WIRELESS_EXT >= 18) 509 528 int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee, 510 529 struct iw_request_info *info, 511 530 union iwreq_data *wrqu, char *extra) ··· 815 836 return 0; 816 837 } 817 838 EXPORT_SYMBOL(ieee80211_wx_set_auth); 818 - #endif 819 839 820 840 int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len) 821 841 {
+1 -5
drivers/staging/rtl8192u/r8192U_core.c
··· 4978 4978 4979 4979 dev->netdev_ops = &rtl8192_netdev_ops; 4980 4980 4981 - #if WIRELESS_EXT >= 12 4982 - #if WIRELESS_EXT < 17 4983 - dev->get_wireless_stats = r8192_get_wireless_stats; 4984 - #endif 4985 4981 dev->wireless_handlers = (struct iw_handler_def *) &r8192_wx_handlers_def; 4986 - #endif 4982 + 4987 4983 dev->type = ARPHRD_ETHER; 4988 4984 4989 4985 dev->watchdog_timeo = HZ*3; //modified by john, 0805
+1 -19
drivers/staging/rtl8192u/r8192U_wx.c
··· 319 319 } 320 320 range->num_frequency = val; 321 321 range->num_channels = val; 322 - #if WIRELESS_EXT > 17 323 322 range->enc_capa = IW_ENC_CAPA_WPA|IW_ENC_CAPA_WPA2| 324 323 IW_ENC_CAPA_CIPHER_TKIP|IW_ENC_CAPA_CIPHER_CCMP; 325 - #endif 326 324 tmp->scan_capa = 0x01; 327 325 return 0; 328 326 } ··· 730 732 return err; 731 733 } 732 734 733 - #if (WIRELESS_EXT >= 18) 734 735 //hw security need to reorganized. 735 736 static int r8192_wx_set_enc_ext(struct net_device *dev, 736 737 struct iw_request_info *info, ··· 839 842 up(&priv->wx_sem); 840 843 return ret; 841 844 } 842 - #endif 845 + 843 846 static int r8192_wx_set_gen_ie(struct net_device *dev, 844 847 struct iw_request_info *info, 845 848 union iwreq_data *data, char *extra) ··· 887 890 NULL, /* SIOCWIWTHRSPY */ 888 891 r8192_wx_set_wap, /* SIOCSIWAP */ 889 892 r8192_wx_get_wap, /* SIOCGIWAP */ 890 - #if (WIRELESS_EXT >= 18) 891 893 r8192_wx_set_mlme, /* MLME-- */ 892 - #else 893 - NULL, 894 - #endif 895 894 dummy, /* SIOCGIWAPLIST -- deprecated */ 896 895 r8192_wx_set_scan, /* SIOCSIWSCAN */ 897 896 r8192_wx_get_scan, /* SIOCGIWSCAN */ ··· 916 923 r8192_wx_set_gen_ie,//NULL, /* SIOCSIWGENIE */ 917 924 NULL, /* SIOCSIWGENIE */ 918 925 919 - #if (WIRELESS_EXT >= 18) 920 926 r8192_wx_set_auth,//NULL, /* SIOCSIWAUTH */ 921 927 NULL,//r8192_wx_get_auth,//NULL, /* SIOCSIWAUTH */ 922 928 r8192_wx_set_enc_ext, /* SIOCSIWENCODEEXT */ 923 929 NULL,//r8192_wx_get_enc_ext,//NULL, /* SIOCSIWENCODEEXT */ 924 - #else 925 - NULL, 926 - NULL, 927 - NULL, 928 - NULL, 929 - #endif 930 930 NULL, /* SIOCSIWPMKSA */ 931 931 NULL, /*---hole---*/ 932 932 ··· 963 977 r8192_wx_force_reset, 964 978 }; 965 979 966 - //#if WIRELESS_EXT >= 17 967 980 struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev) 968 981 { 969 982 struct r8192_priv *priv = ieee80211_priv(dev); ··· 991 1006 wstats->qual.updated = IW_QUAL_ALL_UPDATED| IW_QUAL_DBM; 992 1007 return wstats; 993 1008 } 994 - //#endif 995 1009 996 1010 997 1011 struct iw_handler_def r8192_wx_handlers_def={ ··· 999 1015 .private = r8192_private_handler, 1000 1016 .num_private = ARRAY_SIZE(r8192_private_handler), 1001 1017 .num_private_args = sizeof(r8192_private_args) / sizeof(struct iw_priv_args), 1002 - #if WIRELESS_EXT >= 17 1003 1018 .get_wireless_stats = r8192_get_wireless_stats, 1004 - #endif 1005 1019 .private_args = (struct iw_priv_args *)r8192_private_args, 1006 1020 };