aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-04-26 23:44:35 -0400
committerDavid S. Miller <davem@davemloft.net>2007-04-26 23:44:35 -0400
commit235c107ba08becb3ae6c3d3449c8b1053a5a9d75 (patch)
tree7997e9fb98f54ebe4768dfc67e70cb58a4f4c676 /net
parent295f4a1fa3ecdf816b18393ef7bcd37c032df2fa (diff)
[WEXT]: Remove dead debug code.
This patch kills a whole bunch of code that can only ever be used by defining some things in wext.c. Also, the things that are printed are mostly useless since the API is fairly well-tested. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/wext.c92
1 files changed, 0 insertions, 92 deletions
diff --git a/net/wireless/wext.c b/net/wireless/wext.c
index a6cf1034e07c..1db2be7ba2f2 100644
--- a/net/wireless/wext.c
+++ b/net/wireless/wext.c
@@ -103,11 +103,6 @@
103 103
104/**************************** CONSTANTS ****************************/ 104/**************************** CONSTANTS ****************************/
105 105
106/* Debugging stuff */
107#undef WE_IOCTL_DEBUG /* Debug IOCTL API */
108#undef WE_EVENT_DEBUG /* Debug Event dispatcher */
109#undef WE_SPY_DEBUG /* Debug enhanced spy support */
110
111/* Options */ 106/* Options */
112#define WE_EVENT_RTNETLINK /* Propagate events using RtNetlink */ 107#define WE_EVENT_RTNETLINK /* Propagate events using RtNetlink */
113#define WE_SET_EVENT /* Generate an event on some set commands */ 108#define WE_SET_EVENT /* Generate an event on some set commands */
@@ -736,12 +731,6 @@ static int ioctl_standard_call(struct net_device * dev,
736 return -EOPNOTSUPP; 731 return -EOPNOTSUPP;
737 descr = &(standard_ioctl[cmd - SIOCIWFIRST]); 732 descr = &(standard_ioctl[cmd - SIOCIWFIRST]);
738 733
739#ifdef WE_IOCTL_DEBUG
740 printk(KERN_DEBUG "%s (WE) : Found standard handler for 0x%04X\n",
741 ifr->ifr_name, cmd);
742 printk(KERN_DEBUG "%s (WE) : Header type : %d, Token type : %d, size : %d, token : %d\n", dev->name, descr->header_type, descr->token_type, descr->token_size, descr->max_tokens);
743#endif /* WE_IOCTL_DEBUG */
744
745 /* Prepare the call */ 734 /* Prepare the call */
746 info.cmd = cmd; 735 info.cmd = cmd;
747 info.flags = 0; 736 info.flags = 0;
@@ -832,11 +821,6 @@ static int ioctl_standard_call(struct net_device * dev,
832 } 821 }
833 } 822 }
834 823
835#ifdef WE_IOCTL_DEBUG
836 printk(KERN_DEBUG "%s (WE) : Malloc %d bytes\n",
837 dev->name, extra_size);
838#endif /* WE_IOCTL_DEBUG */
839
840 /* Create the kernel buffer */ 824 /* Create the kernel buffer */
841 /* kzalloc ensures NULL-termination for essid_compat */ 825 /* kzalloc ensures NULL-termination for essid_compat */
842 extra = kzalloc(extra_size, GFP_KERNEL); 826 extra = kzalloc(extra_size, GFP_KERNEL);
@@ -853,11 +837,6 @@ static int ioctl_standard_call(struct net_device * dev,
853 kfree(extra); 837 kfree(extra);
854 return -EFAULT; 838 return -EFAULT;
855 } 839 }
856#ifdef WE_IOCTL_DEBUG
857 printk(KERN_DEBUG "%s (WE) : Got %d bytes\n",
858 dev->name,
859 iwr->u.data.length * descr->token_size);
860#endif /* WE_IOCTL_DEBUG */
861 } 840 }
862 841
863 /* Call the handler */ 842 /* Call the handler */
@@ -878,11 +857,6 @@ static int ioctl_standard_call(struct net_device * dev,
878 descr->token_size); 857 descr->token_size);
879 if (err) 858 if (err)
880 ret = -EFAULT; 859 ret = -EFAULT;
881#ifdef WE_IOCTL_DEBUG
882 printk(KERN_DEBUG "%s (WE) : Wrote %d bytes\n",
883 dev->name,
884 iwr->u.data.length * descr->token_size);
885#endif /* WE_IOCTL_DEBUG */
886 } 860 }
887 861
888#ifdef WE_SET_EVENT 862#ifdef WE_SET_EVENT
@@ -947,16 +921,6 @@ static inline int ioctl_private_call(struct net_device * dev,
947 break; 921 break;
948 } 922 }
949 923
950#ifdef WE_IOCTL_DEBUG
951 printk(KERN_DEBUG "%s (WE) : Found private handler for 0x%04X\n",
952 ifr->ifr_name, cmd);
953 if (descr) {
954 printk(KERN_DEBUG "%s (WE) : Name %s, set %X, get %X\n",
955 dev->name, descr->name,
956 descr->set_args, descr->get_args);
957 }
958#endif /* WE_IOCTL_DEBUG */
959
960 /* Compute the size of the set/get arguments */ 924 /* Compute the size of the set/get arguments */
961 if (descr != NULL) { 925 if (descr != NULL) {
962 if (IW_IS_SET(cmd)) { 926 if (IW_IS_SET(cmd)) {
@@ -1013,11 +977,6 @@ static inline int ioctl_private_call(struct net_device * dev,
1013 return -EFAULT; 977 return -EFAULT;
1014 } 978 }
1015 979
1016#ifdef WE_IOCTL_DEBUG
1017 printk(KERN_DEBUG "%s (WE) : Malloc %d bytes\n",
1018 dev->name, extra_size);
1019#endif /* WE_IOCTL_DEBUG */
1020
1021 /* Always allocate for max space. Easier, and won't last 980 /* Always allocate for max space. Easier, and won't last
1022 * long... */ 981 * long... */
1023 extra = kmalloc(extra_size, GFP_KERNEL); 982 extra = kmalloc(extra_size, GFP_KERNEL);
@@ -1033,10 +992,6 @@ static inline int ioctl_private_call(struct net_device * dev,
1033 kfree(extra); 992 kfree(extra);
1034 return -EFAULT; 993 return -EFAULT;
1035 } 994 }
1036#ifdef WE_IOCTL_DEBUG
1037 printk(KERN_DEBUG "%s (WE) : Got %d elem\n",
1038 dev->name, iwr->u.data.length);
1039#endif /* WE_IOCTL_DEBUG */
1040 } 995 }
1041 996
1042 /* Call the handler */ 997 /* Call the handler */
@@ -1056,10 +1011,6 @@ static inline int ioctl_private_call(struct net_device * dev,
1056 extra_size); 1011 extra_size);
1057 if (err) 1012 if (err)
1058 ret = -EFAULT; 1013 ret = -EFAULT;
1059#ifdef WE_IOCTL_DEBUG
1060 printk(KERN_DEBUG "%s (WE) : Wrote %d elem\n",
1061 dev->name, iwr->u.data.length);
1062#endif /* WE_IOCTL_DEBUG */
1063 } 1014 }
1064 1015
1065 /* Cleanup - I told you it wasn't that long ;-) */ 1016 /* Cleanup - I told you it wasn't that long ;-) */
@@ -1319,11 +1270,6 @@ void wireless_send_event(struct net_device * dev,
1319 dev->name, cmd); 1270 dev->name, cmd);
1320 return; 1271 return;
1321 } 1272 }
1322#ifdef WE_EVENT_DEBUG
1323 printk(KERN_DEBUG "%s (WE) : Got event 0x%04X\n",
1324 dev->name, cmd);
1325 printk(KERN_DEBUG "%s (WE) : Header type : %d, Token type : %d, size : %d, token : %d\n", dev->name, descr->header_type, descr->token_type, descr->token_size, descr->max_tokens);
1326#endif /* WE_EVENT_DEBUG */
1327 1273
1328 /* Check extra parameters and set extra_len */ 1274 /* Check extra parameters and set extra_len */
1329 if (descr->header_type == IW_HEADER_TYPE_POINT) { 1275 if (descr->header_type == IW_HEADER_TYPE_POINT) {
@@ -1341,19 +1287,12 @@ void wireless_send_event(struct net_device * dev,
1341 extra_len = wrqu->data.length * descr->token_size; 1287 extra_len = wrqu->data.length * descr->token_size;
1342 /* Always at an offset in wrqu */ 1288 /* Always at an offset in wrqu */
1343 wrqu_off = IW_EV_POINT_OFF; 1289 wrqu_off = IW_EV_POINT_OFF;
1344#ifdef WE_EVENT_DEBUG
1345 printk(KERN_DEBUG "%s (WE) : Event 0x%04X, tokens %d, extra_len %d\n", dev->name, cmd, wrqu->data.length, extra_len);
1346#endif /* WE_EVENT_DEBUG */
1347 } 1290 }
1348 1291
1349 /* Total length of the event */ 1292 /* Total length of the event */
1350 hdr_len = event_type_size[descr->header_type]; 1293 hdr_len = event_type_size[descr->header_type];
1351 event_len = hdr_len + extra_len; 1294 event_len = hdr_len + extra_len;
1352 1295
1353#ifdef WE_EVENT_DEBUG
1354 printk(KERN_DEBUG "%s (WE) : Event 0x%04X, hdr_len %d, wrqu_off %d, event_len %d\n", dev->name, cmd, hdr_len, wrqu_off, event_len);
1355#endif /* WE_EVENT_DEBUG */
1356
1357 /* Create temporary buffer to hold the event */ 1296 /* Create temporary buffer to hold the event */
1358 event = kmalloc(event_len, GFP_ATOMIC); 1297 event = kmalloc(event_len, GFP_ATOMIC);
1359 if (event == NULL) 1298 if (event == NULL)
@@ -1443,19 +1382,6 @@ int iw_handler_set_spy(struct net_device * dev,
1443 /* Reset stats */ 1382 /* Reset stats */
1444 memset(spydata->spy_stat, 0, 1383 memset(spydata->spy_stat, 0,
1445 sizeof(struct iw_quality) * IW_MAX_SPY); 1384 sizeof(struct iw_quality) * IW_MAX_SPY);
1446
1447#ifdef WE_SPY_DEBUG
1448 printk(KERN_DEBUG "iw_handler_set_spy() : wireless_data %p, spydata %p, num %d\n", dev->wireless_data, spydata, wrqu->data.length);
1449 for (i = 0; i < wrqu->data.length; i++)
1450 printk(KERN_DEBUG
1451 "%02X:%02X:%02X:%02X:%02X:%02X \n",
1452 spydata->spy_address[i][0],
1453 spydata->spy_address[i][1],
1454 spydata->spy_address[i][2],
1455 spydata->spy_address[i][3],
1456 spydata->spy_address[i][4],
1457 spydata->spy_address[i][5]);
1458#endif /* WE_SPY_DEBUG */
1459 } 1385 }
1460 1386
1461 /* Make sure above is updated before re-enabling */ 1387 /* Make sure above is updated before re-enabling */
@@ -1525,10 +1451,6 @@ int iw_handler_set_thrspy(struct net_device * dev,
1525 /* Clear flag */ 1451 /* Clear flag */
1526 memset(spydata->spy_thr_under, '\0', sizeof(spydata->spy_thr_under)); 1452 memset(spydata->spy_thr_under, '\0', sizeof(spydata->spy_thr_under));
1527 1453
1528#ifdef WE_SPY_DEBUG
1529 printk(KERN_DEBUG "iw_handler_set_thrspy() : low %d ; high %d\n", spydata->spy_thr_low.level, spydata->spy_thr_high.level);
1530#endif /* WE_SPY_DEBUG */
1531
1532 return 0; 1454 return 0;
1533} 1455}
1534 1456
@@ -1579,16 +1501,6 @@ static void iw_send_thrspy_event(struct net_device * dev,
1579 memcpy(&(threshold.low), &(spydata->spy_thr_low), 1501 memcpy(&(threshold.low), &(spydata->spy_thr_low),
1580 2 * sizeof(struct iw_quality)); 1502 2 * sizeof(struct iw_quality));
1581 1503
1582#ifdef WE_SPY_DEBUG
1583 printk(KERN_DEBUG "iw_send_thrspy_event() : address %02X:%02X:%02X:%02X:%02X:%02X, level %d, up = %d\n",
1584 threshold.addr.sa_data[0],
1585 threshold.addr.sa_data[1],
1586 threshold.addr.sa_data[2],
1587 threshold.addr.sa_data[3],
1588 threshold.addr.sa_data[4],
1589 threshold.addr.sa_data[5], threshold.qual.level);
1590#endif /* WE_SPY_DEBUG */
1591
1592 /* Send event to user space */ 1504 /* Send event to user space */
1593 wireless_send_event(dev, SIOCGIWTHRSPY, &wrqu, (char *) &threshold); 1505 wireless_send_event(dev, SIOCGIWTHRSPY, &wrqu, (char *) &threshold);
1594} 1506}
@@ -1612,10 +1524,6 @@ void wireless_spy_update(struct net_device * dev,
1612 if (!spydata) 1524 if (!spydata)
1613 return; 1525 return;
1614 1526
1615#ifdef WE_SPY_DEBUG
1616 printk(KERN_DEBUG "wireless_spy_update() : wireless_data %p, spydata %p, address %02X:%02X:%02X:%02X:%02X:%02X\n", dev->wireless_data, spydata, address[0], address[1], address[2], address[3], address[4], address[5]);
1617#endif /* WE_SPY_DEBUG */
1618
1619 /* Update all records that match */ 1527 /* Update all records that match */
1620 for (i = 0; i < spydata->spy_number; i++) 1528 for (i = 0; i < spydata->spy_number; i++)
1621 if (!compare_ether_addr(address, spydata->spy_address[i])) { 1529 if (!compare_ether_addr(address, spydata->spy_address[i])) {