diff options
Diffstat (limited to 'network/madwifi-driver/patches')
-rw-r--r-- | network/madwifi-driver/patches/madwifi-0.9.4_kernel_2.6.26.diff | 203 | ||||
-rw-r--r-- | network/madwifi-driver/patches/madwifi-0.9.4_kernel_2.6.27.diff | 159 |
2 files changed, 362 insertions, 0 deletions
diff --git a/network/madwifi-driver/patches/madwifi-0.9.4_kernel_2.6.26.diff b/network/madwifi-driver/patches/madwifi-0.9.4_kernel_2.6.26.diff new file mode 100644 index 0000000000..986d043dec --- /dev/null +++ b/network/madwifi-driver/patches/madwifi-0.9.4_kernel_2.6.26.diff @@ -0,0 +1,203 @@ +diff -Naur madwifi-0.9.4.orig/Makefile madwifi-0.9.4/Makefile +--- madwifi-0.9.4.orig/Makefile 2007-12-14 06:40:22.000000000 +0000 ++++ madwifi-0.9.4/Makefile 2009-01-06 18:48:14.000000000 +0000 +@@ -40,10 +40,7 @@ + # Makefile for the HAL-based Atheros driver. + # + +-ifeq ($(obj),) +-obj= . +-endif +- ++obj := $(firstword $(obj) $(SUBDIRS) .) + TOP = $(obj) + + ifneq (svnversion.h,$(MAKECMDGOALS)) +diff -Naur madwifi-0.9.4.orig/ath/Makefile madwifi-0.9.4/ath/Makefile +--- madwifi-0.9.4.orig/ath/Makefile 2007-07-25 15:23:34.000000000 +0000 ++++ madwifi-0.9.4/ath/Makefile 2009-01-06 18:48:13.000000000 +0000 +@@ -40,10 +40,7 @@ + # Makefile for the Atheros WLAN driver. + # + +-ifeq ($(obj),) +-obj= . +-endif +- ++obj := $(firstword $(obj) $(SUBDIRS) .) + TOP = $(obj)/.. + + ifeq ($(strip $(BUS)),AHB) +diff -Naur madwifi-0.9.4.orig/ath_hal/Makefile madwifi-0.9.4/ath_hal/Makefile +--- madwifi-0.9.4.orig/ath_hal/Makefile 2007-07-25 15:23:34.000000000 +0000 ++++ madwifi-0.9.4/ath_hal/Makefile 2009-01-06 18:48:13.000000000 +0000 +@@ -40,10 +40,7 @@ + # Makefile for the Atheros WLAN driver. + # + +-ifeq ($(obj),) +-obj= . +-endif +- ++obj := $(firstword $(obj) $(SUBDIRS) .) + TOP = $(obj)/.. + + include $(TOP)/Makefile.inc +diff -Naur madwifi-0.9.4.orig/ath_rate/Makefile madwifi-0.9.4/ath_rate/Makefile +--- madwifi-0.9.4.orig/ath_rate/Makefile 2007-12-12 04:11:07.000000000 +0000 ++++ madwifi-0.9.4/ath_rate/Makefile 2009-01-06 18:48:13.000000000 +0000 +@@ -1,7 +1,4 @@ +-ifeq ($(obj),) +-obj= . +-endif +- ++obj := $(firstword $(obj) $(SUBDIRS) .) + TOP = $(obj)/.. + + obj-y := amrr/ onoe/ sample/ minstrel/ +diff -Naur madwifi-0.9.4.orig/ath_rate/amrr/Makefile madwifi-0.9.4/ath_rate/amrr/Makefile +--- madwifi-0.9.4.orig/ath_rate/amrr/Makefile 2007-07-25 15:23:34.000000000 +0000 ++++ madwifi-0.9.4/ath_rate/amrr/Makefile 2009-01-06 18:48:13.000000000 +0000 +@@ -40,10 +40,7 @@ + # + # Makefile for the Atheros Rate Control Support. + # +-ifeq ($(obj),) +-obj= . +-endif +- ++obj := $(firstword $(obj) $(SUBDIRS) .) + TOP = $(obj)/../.. + + obj-m += ath_rate_amrr.o +diff -Naur madwifi-0.9.4.orig/ath_rate/minstrel/Makefile madwifi-0.9.4/ath_rate/minstrel/Makefile +--- madwifi-0.9.4.orig/ath_rate/minstrel/Makefile 2007-12-12 04:11:07.000000000 +0000 ++++ madwifi-0.9.4/ath_rate/minstrel/Makefile 2009-01-06 18:48:13.000000000 +0000 +@@ -38,10 +38,7 @@ + # + # Makefile for the Atheros Rate Control Support. + # +-ifeq ($(obj),) +-obj= . +-endif +- ++obj := $(firstword $(obj) $(SUBDIRS) .) + TOP = $(obj)/../.. + + obj-m += ath_rate_minstrel.o +diff -Naur madwifi-0.9.4.orig/ath_rate/onoe/Makefile madwifi-0.9.4/ath_rate/onoe/Makefile +--- madwifi-0.9.4.orig/ath_rate/onoe/Makefile 2007-07-25 15:23:34.000000000 +0000 ++++ madwifi-0.9.4/ath_rate/onoe/Makefile 2009-01-06 18:48:13.000000000 +0000 +@@ -40,10 +40,7 @@ + # + # Makefile for the Atheros Rate Control Support. + # +-ifeq ($(obj),) +-obj= . +-endif +- ++obj := $(firstword $(obj) $(SUBDIRS) .) + TOP = $(obj)/../.. + + obj-m += ath_rate_onoe.o +diff -Naur madwifi-0.9.4.orig/ath_rate/sample/Makefile madwifi-0.9.4/ath_rate/sample/Makefile +--- madwifi-0.9.4.orig/ath_rate/sample/Makefile 2007-07-25 15:23:34.000000000 +0000 ++++ madwifi-0.9.4/ath_rate/sample/Makefile 2009-01-06 18:48:13.000000000 +0000 +@@ -38,10 +38,7 @@ + # + # Makefile for the Atheros Rate Control Support. + # +-ifeq ($(obj),) +-obj= . +-endif +- ++obj := $(firstword $(obj) $(SUBDIRS) .) + TOP = $(obj)/../.. + + obj-m += ath_rate_sample.o +diff -Naur madwifi-0.9.4.orig/include/compat.h madwifi-0.9.4/include/compat.h +--- madwifi-0.9.4.orig/include/compat.h 2007-12-13 04:07:54.000000000 +0000 ++++ madwifi-0.9.4/include/compat.h 2009-01-06 18:48:13.000000000 +0000 +@@ -175,6 +175,13 @@ + #define DEV_ATH CTL_UNNUMBERED + #endif + ++/* __skb_append got a third parameter in 2.6.14 */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) ++#define __skb_queue_after(_list, _old, _new) __skb_append(_old, _new) ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) ++#define __skb_queue_after(_list, _old, _new) __skb_append(_old, _new, _list) ++#endif ++ + #endif /* __KERNEL__ */ + + #endif /* _ATH_COMPAT_H_ */ +diff -Naur madwifi-0.9.4.orig/net80211/Makefile madwifi-0.9.4/net80211/Makefile +--- madwifi-0.9.4.orig/net80211/Makefile 2007-07-25 15:23:34.000000000 +0000 ++++ madwifi-0.9.4/net80211/Makefile 2009-01-06 18:48:13.000000000 +0000 +@@ -39,10 +39,7 @@ + # + # Makefile for the 802.11 WLAN modules. + # +-ifeq ($(obj),) +-obj= . +-endif +- ++obj := $(firstword $(obj) $(SUBDIRS) .) + TOP = $(obj)/.. + # + # There are two authenticator mechanisms: an in-kernel implementation +diff -Naur madwifi-0.9.4.orig/net80211/ieee80211_linux.h madwifi-0.9.4/net80211/ieee80211_linux.h +--- madwifi-0.9.4.orig/net80211/ieee80211_linux.h 2007-08-30 01:59:13.000000000 +0000 ++++ madwifi-0.9.4/net80211/ieee80211_linux.h 2009-01-06 18:48:13.000000000 +0000 +@@ -238,11 +238,6 @@ + #define ACL_LOCK_ASSERT(_as) + #endif + +-/* __skb_append got a third parameter in 2.6.14 */ +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) +-#define __skb_append(a,b,c) __skb_append(a,b) +-#endif +- + /* + * Per-node power-save queue definitions. Beware of control + * flow with IEEE80211_NODE_SAVEQ_LOCK/IEEE80211_NODE_SAVEQ_UNLOCK. +@@ -268,16 +263,16 @@ + _skb = __skb_dequeue(&(_ni)->ni_savedq); \ + (_qlen) = skb_queue_len(&(_ni)->ni_savedq); \ + } while (0) +-#define _IEEE80211_NODE_SAVEQ_ENQUEUE(_ni, _skb, _qlen, _age) do {\ +- struct sk_buff *tail = skb_peek_tail(&(_ni)->ni_savedq);\ +- if (tail != NULL) { \ +- _age -= M_AGE_GET(tail); \ +- __skb_append(tail, _skb, &(_ni)->ni_savedq); \ +- } else { \ +- __skb_queue_head(&(_ni)->ni_savedq, _skb); \ +- } \ +- M_AGE_SET(_skb, _age); \ +- (_qlen) = skb_queue_len(&(_ni)->ni_savedq); \ ++#define _IEEE80211_NODE_SAVEQ_ENQUEUE(_ni, _skb, _qlen, _age) do { \ ++ struct sk_buff *tail = skb_peek_tail(&(_ni)->ni_savedq); \ ++ if (tail != NULL) { \ ++ _age -= M_AGE_GET(tail); \ ++ __skb_queue_after(&(_ni)->ni_savedq, tail, _skb); \ ++ } else { \ ++ __skb_queue_head(&(_ni)->ni_savedq, _skb); \ ++ } \ ++ M_AGE_SET(_skb, _age); \ ++ (_qlen) = skb_queue_len(&(_ni)->ni_savedq); \ + } while (0) + + /* +diff -Naur madwifi-0.9.4.orig/net80211/ieee80211_power.c madwifi-0.9.4/net80211/ieee80211_power.c +--- madwifi-0.9.4.orig/net80211/ieee80211_power.c 2008-01-29 09:17:23.000000000 +0000 ++++ madwifi-0.9.4/net80211/ieee80211_power.c 2009-01-06 18:48:13.000000000 +0000 +@@ -237,7 +237,7 @@ + tail = skb_peek_tail(&ni->ni_savedq); + if (tail != NULL) { + age -= M_AGE_GET(tail); +- __skb_append(tail, skb, &ni->ni_savedq); ++ __skb_queue_after(&ni->ni_savedq, tail, skb); + } else + __skb_queue_head(&ni->ni_savedq, skb); + M_AGE_SET(skb, age); diff --git a/network/madwifi-driver/patches/madwifi-0.9.4_kernel_2.6.27.diff b/network/madwifi-driver/patches/madwifi-0.9.4_kernel_2.6.27.diff new file mode 100644 index 0000000000..43325c5a3f --- /dev/null +++ b/network/madwifi-driver/patches/madwifi-0.9.4_kernel_2.6.27.diff @@ -0,0 +1,159 @@ +--- /net80211/ieee80211_wireless.c (revision 3080) ++++ /net80211/ieee80211_wireless.c (revision 3811) +@@ -1552,4 +1552,5 @@ + struct iwscanreq { /* XXX: right place for this declaration? */ + struct ieee80211vap *vap; ++ struct iw_request_info *info; + char *current_ev; + char *end_buf; +@@ -1557,4 +1558,11 @@ + }; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) && !defined(IW_REQUEST_FLAG_COMPAT) ++#define iwe_stream_add_event(a, b, c, d, e) iwe_stream_add_event(b, c, d, e) ++#define iwe_stream_add_point(a, b, c, d, e) iwe_stream_add_point(b, c, d, e) ++#define iwe_stream_add_value(a, b, c, d, e, f) \ ++ iwe_stream_add_value(b, c, d, e, f) ++#define iwe_stream_lcp_len(a) IW_EV_LCP_LEN ++#endif + static int + giwscan_cb(void *arg, const struct ieee80211_scan_entry *se) +@@ -1591,5 +1599,6 @@ + else + IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_bssid); +- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_ADDR_LEN); ++ current_ev = iwe_stream_add_event(req->info, current_ev, end_buf, ++ &iwe, IW_EV_ADDR_LEN); + + /* We ran out of space in the buffer. */ +@@ -1604,9 +1613,9 @@ + iwe.u.data.length = vap->iv_des_nssid > 0 ? + vap->iv_des_ssid[0].len : 0; +- current_ev = iwe_stream_add_point(current_ev, ++ current_ev = iwe_stream_add_point(req->info, current_ev, + end_buf, &iwe, vap->iv_des_ssid[0].ssid); + } else { + iwe.u.data.length = se->se_ssid[1]; +- current_ev = iwe_stream_add_point(current_ev, ++ current_ev = iwe_stream_add_point(req->info, current_ev, + end_buf, &iwe, (char *) se->se_ssid+2); + } +@@ -1622,6 +1631,6 @@ + iwe.u.mode = se->se_capinfo & IEEE80211_CAPINFO_ESS ? + IW_MODE_MASTER : IW_MODE_ADHOC; +- current_ev = iwe_stream_add_event(current_ev, +- end_buf, &iwe, IW_EV_UINT_LEN); ++ current_ev = iwe_stream_add_event(req->info, current_ev, ++ end_buf, &iwe, IW_EV_UINT_LEN); + + /* We ran out of space in the buffer. */ +@@ -1635,6 +1644,6 @@ + iwe.u.freq.m = se->se_chan->ic_freq * 100000; + iwe.u.freq.e = 1; +- current_ev = iwe_stream_add_event(current_ev, +- end_buf, &iwe, IW_EV_FREQ_LEN); ++ current_ev = iwe_stream_add_event(req->info, current_ev, ++ end_buf, &iwe, IW_EV_FREQ_LEN); + + /* We ran out of space in the buffer. */ +@@ -1646,6 +1655,6 @@ + iwe.cmd = IWEVQUAL; + set_quality(&iwe.u.qual, se->se_rssi, ATH_DEFAULT_NOISE); +- current_ev = iwe_stream_add_event(current_ev, +- end_buf, &iwe, IW_EV_QUAL_LEN); ++ current_ev = iwe_stream_add_event(req->info, current_ev, ++ end_buf, &iwe, IW_EV_QUAL_LEN); + + /* We ran out of space in the buffer */ +@@ -1661,5 +1670,6 @@ + iwe.u.data.flags = IW_ENCODE_DISABLED; + iwe.u.data.length = 0; +- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, ""); ++ current_ev = iwe_stream_add_point(req->info, current_ev, ++ end_buf, &iwe, ""); + + /* We ran out of space in the buffer. */ +@@ -1670,5 +1680,5 @@ + last_ev = current_ev; + iwe.cmd = SIOCGIWRATE; +- current_val = current_ev + IW_EV_LCP_LEN; ++ current_val = current_ev + iwe_stream_lcp_len(req->info); + /* NB: not sorted, does it matter? */ + for (j = 0; j < se->se_rates[1]; j++) { +@@ -1676,7 +1686,7 @@ + if (r != 0) { + iwe.u.bitrate.value = r * (1000000 / 2); +- current_val = iwe_stream_add_value(current_ev, +- current_val, end_buf, &iwe, +- IW_EV_PARAM_LEN); ++ current_val = iwe_stream_add_value(req->info, ++ current_ev, current_val, end_buf, ++ &iwe, IW_EV_PARAM_LEN); + } + } +@@ -1685,11 +1695,11 @@ + if (r != 0) { + iwe.u.bitrate.value = r * (1000000 / 2); +- current_val = iwe_stream_add_value(current_ev, +- current_val, end_buf, &iwe, +- IW_EV_PARAM_LEN); ++ current_val = iwe_stream_add_value(req->info, ++ current_ev, current_val, end_buf, ++ &iwe, IW_EV_PARAM_LEN); + } + } + /* remove fixed header if no rates were added */ +- if ((current_val - current_ev) > IW_EV_LCP_LEN) { ++ if ((current_val - current_ev) > iwe_stream_lcp_len(req->info)) { + current_ev = current_val; + } else { +@@ -1705,5 +1715,6 @@ + snprintf(buf, sizeof(buf), "bcn_int=%d", se->se_intval); + iwe.u.data.length = strlen(buf); +- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf); ++ current_ev = iwe_stream_add_point(req->info, current_ev, ++ end_buf, &iwe, buf); + + /* We ran out of space in the buffer. */ +@@ -1729,6 +1740,6 @@ + #endif + if (iwe.u.data.length != 0) { +- current_ev = iwe_stream_add_point(current_ev, end_buf, +- &iwe, buf); ++ current_ev = iwe_stream_add_point(req->info, ++ current_ev, end_buf, &iwe, buf); + + /* We ran out of space in the buffer */ +@@ -1755,6 +1766,6 @@ + #endif + if (iwe.u.data.length != 0) { +- current_ev = iwe_stream_add_point(current_ev, end_buf, +- &iwe, buf); ++ current_ev = iwe_stream_add_point(req->info, ++ current_ev, end_buf, &iwe, buf); + + /* We ran out of space in the buffer. */ +@@ -1774,6 +1785,6 @@ + wme_leader, sizeof(wme_leader) - 1); + if (iwe.u.data.length != 0) { +- current_ev = iwe_stream_add_point(current_ev, end_buf, +- &iwe, buf); ++ current_ev = iwe_stream_add_point(req->info, ++ current_ev, end_buf, &iwe, buf); + + /* We ran out of space in the buffer. */ +@@ -1792,6 +1803,6 @@ + ath_leader, sizeof(ath_leader) - 1); + if (iwe.u.data.length != 0) { +- current_ev = iwe_stream_add_point(current_ev, end_buf, +- &iwe, buf); ++ current_ev = iwe_stream_add_point(req->info, ++ current_ev, end_buf, &iwe, buf); + + /* We ran out of space in the buffer. */ +@@ -1816,4 +1827,5 @@ + + req.vap = vap; ++ req.info = info; + req.current_ev = extra; + if (data->length == 0) { |