diff options
author | Daniel Drake <dsd@gentoo.org> | 2007-02-05 20:16:44 +0000 |
---|---|---|
committer | Daniel Drake <dsd@gentoo.org> | 2007-02-05 20:16:44 +0000 |
commit | f2e410a315731c3909314550d6b1dd427335749a (patch) | |
tree | e09219fab917b661eaa89a273c4c486e8abe00de /net-wireless | |
parent | Regenerate digest in Manifest2 format. (diff) | |
download | gentoo-2-f2e410a315731c3909314550d6b1dd427335749a.tar.gz gentoo-2-f2e410a315731c3909314550d6b1dd427335749a.tar.bz2 gentoo-2-f2e410a315731c3909314550d6b1dd427335749a.zip |
Move patches into src_unpack, and add 2.6.20 compatibility patch
(Portage version: 2.1.2-r7)
Diffstat (limited to 'net-wireless')
-rw-r--r-- | net-wireless/madwifi-ng/ChangeLog | 6 | ||||
-rw-r--r-- | net-wireless/madwifi-ng/files/madwifi-ng-0.9.2.1-linux-2.6.20.patch | 151 | ||||
-rw-r--r-- | net-wireless/madwifi-ng/madwifi-ng-0.9.2.1.ebuild | 8 |
3 files changed, 161 insertions, 4 deletions
diff --git a/net-wireless/madwifi-ng/ChangeLog b/net-wireless/madwifi-ng/ChangeLog index 36d3348390be..8501c7abc2ae 100644 --- a/net-wireless/madwifi-ng/ChangeLog +++ b/net-wireless/madwifi-ng/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-wireless/madwifi-ng # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng/ChangeLog,v 1.22 2007/01/29 23:01:50 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng/ChangeLog,v 1.23 2007/02/05 20:16:44 dsd Exp $ + + 05 Feb 2007; Daniel Drake <dsd@gentoo.org> + +files/madwifi-ng-0.9.2.1-linux-2.6.20.patch, madwifi-ng-0.9.2.1.ebuild: + Move patches into src_unpack, and add 2.6.20 compatibility patch 29 Jan 2007; <genstef@gentoo.org> +files/madwifi-ng-r1886.patch, madwifi-ng-0.9.2.1.ebuild: diff --git a/net-wireless/madwifi-ng/files/madwifi-ng-0.9.2.1-linux-2.6.20.patch b/net-wireless/madwifi-ng/files/madwifi-ng-0.9.2.1-linux-2.6.20.patch new file mode 100644 index 000000000000..cabdbb6c547c --- /dev/null +++ b/net-wireless/madwifi-ng/files/madwifi-ng-0.9.2.1-linux-2.6.20.patch @@ -0,0 +1,151 @@ +Index: madwifi-0.9.2.1/ath/if_ath.c +=================================================================== +--- madwifi-0.9.2.1.orig/ath/if_ath.c ++++ madwifi-0.9.2.1/ath/if_ath.c +@@ -118,7 +118,7 @@ static void ath_fatal_tasklet(TQUEUE_ARG + static void ath_rxorn_tasklet(TQUEUE_ARG); + static void ath_bmiss_tasklet(TQUEUE_ARG); + static void ath_bstuck_tasklet(TQUEUE_ARG); +-static void ath_radar_task(TQUEUE_ARG); ++static void ath_radar_task(struct work_struct *); + static void ath_dfs_test_return(unsigned long); + + static int ath_stop_locked(struct net_device *); +@@ -414,7 +414,7 @@ ath_attach(u_int16_t devid, struct net_d + ATH_INIT_TQUEUE(&sc->sc_bstucktq,ath_bstuck_tasklet, dev); + ATH_INIT_TQUEUE(&sc->sc_rxorntq, ath_rxorn_tasklet, dev); + ATH_INIT_TQUEUE(&sc->sc_fataltq, ath_fatal_tasklet, dev); +- ATH_INIT_SCHED_TASK(&sc->sc_radartask, ath_radar_task, dev); ++ ATH_INIT_WORK(&sc->sc_radartask, ath_radar_task); + + /* + * Attach the hal and verify ABI compatibility by checking +@@ -934,7 +934,7 @@ ath_detach(struct net_device *dev) + ath_hal_setpower(sc->sc_ah, HAL_PM_AWAKE); + /* Flush the radar task if it's scheduled */ + if (sc->sc_rtasksched == 1) +- ATH_FLUSH_TASKS(); ++ flush_scheduled_work(); + + sc->sc_invalid = 1; + +@@ -1707,10 +1707,9 @@ ath_intr(int irq, void *dev_id, struct p + } + + static void +-ath_radar_task(TQUEUE_ARG data) ++ath_radar_task(struct work_struct *thr) + { +- struct net_device *dev = (struct net_device *)data; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = container_of(thr, struct ath_softc, sc_radartask); + struct ath_hal *ah = sc->sc_ah; + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211_channel ichan; +@@ -5634,7 +5633,7 @@ rx_next: + ath_hal_rxmonitor(ah, &sc->sc_halstats, &sc->sc_curchan); + if (ath_hal_radar_event(ah)) { + sc->sc_rtasksched = 1; +- ATH_SCHEDULE_TASK(&sc->sc_radartask); ++ schedule_work(&sc->sc_radartask); + } + #undef PA2DESC + } +Index: madwifi-0.9.2.1/ath/if_athvar.h +=================================================================== +--- madwifi-0.9.2.1.orig/ath/if_athvar.h ++++ madwifi-0.9.2.1/ath/if_athvar.h +@@ -71,22 +71,22 @@ typedef void *TQUEUE_ARG; + #include <linux/sched.h> + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41) + #include <linux/tqueue.h> +-#define ATH_WORK_THREAD tq_struct +-#define ATH_SCHEDULE_TASK(t) schedule_task((t)) +-#define ATH_INIT_SCHED_TASK(t, f, d) do { \ ++#define work_struct tq_struct ++#define schedule_work(t) schedule_task((t)) ++#define flush_scheduled_work() flush_scheduled_tasks() ++#define ATH_INIT_WORK(t, f) do { \ + memset((t),0,sizeof(struct tq_struct)); \ + (t)->routine = (void (*)(void*)) (f); \ +- (t)->data=(void *) (d); \ ++ (t)->data=(void *) (t); \ + } while (0) +-#define ATH_FLUSH_TASKS flush_scheduled_tasks + #else + #include <linux/workqueue.h> +-#define ATH_SCHEDULE_TASK(t) schedule_work((t)) + +-#define ATH_INIT_SCHED_TASK(_t, _f, _d) INIT_WORK((_t), (void (*)(void *))(_f), (void *)(_d)); +- +-#define ATH_WORK_THREAD work_struct +-#define ATH_FLUSH_TASKS flush_scheduled_work ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) ++#define ATH_INIT_WORK(_t, _f) INIT_WORK((_t), (void (*)(void *))(_f), (void *)(_t)); ++#else ++#define ATH_INIT_WORK(_t, _f) INIT_WORK((_t), (_f)); ++#endif + #endif /* KERNEL_VERSION < 2.5.41 */ + + /* +@@ -613,7 +613,7 @@ struct ath_softc { + + struct timer_list sc_cal_ch; /* calibration timer */ + HAL_NODE_STATS sc_halstats; /* station-mode rssi stats */ +- struct ATH_WORK_THREAD sc_radartask; /* Schedule task for DFS handling */ ++ struct work_struct sc_radartask; /* Schedule task for DFS handling */ + + #ifdef CONFIG_SYSCTL + struct ctl_table_header *sc_sysctl_header; +Index: madwifi-0.9.2.1/hal/linux/ah_osdep.c +=================================================================== +--- madwifi-0.9.2.1.orig/hal/linux/ah_osdep.c ++++ madwifi-0.9.2.1/hal/linux/ah_osdep.c +@@ -51,6 +51,7 @@ + #include <linux/kernel.h> + #include <linux/slab.h> + #include <linux/delay.h> ++#include <linux/jiffies.h> + + #include <linux/sysctl.h> + #include <linux/proc_fs.h> +Index: madwifi-0.9.2.1/net80211/ieee80211_linux.h +=================================================================== +--- madwifi-0.9.2.1.orig/net80211/ieee80211_linux.h ++++ madwifi-0.9.2.1/net80211/ieee80211_linux.h +@@ -276,9 +276,15 @@ struct ieee80211_cb { + * mbuf packet header to store this data. + * XXX use private cb area + */ +-#define M_AGE_SET(skb,v) (skb->csum = v) +-#define M_AGE_GET(skb) (skb->csum) +-#define M_AGE_SUB(skb,adj) (skb->csum -= adj) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) ++#define skb_age csum_offset ++#else ++#define skb_age csum ++#endif ++ ++#define M_AGE_SET(skb,v) (skb->skb_age = v) ++#define M_AGE_GET(skb) (skb->skb_age) ++#define M_AGE_SUB(skb,adj) (skb->skb_age -= adj) + + struct ieee80211com; + struct ieee80211vap; +@@ -415,6 +421,8 @@ static __inline unsigned long msecs_to_j + + #endif + ++#include <linux/jiffies.h> ++ + #ifndef CLONE_KERNEL + /* + * List of flags we want to share for kernel threads, +@@ -423,6 +431,7 @@ static __inline unsigned long msecs_to_j + #define CLONE_KERNEL (CLONE_FS | CLONE_FILES | CLONE_SIGHAND) + #endif + ++#include <linux/mm.h> + #ifndef offset_in_page + #define offset_in_page(p) ((unsigned long) (p) & ~PAGE_MASK) + #endif diff --git a/net-wireless/madwifi-ng/madwifi-ng-0.9.2.1.ebuild b/net-wireless/madwifi-ng/madwifi-ng-0.9.2.1.ebuild index f2304d89034a..cb79f2e0d73b 100644 --- a/net-wireless/madwifi-ng/madwifi-ng-0.9.2.1.ebuild +++ b/net-wireless/madwifi-ng/madwifi-ng-0.9.2.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng/madwifi-ng-0.9.2.1.ebuild,v 1.5 2007/01/29 23:01:50 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/madwifi-ng/madwifi-ng-0.9.2.1.ebuild,v 1.6 2007/02/05 20:16:44 dsd Exp $ inherit linux-mod @@ -72,13 +72,15 @@ src_unpack() { for dir in ath net80211 ath_rate/amrr ath_rate/onoe ath_rate/sample; do convert_to_m ${S}/${dir}/Makefile done -} -src_compile() { epatch ${FILESDIR}/madwifi-ng-uudecode-gcda-fix.patch if use injection; then epatch ${FILESDIR}/madwifi-ng-r1886.patch; fi # epatch ${FILESDIR}/madwifi-association-fix.patch + epatch ${FILESDIR}/${P}-linux-2.6.20.patch +} + +src_compile() { # assists in debugging emake KERNELPATH=${KV_OUT_DIR} info || die "emake info failed" |