Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 165447 | Differences between
and this patch

Collapse All | Expand All

(-)madwifi-0.9.2.1/ath_hal/ah_osdep.h (-7 / +7 lines)
Lines 40-51 Link Here
40
40
41
/*
41
/*
42
 * Starting with 2.6.4 the kernel supports a configuration option
42
 * Linux on i386 may pass parameters in registers.  This is an option
43
 * to pass parameters in registers.  If this is enabled we must
43
 * starting with Linux 2.6.4.  Starting with Linux 2.6.20, it's done
44
 * mark all function interfaces in+out of the HAL to pass parameters
44
 * unconditionally.  However, the HAL uses standard ABI whereas the
45
 * on the stack as this is the convention used internally (for
45
 * parameters are passed on the stack (for maximum portability).
46
 * maximum portability).
46
 * "asmlinkage" forces the standard ABI for the HAL calls.
47
 */
47
 */
48
#ifdef CONFIG_REGPARM
48
#ifdef __i386__
49
#define	__ahdecl	__attribute__((regparm(0)))
49
#define	__ahdecl	asmlinkage
50
#else
50
#else
51
#define	__ahdecl
51
#define	__ahdecl
(-)madwifi-0.9.2.1/ath/if_ath.c (-7 / +6 lines)
Lines 118-124 static void ath_fatal_tasklet(TQUEUE_ARG Link Here
118
static void ath_rxorn_tasklet(TQUEUE_ARG);
118
static void ath_rxorn_tasklet(TQUEUE_ARG);
119
static void ath_bmiss_tasklet(TQUEUE_ARG);
119
static void ath_bmiss_tasklet(TQUEUE_ARG);
120
static void ath_bstuck_tasklet(TQUEUE_ARG);
120
static void ath_bstuck_tasklet(TQUEUE_ARG);
121
static void ath_radar_task(TQUEUE_ARG);
121
static void ath_radar_task(struct work_struct *);
122
static void ath_dfs_test_return(unsigned long);
122
static void ath_dfs_test_return(unsigned long);
123
123
124
static int ath_stop_locked(struct net_device *);
124
static int ath_stop_locked(struct net_device *);
Lines 414-420 ath_attach(u_int16_t devid, struct net_d Link Here
414
	ATH_INIT_TQUEUE(&sc->sc_bstucktq,ath_bstuck_tasklet,	dev);
414
	ATH_INIT_TQUEUE(&sc->sc_bstucktq,ath_bstuck_tasklet,	dev);
415
	ATH_INIT_TQUEUE(&sc->sc_rxorntq, ath_rxorn_tasklet,	dev);
415
	ATH_INIT_TQUEUE(&sc->sc_rxorntq, ath_rxorn_tasklet,	dev);
416
	ATH_INIT_TQUEUE(&sc->sc_fataltq, ath_fatal_tasklet,	dev);
416
	ATH_INIT_TQUEUE(&sc->sc_fataltq, ath_fatal_tasklet,	dev);
417
	ATH_INIT_SCHED_TASK(&sc->sc_radartask, ath_radar_task,	dev);
417
	ATH_INIT_WORK(&sc->sc_radartask, ath_radar_task);
418
418
419
	/*
419
	/*
420
	 * Attach the hal and verify ABI compatibility by checking
420
	 * Attach the hal and verify ABI compatibility by checking
Lines 934-940 ath_detach(struct net_device *dev) Link Here
934
	ath_hal_setpower(sc->sc_ah, HAL_PM_AWAKE);
934
	ath_hal_setpower(sc->sc_ah, HAL_PM_AWAKE);
935
	/* Flush the radar task if it's scheduled */
935
	/* Flush the radar task if it's scheduled */
936
	if (sc->sc_rtasksched == 1)
936
	if (sc->sc_rtasksched == 1)
937
		ATH_FLUSH_TASKS();
937
		flush_scheduled_work();
938
938
939
	sc->sc_invalid = 1;
939
	sc->sc_invalid = 1;
940
940
Lines 1707-1716 ath_intr(int irq, void *dev_id, struct p Link Here
1707
}
1707
}
1708
1708
1709
static void
1709
static void
1710
ath_radar_task(TQUEUE_ARG data)
1710
ath_radar_task(struct work_struct *thr)
1711
{
1711
{
1712
	struct net_device *dev = (struct net_device *)data;
1712
	struct ath_softc *sc = container_of(thr, struct ath_softc, sc_radartask);
1713
	struct ath_softc *sc = dev->priv;
1714
	struct ath_hal *ah = sc->sc_ah;
1713
	struct ath_hal *ah = sc->sc_ah;
1715
	struct ieee80211com *ic = &sc->sc_ic;
1714
	struct ieee80211com *ic = &sc->sc_ic;
1716
	struct ieee80211_channel ichan;
1715
	struct ieee80211_channel ichan;
Lines 5634-5640 rx_next: Link Here
5634
	ath_hal_rxmonitor(ah, &sc->sc_halstats, &sc->sc_curchan);
5633
	ath_hal_rxmonitor(ah, &sc->sc_halstats, &sc->sc_curchan);
5635
	if (ath_hal_radar_event(ah)) {
5634
	if (ath_hal_radar_event(ah)) {
5636
		sc->sc_rtasksched = 1;
5635
		sc->sc_rtasksched = 1;
5637
		ATH_SCHEDULE_TASK(&sc->sc_radartask);
5636
		schedule_work(&sc->sc_radartask);
5638
	}
5637
	}
5639
#undef PA2DESC
5638
#undef PA2DESC
5640
}
5639
}
(-)madwifi-0.9.2.1/ath/if_athvar.h (-11 / +11 lines)
Lines 71-92 typedef void *TQUEUE_ARG; Link Here
71
#include <linux/sched.h>
71
#include <linux/sched.h>
72
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41)
72
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41)
73
#include <linux/tqueue.h>
73
#include <linux/tqueue.h>
74
#define ATH_WORK_THREAD			tq_struct
74
#define work_struct			tq_struct
75
#define ATH_SCHEDULE_TASK(t)		schedule_task((t))
75
#define schedule_work(t)		schedule_task((t))
76
#define ATH_INIT_SCHED_TASK(t, f, d) do { 	\
76
#define flush_scheduled_work()		flush_scheduled_tasks()
77
#define ATH_INIT_WORK(t, f) do { 	\
77
	memset((t),0,sizeof(struct tq_struct)); 	\
78
	memset((t),0,sizeof(struct tq_struct)); 	\
78
	(t)->routine = (void (*)(void*)) (f); 	\
79
	(t)->routine = (void (*)(void*)) (f); 	\
79
	(t)->data=(void *) (d); 		\
80
	(t)->data=(void *) (t); 		\
80
} while (0)
81
} while (0)
81
#define ATH_FLUSH_TASKS			flush_scheduled_tasks
82
#else
82
#else
83
#include <linux/workqueue.h>
83
#include <linux/workqueue.h>
84
#define ATH_SCHEDULE_TASK(t)		schedule_work((t))
85
84
86
#define ATH_INIT_SCHED_TASK(_t, _f, _d)	INIT_WORK((_t), (void (*)(void *))(_f), (void *)(_d));
85
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
87
86
#define ATH_INIT_WORK(_t, _f)	INIT_WORK((_t), (void (*)(void *))(_f), (void *)(_t));
88
#define ATH_WORK_THREAD			work_struct
87
#else
89
#define	ATH_FLUSH_TASKS			flush_scheduled_work
88
#define ATH_INIT_WORK(_t, _f)	INIT_WORK((_t), (_f));
89
#endif
90
#endif /* KERNEL_VERSION < 2.5.41 */
90
#endif /* KERNEL_VERSION < 2.5.41 */
91
91
92
/*
92
/*
Lines 613-619 struct ath_softc { Link Here
613
613
614
	struct timer_list sc_cal_ch;		/* calibration timer */
614
	struct timer_list sc_cal_ch;		/* calibration timer */
615
	HAL_NODE_STATS sc_halstats;		/* station-mode rssi stats */
615
	HAL_NODE_STATS sc_halstats;		/* station-mode rssi stats */
616
	struct ATH_WORK_THREAD sc_radartask;	/* Schedule task for DFS handling */
616
	struct work_struct sc_radartask;	/* Schedule task for DFS handling */
617
617
618
#ifdef CONFIG_SYSCTL
618
#ifdef CONFIG_SYSCTL
619
	struct ctl_table_header *sc_sysctl_header;
619
	struct ctl_table_header *sc_sysctl_header;
(-)madwifi-0.9.2.1/hal/linux/ah_osdep.c (+1 lines)
Lines 51-56 Link Here
51
#include <linux/kernel.h>
51
#include <linux/kernel.h>
52
#include <linux/slab.h>
52
#include <linux/slab.h>
53
#include <linux/delay.h>
53
#include <linux/delay.h>
54
#include <linux/jiffies.h>
54
55
55
#include <linux/sysctl.h>
56
#include <linux/sysctl.h>
56
#include <linux/proc_fs.h>
57
#include <linux/proc_fs.h>
(-)madwifi-0.9.2.1/net80211/ieee80211_linux.h (-3 / +12 lines)
Lines 276-284 struct ieee80211_cb { Link Here
276
 * mbuf packet header to store this data.
276
 * mbuf packet header to store this data.
277
 * XXX use private cb area
277
 * XXX use private cb area
278
 */
278
 */
279
#define	M_AGE_SET(skb,v)	(skb->csum = v)
279
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
280
#define	M_AGE_GET(skb)		(skb->csum)
280
#define skb_age csum_offset
281
#define	M_AGE_SUB(skb,adj)	(skb->csum -= adj)
281
#else
282
#define skb_age csum
283
#endif
284
285
#define	M_AGE_SET(skb,v)	(skb->skb_age = v)
286
#define	M_AGE_GET(skb)		(skb->skb_age)
287
#define	M_AGE_SUB(skb,adj)	(skb->skb_age -= adj)
282
288
283
struct ieee80211com;
289
struct ieee80211com;
284
struct ieee80211vap;
290
struct ieee80211vap;
Lines 415-420 static __inline unsigned long msecs_to_j Link Here
415
421
416
#endif
422
#endif
417
423
424
#include <linux/jiffies.h>
425
418
#ifndef CLONE_KERNEL
426
#ifndef CLONE_KERNEL
419
/*
427
/*
420
 * List of flags we want to share for kernel threads,
428
 * List of flags we want to share for kernel threads,
Lines 423-428 static __inline unsigned long msecs_to_j Link Here
423
#define CLONE_KERNEL	(CLONE_FS | CLONE_FILES | CLONE_SIGHAND)
431
#define CLONE_KERNEL	(CLONE_FS | CLONE_FILES | CLONE_SIGHAND)
424
#endif
432
#endif
425
433
434
#include <linux/mm.h>
426
#ifndef offset_in_page
435
#ifndef offset_in_page
427
#define	offset_in_page(p) ((unsigned long) (p) & ~PAGE_MASK)
436
#define	offset_in_page(p) ((unsigned long) (p) & ~PAGE_MASK)
428
#endif
437
#endif

Return to bug 165447