1 diff -u -p linux/net/core/wireless.j2.c linux/net/core/wireless.c
2 --- linux/net/core/wireless.j2.c 2007-03-21 14:41:51.000000000 -0700
3 +++ linux/net/core/wireless.c 2007-03-21 14:41:08.000000000 -0700
4 @@ -766,39 +766,11 @@ static int ioctl_standard_call(struct ne
8 - int essid_compat = 0;
10 /* Calculate space needed by arguments. Always allocate
11 * for max space. Easier, and won't last long... */
12 extra_size = descr->max_tokens * descr->token_size;
14 - /* Check need for ESSID compatibility for WE < 21 */
20 - if (iwr->u.data.length == descr->max_tokens + 1)
22 - else if (IW_IS_SET(cmd) && (iwr->u.data.length != 0)) {
23 - char essid[IW_ESSID_MAX_SIZE + 1];
25 - err = copy_from_user(essid, iwr->u.data.pointer,
26 - iwr->u.data.length *
31 - if (essid[iwr->u.data.length - 1] == '\0')
39 - iwr->u.data.length -= essid_compat;
41 /* Check what user space is giving us */
43 /* Check NULL pointer */
44 @@ -841,7 +813,6 @@ static int ioctl_standard_call(struct ne
45 #endif /* WE_IOCTL_DEBUG */
47 /* Create the kernel buffer */
48 - /* kzalloc ensures NULL-termination for essid_compat */
49 extra = kzalloc(extra_size, GFP_KERNEL);
52 @@ -866,8 +837,6 @@ static int ioctl_standard_call(struct ne
53 /* Call the handler */
54 ret = handler(dev, &info, &(iwr->u), extra);
56 - iwr->u.data.length += essid_compat;
58 /* If we have something to return to the user */
59 if (!ret && IW_IS_GET(cmd)) {
60 /* Check if there is enough buffer up there */