X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/f52d66ff00b24111f87c274d3d7085ef2e1d27b1..7db6197f88bbd91afb6a80994f378e759d11f94b:/target/linux/generic-2.4/patches/100-wireless-extension.patch diff --git a/target/linux/generic-2.4/patches/100-wireless-extension.patch b/target/linux/generic-2.4/patches/100-wireless-extension.patch index 88e91831f..d6fc54987 100644 --- a/target/linux/generic-2.4/patches/100-wireless-extension.patch +++ b/target/linux/generic-2.4/patches/100-wireless-extension.patch @@ -1,7 +1,6 @@ -diff -Nur linux-2.4.32/include/linux/netdevice.h linux-2.4.32-we/include/linux/netdevice.h ---- linux-2.4.32/include/linux/netdevice.h 2004-11-17 12:54:22.000000000 +0100 -+++ linux-2.4.32-we/include/linux/netdevice.h 2006-03-13 12:10:57.000000000 +0100 -@@ -295,7 +295,9 @@ +--- a/include/linux/netdevice.h ++++ b/include/linux/netdevice.h +@@ -295,7 +295,9 @@ struct net_device /* List of functions to handle Wireless Extensions (instead of ioctl). * See for details. Jean II */ @@ -12,9 +11,8 @@ diff -Nur linux-2.4.32/include/linux/netdevice.h linux-2.4.32-we/include/linux/n struct ethtool_ops *ethtool_ops; -diff -Nur linux-2.4.32/include/linux/wireless.h linux-2.4.32-we/include/linux/wireless.h ---- linux-2.4.32/include/linux/wireless.h 2003-11-28 19:26:21.000000000 +0100 -+++ linux-2.4.32-we/include/linux/wireless.h 2006-03-13 12:11:02.000000000 +0100 +--- a/include/linux/wireless.h ++++ b/include/linux/wireless.h @@ -1,10 +1,10 @@ /* * This file define a set of standard wireless extensions @@ -303,7 +301,7 @@ diff -Nur linux-2.4.32/include/linux/wireless.h linux-2.4.32-we/include/linux/wi /****************************** TYPES ******************************/ /* --------------------------- SUBTYPES --------------------------- */ -@@ -456,7 +644,7 @@ +@@ -456,7 +644,7 @@ struct iw_freq __s32 m; /* Mantissa */ __s16 e; /* Exponent */ __u8 i; /* List index (when in range struct) */ @@ -312,7 +310,7 @@ diff -Nur linux-2.4.32/include/linux/wireless.h linux-2.4.32-we/include/linux/wi }; /* -@@ -507,6 +695,132 @@ +@@ -507,6 +695,132 @@ struct iw_thrspy struct iw_quality high; /* High threshold */ }; @@ -445,7 +443,7 @@ diff -Nur linux-2.4.32/include/linux/wireless.h linux-2.4.32-we/include/linux/wi /* ------------------------ WIRELESS STATS ------------------------ */ /* * Wireless statistics (used for /proc/net/wireless) -@@ -610,11 +924,12 @@ +@@ -610,11 +924,12 @@ struct iw_range /* Old Frequency (backward compat - moved lower ) */ __u16 old_num_channels; __u8 old_num_frequency; @@ -461,7 +459,7 @@ diff -Nur linux-2.4.32/include/linux/wireless.h linux-2.4.32-we/include/linux/wi /* Quality of link & SNR stuff */ /* Quality range (link, level, noise) -@@ -685,6 +1000,8 @@ +@@ -685,6 +1000,8 @@ struct iw_range struct iw_freq freq[IW_MAX_FREQUENCIES]; /* list */ /* Note : this frequency list doesn't need to fit channel numbers, * because each entry contain its channel index */ @@ -470,9 +468,8 @@ diff -Nur linux-2.4.32/include/linux/wireless.h linux-2.4.32-we/include/linux/wi }; /* -diff -Nur linux-2.4.32/include/net/iw_handler.h linux-2.4.32-we/include/net/iw_handler.h ---- linux-2.4.32/include/net/iw_handler.h 2003-11-28 19:26:21.000000000 +0100 -+++ linux-2.4.32-we/include/net/iw_handler.h 2006-03-13 12:10:57.000000000 +0100 +--- a/include/net/iw_handler.h ++++ b/include/net/iw_handler.h @@ -1,10 +1,10 @@ /* * This file define the new driver API for Wireless Extensions @@ -523,7 +520,7 @@ diff -Nur linux-2.4.32/include/net/iw_handler.h linux-2.4.32-we/include/net/iw_h /* Driver level flags */ #define IW_DESCR_FLAG_WAIT 0x0100 /* Wait for driver event */ -@@ -311,23 +319,25 @@ +@@ -311,23 +319,25 @@ struct iw_handler_def /* Array of handlers for standard ioctls * We will call dev->wireless_handlers->standard[ioctl - SIOCSIWNAME] */ @@ -556,7 +553,7 @@ diff -Nur linux-2.4.32/include/net/iw_handler.h linux-2.4.32-we/include/net/iw_h }; /* ---------------------- IOCTL DESCRIPTION ---------------------- */ -@@ -374,18 +384,29 @@ +@@ -374,18 +384,29 @@ struct iw_ioctl_description */ struct iw_spy_data { @@ -590,10 +587,9 @@ diff -Nur linux-2.4.32/include/net/iw_handler.h linux-2.4.32-we/include/net/iw_h }; /**************************** PROTOTYPES ****************************/ -diff -Nur linux-2.4.32/net/core/dev.c linux-2.4.32-we/net/core/dev.c ---- linux-2.4.32/net/core/dev.c 2005-04-04 03:42:20.000000000 +0200 -+++ linux-2.4.32-we/net/core/dev.c 2006-03-13 12:10:57.000000000 +0100 -@@ -2426,7 +2426,7 @@ +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -2426,7 +2426,7 @@ int dev_ioctl(unsigned int cmd, void *ar /* Follow me in net/core/wireless.c */ ret = wireless_process_ioctl(&ifr, cmd); rtnl_unlock(); @@ -602,9 +598,8 @@ diff -Nur linux-2.4.32/net/core/dev.c linux-2.4.32-we/net/core/dev.c copy_to_user(arg, &ifr, sizeof(struct ifreq))) return -EFAULT; return ret; -diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c ---- linux-2.4.32/net/core/wireless.c 2003-11-28 19:26:21.000000000 +0100 -+++ linux-2.4.32-we/net/core/wireless.c 2006-03-13 12:11:02.000000000 +0100 +--- a/net/core/wireless.c ++++ b/net/core/wireless.c @@ -2,7 +2,7 @@ * This file implement the Wireless Extensions APIs. * @@ -644,7 +639,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c #undef WE_IOCTL_DEBUG /* Debug IOCTL API */ #undef WE_EVENT_DEBUG /* Debug Event dispatcher */ #undef WE_SPY_DEBUG /* Debug enhanced spy support */ -@@ -131,14 +137,14 @@ +@@ -131,14 +137,14 @@ static const struct iw_ioctl_description { IW_HEADER_TYPE_ADDR, 0, 0, 0, 0, 0}, /* SIOCGIWAP */ { IW_HEADER_TYPE_ADDR, 0, 0, 0, 0, IW_DESCR_FLAG_DUMP}, @@ -664,7 +659,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c /* SIOCSIWESSID */ { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_ESSID_MAX_SIZE + 1, IW_DESCR_FLAG_EVENT}, /* SIOCGIWESSID */ -@@ -179,6 +185,25 @@ +@@ -179,6 +185,25 @@ static const struct iw_ioctl_description { IW_HEADER_TYPE_PARAM, 0, 0, 0, 0, 0}, /* SIOCGIWPOWER */ { IW_HEADER_TYPE_PARAM, 0, 0, 0, 0, 0}, @@ -690,7 +685,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c }; static const int standard_ioctl_num = (sizeof(standard_ioctl) / sizeof(struct iw_ioctl_description)); -@@ -198,12 +223,22 @@ +@@ -198,12 +223,22 @@ static const struct iw_ioctl_description { IW_HEADER_TYPE_ADDR, 0, 0, 0, 0, 0}, /* IWEVEXPIRED */ { IW_HEADER_TYPE_ADDR, 0, 0, 0, 0, 0}, @@ -714,7 +709,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c 0, /* IW_PRIV_TYPE_NONE */ 1, /* IW_PRIV_TYPE_BYTE */ 1, /* IW_PRIV_TYPE_CHAR */ -@@ -270,12 +305,15 @@ +@@ -270,12 +305,15 @@ static inline iw_handler get_handler(str */ static inline struct iw_statistics *get_wireless_stats(struct net_device *dev) { @@ -733,7 +728,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c } /* ---------------------------------------------------------------- */ -@@ -310,14 +348,32 @@ +@@ -310,14 +348,32 @@ static inline int call_commit_handler(st /* ---------------------------------------------------------------- */ /* @@ -768,7 +763,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c } -@@ -350,11 +406,14 @@ +@@ -350,11 +406,14 @@ static inline int sprintf_wireless_stats dev->name, stats->status, stats->qual.qual, @@ -786,7 +781,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c stats->discard.nwid, stats->discard.code, stats->discard.fragment, -@@ -470,13 +529,15 @@ +@@ -470,13 +529,15 @@ static inline int ioctl_export_private(s /* Check NULL pointer */ if(iwr->u.data.pointer == NULL) return -EFAULT; @@ -805,7 +800,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c /* Set the number of available ioctls. */ iwr->u.data.length = dev->wireless_handlers->num_private_args; -@@ -505,7 +566,6 @@ +@@ -505,7 +566,6 @@ static inline int ioctl_standard_call(st const struct iw_ioctl_description * descr; struct iw_request_info info; int ret = -EINVAL; @@ -813,7 +808,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c /* Get the description of the IOCTL */ if((cmd - SIOCIWFIRST) >= standard_ioctl_num) -@@ -536,8 +596,14 @@ +@@ -536,8 +596,14 @@ static inline int ioctl_standard_call(st #endif /* WE_SET_EVENT */ } else { char * extra; @@ -828,7 +823,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c /* Check what user space is giving us */ if(IW_IS_SET(cmd)) { /* Check NULL pointer */ -@@ -554,18 +620,33 @@ +@@ -554,18 +620,33 @@ static inline int ioctl_standard_call(st if(iwr->u.data.pointer == NULL) return -EFAULT; /* Save user space buffer size for checking */ @@ -868,7 +863,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c if (extra == NULL) { return -ENOMEM; } -@@ -591,14 +672,11 @@ +@@ -591,14 +672,11 @@ static inline int ioctl_standard_call(st /* If we have something to return to the user */ if (!ret && IW_IS_GET(cmd)) { @@ -884,7 +879,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c err = copy_to_user(iwr->u.data.pointer, extra, iwr->u.data.length * -@@ -661,7 +739,7 @@ +@@ -661,7 +739,7 @@ static inline int ioctl_private_call(str iw_handler handler) { struct iwreq * iwr = (struct iwreq *) ifr; @@ -893,7 +888,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c struct iw_request_info info; int extra_size = 0; int i; -@@ -701,7 +779,7 @@ +@@ -701,7 +779,7 @@ static inline int ioctl_private_call(str ((extra_size + offset) <= IFNAMSIZ)) extra_size = 0; } else { @@ -902,7 +897,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c extra_size = get_priv_size(descr->get_args); /* Does it fits in iwr ? */ -@@ -771,6 +849,14 @@ +@@ -771,6 +849,14 @@ static inline int ioctl_private_call(str /* If we have something to return to the user */ if (!ret && IW_IS_GET(cmd)) { @@ -917,7 +912,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c err = copy_to_user(iwr->u.data.pointer, extra, extra_size); if (err) -@@ -1042,9 +1128,25 @@ +@@ -1042,9 +1128,25 @@ void wireless_send_event(struct net_devi * One of the main advantage of centralising spy support here is that * it becomes much easier to improve and extend it without having to touch * the drivers. One example is the addition of the Spy-Threshold events. @@ -944,7 +939,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c /*------------------------------------------------------------------*/ /* * Standard Wireless Handler : set Spy List -@@ -1054,16 +1156,26 @@ +@@ -1054,16 +1156,26 @@ int iw_handler_set_spy(struct net_device union iwreq_data * wrqu, char * extra) { @@ -976,7 +971,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c /* Are there are addresses to copy? */ if(wrqu->data.length > 0) { int i; -@@ -1089,13 +1201,14 @@ +@@ -1089,13 +1201,14 @@ int iw_handler_set_spy(struct net_device spydata->spy_address[i][5]); #endif /* WE_SPY_DEBUG */ } @@ -994,7 +989,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c } /*------------------------------------------------------------------*/ -@@ -1107,12 +1220,14 @@ +@@ -1107,12 +1220,14 @@ int iw_handler_get_spy(struct net_device union iwreq_data * wrqu, char * extra) { @@ -1012,7 +1007,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c wrqu->data.length = spydata->spy_number; /* Copy addresses. */ -@@ -1129,9 +1244,6 @@ +@@ -1129,9 +1244,6 @@ int iw_handler_get_spy(struct net_device for(i = 0; i < spydata->spy_number; i++) spydata->spy_stat[i].updated = 0; return 0; @@ -1022,7 +1017,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c } /*------------------------------------------------------------------*/ -@@ -1143,11 +1255,13 @@ +@@ -1143,11 +1255,13 @@ int iw_handler_set_thrspy(struct net_dev union iwreq_data * wrqu, char * extra) { @@ -1039,7 +1034,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c /* Just do it */ memcpy(&(spydata->spy_thr_low), &(threshold->low), 2 * sizeof(struct iw_quality)); -@@ -1160,9 +1274,6 @@ +@@ -1160,9 +1274,6 @@ int iw_handler_set_thrspy(struct net_dev #endif /* WE_SPY_DEBUG */ return 0; @@ -1049,7 +1044,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c } /*------------------------------------------------------------------*/ -@@ -1174,22 +1285,20 @@ +@@ -1174,22 +1285,20 @@ int iw_handler_get_thrspy(struct net_dev union iwreq_data * wrqu, char * extra) { @@ -1077,7 +1072,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c /*------------------------------------------------------------------*/ /* * Prepare and send a Spy Threshold event -@@ -1227,7 +1336,6 @@ +@@ -1227,7 +1336,6 @@ static void iw_send_thrspy_event(struct /* Send event to user space */ wireless_send_event(dev, SIOCGIWTHRSPY, &wrqu, (char *) &threshold); } @@ -1085,7 +1080,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c /* ---------------------------------------------------------------- */ /* -@@ -1240,12 +1348,14 @@ +@@ -1240,12 +1348,14 @@ void wireless_spy_update(struct net_devi unsigned char * address, struct iw_quality * wstats) { @@ -1103,7 +1098,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c #ifdef WE_SPY_DEBUG printk(KERN_DEBUG "wireless_spy_update() : offset %ld, spydata %p, address %02X:%02X:%02X:%02X:%02X:%02X\n", dev->wireless_handlers->spy_offset, spydata, address[0], address[1], address[2], address[3], address[4], address[5]); #endif /* WE_SPY_DEBUG */ -@@ -1257,7 +1367,7 @@ +@@ -1257,7 +1367,7 @@ void wireless_spy_update(struct net_devi sizeof(struct iw_quality)); match = i; } @@ -1112,7 +1107,7 @@ diff -Nur linux-2.4.32/net/core/wireless.c linux-2.4.32-we/net/core/wireless.c /* Generate an event if we cross the spy threshold. * To avoid event storms, we have a simple hysteresis : we generate * event only when we go under the low threshold or above the -@@ -1277,6 +1387,4 @@ +@@ -1277,6 +1387,4 @@ void wireless_spy_update(struct net_devi } } }