Index: madwifi-trunk-r3776/ath/if_ath.c
===================================================================
Index: madwifi-trunk-r3776/ath/if_ath.c
===================================================================
---- madwifi-trunk-r3776.orig/ath/if_ath.c 2008-07-17 01:20:11.000000000 +0200
-+++ madwifi-trunk-r3776/ath/if_ath.c 2008-07-17 01:46:37.000000000 +0200
+--- madwifi-trunk-r3776.orig/ath/if_ath.c 2008-07-18 20:35:03.000000000 +0200
++++ madwifi-trunk-r3776/ath/if_ath.c 2008-07-18 20:37:47.000000000 +0200
@@ -182,7 +182,11 @@
struct sk_buff *, int, int, u_int64_t);
static void ath_setdefantenna(struct ath_softc *, u_int);
@@ -182,7 +182,11 @@
struct sk_buff *, int, int, u_int64_t);
static void ath_setdefantenna(struct ath_softc *, u_int);
netif_stop_queue(dev); /* XXX re-enabled by ath_newstate */
dev->flags &= ~IFF_RUNNING; /* NB: avoid recursion */
ieee80211_stop_running(ic); /* stop all VAPs */
netif_stop_queue(dev); /* XXX re-enabled by ath_newstate */
dev->flags &= ~IFF_RUNNING; /* NB: avoid recursion */
ieee80211_stop_running(ic); /* stop all VAPs */
return ath_keyset(sc, k, mac, vap->iv_bss);
}
+static void ath_poll_disable(struct net_device *dev)
+{
return ath_keyset(sc, k, mac, vap->iv_bss);
}
+static void ath_poll_disable(struct net_device *dev)
+{
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+ struct ath_softc *sc = dev->priv;
+ struct ath_softc *sc = dev->priv;
+
+ /*
+ * XXX Using in_softirq is not right since we might
+
+ /*
+ * XXX Using in_softirq is not right since we might
+
+static void ath_poll_enable(struct net_device *dev)
+{
+
+static void ath_poll_enable(struct net_device *dev)
+{
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+ struct ath_softc *sc = dev->priv;
+ struct ath_softc *sc = dev->priv;
+
+ /* NB: see above */
+ if (!in_softirq()) {
+
+ /* NB: see above */
+ if (!in_softirq()) {
/*
* Block/unblock tx+rx processing while a key change is done.
* We assume the caller serializes key management operations
/*
* Block/unblock tx+rx processing while a key change is done.
* We assume the caller serializes key management operations
ath_key_update_begin(struct ieee80211vap *vap)
{
struct net_device *dev = vap->iv_ic->ic_dev;
ath_key_update_begin(struct ieee80211vap *vap)
{
struct net_device *dev = vap->iv_ic->ic_dev;
sc->sc_numrxotherant = 0;
}
sc->sc_numrxotherant = 0;
}
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc ? sc->sc_ah : NULL;
struct ath_desc *ds;
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc ? sc->sc_ah : NULL;
struct ath_desc *ds;
struct ieee80211_node *ni;
struct sk_buff *skb = NULL;
unsigned int len, phyerr, mic_fail = 0;
struct ieee80211_node *ni;
struct sk_buff *skb = NULL;
unsigned int len, phyerr, mic_fail = 0;
int type = -1; /* undefined */
int init_ret = 0;
int bf_processed = 0;
int type = -1; /* undefined */
int init_ret = 0;
int bf_processed = 0;
int errors = 0;
DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s started...\n", __func__);
int errors = 0;
DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s started...\n", __func__);
do {
/* Get next RX buffer pending processing by RX tasklet...
*
do {
/* Get next RX buffer pending processing by RX tasklet...
*
ds = bf->bf_desc;
#ifdef AR_DEBUG
ds = bf->bf_desc;
#ifdef AR_DEBUG
sc->sc_stats.ast_rx_phyerr++;
phyerr = rs->rs_phyerr & 0x1f;
sc->sc_stats.ast_rx_phy[phyerr]++;
sc->sc_stats.ast_rx_phyerr++;
phyerr = rs->rs_phyerr & 0x1f;
sc->sc_stats.ast_rx_phy[phyerr]++;
}
if (rs->rs_status & HAL_RXERR_DECRYPT) {
/* Decrypt error. If the error occurred
}
if (rs->rs_status & HAL_RXERR_DECRYPT) {
/* Decrypt error. If the error occurred
STAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list);
ATH_RXBUF_UNLOCK_IRQ(sc);
} while (1);
STAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list);
ATH_RXBUF_UNLOCK_IRQ(sc);
} while (1);
if (sc->sc_useintmit)
ath_hal_rxmonitor(ah, &sc->sc_halstats, &sc->sc_curchan);
if (sc->sc_useintmit)
ath_hal_rxmonitor(ah, &sc->sc_halstats, &sc->sc_curchan);
" %d rx buf processed. %d were errors. %d skb accepted.\n",
__func__, bf_processed, errors, skb_accepted);
#undef PA2DESC
" %d rx buf processed. %d were errors. %d skb accepted.\n",
__func__, bf_processed, errors, skb_accepted);
#undef PA2DESC
{
struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv;
{
struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv;
netif_wake_queue(dev);
if (sc->sc_softled)
netif_wake_queue(dev);
if (sc->sc_softled)
{
struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv;
{
struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv;
/*
* Process each active queue.
*/
/*
* Process each active queue.
*/
if (sc->sc_uapsdq && txqactive(sc->sc_ah, sc->sc_uapsdq->axq_qnum))
ath_tx_processq(sc, sc->sc_uapsdq);
if (sc->sc_uapsdq && txqactive(sc->sc_ah, sc->sc_uapsdq->axq_qnum))
ath_tx_processq(sc, sc->sc_uapsdq);
netif_wake_queue(dev);
if (sc->sc_softled)
netif_wake_queue(dev);
if (sc->sc_softled)
dev->mtu = mtu;
if ((dev->flags & IFF_RUNNING) && !sc->sc_invalid) {
/* NB: the rx buffers may need to be reallocated */
dev->mtu = mtu;
if ((dev->flags & IFF_RUNNING) && !sc->sc_invalid) {
/* NB: the rx buffers may need to be reallocated */
Index: madwifi-trunk-r3776/ath/if_athvar.h
===================================================================
Index: madwifi-trunk-r3776/ath/if_athvar.h
===================================================================
---- madwifi-trunk-r3776.orig/ath/if_athvar.h 2008-07-17 00:52:28.000000000 +0200
-+++ madwifi-trunk-r3776/ath/if_athvar.h 2008-07-17 01:27:21.000000000 +0200
+--- madwifi-trunk-r3776.orig/ath/if_athvar.h 2008-07-18 20:35:03.000000000 +0200
++++ madwifi-trunk-r3776/ath/if_athvar.h 2008-07-18 20:37:09.000000000 +0200
@@ -56,6 +56,10 @@
# include <asm/bitops.h>
#endif
@@ -56,6 +56,10 @@
# include <asm/bitops.h>
#endif
#define ATH_RXBUF_LOCK_DESTROY(_sc)
Index: madwifi-trunk-r3776/net80211/ieee80211_skb.c
===================================================================
#define ATH_RXBUF_LOCK_DESTROY(_sc)
Index: madwifi-trunk-r3776/net80211/ieee80211_skb.c
===================================================================
---- madwifi-trunk-r3776.orig/net80211/ieee80211_skb.c 2008-07-17 00:21:29.000000000 +0200
-+++ madwifi-trunk-r3776/net80211/ieee80211_skb.c 2008-07-17 01:42:17.000000000 +0200
+--- madwifi-trunk-r3776.orig/net80211/ieee80211_skb.c 2008-07-18 20:32:42.000000000 +0200
++++ madwifi-trunk-r3776/net80211/ieee80211_skb.c 2008-07-18 20:35:03.000000000 +0200
@@ -73,7 +73,7 @@
#undef dev_queue_xmit
#undef kfree_skb
@@ -73,7 +73,7 @@
#undef dev_queue_xmit
#undef kfree_skb
EXPORT_SYMBOL(skb_clone_debug);
Index: madwifi-trunk-r3776/net80211/ieee80211_skb.h
===================================================================
EXPORT_SYMBOL(skb_clone_debug);
Index: madwifi-trunk-r3776/net80211/ieee80211_skb.h
===================================================================
---- madwifi-trunk-r3776.orig/net80211/ieee80211_skb.h 2008-07-17 00:21:29.000000000 +0200
-+++ madwifi-trunk-r3776/net80211/ieee80211_skb.h 2008-07-17 01:42:43.000000000 +0200
+--- madwifi-trunk-r3776.orig/net80211/ieee80211_skb.h 2008-07-18 20:32:42.000000000 +0200
++++ madwifi-trunk-r3776/net80211/ieee80211_skb.h 2008-07-18 20:35:03.000000000 +0200
@@ -115,7 +115,7 @@
int vlan_hwaccel_rx_debug(struct sk_buff *skb, struct vlan_group *grp,
@@ -115,7 +115,7 @@
int vlan_hwaccel_rx_debug(struct sk_buff *skb, struct vlan_group *grp,
#define dev_alloc_skb(_length) \
Index: madwifi-trunk-r3776/net80211/ieee80211_input.c
===================================================================
#define dev_alloc_skb(_length) \
Index: madwifi-trunk-r3776/net80211/ieee80211_input.c
===================================================================
---- madwifi-trunk-r3776.orig/net80211/ieee80211_input.c 2008-07-17 00:21:29.000000000 +0200
-+++ madwifi-trunk-r3776/net80211/ieee80211_input.c 2008-07-17 01:41:16.000000000 +0200
+--- madwifi-trunk-r3776.orig/net80211/ieee80211_input.c 2008-07-18 20:32:42.000000000 +0200
++++ madwifi-trunk-r3776/net80211/ieee80211_input.c 2008-07-18 20:37:09.000000000 +0200
@@ -1185,7 +1185,7 @@
ret = vlan_hwaccel_rx(skb,
vap->iv_vlgrp, ni->ni_vlan);
@@ -1185,7 +1185,7 @@
ret = vlan_hwaccel_rx(skb,
vap->iv_vlgrp, ni->ni_vlan);
}
Index: madwifi-trunk-r3776/net80211/ieee80211_monitor.c
===================================================================
}
Index: madwifi-trunk-r3776/net80211/ieee80211_monitor.c
===================================================================
---- madwifi-trunk-r3776.orig/net80211/ieee80211_monitor.c 2008-07-17 00:21:29.000000000 +0200
-+++ madwifi-trunk-r3776/net80211/ieee80211_monitor.c 2008-07-17 01:41:51.000000000 +0200
+--- madwifi-trunk-r3776.orig/net80211/ieee80211_monitor.c 2008-07-18 20:32:42.000000000 +0200
++++ madwifi-trunk-r3776/net80211/ieee80211_monitor.c 2008-07-18 20:35:03.000000000 +0200
@@ -580,7 +580,7 @@
if (SKB_NI(skb1) != NULL)
@@ -580,7 +580,7 @@
if (SKB_NI(skb1) != NULL)