diff options
Diffstat (limited to 'net/wireless/wext-compat.c')
-rw-r--r-- | net/wireless/wext-compat.c | 137 |
1 files changed, 59 insertions, 78 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index 0bf169bb770e..62f121d1d9cb 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <net/iw_handler.h> | 16 | #include <net/iw_handler.h> |
17 | #include <net/cfg80211.h> | 17 | #include <net/cfg80211.h> |
18 | #include <net/cfg80211-wext.h> | ||
18 | #include "wext-compat.h" | 19 | #include "wext-compat.h" |
19 | #include "core.h" | 20 | #include "core.h" |
20 | 21 | ||
@@ -363,9 +364,9 @@ int cfg80211_wext_giwfrag(struct net_device *dev, | |||
363 | } | 364 | } |
364 | EXPORT_SYMBOL_GPL(cfg80211_wext_giwfrag); | 365 | EXPORT_SYMBOL_GPL(cfg80211_wext_giwfrag); |
365 | 366 | ||
366 | int cfg80211_wext_siwretry(struct net_device *dev, | 367 | static int cfg80211_wext_siwretry(struct net_device *dev, |
367 | struct iw_request_info *info, | 368 | struct iw_request_info *info, |
368 | struct iw_param *retry, char *extra) | 369 | struct iw_param *retry, char *extra) |
369 | { | 370 | { |
370 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 371 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
371 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 372 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
@@ -402,7 +403,6 @@ int cfg80211_wext_siwretry(struct net_device *dev, | |||
402 | 403 | ||
403 | return err; | 404 | return err; |
404 | } | 405 | } |
405 | EXPORT_SYMBOL_GPL(cfg80211_wext_siwretry); | ||
406 | 406 | ||
407 | int cfg80211_wext_giwretry(struct net_device *dev, | 407 | int cfg80211_wext_giwretry(struct net_device *dev, |
408 | struct iw_request_info *info, | 408 | struct iw_request_info *info, |
@@ -593,9 +593,9 @@ static int cfg80211_set_encryption(struct cfg80211_registered_device *rdev, | |||
593 | return err; | 593 | return err; |
594 | } | 594 | } |
595 | 595 | ||
596 | int cfg80211_wext_siwencode(struct net_device *dev, | 596 | static int cfg80211_wext_siwencode(struct net_device *dev, |
597 | struct iw_request_info *info, | 597 | struct iw_request_info *info, |
598 | struct iw_point *erq, char *keybuf) | 598 | struct iw_point *erq, char *keybuf) |
599 | { | 599 | { |
600 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 600 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
601 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 601 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
@@ -652,11 +652,10 @@ int cfg80211_wext_siwencode(struct net_device *dev, | |||
652 | wdev->wext.default_key == -1, | 652 | wdev->wext.default_key == -1, |
653 | idx, ¶ms); | 653 | idx, ¶ms); |
654 | } | 654 | } |
655 | EXPORT_SYMBOL_GPL(cfg80211_wext_siwencode); | ||
656 | 655 | ||
657 | int cfg80211_wext_siwencodeext(struct net_device *dev, | 656 | static int cfg80211_wext_siwencodeext(struct net_device *dev, |
658 | struct iw_request_info *info, | 657 | struct iw_request_info *info, |
659 | struct iw_point *erq, char *extra) | 658 | struct iw_point *erq, char *extra) |
660 | { | 659 | { |
661 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 660 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
662 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 661 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
@@ -744,11 +743,10 @@ int cfg80211_wext_siwencodeext(struct net_device *dev, | |||
744 | ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY, | 743 | ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY, |
745 | idx, ¶ms); | 744 | idx, ¶ms); |
746 | } | 745 | } |
747 | EXPORT_SYMBOL_GPL(cfg80211_wext_siwencodeext); | ||
748 | 746 | ||
749 | int cfg80211_wext_giwencode(struct net_device *dev, | 747 | static int cfg80211_wext_giwencode(struct net_device *dev, |
750 | struct iw_request_info *info, | 748 | struct iw_request_info *info, |
751 | struct iw_point *erq, char *keybuf) | 749 | struct iw_point *erq, char *keybuf) |
752 | { | 750 | { |
753 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 751 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
754 | int idx; | 752 | int idx; |
@@ -782,11 +780,10 @@ int cfg80211_wext_giwencode(struct net_device *dev, | |||
782 | 780 | ||
783 | return 0; | 781 | return 0; |
784 | } | 782 | } |
785 | EXPORT_SYMBOL_GPL(cfg80211_wext_giwencode); | ||
786 | 783 | ||
787 | int cfg80211_wext_siwfreq(struct net_device *dev, | 784 | static int cfg80211_wext_siwfreq(struct net_device *dev, |
788 | struct iw_request_info *info, | 785 | struct iw_request_info *info, |
789 | struct iw_freq *wextfreq, char *extra) | 786 | struct iw_freq *wextfreq, char *extra) |
790 | { | 787 | { |
791 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 788 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
792 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 789 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
@@ -815,11 +812,10 @@ int cfg80211_wext_siwfreq(struct net_device *dev, | |||
815 | return -EOPNOTSUPP; | 812 | return -EOPNOTSUPP; |
816 | } | 813 | } |
817 | } | 814 | } |
818 | EXPORT_SYMBOL_GPL(cfg80211_wext_siwfreq); | ||
819 | 815 | ||
820 | int cfg80211_wext_giwfreq(struct net_device *dev, | 816 | static int cfg80211_wext_giwfreq(struct net_device *dev, |
821 | struct iw_request_info *info, | 817 | struct iw_request_info *info, |
822 | struct iw_freq *freq, char *extra) | 818 | struct iw_freq *freq, char *extra) |
823 | { | 819 | { |
824 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 820 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
825 | 821 | ||
@@ -836,11 +832,10 @@ int cfg80211_wext_giwfreq(struct net_device *dev, | |||
836 | return 0; | 832 | return 0; |
837 | } | 833 | } |
838 | } | 834 | } |
839 | EXPORT_SYMBOL_GPL(cfg80211_wext_giwfreq); | ||
840 | 835 | ||
841 | int cfg80211_wext_siwtxpower(struct net_device *dev, | 836 | static int cfg80211_wext_siwtxpower(struct net_device *dev, |
842 | struct iw_request_info *info, | 837 | struct iw_request_info *info, |
843 | union iwreq_data *data, char *extra) | 838 | union iwreq_data *data, char *extra) |
844 | { | 839 | { |
845 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 840 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
846 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 841 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
@@ -889,11 +884,10 @@ int cfg80211_wext_siwtxpower(struct net_device *dev, | |||
889 | 884 | ||
890 | return rdev->ops->set_tx_power(wdev->wiphy, type, DBM_TO_MBM(dbm)); | 885 | return rdev->ops->set_tx_power(wdev->wiphy, type, DBM_TO_MBM(dbm)); |
891 | } | 886 | } |
892 | EXPORT_SYMBOL_GPL(cfg80211_wext_siwtxpower); | ||
893 | 887 | ||
894 | int cfg80211_wext_giwtxpower(struct net_device *dev, | 888 | static int cfg80211_wext_giwtxpower(struct net_device *dev, |
895 | struct iw_request_info *info, | 889 | struct iw_request_info *info, |
896 | union iwreq_data *data, char *extra) | 890 | union iwreq_data *data, char *extra) |
897 | { | 891 | { |
898 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 892 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
899 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 893 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
@@ -919,7 +913,6 @@ int cfg80211_wext_giwtxpower(struct net_device *dev, | |||
919 | 913 | ||
920 | return 0; | 914 | return 0; |
921 | } | 915 | } |
922 | EXPORT_SYMBOL_GPL(cfg80211_wext_giwtxpower); | ||
923 | 916 | ||
924 | static int cfg80211_set_auth_alg(struct wireless_dev *wdev, | 917 | static int cfg80211_set_auth_alg(struct wireless_dev *wdev, |
925 | s32 auth_alg) | 918 | s32 auth_alg) |
@@ -1070,9 +1063,9 @@ static int cfg80211_set_key_mgt(struct wireless_dev *wdev, u32 key_mgt) | |||
1070 | return 0; | 1063 | return 0; |
1071 | } | 1064 | } |
1072 | 1065 | ||
1073 | int cfg80211_wext_siwauth(struct net_device *dev, | 1066 | static int cfg80211_wext_siwauth(struct net_device *dev, |
1074 | struct iw_request_info *info, | 1067 | struct iw_request_info *info, |
1075 | struct iw_param *data, char *extra) | 1068 | struct iw_param *data, char *extra) |
1076 | { | 1069 | { |
1077 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1070 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1078 | 1071 | ||
@@ -1102,21 +1095,19 @@ int cfg80211_wext_siwauth(struct net_device *dev, | |||
1102 | return -EOPNOTSUPP; | 1095 | return -EOPNOTSUPP; |
1103 | } | 1096 | } |
1104 | } | 1097 | } |
1105 | EXPORT_SYMBOL_GPL(cfg80211_wext_siwauth); | ||
1106 | 1098 | ||
1107 | int cfg80211_wext_giwauth(struct net_device *dev, | 1099 | static int cfg80211_wext_giwauth(struct net_device *dev, |
1108 | struct iw_request_info *info, | 1100 | struct iw_request_info *info, |
1109 | struct iw_param *data, char *extra) | 1101 | struct iw_param *data, char *extra) |
1110 | { | 1102 | { |
1111 | /* XXX: what do we need? */ | 1103 | /* XXX: what do we need? */ |
1112 | 1104 | ||
1113 | return -EOPNOTSUPP; | 1105 | return -EOPNOTSUPP; |
1114 | } | 1106 | } |
1115 | EXPORT_SYMBOL_GPL(cfg80211_wext_giwauth); | ||
1116 | 1107 | ||
1117 | int cfg80211_wext_siwpower(struct net_device *dev, | 1108 | static int cfg80211_wext_siwpower(struct net_device *dev, |
1118 | struct iw_request_info *info, | 1109 | struct iw_request_info *info, |
1119 | struct iw_param *wrq, char *extra) | 1110 | struct iw_param *wrq, char *extra) |
1120 | { | 1111 | { |
1121 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1112 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1122 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 1113 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
@@ -1160,11 +1151,10 @@ int cfg80211_wext_siwpower(struct net_device *dev, | |||
1160 | return 0; | 1151 | return 0; |
1161 | 1152 | ||
1162 | } | 1153 | } |
1163 | EXPORT_SYMBOL_GPL(cfg80211_wext_siwpower); | ||
1164 | 1154 | ||
1165 | int cfg80211_wext_giwpower(struct net_device *dev, | 1155 | static int cfg80211_wext_giwpower(struct net_device *dev, |
1166 | struct iw_request_info *info, | 1156 | struct iw_request_info *info, |
1167 | struct iw_param *wrq, char *extra) | 1157 | struct iw_param *wrq, char *extra) |
1168 | { | 1158 | { |
1169 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1159 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1170 | 1160 | ||
@@ -1172,7 +1162,6 @@ int cfg80211_wext_giwpower(struct net_device *dev, | |||
1172 | 1162 | ||
1173 | return 0; | 1163 | return 0; |
1174 | } | 1164 | } |
1175 | EXPORT_SYMBOL_GPL(cfg80211_wext_giwpower); | ||
1176 | 1165 | ||
1177 | static int cfg80211_wds_wext_siwap(struct net_device *dev, | 1166 | static int cfg80211_wds_wext_siwap(struct net_device *dev, |
1178 | struct iw_request_info *info, | 1167 | struct iw_request_info *info, |
@@ -1218,9 +1207,9 @@ static int cfg80211_wds_wext_giwap(struct net_device *dev, | |||
1218 | return 0; | 1207 | return 0; |
1219 | } | 1208 | } |
1220 | 1209 | ||
1221 | int cfg80211_wext_siwrate(struct net_device *dev, | 1210 | static int cfg80211_wext_siwrate(struct net_device *dev, |
1222 | struct iw_request_info *info, | 1211 | struct iw_request_info *info, |
1223 | struct iw_param *rate, char *extra) | 1212 | struct iw_param *rate, char *extra) |
1224 | { | 1213 | { |
1225 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1214 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1226 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 1215 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
@@ -1268,11 +1257,10 @@ int cfg80211_wext_siwrate(struct net_device *dev, | |||
1268 | 1257 | ||
1269 | return rdev->ops->set_bitrate_mask(wdev->wiphy, dev, NULL, &mask); | 1258 | return rdev->ops->set_bitrate_mask(wdev->wiphy, dev, NULL, &mask); |
1270 | } | 1259 | } |
1271 | EXPORT_SYMBOL_GPL(cfg80211_wext_siwrate); | ||
1272 | 1260 | ||
1273 | int cfg80211_wext_giwrate(struct net_device *dev, | 1261 | static int cfg80211_wext_giwrate(struct net_device *dev, |
1274 | struct iw_request_info *info, | 1262 | struct iw_request_info *info, |
1275 | struct iw_param *rate, char *extra) | 1263 | struct iw_param *rate, char *extra) |
1276 | { | 1264 | { |
1277 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1265 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1278 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 1266 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
@@ -1308,10 +1296,9 @@ int cfg80211_wext_giwrate(struct net_device *dev, | |||
1308 | 1296 | ||
1309 | return 0; | 1297 | return 0; |
1310 | } | 1298 | } |
1311 | EXPORT_SYMBOL_GPL(cfg80211_wext_giwrate); | ||
1312 | 1299 | ||
1313 | /* Get wireless statistics. Called by /proc/net/wireless and by SIOCGIWSTATS */ | 1300 | /* Get wireless statistics. Called by /proc/net/wireless and by SIOCGIWSTATS */ |
1314 | struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev) | 1301 | static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev) |
1315 | { | 1302 | { |
1316 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1303 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1317 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 1304 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
@@ -1376,11 +1363,10 @@ struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev) | |||
1376 | 1363 | ||
1377 | return &wstats; | 1364 | return &wstats; |
1378 | } | 1365 | } |
1379 | EXPORT_SYMBOL_GPL(cfg80211_wireless_stats); | ||
1380 | 1366 | ||
1381 | int cfg80211_wext_siwap(struct net_device *dev, | 1367 | static int cfg80211_wext_siwap(struct net_device *dev, |
1382 | struct iw_request_info *info, | 1368 | struct iw_request_info *info, |
1383 | struct sockaddr *ap_addr, char *extra) | 1369 | struct sockaddr *ap_addr, char *extra) |
1384 | { | 1370 | { |
1385 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1371 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1386 | 1372 | ||
@@ -1395,11 +1381,10 @@ int cfg80211_wext_siwap(struct net_device *dev, | |||
1395 | return -EOPNOTSUPP; | 1381 | return -EOPNOTSUPP; |
1396 | } | 1382 | } |
1397 | } | 1383 | } |
1398 | EXPORT_SYMBOL_GPL(cfg80211_wext_siwap); | ||
1399 | 1384 | ||
1400 | int cfg80211_wext_giwap(struct net_device *dev, | 1385 | static int cfg80211_wext_giwap(struct net_device *dev, |
1401 | struct iw_request_info *info, | 1386 | struct iw_request_info *info, |
1402 | struct sockaddr *ap_addr, char *extra) | 1387 | struct sockaddr *ap_addr, char *extra) |
1403 | { | 1388 | { |
1404 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1389 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1405 | 1390 | ||
@@ -1414,11 +1399,10 @@ int cfg80211_wext_giwap(struct net_device *dev, | |||
1414 | return -EOPNOTSUPP; | 1399 | return -EOPNOTSUPP; |
1415 | } | 1400 | } |
1416 | } | 1401 | } |
1417 | EXPORT_SYMBOL_GPL(cfg80211_wext_giwap); | ||
1418 | 1402 | ||
1419 | int cfg80211_wext_siwessid(struct net_device *dev, | 1403 | static int cfg80211_wext_siwessid(struct net_device *dev, |
1420 | struct iw_request_info *info, | 1404 | struct iw_request_info *info, |
1421 | struct iw_point *data, char *ssid) | 1405 | struct iw_point *data, char *ssid) |
1422 | { | 1406 | { |
1423 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1407 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1424 | 1408 | ||
@@ -1431,11 +1415,10 @@ int cfg80211_wext_siwessid(struct net_device *dev, | |||
1431 | return -EOPNOTSUPP; | 1415 | return -EOPNOTSUPP; |
1432 | } | 1416 | } |
1433 | } | 1417 | } |
1434 | EXPORT_SYMBOL_GPL(cfg80211_wext_siwessid); | ||
1435 | 1418 | ||
1436 | int cfg80211_wext_giwessid(struct net_device *dev, | 1419 | static int cfg80211_wext_giwessid(struct net_device *dev, |
1437 | struct iw_request_info *info, | 1420 | struct iw_request_info *info, |
1438 | struct iw_point *data, char *ssid) | 1421 | struct iw_point *data, char *ssid) |
1439 | { | 1422 | { |
1440 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1423 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1441 | 1424 | ||
@@ -1451,11 +1434,10 @@ int cfg80211_wext_giwessid(struct net_device *dev, | |||
1451 | return -EOPNOTSUPP; | 1434 | return -EOPNOTSUPP; |
1452 | } | 1435 | } |
1453 | } | 1436 | } |
1454 | EXPORT_SYMBOL_GPL(cfg80211_wext_giwessid); | ||
1455 | 1437 | ||
1456 | int cfg80211_wext_siwpmksa(struct net_device *dev, | 1438 | static int cfg80211_wext_siwpmksa(struct net_device *dev, |
1457 | struct iw_request_info *info, | 1439 | struct iw_request_info *info, |
1458 | struct iw_point *data, char *extra) | 1440 | struct iw_point *data, char *extra) |
1459 | { | 1441 | { |
1460 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1442 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1461 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 1443 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); |
@@ -1493,7 +1475,6 @@ int cfg80211_wext_siwpmksa(struct net_device *dev, | |||
1493 | return -EOPNOTSUPP; | 1475 | return -EOPNOTSUPP; |
1494 | } | 1476 | } |
1495 | } | 1477 | } |
1496 | EXPORT_SYMBOL_GPL(cfg80211_wext_siwpmksa); | ||
1497 | 1478 | ||
1498 | static const iw_handler cfg80211_handlers[] = { | 1479 | static const iw_handler cfg80211_handlers[] = { |
1499 | [IW_IOCTL_IDX(SIOCGIWNAME)] = (iw_handler) cfg80211_wext_giwname, | 1480 | [IW_IOCTL_IDX(SIOCGIWNAME)] = (iw_handler) cfg80211_wext_giwname, |