summaryrefslogtreecommitdiff
path: root/recipes/linux/files
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/linux/files
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/linux/files')
-rw-r--r--recipes/linux/files/ipaq-hal.init14
-rw-r--r--recipes/linux/files/ir240_sys_max_tx-2.diff110
-rw-r--r--recipes/linux/files/ir241_qos_param-2.diff164
-rw-r--r--recipes/linux/files/iw240_we15-6.diff399
-rw-r--r--recipes/linux/files/iw240_we18-5.diff421
-rw-r--r--recipes/linux/files/iw241_we16-6.diff667
-rw-r--r--recipes/linux/files/iw249_we16-6.diff670
-rw-r--r--recipes/linux/files/iw249_we17-13.diff768
-rw-r--r--recipes/linux/files/iw_handlers.w13-5.diff1513
-rw-r--r--recipes/linux/files/iw_handlers.w14-5.diff838
-rw-r--r--recipes/linux/files/linux-2.4-cpufreq.patch20
-rw-r--r--recipes/linux/files/linux-2.4-mmc-debugging.patch15
-rw-r--r--recipes/linux/files/linux-2.4-no-short-loads.patch18
-rw-r--r--recipes/linux/files/linux-2.4-usb-gadget.patch29506
-rw-r--r--recipes/linux/files/linux-2.4.18-list_move.patch32
-rw-r--r--recipes/linux/files/mipv6-1.1-v2.4.25.patch19832
-rw-r--r--recipes/linux/files/mipv6-1.1-v2.4.27.patch19736
-rw-r--r--recipes/linux/files/usb-gadget-ether-compat.patch30
18 files changed, 74753 insertions, 0 deletions
diff --git a/recipes/linux/files/ipaq-hal.init b/recipes/linux/files/ipaq-hal.init
new file mode 100644
index 0000000000..4efb52ec97
--- /dev/null
+++ b/recipes/linux/files/ipaq-hal.init
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# make sure update-modules has been run
+# since the calls below depend on aliases...
+if [ ! -f /etc/modules.conf ]; then
+ update-modules || true
+fi
+
+modprobe ipaq_hal || exit 0
+
+if [ -d /proc/hal ]; then
+ model=`cat /proc/hal/model`
+ modprobe ipaq_hal_$model
+fi
diff --git a/recipes/linux/files/ir240_sys_max_tx-2.diff b/recipes/linux/files/ir240_sys_max_tx-2.diff
new file mode 100644
index 0000000000..5f1307d7dc
--- /dev/null
+++ b/recipes/linux/files/ir240_sys_max_tx-2.diff
@@ -0,0 +1,110 @@
+--- linux/net/irda/irsysctl.c.orig 2003-05-13 11:20:16.000000000 +0200
++++ linux/net/irda/irsysctl.c 2005-01-22 18:39:40.496001712 +0100
+@@ -40,7 +40,8 @@
+
+ enum { DISCOVERY=1, DEVNAME, DEBUG, FAST_POLL, DISCOVERY_SLOTS,
+ DISCOVERY_TIMEOUT, SLOT_TIMEOUT, MAX_BAUD_RATE, MIN_TX_TURN_TIME,
+- MAX_NOREPLY_TIME, WARN_NOREPLY_TIME, LAP_KEEPALIVE_TIME, SPECIFIC_DEV };
++ MAX_TX_DATA_SIZE, MAX_NOREPLY_TIME, WARN_NOREPLY_TIME, LAP_KEEPALIVE_TIME,
++ SPECIFIC_DEV };
+
+ extern int sysctl_discovery;
+ extern int sysctl_discovery_slots;
+@@ -51,6 +52,7 @@
+ extern char sysctl_devname[];
+ extern int sysctl_max_baud_rate;
+ extern int sysctl_min_tx_turn_time;
++extern int sysctl_max_tx_data_size;
+ extern int sysctl_max_noreply_time;
+ extern int sysctl_warn_noreply_time;
+ extern int sysctl_lap_keepalive_time;
+@@ -71,6 +73,8 @@
+ static int min_max_baud_rate = 2400;
+ static int max_min_tx_turn_time = 10000; /* See qos.c - IrLAP spec */
+ static int min_min_tx_turn_time = 0;
++static int max_max_tx_data_size = 2048; /* See qos.c - IrLAP spec */
++static int min_max_tx_data_size = 64;
+ static int max_max_noreply_time = 40; /* See qos.c - IrLAP spec */
+ static int min_max_noreply_time = 3;
+ static int max_warn_noreply_time = 3; /* 3s == standard */
+@@ -128,6 +132,9 @@
+ { MIN_TX_TURN_TIME, "min_tx_turn_time", &sysctl_min_tx_turn_time,
+ sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec,
+ NULL, &min_min_tx_turn_time, &max_min_tx_turn_time },
++ { MAX_TX_DATA_SIZE, "max_tx_data_size", &sysctl_max_tx_data_size,
++ sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec,
++ NULL, &min_max_tx_data_size, &max_max_tx_data_size },
+ { MAX_NOREPLY_TIME, "max_noreply_time", &sysctl_max_noreply_time,
+ sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec,
+ NULL, &min_max_noreply_time, &max_max_noreply_time },
+--- linux/net/irda/qos.c.orig 2003-05-13 11:20:16.000000000 +0200
++++ linux/net/irda/qos.c 2005-01-22 18:36:46.759413688 +0100
+@@ -60,10 +60,26 @@
+ * Nonzero values (usec) are used as lower limit to the per-connection
+ * mtt value which was announced by the other end during negotiation.
+ * Might be helpful if the peer device provides too short mtt.
+- * Default is 10 which means using the unmodified value given by the peer
+- * except if it's 0 (0 is likely a bug in the other stack).
++ * Default is 10us which means using the unmodified value given by the
++ * peer except if it's 0 (0 is likely a bug in the other stack).
+ */
+ unsigned sysctl_min_tx_turn_time = 10;
++/*
++ * Maximum data size to be used in transmission in payload of LAP frame.
++ * There is a bit of confusion in the IrDA spec :
++ * The LAP spec defines the payload of a LAP frame (I field) to be
++ * 2048 bytes max (IrLAP 1.1, chapt 6.6.5, p40).
++ * On the other hand, the PHY mention frames of 2048 bytes max (IrPHY
++ * 1.2, chapt 5.3.2.1, p41). But, this number includes the LAP header
++ * (2 bytes), and CRC (32 bits at 4 Mb/s). So, for the I field (LAP
++ * payload), that's only 2042 bytes. Oups !
++ * I've had trouble trouble transmitting 2048 bytes frames with USB
++ * dongles and nsc-ircc at 4 Mb/s, so adjust to 2042... I don't know
++ * if this bug applies only for 2048 bytes frames or all negociated
++ * frame sizes, but all hardware seem to support "2048 bytes" frames.
++ * You can use the sysctl to play with this value anyway.
++ * Jean II */
++unsigned sysctl_max_tx_data_size = 2042;
+
+ /*
+ * Specific device list limits some negotiation parameters at the connection
+@@ -398,10 +414,10 @@
+ while ((qos->data_size.value > line_capacity) && (index > 0)) {
+ qos->data_size.value = data_sizes[index--];
+ IRDA_DEBUG(2, __FUNCTION__
+- "(), redusing data size to %d\n",
++ "(), reducing data size to %d\n",
+ qos->data_size.value);
+ }
+-#else /* Use method descibed in section 6.6.11 of IrLAP */
++#else /* Use method described in section 6.6.11 of IrLAP */
+ while (irlap_requested_line_capacity(qos) > line_capacity) {
+ ASSERT(index != 0, return;);
+
+@@ -409,18 +425,24 @@
+ if (qos->window_size.value > 1) {
+ qos->window_size.value--;
+ IRDA_DEBUG(2, __FUNCTION__
+- "(), redusing window size to %d\n",
++ "(), reducing window size to %d\n",
+ qos->window_size.value);
+ } else if (index > 1) {
+ qos->data_size.value = data_sizes[index--];
+ IRDA_DEBUG(2, __FUNCTION__
+- "(), redusing data size to %d\n",
++ "(), reducing data size to %d\n",
+ qos->data_size.value);
+ } else {
+ WARNING(__FUNCTION__ "(), nothing more we can do!\n");
+ }
+ }
+ #endif /* CONFIG_IRDA_DYNAMIC_WINDOW */
++ /*
++ * Fix tx data size according to user limits - Jean II
++ */
++ if (qos->data_size.value > sysctl_max_tx_data_size)
++ /* Allow non discrete adjustement to avoid loosing capacity */
++ qos->data_size.value = sysctl_max_tx_data_size;
+ }
+
+ /*
diff --git a/recipes/linux/files/ir241_qos_param-2.diff b/recipes/linux/files/ir241_qos_param-2.diff
new file mode 100644
index 0000000000..dfe77c52b0
--- /dev/null
+++ b/recipes/linux/files/ir241_qos_param-2.diff
@@ -0,0 +1,164 @@
+--- linux/net/irda/qos.c.orig 2005-01-22 19:19:56.013787192 +0100
++++ linux/net/irda/qos.c 2005-01-22 19:21:13.493008560 +0100
+@@ -73,13 +73,18 @@
+ * 1.2, chapt 5.3.2.1, p41). But, this number includes the LAP header
+ * (2 bytes), and CRC (32 bits at 4 Mb/s). So, for the I field (LAP
+ * payload), that's only 2042 bytes. Oups !
+- * I've had trouble trouble transmitting 2048 bytes frames with USB
+- * dongles and nsc-ircc at 4 Mb/s, so adjust to 2042... I don't know
+- * if this bug applies only for 2048 bytes frames or all negociated
+- * frame sizes, but all hardware seem to support "2048 bytes" frames.
+- * You can use the sysctl to play with this value anyway.
++ * My nsc-ircc hardware has troubles receiving 2048 bytes frames at 4 Mb/s,
++ * so adjust to 2042... I don't know if this bug applies only for 2048
++ * bytes frames or all negociated frame sizes, but you can use the sysctl
++ * to play with this value anyway.
+ * Jean II */
+ unsigned sysctl_max_tx_data_size = 2042;
++/*
++ * Maximum transmit window, i.e. number of LAP frames between turn-around.
++ * This allow to override what the peer told us. Some peers are buggy and
++ * don't always support what they tell us.
++ * Jean II */
++unsigned sysctl_max_tx_window = 7;
+
+ /*
+ * Specific device list limits some negotiation parameters at the connection
+@@ -227,7 +232,19 @@
+ {
+ __u16 msb = 0x8000;
+ int index = 15; /* Current MSB */
+-
++
++ /* Check for buggy peers.
++ * Note : there is a small probability that it could be us, but I
++ * would expect driver authors to catch that pretty early and be
++ * able to check precisely what's going on. If a end user sees this,
++ * it's very likely the peer. - Jean II */
++ if (word == 0) {
++ WARNING("%s(), Detected buggy peer, adjust null PV to 0x1!\n",
++ __FUNCTION__);
++ /* The only safe choice (we don't know the array size) */
++ word = 0x1;
++ }
++
+ while (msb) {
+ if (word & msb)
+ break; /* Found it! */
+@@ -378,10 +395,14 @@
+
+ /*
+ * Make sure the mintt is sensible.
++ * Main culprit : Ericsson T39. - Jean II
+ */
+ if (sysctl_min_tx_turn_time > qos->min_turn_time.value) {
+ int i;
+
++ WARNING("%s(), Detected buggy peer, adjust mtt to %dus!\n",
++ __FUNCTION__, sysctl_min_tx_turn_time);
++
+ /* We don't really need bits, but easier this way */
+ i = value_highest_bit(sysctl_min_tx_turn_time, min_turn_times,
+ 8, &qos->min_turn_time.bits);
+@@ -443,6 +464,11 @@
+ if (qos->data_size.value > sysctl_max_tx_data_size)
+ /* Allow non discrete adjustement to avoid loosing capacity */
+ qos->data_size.value = sysctl_max_tx_data_size;
++ /*
++ * Override Tx window if user request it. - Jean II
++ */
++ if (qos->window_size.value > sysctl_max_tx_window)
++ qos->window_size.value = sysctl_max_tx_window;
+ }
+
+ /*
+--- linux/net/irda/irsysctl.c.orig 2005-01-22 19:19:56.006788256 +0100
++++ linux/net/irda/irsysctl.c 2005-01-22 19:24:31.273941288 +0100
+@@ -40,8 +40,8 @@
+
+ enum { DISCOVERY=1, DEVNAME, DEBUG, FAST_POLL, DISCOVERY_SLOTS,
+ DISCOVERY_TIMEOUT, SLOT_TIMEOUT, MAX_BAUD_RATE, MIN_TX_TURN_TIME,
+- MAX_TX_DATA_SIZE, MAX_NOREPLY_TIME, WARN_NOREPLY_TIME, LAP_KEEPALIVE_TIME,
+- SPECIFIC_DEV };
++ MAX_TX_DATA_SIZE, MAX_TX_WINDOW, MAX_NOREPLY_TIME, WARN_NOREPLY_TIME,
++ LAP_KEEPALIVE_TIME, SPECIFIC_DEV };
+
+ extern int sysctl_discovery;
+ extern int sysctl_discovery_slots;
+@@ -53,6 +53,7 @@
+ extern int sysctl_max_baud_rate;
+ extern int sysctl_min_tx_turn_time;
+ extern int sysctl_max_tx_data_size;
++extern int sysctl_max_tx_window;
+ extern int sysctl_max_noreply_time;
+ extern int sysctl_warn_noreply_time;
+ extern int sysctl_lap_keepalive_time;
+@@ -75,6 +76,8 @@
+ static int min_min_tx_turn_time = 0;
+ static int max_max_tx_data_size = 2048; /* See qos.c - IrLAP spec */
+ static int min_max_tx_data_size = 64;
++static int max_max_tx_window = 7; /* See qos.c - IrLAP spec */
++static int min_max_tx_window = 1;
+ static int max_max_noreply_time = 40; /* See qos.c - IrLAP spec */
+ static int min_max_noreply_time = 3;
+ static int max_warn_noreply_time = 3; /* 3s == standard */
+@@ -135,6 +138,9 @@
+ { MAX_TX_DATA_SIZE, "max_tx_data_size", &sysctl_max_tx_data_size,
+ sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec,
+ NULL, &min_max_tx_data_size, &max_max_tx_data_size },
++ { MAX_TX_WINDOW, "max_tx_window", &sysctl_max_tx_window,
++ sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec,
++ NULL, &min_max_tx_window, &max_max_tx_window },
+ { MAX_NOREPLY_TIME, "max_noreply_time", &sysctl_max_noreply_time,
+ sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec,
+ NULL, &min_max_noreply_time, &max_max_noreply_time },
+--- linux/net/irda/parameters.c.orig 2003-05-13 11:20:16.000000000 +0200
++++ linux/net/irda/parameters.c 2005-01-22 19:21:13.527003392 +0100
+@@ -204,11 +204,13 @@
+ {
+ irda_param_t p;
+ int n = 0;
++ int extract_len; /* Real lenght we extract */
+ int err;
+
+ p.pi = pi; /* In case handler needs to know */
+ p.pl = buf[1]; /* Extract lenght of value */
+ p.pv.i = 0; /* Clear value */
++ extract_len = p.pl; /* Default : extract all */
+
+ /* Check if buffer is long enough for parsing */
+ if (len < (2+p.pl)) {
+@@ -220,18 +222,30 @@
+ /*
+ * Check that the integer length is what we expect it to be. If the
+ * handler want a 16 bits integer then a 32 bits is not good enough
++ * PV_INTEGER means that the handler is flexible.
+ */
+ if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) {
+ ERROR(__FUNCTION__ "(), invalid parameter length! "
+ "Expected %d bytes, but value had %d bytes!\n",
+ type & PV_MASK, p.pl);
+
+- /* Skip parameter */
+- return p.pl+2;
++ /* Most parameters are bit/byte fields or little endian,
++ * so it's ok to only extract a subset of it (the subset
++ * that the handler expect). This is necessary, as some
++ * broken implementations seems to add extra undefined bits.
++ * If the parameter is shorter than we expect or is big
++ * endian, we can't play those tricks. Jean II */
++ if((p.pl < (type & PV_MASK)) || (type & PV_BIG_ENDIAN)) {
++ /* Skip parameter */
++ return p.pl+2;
++ } else {
++ /* Extract subset of it, fallthrough */
++ extract_len = type & PV_MASK;
++ }
+ }
+
+
+- switch (p.pl) {
++ switch (extract_len) {
+ case 1:
+ n += irda_param_unpack(buf+2, "b", &p.pv.i);
+ break;
diff --git a/recipes/linux/files/iw240_we15-6.diff b/recipes/linux/files/iw240_we15-6.diff
new file mode 100644
index 0000000000..2ebfd8ec12
--- /dev/null
+++ b/recipes/linux/files/iw240_we15-6.diff
@@ -0,0 +1,399 @@
+diff -u -p linux/include/linux/wireless.14.h linux/include/linux/wireless.h
+--- linux/include/linux/wireless.14.h Mon Dec 2 18:51:00 2002
++++ linux/include/linux/wireless.h Mon Dec 2 18:53:35 2002
+@@ -1,7 +1,7 @@
+ /*
+ * This file define a set of standard wireless extensions
+ *
+- * Version : 14 25.1.02
++ * Version : 15 12.7.02
+ *
+ * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
+ * Copyright (c) 1997-2002 Jean Tourrilhes, All Rights Reserved.
+@@ -80,7 +80,7 @@
+ * (there is some stuff that will be added in the future...)
+ * I just plan to increment with each new version.
+ */
+-#define WIRELESS_EXT 14
++#define WIRELESS_EXT 15
+
+ /*
+ * Changes :
+@@ -153,17 +153,32 @@
+ * - Define additional specific event numbers
+ * - Add "addr" and "param" fields in union iwreq_data
+ * - AP scanning stuff (SIOCSIWSCAN and friends)
++ *
++ * V14 to V15
++ * ----------
++ * - Add IW_PRIV_TYPE_ADDR for struct sockaddr private arg
++ * - Make struct iw_freq signed (both m & e), add explicit padding
++ * - Add IWEVCUSTOM for driver specific event/scanning token
++ * - Add IW_MAX_GET_SPY for driver returning a lot of addresses
++ * - Add IW_TXPOW_RANGE for range of Tx Powers
++ * - Add IWEVREGISTERED & IWEVEXPIRED events for Access Points
++ * - Add IW_MODE_MONITOR for passive monitor
+ */
+
+ /**************************** CONSTANTS ****************************/
+
+ /* -------------------------- IOCTL LIST -------------------------- */
+
+-/* Basic operations */
++/* Wireless Identification */
+ #define SIOCSIWCOMMIT 0x8B00 /* Commit pending changes to driver */
+ #define SIOCGIWNAME 0x8B01 /* get name == wireless protocol */
+-#define SIOCSIWNWID 0x8B02 /* set network id (the cell) */
+-#define SIOCGIWNWID 0x8B03 /* get network id */
++/* SIOCGIWNAME is used to verify the presence of Wireless Extensions.
++ * Common values : "IEEE 802.11-DS", "IEEE 802.11-FH", "IEEE 802.11b"...
++ * Don't put the name of your driver there, it's useless. */
++
++/* Basic operations */
++#define SIOCSIWNWID 0x8B02 /* set network id (pre-802.11) */
++#define SIOCGIWNWID 0x8B03 /* get network id (the cell) */
+ #define SIOCSIWFREQ 0x8B04 /* set channel/frequency (Hz) */
+ #define SIOCGIWFREQ 0x8B05 /* get channel/frequency (Hz) */
+ #define SIOCSIWMODE 0x8B06 /* set operation mode */
+@@ -178,16 +193,18 @@
+ #define SIOCGIWPRIV 0x8B0D /* get private ioctl interface info */
+ #define SIOCSIWSTATS 0x8B0E /* Unused */
+ #define SIOCGIWSTATS 0x8B0F /* Get /proc/net/wireless stats */
++/* SIOCGIWSTATS is strictly used between user space and the kernel, and
++ * is never passed to the driver (i.e. the driver will never see it). */
+
+-/* Mobile IP support */
++/* Mobile IP support (statistics per MAC address) */
+ #define SIOCSIWSPY 0x8B10 /* set spy addresses */
+ #define SIOCGIWSPY 0x8B11 /* get spy info (quality of link) */
+
+ /* Access Point manipulation */
+ #define SIOCSIWAP 0x8B14 /* set access point MAC addresses */
+ #define SIOCGIWAP 0x8B15 /* get access point MAC addresses */
+-#define SIOCGIWAPLIST 0x8B17 /* get list of access point in range */
+-#define SIOCSIWSCAN 0x8B18 /* trigger scanning */
++#define SIOCGIWAPLIST 0x8B17 /* Deprecated in favor of scanning */
++#define SIOCSIWSCAN 0x8B18 /* trigger scanning (list cells) */
+ #define SIOCGIWSCAN 0x8B19 /* get scanning results */
+
+ /* 802.11 specific support */
+@@ -197,9 +214,7 @@
+ #define SIOCGIWNICKN 0x8B1D /* get node name/nickname */
+ /* As the ESSID and NICKN are strings up to 32 bytes long, it doesn't fit
+ * within the 'iwreq' structure, so we need to use the 'data' member to
+- * point to a string in user space, like it is done for RANGE...
+- * The "flags" member indicate if the ESSID is active or not (promiscuous).
+- */
++ * point to a string in user space, like it is done for RANGE... */
+
+ /* Other parameters useful in 802.11 and some other devices */
+ #define SIOCSIWRATE 0x8B20 /* set default bit rate (bps) */
+@@ -257,7 +272,10 @@
+ /* Most events use the same identifier as ioctl requests */
+
+ #define IWEVTXDROP 0x8C00 /* Packet dropped to excessive retry */
+-#define IWEVQUAL 0x8C01 /* Quality part of statistics */
++#define IWEVQUAL 0x8C01 /* Quality part of statistics (scan) */
++#define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */
++#define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) */
++#define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */
+
+ #define IWEVFIRST 0x8C00
+
+@@ -273,7 +291,8 @@
+ #define IW_PRIV_TYPE_BYTE 0x1000 /* Char as number */
+ #define IW_PRIV_TYPE_CHAR 0x2000 /* Char as character */
+ #define IW_PRIV_TYPE_INT 0x4000 /* 32 bits int */
+-#define IW_PRIV_TYPE_FLOAT 0x5000
++#define IW_PRIV_TYPE_FLOAT 0x5000 /* struct iw_freq */
++#define IW_PRIV_TYPE_ADDR 0x6000 /* struct sockaddr */
+
+ #define IW_PRIV_SIZE_FIXED 0x0800 /* Variable or fixed nuber of args */
+
+@@ -297,13 +316,16 @@
+
+ /* Maximum tx powers in the range struct */
+ #define IW_MAX_TXPOWER 8
++/* Note : if you more than 8 TXPowers, just set the max and min or
++ * a few of them in the struct iw_range. */
+
+ /* Maximum of address that you may set with SPY */
+-#define IW_MAX_SPY 8
++#define IW_MAX_SPY 8 /* set */
++#define IW_MAX_GET_SPY 64 /* get */
+
+ /* Maximum of address that you may get in the
+ list of access points in range */
+-#define IW_MAX_AP 8
++#define IW_MAX_AP 64
+
+ /* Maximum size of the ESSID and NICKN strings */
+ #define IW_ESSID_MAX_SIZE 32
+@@ -315,6 +337,7 @@
+ #define IW_MODE_MASTER 3 /* Synchronisation master or Access Point */
+ #define IW_MODE_REPEAT 4 /* Wireless Repeater (forwarder) */
+ #define IW_MODE_SECOND 5 /* Secondary master/repeater (backup) */
++#define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */
+
+ /* Maximum number of size of encoding token available
+ * they are listed in the range structure */
+@@ -350,8 +373,10 @@
+ #define IW_POWER_RELATIVE 0x0004 /* Value is not in seconds/ms/us */
+
+ /* Transmit Power flags available */
++#define IW_TXPOW_TYPE 0x00FF /* Type of value */
+ #define IW_TXPOW_DBM 0x0000 /* Value is in dBm */
+ #define IW_TXPOW_MWATT 0x0001 /* Value is in mW */
++#define IW_TXPOW_RANGE 0x1000 /* Range of value between min/max */
+
+ /* Retry limits and lifetime flags available */
+ #define IW_RETRY_ON 0x0000 /* No details... */
+@@ -376,6 +401,9 @@
+ /* Maximum size of returned data */
+ #define IW_SCAN_MAX_DATA 4096 /* In bytes */
+
++/* Max number of char in custom event - use multiple of them if needed */
++#define IW_CUSTOM_MAX 256 /* In bytes */
++
+ /****************************** TYPES ******************************/
+
+ /* --------------------------- SUBTYPES --------------------------- */
+@@ -411,9 +439,10 @@ struct iw_point
+ */
+ struct iw_freq
+ {
+- __u32 m; /* Mantissa */
+- __u16 e; /* Exponent */
++ __s32 m; /* Mantissa */
++ __s16 e; /* Exponent */
+ __u8 i; /* List index (when in range struct) */
++ __u8 pad; /* Unused - just for alignement */
+ };
+
+ /*
+diff -u -p linux/include/net/iw_handler.14.h linux/include/net/iw_handler.h
+--- linux/include/net/iw_handler.14.h Mon Dec 2 18:51:17 2002
++++ linux/include/net/iw_handler.h Mon Dec 2 18:54:51 2002
+@@ -1,7 +1,7 @@
+ /*
+ * This file define the new driver API for Wireless Extensions
+ *
+- * Version : 3 17.1.02
++ * Version : 4 21.6.02
+ *
+ * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
+ * Copyright (c) 2001-2002 Jean Tourrilhes, All Rights Reserved.
+@@ -206,7 +206,7 @@
+ * will be needed...
+ * I just plan to increment with each new version.
+ */
+-#define IW_HANDLER_VERSION 3
++#define IW_HANDLER_VERSION 4
+
+ /*
+ * Changes :
+@@ -217,6 +217,9 @@
+ * - Add Wireless Event support :
+ * o wireless_send_event() prototype
+ * o iwe_stream_add_event/point() inline functions
++ * V3 to V4
++ * --------
++ * - Reshuffle IW_HEADER_TYPE_XXX to map IW_PRIV_TYPE_XXX changes
+ */
+
+ /**************************** CONSTANTS ****************************/
+@@ -233,10 +236,10 @@
+ #define IW_HEADER_TYPE_CHAR 2 /* char [IFNAMSIZ] */
+ #define IW_HEADER_TYPE_UINT 4 /* __u32 */
+ #define IW_HEADER_TYPE_FREQ 5 /* struct iw_freq */
+-#define IW_HEADER_TYPE_POINT 6 /* struct iw_point */
+-#define IW_HEADER_TYPE_PARAM 7 /* struct iw_param */
+-#define IW_HEADER_TYPE_ADDR 8 /* struct sockaddr */
+-#define IW_HEADER_TYPE_QUAL 9 /* struct iw_quality */
++#define IW_HEADER_TYPE_ADDR 6 /* struct sockaddr */
++#define IW_HEADER_TYPE_POINT 8 /* struct iw_point */
++#define IW_HEADER_TYPE_PARAM 9 /* struct iw_param */
++#define IW_HEADER_TYPE_QUAL 10 /* struct iw_quality */
+
+ /* Handling flags */
+ /* Most are not implemented. I just use them as a reminder of some
+diff -u -p linux/net/core/wireless.14.c linux/net/core/wireless.c
+--- linux/net/core/wireless.14.c Mon Dec 2 18:51:35 2002
++++ linux/net/core/wireless.c Mon Dec 2 18:53:10 2002
+@@ -33,8 +33,16 @@
+ * o Propagate events as rtnetlink IFLA_WIRELESS option
+ * o Generate event on selected SET requests
+ *
+- * v4 - 18.04.01 - Jean II
++ * v4 - 18.04.02 - Jean II
+ * o Fix stupid off by one in iw_ioctl_description : IW_ESSID_MAX_SIZE + 1
++ *
++ * v5 - 21.06.02 - Jean II
++ * o Add IW_PRIV_TYPE_ADDR in priv_type_size (+cleanup)
++ * o Reshuffle IW_HEADER_TYPE_XXX to map IW_PRIV_TYPE_XXX changes
++ * o Add IWEVCUSTOM for driver specific event/scanning token
++ * o Turn on WE_STRICT_WRITE by default + kernel warning
++ * o Fix WE_STRICT_WRITE in ioctl_export_private() (32 => iw_num)
++ * o Fix off-by-one in test (extra_size <= IFNAMSIZ)
+ */
+
+ /***************************** INCLUDES *****************************/
+@@ -50,8 +58,9 @@
+
+ /**************************** CONSTANTS ****************************/
+
+-/* This will be turned on later on... */
+-#undef WE_STRICT_WRITE /* Check write buffer size */
++/* Enough lenience, let's make sure things are proper... */
++#define WE_STRICT_WRITE /* Check write buffer size */
++/* I'll probably drop both the define and kernel message in the next version */
+
+ /* Debuging stuff */
+ #undef WE_IOCTL_DEBUG /* Debug IOCTL API */
+@@ -106,7 +115,7 @@ static const struct iw_ioctl_description
+ /* SIOCSIWSPY */
+ { IW_HEADER_TYPE_POINT, 0, sizeof(struct sockaddr), 0, IW_MAX_SPY, 0},
+ /* SIOCGIWSPY */
+- { IW_HEADER_TYPE_POINT, 0, (sizeof(struct sockaddr) + sizeof(struct iw_quality)), 0, IW_MAX_SPY, 0},
++ { IW_HEADER_TYPE_POINT, 0, (sizeof(struct sockaddr) + sizeof(struct iw_quality)), 0, IW_MAX_GET_SPY, 0},
+ /* -- hole -- */
+ { IW_HEADER_TYPE_NULL, 0, 0, 0, 0, 0},
+ /* -- hole -- */
+@@ -176,25 +185,41 @@ static const struct iw_ioctl_description
+ { IW_HEADER_TYPE_ADDR, 0, 0, 0, 0, 0},
+ /* IWEVQUAL */
+ { IW_HEADER_TYPE_QUAL, 0, 0, 0, 0, 0},
++ /* IWEVCUSTOM */
++ { IW_HEADER_TYPE_POINT, 0, 1, 0, IW_CUSTOM_MAX, 0},
++ /* IWEVREGISTERED */
++ { IW_HEADER_TYPE_ADDR, 0, 0, 0, 0, 0},
++ /* IWEVEXPIRED */
++ { IW_HEADER_TYPE_ADDR, 0, 0, 0, 0, 0},
+ };
+ static const int standard_event_num = (sizeof(standard_event) /
+ sizeof(struct iw_ioctl_description));
+
+ /* Size (in bytes) of the various private data types */
+-static const char priv_type_size[] = { 0, 1, 1, 0, 4, 4, 0, 0 };
++static const char priv_type_size[] = {
++ 0, /* IW_PRIV_TYPE_NONE */
++ 1, /* IW_PRIV_TYPE_BYTE */
++ 1, /* IW_PRIV_TYPE_CHAR */
++ 0, /* Not defined */
++ sizeof(__u32), /* IW_PRIV_TYPE_INT */
++ sizeof(struct iw_freq), /* IW_PRIV_TYPE_FLOAT */
++ sizeof(struct sockaddr), /* IW_PRIV_TYPE_ADDR */
++ 0, /* Not defined */
++};
+
+ /* Size (in bytes) of various events */
+ static const int event_type_size[] = {
+- IW_EV_LCP_LEN,
++ IW_EV_LCP_LEN, /* IW_HEADER_TYPE_NULL */
++ 0,
++ IW_EV_CHAR_LEN, /* IW_HEADER_TYPE_CHAR */
+ 0,
+- IW_EV_CHAR_LEN,
++ IW_EV_UINT_LEN, /* IW_HEADER_TYPE_UINT */
++ IW_EV_FREQ_LEN, /* IW_HEADER_TYPE_FREQ */
++ IW_EV_ADDR_LEN, /* IW_HEADER_TYPE_ADDR */
+ 0,
+- IW_EV_UINT_LEN,
+- IW_EV_FREQ_LEN,
+ IW_EV_POINT_LEN, /* Without variable payload */
+- IW_EV_PARAM_LEN,
+- IW_EV_ADDR_LEN,
+- IW_EV_QUAL_LEN,
++ IW_EV_PARAM_LEN, /* IW_HEADER_TYPE_PARAM */
++ IW_EV_QUAL_LEN, /* IW_HEADER_TYPE_QUAL */
+ };
+
+ /************************ COMMON SUBROUTINES ************************/
+@@ -440,8 +465,10 @@ static inline int ioctl_export_private(s
+ return -EFAULT;
+ #ifdef WE_STRICT_WRITE
+ /* Check if there is enough buffer up there */
+- if(iwr->u.data.length < (SIOCIWLASTPRIV - SIOCIWFIRSTPRIV + 1))
++ if(iwr->u.data.length < dev->wireless_handlers->num_private_args) {
++ printk(KERN_ERR "%s (WE) : Buffer for request SIOCGIWPRIV too small (%d<%d)\n", dev->name, iwr->u.data.length, dev->wireless_handlers->num_private_args);
+ return -E2BIG;
++ }
+ #endif /* WE_STRICT_WRITE */
+
+ /* Set the number of available ioctls. */
+@@ -471,6 +498,7 @@ static inline int ioctl_standard_call(st
+ const struct iw_ioctl_description * descr;
+ struct iw_request_info info;
+ int ret = -EINVAL;
++ int user_size = 0;
+
+ /* Get the description of the IOCTL */
+ if((cmd - SIOCIWFIRST) >= standard_ioctl_num)
+@@ -518,11 +546,8 @@ static inline int ioctl_standard_call(st
+ /* Check NULL pointer */
+ if(iwr->u.data.pointer == NULL)
+ return -EFAULT;
+-#ifdef WE_STRICT_WRITE
+- /* Check if there is enough buffer up there */
+- if(iwr->u.data.length < descr->max_tokens)
+- return -E2BIG;
+-#endif /* WE_STRICT_WRITE */
++ /* Save user space buffer size for checking */
++ user_size = iwr->u.data.length;
+ }
+
+ #ifdef WE_IOCTL_DEBUG
+@@ -559,6 +584,15 @@ static inline int ioctl_standard_call(st
+
+ /* If we have something to return to the user */
+ if (!ret && IW_IS_GET(cmd)) {
++#ifdef WE_STRICT_WRITE
++ /* Check if there is enough buffer up there */
++ if(user_size < iwr->u.data.length) {
++ printk(KERN_ERR "%s (WE) : Buffer for request %04X too small (%d<%d)\n", dev->name, cmd, user_size, iwr->u.data.length);
++ kfree(extra);
++ return -E2BIG;
++ }
++#endif /* WE_STRICT_WRITE */
++
+ err = copy_to_user(iwr->u.data.pointer, extra,
+ iwr->u.data.length *
+ descr->token_size);
+@@ -646,12 +680,18 @@ static inline int ioctl_private_call(str
+ /* Compute the size of the set/get arguments */
+ if(descr != NULL) {
+ if(IW_IS_SET(cmd)) {
++ int offset = 0; /* For sub-ioctls */
++ /* Check for sub-ioctl handler */
++ if(descr->name[0] == '\0')
++ /* Reserve one int for sub-ioctl index */
++ offset = sizeof(__u32);
++
+ /* Size of set arguments */
+ extra_size = get_priv_size(descr->set_args);
+
+ /* Does it fits in iwr ? */
+ if((descr->set_args & IW_PRIV_SIZE_FIXED) &&
+- (extra_size < IFNAMSIZ))
++ ((extra_size + offset) <= IFNAMSIZ))
+ extra_size = 0;
+ } else {
+ /* Size of set arguments */
+@@ -659,7 +699,7 @@ static inline int ioctl_private_call(str
+
+ /* Does it fits in iwr ? */
+ if((descr->get_args & IW_PRIV_SIZE_FIXED) &&
+- (extra_size < IFNAMSIZ))
++ (extra_size <= IFNAMSIZ))
+ extra_size = 0;
+ }
+ }
+@@ -925,7 +965,7 @@ void wireless_send_event(struct net_devi
+ * The best the driver could do is to log an error message.
+ * We will do it ourselves instead...
+ */
+- printk(KERN_ERR "%s (WE) : Invalid Wireless Event (0x%04X)\n",
++ printk(KERN_ERR "%s (WE) : Invalid/Unknown Wireless Event (0x%04X)\n",
+ dev->name, cmd);
+ return;
+ }
diff --git a/recipes/linux/files/iw240_we18-5.diff b/recipes/linux/files/iw240_we18-5.diff
new file mode 100644
index 0000000000..f65987588d
--- /dev/null
+++ b/recipes/linux/files/iw240_we18-5.diff
@@ -0,0 +1,421 @@
+diff -u -p linux/include/linux/wireless.we17.h linux/include/linux/wireless.h
+--- linux/include/linux/wireless.we17.h 2005-05-20 11:25:49.000000000 -0700
++++ linux/include/linux/wireless.h 2005-05-20 11:29:05.000000000 -0700
+@@ -1,10 +1,10 @@
+ /*
+ * This file define a set of standard wireless extensions
+ *
+- * Version : 17 21.6.04
++ * Version : 18 12.3.05
+ *
+ * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
+- * Copyright (c) 1997-2004 Jean Tourrilhes, All Rights Reserved.
++ * Copyright (c) 1997-2005 Jean Tourrilhes, All Rights Reserved.
+ */
+
+ #ifndef _LINUX_WIRELESS_H
+@@ -82,7 +82,7 @@
+ * (there is some stuff that will be added in the future...)
+ * I just plan to increment with each new version.
+ */
+-#define WIRELESS_EXT 17
++#define WIRELESS_EXT 18
+
+ /*
+ * Changes :
+@@ -182,6 +182,21 @@
+ * - Document (struct iw_quality *)->updated, add new flags (INVALID)
+ * - Wireless Event capability in struct iw_range
+ * - Add support for relative TxPower (yick !)
++ *
++ * V17 to V18 (From Jouni Malinen <jkmaline@cc.hut.fi>)
++ * ----------
++ * - Add support for WPA/WPA2
++ * - Add extended encoding configuration (SIOCSIWENCODEEXT and
++ * SIOCGIWENCODEEXT)
++ * - Add SIOCSIWGENIE/SIOCGIWGENIE
++ * - Add SIOCSIWMLME
++ * - Add SIOCSIWPMKSA
++ * - Add struct iw_range bit field for supported encoding capabilities
++ * - Add optional scan request parameters for SIOCSIWSCAN
++ * - Add SIOCSIWAUTH/SIOCGIWAUTH for setting authentication and WPA
++ * related parameters (extensible up to 4096 parameter values)
++ * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE,
++ * IWEVASSOCREQIE, IWEVASSOCRESPIE, IWEVPMKIDCAND
+ */
+
+ /**************************** CONSTANTS ****************************/
+@@ -256,6 +271,30 @@
+ #define SIOCSIWPOWER 0x8B2C /* set Power Management settings */
+ #define SIOCGIWPOWER 0x8B2D /* get Power Management settings */
+
++/* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM).
++ * This ioctl uses struct iw_point and data buffer that includes IE id and len
++ * fields. More than one IE may be included in the request. Setting the generic
++ * IE to empty buffer (len=0) removes the generic IE from the driver. Drivers
++ * are allowed to generate their own WPA/RSN IEs, but in these cases, drivers
++ * are required to report the used IE as a wireless event, e.g., when
++ * associating with an AP. */
++#define SIOCSIWGENIE 0x8B30 /* set generic IE */
++#define SIOCGIWGENIE 0x8B31 /* get generic IE */
++
++/* WPA : IEEE 802.11 MLME requests */
++#define SIOCSIWMLME 0x8B16 /* request MLME operation; uses
++ * struct iw_mlme */
++/* WPA : Authentication mode parameters */
++#define SIOCSIWAUTH 0x8B32 /* set authentication mode params */
++#define SIOCGIWAUTH 0x8B33 /* get authentication mode params */
++
++/* WPA : Extended version of encoding configuration */
++#define SIOCSIWENCODEEXT 0x8B34 /* set encoding token & mode */
++#define SIOCGIWENCODEEXT 0x8B35 /* get encoding token & mode */
++
++/* WPA2 : PMKSA cache management */
++#define SIOCSIWPMKSA 0x8B36 /* PMKSA cache operation */
++
+ /* -------------------- DEV PRIVATE IOCTL LIST -------------------- */
+
+ /* These 32 ioctl are wireless device private, for 16 commands.
+@@ -297,6 +336,34 @@
+ #define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */
+ #define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) */
+ #define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */
++#define IWEVGENIE 0x8C05 /* Generic IE (WPA, RSN, WMM, ..)
++ * (scan results); This includes id a