Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=kernel2629.git;a=commitdiff;h=be39c99ceb3003fd9d2662d9c0b54870ff78c0b0
commit be39c99ceb3003fd9d2662d9c0b54870ff78c0b0 Author: Miklos Vajna <vmik...@frugalware.org> Date: Mon Apr 13 21:32:55 2009 +0200 madwifi-0.9.4-22-i686 - kernel-2.6.29 - backported r3902 from svn diff --git a/source/network/madwifi/FrugalBuild b/source/network/madwifi/FrugalBuild index d3efe26..818d6a2 100644 --- a/source/network/madwifi/FrugalBuild +++ b/source/network/madwifi/FrugalBuild @@ -3,7 +3,7 @@ pkgname=madwifi pkgver=0.9.4 -pkgrel=21 +pkgrel=22 pkgdesc="Madwifi drivers for Atheros wireless chipsets" Finclude kernel-module depends=(${depen...@]} 'wireless_tools') @@ -13,11 +13,12 @@ groups=('network') archs=('i686' 'x86_64') Finclude sourceforge url="http://madwifi.sourceforge.net/" -source=($source madwifi-0.9.3-cflags.diff kernel-2.6.2{6,7}.patch) +source=($source madwifi-0.9.3-cflags.diff kernel-2.6.2{6,7,9}.patch) sha1sums=('6f289cb2e99d27b23570d15b69bf0f4240e34d1e' \ '26fdc221e5bb0299d8b3c41ad30b6fe6882a8e35' \ '41928bbfdbb4e1c1fa5c1ed93fb673542c18bbc3' \ - 'd13a31f131b227838046c384e04cb32922b481bf') + 'd13a31f131b227838046c384e04cb32922b481bf' \ + '0afa565128984ebcae441580b83eb916a2f3f09c') # If the package needs testing, feel free to poke Benjamin Woods <woods...@gmail.com> diff --git a/source/network/madwifi/kernel-2.6.29.patch b/source/network/madwifi/kernel-2.6.29.patch new file mode 100644 index 0000000..c32bc0e --- /dev/null +++ b/source/network/madwifi/kernel-2.6.29.patch @@ -0,0 +1,1481 @@ +diff --git a/ath/if_ath.c b/ath/if_ath.c +index 4815dcd..1409fd7 100644 +--- a/ath/if_ath.c ++++ b/ath/if_ath.c +@@ -399,7 +399,7 @@ enum { + int + ath_attach(u_int16_t devid, struct net_device *dev, HAL_BUS_TAG tag) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + struct ath_hal *ah; + HAL_STATUS status; +@@ -955,7 +955,7 @@ bad: + int + ath_detach(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + + HAL_INT tmp; +@@ -1011,7 +1011,7 @@ static struct ieee80211vap * + ath_vap_create(struct ieee80211com *ic, const char *name, int unit, + int opmode, int flags, struct net_device *mdev) + { +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + struct ath_hal *ah = sc->sc_ah; + struct net_device *dev; + struct ath_vap *avp; +@@ -1081,7 +1081,7 @@ ath_vap_create(struct ieee80211com *ic, const char *name, int unit, + return NULL; + } + +- avp = dev->priv; ++ avp = netdev_priv(dev); + ieee80211_vap_setup(ic, dev, name, unit, opmode, flags); + /* override with driver methods */ + vap = &avp->av_vap; +@@ -1245,7 +1245,7 @@ static void + ath_vap_delete(struct ieee80211vap *vap) + { + struct net_device *dev = vap->iv_ic->ic_dev; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + struct ath_vap *avp = ATH_VAP(vap); + int decrease = 1; +@@ -1347,7 +1347,7 @@ ath_vap_delete(struct ieee80211vap *vap) + void + ath_suspend(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + + DPRINTF(sc, ATH_DEBUG_ANY, "%s: flags %x\n", __func__, dev->flags); + ath_stop(dev); +@@ -1356,7 +1356,7 @@ ath_suspend(struct net_device *dev) + void + ath_resume(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + + DPRINTF(sc, ATH_DEBUG_ANY, "%s: flags %x\n", __func__, dev->flags); + ath_init(dev); +@@ -1649,7 +1649,7 @@ ath_intr(int irq, void *dev_id, struct pt_regs *regs) + #endif + { + struct net_device *dev = dev_id; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + HAL_INT status; + int needmark; +@@ -1840,7 +1840,7 @@ static void + ath_bmiss_tasklet(TQUEUE_ARG data) + { + struct net_device *dev = (struct net_device *)data; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + + if (time_before(jiffies, sc->sc_ic.ic_bmiss_guard)) { + /* Beacon miss interrupt occured too short after last beacon +@@ -1883,7 +1883,7 @@ ath_chan2flags(struct ieee80211_channel *chan) + static int + ath_init(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + struct ath_hal *ah = sc->sc_ah; + HAL_STATUS status; +@@ -2011,7 +2011,7 @@ done: + static int + ath_stop_locked(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + struct ath_hal *ah = sc->sc_ah; + +@@ -2075,7 +2075,7 @@ ath_stop_locked(struct net_device *dev) + static int + ath_stop(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + int error; + + ATH_LOCK(sc); +@@ -2179,7 +2179,7 @@ ath_set_ack_bitrate(struct ath_softc *sc, int high) + static int + ath_reset(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + struct ath_hal *ah = sc->sc_ah; + struct ieee80211_channel *c; +@@ -2340,7 +2340,7 @@ dot11_to_ratecode(struct ath_softc *sc, const HAL_RATE_TABLE *rt, int dot11) + static int + ath_tx_startraw(struct net_device *dev, struct ath_buf *bf, struct sk_buff *skb) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + struct ieee80211_phy_params *ph = (struct ieee80211_phy_params *) (skb->cb + sizeof(struct ieee80211_cb)); + const HAL_RATE_TABLE *rt; +@@ -2555,7 +2555,7 @@ ath_ffstageq_flush(struct ath_softc *sc, struct ath_txq *txq, + static int + ath_hardstart(struct sk_buff *skb, struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211_node *ni = NULL; + struct ath_buf *bf = NULL; + struct ieee80211_cb *cb = (struct ieee80211_cb *) skb->cb; +@@ -2872,7 +2872,7 @@ static int + ath_mgtstart(struct ieee80211com *ic, struct sk_buff *skb) + { + struct net_device *dev = ic->ic_dev; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211_node *ni = NULL; + struct ath_buf *bf = NULL; + struct ieee80211_cb *cb; +@@ -3234,7 +3234,7 @@ static int + ath_key_alloc(struct ieee80211vap *vap, const struct ieee80211_key *k) + { + struct net_device *dev = vap->iv_ic->ic_dev; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + + /* + * Group key allocation must be handled specially for +@@ -3301,7 +3301,7 @@ ath_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k, + struct ieee80211_node *ninfo) + { + struct net_device *dev = vap->iv_ic->ic_dev; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + const struct ieee80211_cipher *cip = k->wk_cipher; + struct ieee80211_node *ni; +@@ -3377,7 +3377,7 @@ ath_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k, + const u_int8_t mac[IEEE80211_ADDR_LEN]) + { + struct net_device *dev = vap->iv_ic->ic_dev; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + + return ath_keyset(sc, k, mac, vap->iv_bss); + } +@@ -3392,7 +3392,7 @@ static void + ath_key_update_begin(struct ieee80211vap *vap) + { + struct net_device *dev = vap->iv_ic->ic_dev; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + + DPRINTF(sc, ATH_DEBUG_KEYCACHE, "%s:\n", __func__); + /* +@@ -3413,7 +3413,7 @@ static void + ath_key_update_end(struct ieee80211vap *vap) + { + struct net_device *dev = vap->iv_ic->ic_dev; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + + DPRINTF(sc, ATH_DEBUG_KEYCACHE, "%s:\n", __func__); + netif_start_queue(dev); +@@ -3501,7 +3501,7 @@ ath_merge_mcast(struct ath_softc *sc, u_int32_t mfilt[2]) + static void + ath_mode_init(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + u_int32_t rfilt, mfilt[2]; + +@@ -3552,7 +3552,7 @@ ath_setslottime(struct ath_softc *sc) + static void + ath_updateslot(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + + /* +@@ -3582,7 +3582,7 @@ ath_beacon_dturbo_config(struct ieee80211vap *vap, u_int32_t intval) + (vap->iv_bss && (vap->iv_bss->ni_ath_flags & (IEEE80211_ATHC_TURBOP )) == \ + (IEEE80211_ATHC_TURBOP)) + struct ieee80211com *ic = vap->iv_ic; +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + + if (ic->ic_opmode == IEEE80211_M_HOSTAP && IS_CAPABLE(vap)) { + +@@ -3630,7 +3630,7 @@ static void + ath_beacon_dturbo_update(struct ieee80211vap *vap, int *needmark,u_int8_t dtim) + { + struct ieee80211com *ic = vap->iv_ic; +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + u_int32_t bss_traffic; + + /* TBD: Age out CHANNEL_INTERFERENCE */ +@@ -3773,7 +3773,7 @@ static void + ath_turbo_switch_mode(unsigned long data) + { + struct net_device *dev = (struct net_device *)data; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + int newflags; + +@@ -4365,7 +4365,7 @@ static void + ath_bstuck_tasklet(TQUEUE_ARG data) + { + struct net_device *dev = (struct net_device *)data; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + /* + * XXX:if the bmisscount is cleared while the + * tasklet execution is pending, the following +@@ -4817,7 +4817,7 @@ ath_desc_free(struct ath_softc *sc) + static struct ieee80211_node * + ath_node_alloc(struct ieee80211_node_table *nt,struct ieee80211vap *vap) + { +- struct ath_softc *sc = nt->nt_ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(nt->nt_ic->ic_dev); + const size_t space = sizeof(struct ath_node) + sc->sc_rc->arc_space; + struct ath_node *an; + +@@ -4852,7 +4852,7 @@ static void + ath_node_cleanup(struct ieee80211_node *ni) + { + struct ieee80211com *ic = ni->ni_ic; +- struct ath_softc *sc = ni->ni_ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ni->ni_ic->ic_dev); + struct ath_node *an = ATH_NODE(ni); + struct ath_buf *bf; + +@@ -4906,7 +4906,7 @@ ath_node_cleanup(struct ieee80211_node *ni) + static void + ath_node_free(struct ieee80211_node *ni) + { +- struct ath_softc *sc = ni->ni_ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ni->ni_ic->ic_dev); + + sc->sc_rc->ops->node_cleanup(sc, ATH_NODE(ni)); + sc->sc_node_free(ni); +@@ -4949,7 +4949,7 @@ ath_node_move_data(const struct ieee80211_node *ni) + #ifdef NOT_YET + struct ath_txq *txq = NULL; + struct ieee80211com *ic = ni->ni_ic; +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + struct ath_buf *bf, *prev, *bf_tmp, *bf_tmp1; + struct ath_hal *ah = sc->sc_ah; + struct sk_buff *skb = NULL; +@@ -5401,7 +5401,7 @@ ath_extend_tsf(struct ath_hal *ah, u_int32_t rstamp) + static void + ath_rx_capture(struct net_device *dev, struct ath_desc *ds, struct sk_buff *skb) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211_frame *wh = (struct ieee80211_frame *) skb->data; + unsigned int headersize = ieee80211_anyhdrsize(wh); +@@ -5434,7 +5434,7 @@ ath_rx_capture(struct net_device *dev, struct ath_desc *ds, struct sk_buff *skb) + static void + ath_tx_capture(struct net_device *dev, struct ath_desc *ds, struct sk_buff *skb) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211_frame *wh; + int extra = A_MAX(sizeof(struct ath_tx_radiotap_header), +@@ -5499,7 +5499,7 @@ static void + ath_recv_mgmt(struct ieee80211_node *ni, struct sk_buff *skb, + int subtype, int rssi, u_int32_t rstamp) + { +- struct ath_softc *sc = ni->ni_ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ni->ni_ic->ic_dev); + struct ieee80211vap *vap = ni->ni_vap; + + /* +@@ -5571,7 +5571,7 @@ ath_rx_tasklet(TQUEUE_ARG data) + ((_pa) - (_sc)->sc_rxdma.dd_desc_paddr))) + struct net_device *dev = (struct net_device *)data; + struct ath_buf *bf; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + struct ath_hal *ah = sc->sc_ah; + struct ath_desc *ds; +@@ -6010,7 +6010,7 @@ static void ath_grppoll_start(struct ieee80211vap *vap,int pollcount) + struct sk_buff *skb = NULL; + struct ath_buf *bf, *head = NULL; + struct ieee80211com *ic = vap->iv_ic; +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + struct ath_hal *ah = sc->sc_ah; + u_int8_t rate; + int ctsrate = 0; +@@ -6223,7 +6223,7 @@ static void ath_grppoll_start(struct ieee80211vap *vap,int pollcount) + static void ath_grppoll_stop(struct ieee80211vap *vap) + { + struct ieee80211com *ic = vap->iv_ic; +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + struct ath_hal *ah = sc->sc_ah; + struct ath_txq *txq = &sc->sc_grpplq; + struct ath_buf *bf; +@@ -6438,7 +6438,7 @@ ath_txq_update(struct ath_softc *sc, struct ath_txq *txq, int ac) + static int + ath_wme_update(struct ieee80211com *ic) + { +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + + if (sc->sc_uapsdq) + ath_txq_update(sc, sc->sc_uapsdq, WME_AC_VO); +@@ -6457,7 +6457,7 @@ ath_uapsd_flush(struct ieee80211_node *ni) + { + struct ath_node *an = ATH_NODE(ni); + struct ath_buf *bf; +- struct ath_softc *sc = ni->ni_ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ni->ni_ic->ic_dev); + struct ath_txq *txq; + + ATH_NODE_UAPSD_LOCK_IRQ(an); +@@ -6652,7 +6652,7 @@ static int + ath_tx_start(struct net_device *dev, struct ieee80211_node *ni, struct ath_buf *bf, struct sk_buff *skb, int nextfraglen) + { + #define MIN(a,b) ((a) < (b) ? (a) : (b)) +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = ni->ni_ic; + struct ieee80211vap *vap = ni->ni_vap; + struct ath_hal *ah = sc->sc_ah; +@@ -7492,7 +7492,7 @@ static void + ath_tx_tasklet_q0(TQUEUE_ARG data) + { + struct net_device *dev = (struct net_device *)data; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + + if (txqactive(sc->sc_ah, 0)) + ath_tx_processq(sc, &sc->sc_txq[0]); +@@ -7513,7 +7513,7 @@ static void + ath_tx_tasklet_q0123(TQUEUE_ARG data) + { + struct net_device *dev = (struct net_device *)data; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + + /* + * Process each active queue. +@@ -7548,7 +7548,7 @@ static void + ath_tx_tasklet(TQUEUE_ARG data) + { + struct net_device *dev = (struct net_device *)data; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + int i; + + /* +@@ -7571,7 +7571,7 @@ ath_tx_tasklet(TQUEUE_ARG data) + static void + ath_tx_timeout(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + + DPRINTF(sc, ATH_DEBUG_WATCHDOG, "%s: %sRUNNING %svalid\n", + __func__, (dev->flags & IFF_RUNNING) ? "" : "!", +@@ -7934,7 +7934,7 @@ static void + ath_calibrate(unsigned long arg) + { + struct net_device *dev = (struct net_device *) arg; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + struct ieee80211com *ic = &sc->sc_ic; + HAL_CHANNEL *chans; +@@ -8000,7 +8000,7 @@ static void + ath_scan_start(struct ieee80211com *ic) + { + struct net_device *dev = ic->ic_dev; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + u_int32_t rfilt; + +@@ -8020,7 +8020,7 @@ static void + ath_scan_end(struct ieee80211com *ic) + { + struct net_device *dev = ic->ic_dev; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + u_int32_t rfilt; + +@@ -8038,7 +8038,7 @@ static void + ath_set_channel(struct ieee80211com *ic) + { + struct net_device *dev = ic->ic_dev; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + + (void) ath_chan_set(sc, ic->ic_curchan); + /* +@@ -8054,7 +8054,7 @@ ath_set_channel(struct ieee80211com *ic) + static void + ath_set_coverageclass(struct ieee80211com *ic) + { +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + + ath_hal_setcoverageclass(sc->sc_ah, ic->ic_coverageclass, 0); + +@@ -8064,7 +8064,7 @@ ath_set_coverageclass(struct ieee80211com *ic) + static u_int + ath_mhz2ieee(struct ieee80211com *ic, u_int freq, u_int flags) + { +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + + return (ath_hal_mhz2ieee(sc->sc_ah, freq, flags)); + } +@@ -8079,7 +8079,7 @@ ath_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) + struct ath_vap *avp = ATH_VAP(vap); + struct ieee80211com *ic = vap->iv_ic; + struct net_device *dev = ic->ic_dev; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + struct ieee80211_node *ni, *wds_ni; + int i, error, stamode; +@@ -8414,7 +8414,7 @@ ath_setup_comp(struct ieee80211_node *ni, int enable) + { + #define IEEE80211_KEY_XR (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV) + struct ieee80211vap *vap = ni->ni_vap; +- struct ath_softc *sc = vap->iv_ic->ic_dev->priv; ++ struct ath_softc *sc = vap->iv_netdev_priv(ic->ic_dev); + struct ath_node *an = ATH_NODE(ni); + u_int16_t keyindex; + +@@ -8468,7 +8468,7 @@ static void + ath_setup_stationkey(struct ieee80211_node *ni) + { + struct ieee80211vap *vap = ni->ni_vap; +- struct ath_softc *sc = vap->iv_ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(vap->iv_ic->ic_dev); + u_int16_t keyix; + + keyix = ath_key_alloc(vap, &ni->ni_ucastkey); +@@ -8628,7 +8628,7 @@ ath_newassoc(struct ieee80211_node *ni, int isnew) + { + struct ieee80211com *ic = ni->ni_ic; + struct ieee80211vap *vap = ni->ni_vap; +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + + sc->sc_rc->ops->newassoc(sc, ATH_NODE(ni), isnew); + +@@ -8659,7 +8659,7 @@ static int + ath_getchannels(struct net_device *dev, u_int cc, + HAL_BOOL outdoor, HAL_BOOL xchanmode) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + struct ath_hal *ah = sc->sc_ah; + HAL_CHANNEL *chans; +@@ -8829,7 +8829,7 @@ ath_update_txpow(struct ath_softc *sc) + static int + ath_xr_rate_setup(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + struct ieee80211com *ic = &sc->sc_ic; + const HAL_RATE_TABLE *rt; +@@ -8858,7 +8858,7 @@ ath_xr_rate_setup(struct net_device *dev) + static void + ath_setup_subrates(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + struct ieee80211com *ic = &sc->sc_ic; + const HAL_RATE_TABLE *rt; +@@ -8901,7 +8901,7 @@ ath_setup_subrates(struct net_device *dev) + static int + ath_rate_setup(struct net_device *dev, u_int mode) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + struct ieee80211com *ic = &sc->sc_ic; + const HAL_RATE_TABLE *rt; +@@ -9138,7 +9138,7 @@ ath_printtxbuf(struct ath_buf *bf, int done) + static struct net_device_stats * + ath_getstats(struct net_device *dev) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct net_device_stats *stats = &sc->sc_devstats; + + /* update according to private statistics */ +@@ -9161,7 +9161,7 @@ ath_getstats(struct net_device *dev) + static int + ath_set_mac_address(struct net_device *dev, void *addr) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + struct ath_hal *ah = sc->sc_ah; + struct sockaddr *mac = addr; +@@ -9193,7 +9193,7 @@ ath_set_mac_address(struct net_device *dev, void *addr) + static int + ath_change_mtu(struct net_device *dev, int mtu) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + int error = 0; + + if (!(ATH_MIN_MTU < mtu && mtu <= ATH_MAX_MTU)) { +@@ -9280,7 +9280,7 @@ bad: + static int + ath_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) + { +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ieee80211com *ic = &sc->sc_ic; + int error; + +@@ -9776,7 +9776,7 @@ static void + ath_announce(struct net_device *dev) + { + #define HAL_MODE_DUALBAND (HAL_MODE_11A|HAL_MODE_11B) +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct ath_hal *ah = sc->sc_ah; + u_int modes, cc; + +@@ -9923,7 +9923,7 @@ ath_rcv_dev_event(struct notifier_block *this, unsigned long event, + void *ptr) + { + struct net_device *dev = (struct net_device *) ptr; +- struct ath_softc *sc = (struct ath_softc *) dev->priv; ++ struct ath_softc *sc = (struct ath_softc *) netdev_priv(dev); + + if (!dev || !sc || dev->open != &ath_init) + return 0; +diff --git a/ath/if_ath_pci.c b/ath/if_ath_pci.c +index 49ebf0a..542bca1 100644 +--- a/ath/if_ath_pci.c ++++ b/ath/if_ath_pci.c +@@ -184,7 +184,7 @@ ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) + printk(KERN_ERR "ath_pci: no memory for device state\n"); + goto bad2; + } +- sc = dev->priv; ++ sc = netdev_priv(dev); + sc->aps_sc.sc_dev = dev; + sc->aps_sc.sc_iobase = mem; + +@@ -265,7 +265,7 @@ static void + ath_pci_remove(struct pci_dev *pdev) + { + struct net_device *dev = pci_get_drvdata(pdev); +- struct ath_pci_softc *sc = dev->priv; ++ struct ath_pci_softc *sc = netdev_priv(dev); + + ath_detach(dev); + if (dev->irq) +diff --git a/ath_rate/amrr/amrr.c b/ath_rate/amrr/amrr.c +index b18fd5d..f6a7399 100644 +--- a/ath_rate/amrr/amrr.c ++++ b/ath_rate/amrr/amrr.c +@@ -303,7 +303,7 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni) + static void + ath_rate_cb(void *arg, struct ieee80211_node *ni) + { +- ath_rate_update(ni->ni_ic->ic_dev->priv, ni, (long) arg); ++ ath_rate_update(netdev_priv(ni->ni_ic->ic_dev), ni, (long) arg); + } + + /* +@@ -313,7 +313,7 @@ static void + ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) + { + struct ieee80211com *ic = vap->iv_ic; +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + struct amrr_softc *asc = (struct amrr_softc *) sc->sc_rc; + struct ieee80211_node *ni; + +@@ -425,7 +425,7 @@ static void + ath_ratectl(unsigned long data) + { + struct net_device *dev = (struct net_device *)data; +- struct ath_softc *sc = dev->priv; ++ struct ath_softc *sc = netdev_priv(dev); + struct amrr_softc *asc = (struct amrr_softc *)sc->sc_rc; + struct ieee80211com *ic = &sc->sc_ic; + int interval; +diff --git a/ath_rate/minstrel/minstrel.c b/ath_rate/minstrel/minstrel.c +index cccf633..3235a3b 100644 +--- a/ath_rate/minstrel/minstrel.c ++++ b/ath_rate/minstrel/minstrel.c +@@ -730,7 +730,7 @@ ath_rate_ctl_reset(struct ath_softc *sc, struct ieee80211_node *ni) + static void + ath_rate_cb(void *arg, struct ieee80211_node *ni) + { +- ath_rate_ctl_reset(ni->ni_ic->ic_dev->priv, ni); ++ ath_rate_ctl_reset(netdev_priv(ni->ni_ic->ic_dev), ni); + } + + /* Reset the rate control state for each 802.11 state transition. */ +@@ -744,7 +744,7 @@ ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state newstate) + /* Sync rates for associated stations and neighbors. */ + ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, NULL); + } +- ath_rate_newassoc(ic->ic_dev->priv, ATH_NODE(vap->iv_bss), 1); ++ ath_rate_newassoc(netdev_priv(ic->ic_dev), ATH_NODE(vap->iv_bss), 1); + } + } + +@@ -929,7 +929,7 @@ ath_proc_read_nodes(struct ieee80211vap *vap, char *buf, int space) + (struct ieee80211_node_table *) &vap->iv_ic->ic_sta; + unsigned int x = 0; + unsigned int this_tp, this_prob, this_eprob; +- struct ath_softc *sc = vap->iv_ic->ic_dev->priv;; ++ struct ath_softc *sc = netdev_priv(vap->iv_ic->ic_dev);; + + TAILQ_FOREACH(ni, &nt->nt_node, ni_list) { + /* Assume each node needs 1500 bytes */ +diff --git a/ath_rate/onoe/onoe.c b/ath_rate/onoe/onoe.c +index 275ec13..a174d5d 100644 +--- a/ath_rate/onoe/onoe.c ++++ b/ath_rate/onoe/onoe.c +@@ -289,7 +289,7 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni) + static void + ath_rate_cb(void *arg, struct ieee80211_node *ni) + { +- ath_rate_update(ni->ni_ic->ic_dev->priv, ni, (long) arg); ++ ath_rate_update(netdev_priv(ni->ni_ic->ic_dev), ni, (long) arg); + } + + /* +@@ -299,7 +299,7 @@ static void + ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) + { + struct ieee80211com *ic = vap->iv_ic; +- struct ath_softc *sc = ic->ic_dev->priv; ++ struct ath_softc *sc = netdev_priv(ic->ic_dev); + struct ieee80211_node *ni; + + if (state == IEEE80211_S_INIT) +diff --git a/ath_rate/sample/sample.c b/ath_rate/sample/sample.c +index a49efd4..671301c 100644 +--- a/ath_rate/sample/sample.c ++++ b/ath_rate/sample/sample.c +@@ -882,7 +882,7 @@ ath_rate_ctl_reset(struct ath_softc *sc, struct ieee80211_node *ni) + static void + ath_rate_cb(void *arg, struct ieee80211_node *ni) + { +- ath_rate_ctl_reset(ni->ni_ic->ic_dev->priv, ni); ++ ath_rate_ctl_reset(netdev_priv(ni->ni_ic->ic_dev), ni); + } + + /* +@@ -900,7 +900,7 @@ ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state newstate) + */ + ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, NULL); + } +- ath_rate_newassoc(ic->ic_dev->priv, ATH_NODE(vap->iv_bss), 1); ++ ath_rate_newassoc(netdev_priv(ic->ic_dev), ATH_NODE(vap->iv_bss), 1); + } + } + +diff --git a/net80211/ieee80211.c b/net80211/ieee80211.c +index 088d5eb..f08cb93 100644 +--- a/net80211/ieee80211.c ++++ b/net80211/ieee80211.c +@@ -378,7 +378,7 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct net_device *dev, + #define IEEE80211_C_OPMODE \ + (IEEE80211_C_IBSS | IEEE80211_C_HOSTAP | IEEE80211_C_AHDEMO | \ + IEEE80211_C_MONITOR) +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct net_device *parent = ic->ic_dev; + int err; + +@@ -1018,7 +1018,7 @@ media_status(enum ieee80211_opmode opmode, const struct ieee80211_channel *chan) + static void + ieee80211com_media_status(struct net_device *dev, struct ifmediareq *imr) + { +- struct ieee80211com *ic = dev->priv; /*XXX*/ ++ struct ieee80211com *ic = netdev_priv(dev); /*XXX*/ + + imr->ifm_status = IFM_AVALID; + if (!TAILQ_EMPTY(&ic->ic_vaps)) +@@ -1070,7 +1070,7 @@ media2mode(const struct ifmedia_entry *ime, enum ieee80211_phymode *mode) + static int + ieee80211com_media_change(struct net_device *dev) + { +- struct ieee80211com *ic = dev->priv; /*XXX*/ ++ struct ieee80211com *ic = netdev_priv(dev); /*XXX*/ + struct ieee80211vap *vap; + struct ifmedia_entry *ime = ic->ic_media.ifm_cur; + enum ieee80211_phymode newphymode; +@@ -1183,7 +1183,7 @@ checkrate(struct ieee80211com *ic, enum ieee80211_phymode mode, int rate) + int + ieee80211_media_change(struct net_device *dev) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ifmedia_entry *ime = vap->iv_media.ifm_cur; + enum ieee80211_phymode newmode; +@@ -1227,7 +1227,7 @@ EXPORT_SYMBOL(ieee80211_media_change); + void + ieee80211_media_status(struct net_device *dev, struct ifmediareq *imr) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + enum ieee80211_phymode mode; + struct ieee80211_rateset *rs; +@@ -1445,7 +1445,7 @@ EXPORT_SYMBOL(ieee80211_media2rate); + static struct net_device_stats * + ieee80211_getstats(struct net_device *dev) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct net_device_stats *stats = &vap->iv_devstats; + + /* XXX total guess as to what to count where */ +@@ -1484,7 +1484,7 @@ ieee80211_change_mtu(struct net_device *dev, int mtu) + static void + ieee80211_set_multicast_list(struct net_device *dev) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct net_device *parent = ic->ic_dev; + +diff --git a/net80211/ieee80211_linux.c b/net80211/ieee80211_linux.c +index ddaed32..6c4e087 100644 +--- a/net80211/ieee80211_linux.c ++++ b/net80211/ieee80211_linux.c +@@ -140,7 +140,7 @@ __skb_queue_drain(struct sk_buff_head *q) + static void + ieee80211_vlan_register(struct net_device *dev, struct vlan_group *grp) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + vap->iv_vlgrp = grp; + } +@@ -151,7 +151,7 @@ ieee80211_vlan_register(struct net_device *dev, struct vlan_group *grp) + static void + ieee80211_vlan_add_vid(struct net_device *dev, unsigned short vid) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + if (vap->iv_vlgrp != NULL) + vap->iv_bss->ni_vlan = vid; +@@ -163,7 +163,7 @@ ieee80211_vlan_add_vid(struct net_device *dev, unsigned short vid) + static void + ieee80211_vlan_kill_vid(struct net_device *dev, unsigned short vid) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + if (vap->iv_vlgrp != NULL) + vlan_group_set_device(vap->iv_vlgrp, vid, NULL); +@@ -899,8 +899,8 @@ ieee80211_rcv_dev_event(struct notifier_block *this, unsigned long event, + + switch (event) { + case NETDEV_CHANGENAME: +- ieee80211_sysctl_vdetach(dev->priv); +- ieee80211_sysctl_vattach(dev->priv); ++ ieee80211_sysctl_vdetach(netdev_priv(dev)); ++ ieee80211_sysctl_vattach(netdev_priv(dev)); + return NOTIFY_DONE; + default: + break; +diff --git a/net80211/ieee80211_output.c b/net80211/ieee80211_output.c +index acb8b31..d05517d 100644 +--- a/net80211/ieee80211_output.c ++++ b/net80211/ieee80211_output.c +@@ -200,7 +200,7 @@ ieee80211_classify(struct ieee80211_node *ni, struct sk_buff *skb) + int + ieee80211_hardstart(struct sk_buff *skb, struct net_device *dev) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct net_device *parent = ic->ic_dev; + struct ieee80211_node *ni = NULL; +@@ -304,7 +304,7 @@ bad: + } + + void ieee80211_parent_queue_xmit(struct sk_buff *skb) { +- struct ieee80211vap *vap = skb->dev->priv; ++ struct ieee80211vap *vap = netdev_priv(skb->dev); + + vap->iv_devstats.tx_packets++; + vap->iv_devstats.tx_bytes += skb->len; +diff --git a/net80211/ieee80211_proto.c b/net80211/ieee80211_proto.c +index 67a9e59..e322913 100644 +--- a/net80211/ieee80211_proto.c ++++ b/net80211/ieee80211_proto.c +@@ -946,7 +946,7 @@ ieee80211_init(struct net_device *dev, int forcescan) + { + #define IS_RUNNING(_dev) \ + ((_dev->flags & (IFF_RUNNING|IFF_UP)) == (IFF_RUNNING|IFF_UP)) +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct net_device *parent = ic->ic_dev; + +@@ -1043,7 +1043,7 @@ EXPORT_SYMBOL(ieee80211_start_running); + int + ieee80211_stop(struct net_device *dev) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct net_device *parent = ic->ic_dev; + +diff --git a/net80211/ieee80211_wireless.c b/net80211/ieee80211_wireless.c +index df002c6..0507562 100644 +--- a/net80211/ieee80211_wireless.c ++++ b/net80211/ieee80211_wireless.c +@@ -85,7 +85,7 @@ pre_announced_chanswitch(struct net_device *dev, u_int32_t channel, u_int32_t tb + static void + preempt_scan(struct net_device *dev, int max_grace, int max_wait) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + int total_delay = 0; + int canceled = 0, ready = 0; +@@ -118,7 +118,7 @@ preempt_scan(struct net_device *dev, int max_grace, int max_wait) + static struct iw_statistics * + ieee80211_iw_getstats(struct net_device *dev) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct iw_statistics *is = &vap->iv_iwstats; + struct ieee80211com *ic = vap->iv_ic; + +@@ -142,7 +142,7 @@ static int + ieee80211_ioctl_giwname(struct net_device *dev, struct iw_request_info *info, + char *name, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211_channel *c = vap->iv_ic->ic_curchan; + + if (IEEE80211_IS_CHAN_108G(c)) +@@ -192,7 +192,7 @@ static int + ieee80211_ioctl_siwencode(struct net_device *dev, + struct iw_request_info *info, struct iw_point *erq, char *keybuf) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + int kid, error; + int wepchange = 0; + +@@ -296,7 +296,7 @@ static int + ieee80211_ioctl_giwencode(struct net_device *dev, struct iw_request_info *info, + struct iw_point *erq, char *key) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211_key *k; + int error, kid; + +@@ -340,7 +340,7 @@ ieee80211_ioctl_siwrate(struct net_device *dev, struct iw_request_info *info, + IFM_IEEE80211_11A | IFM_IEEE80211_TURBO, + IFM_IEEE80211_11G | IFM_IEEE80211_TURBO, + }; +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ifreq ifr; + int rate, retv; +@@ -375,7 +375,7 @@ static int + ieee80211_ioctl_giwrate(struct net_device *dev, struct iw_request_info *info, + struct iw_param *rrq, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ifmediareq imr; + int rate; + +@@ -413,7 +413,7 @@ static int + ieee80211_ioctl_siwrts(struct net_device *dev, struct iw_request_info *info, + struct iw_param *rts, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + u16 val; + +@@ -436,7 +436,7 @@ static int + ieee80211_ioctl_giwrts(struct net_device *dev, struct iw_request_info *info, + struct iw_param *rts, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + rts->value = vap->iv_rtsthreshold; + rts->disabled = (rts->value == IEEE80211_RTS_MAX); +@@ -449,7 +449,7 @@ static int + ieee80211_ioctl_siwfrag(struct net_device *dev, struct iw_request_info *info, + struct iw_param *rts, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + u16 val; + +@@ -472,7 +472,7 @@ static int + ieee80211_ioctl_giwfrag(struct net_device *dev, struct iw_request_info *info, + struct iw_param *rts, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + rts->value = vap->iv_fragthreshold; + rts->disabled = (rts->value == 2346); +@@ -485,7 +485,7 @@ static int + ieee80211_ioctl_siwap(struct net_device *dev, struct iw_request_info *info, + struct sockaddr *ap_addr, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + /* NB: should not be set when in AP mode */ + if (vap->iv_opmode == IEEE80211_M_HOSTAP) +@@ -520,7 +520,7 @@ static int + ieee80211_ioctl_giwap(struct net_device *dev, struct iw_request_info *info, + struct sockaddr *ap_addr, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + if (vap->iv_flags & IEEE80211_F_DESBSSID) + IEEE80211_ADDR_COPY(&ap_addr->sa_data, vap->iv_des_bssid); +@@ -541,7 +541,7 @@ static int + ieee80211_ioctl_siwnickn(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *nickname) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + if (data->length > IEEE80211_NWID_LEN) + return -EINVAL; +@@ -557,7 +557,7 @@ static int + ieee80211_ioctl_giwnickn(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *nickname) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + if (data->length > vap->iv_nicknamelen + 1) + data->length = vap->iv_nicknamelen + 1; +@@ -666,7 +666,7 @@ static int + ieee80211_ioctl_siwfreq(struct net_device *dev, struct iw_request_info *info, + struct iw_freq *freq, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_channel *c, *c2; + int i; +@@ -780,7 +780,7 @@ static int + ieee80211_ioctl_giwfreq(struct net_device *dev, struct iw_request_info *info, + struct iw_freq *freq, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + + if (vap->iv_state == IEEE80211_S_RUN && +@@ -821,7 +821,7 @@ static int + ieee80211_ioctl_siwessid(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *ssid) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + if (vap->iv_opmode == IEEE80211_M_WDS) + return -EOPNOTSUPP; +@@ -863,7 +863,7 @@ static int + ieee80211_ioctl_giwessid(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *essid) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + if (vap->iv_opmode == IEEE80211_M_WDS) + return -EOPNOTSUPP; +@@ -894,7 +894,7 @@ static int + ieee80211_ioctl_giwrange(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_node *ni = vap->iv_bss; + struct iw_range *range = (struct iw_range *) extra; +@@ -1041,7 +1041,7 @@ ieee80211_ioctl_setspy(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *extra) + { + /* save the list of node addresses */ +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct sockaddr address[IW_MAX_SPY]; + unsigned int number = data->length; + int i; +@@ -1079,7 +1079,7 @@ ieee80211_ioctl_getspy(struct net_device *dev, struct iw_request_info *info, + * locate nodes by mac (ieee80211_find_node()), + * copy out rssi, set updated flag appropriately + */ +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211_node_table *nt = &vap->iv_ic->ic_sta; + struct ieee80211_node *ni; + struct ieee80211com *ic = vap->iv_ic; +@@ -1125,7 +1125,7 @@ static int + ieee80211_ioctl_setthrspy(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct iw_thrspy threshold; + + if (data->length != 1) +@@ -1162,7 +1162,7 @@ static int + ieee80211_ioctl_getthrspy(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct iw_thrspy *threshold; + +@@ -1183,7 +1183,7 @@ static int + ieee80211_ioctl_siwmode(struct net_device *dev, struct iw_request_info *info, + __u32 *mode, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ifmediareq imr; + int valid = 0; + +@@ -1210,7 +1210,7 @@ static int + ieee80211_ioctl_giwmode(struct net_device *dev, struct iw_request_info *info, + __u32 *mode, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ifmediareq imr; + + memset(&imr, 0, sizeof(imr)); +@@ -1235,7 +1235,7 @@ static int + ieee80211_ioctl_siwpower(struct net_device *dev, struct iw_request_info *info, + struct iw_param *wrq, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + + /* XXX: These values, flags, and caps do not seem to be used elsewhere +@@ -1275,7 +1275,7 @@ static int + ieee80211_ioctl_giwpower(struct net_device *dev, struct iw_request_info *info, + struct iw_param *rrq, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + + rrq->disabled = (ic->ic_flags & IEEE80211_F_PMGTON) == 0; +@@ -1299,7 +1299,7 @@ static int + ieee80211_ioctl_siwretry(struct net_device *dev, struct iw_request_info *info, + struct iw_param *rrq, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + + if (rrq->disabled) { +@@ -1331,7 +1331,7 @@ static int + ieee80211_ioctl_giwretry(struct net_device *dev, struct iw_request_info *info, + struct iw_param *rrq, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + rrq->disabled = (vap->iv_flags & IEEE80211_F_SWRETRY) == 0; + if (!rrq->disabled) { +@@ -1362,7 +1362,7 @@ static int + ieee80211_ioctl_siwtxpow(struct net_device *dev, struct iw_request_info *info, + struct iw_param *rrq, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + int fixed, disabled; + +@@ -1417,7 +1417,7 @@ static int + ieee80211_ioctl_giwtxpow(struct net_device *dev, struct iw_request_info *info, + struct iw_param *rrq, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + + rrq->value = vap->iv_bss->ni_txpower / 2; +@@ -1457,7 +1457,7 @@ static int + ieee80211_ioctl_iwaplist(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct waplistreq req; /* XXX off stack */ + +@@ -1479,7 +1479,7 @@ static int + ieee80211_ioctl_siwscan(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + /* + * XXX don't permit a scan to be started unless we +@@ -1816,7 +1816,7 @@ static int + ieee80211_ioctl_giwscan(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct iwscanreq req; + int res = 0; +@@ -1917,7 +1917,7 @@ static int + ieee80211_ioctl_setmode(struct net_device *dev, struct iw_request_info *info, + struct iw_point *wri, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ifreq ifr; + char s[6]; /* big enough for ``11adt'' */ +@@ -2042,10 +2042,10 @@ ieee80211_setathcap(struct ieee80211vap *vap, int cap, int setting) + static int + ieee80211_set_turbo(struct net_device *dev, int flag) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ifreq ifr; +- struct ieee80211vap *tmpvap = dev->priv; ++ struct ieee80211vap *tmpvap = netdev_priv(dev); + int nvap = 0; + + TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) +@@ -2066,7 +2066,7 @@ static int + ieee80211_ioctl_setparam(struct net_device *dev, struct iw_request_info *info, + void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_rsnparms *rsn = &vap->iv_bss->ni_rsn; + int *i = (int *) extra; +@@ -2598,7 +2598,7 @@ static int + ieee80211_ioctl_getmode(struct net_device *dev, struct iw_request_info *info, + struct iw_point *wri, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ifmediareq imr; + +@@ -2636,7 +2636,7 @@ static int + ieee80211_ioctl_getparam(struct net_device *dev, struct iw_request_info *info, + void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_rsnparms *rsn = &vap->iv_bss->ni_rsn; + int *param = (int *) extra; +@@ -2911,7 +2911,7 @@ static int + ieee80211_ioctl_setoptie(struct net_device *dev, struct iw_request_info *info, + struct iw_point *wri, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + void *ie; + + /* +@@ -2945,7 +2945,7 @@ static int + ieee80211_ioctl_getoptie(struct net_device *dev, struct iw_request_info *info, + struct iw_point *wri, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + if (vap->iv_opt_ie == NULL) { + wri->length = 0; +@@ -3009,7 +3009,7 @@ ieee80211_ioctl_setappiebuf(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211req_getset_appiebuf *iebuf = + (struct ieee80211req_getset_appiebuf *)extra; + enum ieee80211_opmode chk_opmode; +@@ -3051,7 +3051,7 @@ static int + ieee80211_ioctl_getappiebuf(struct net_device *dev, struct iw_request_info *info, + struct iw_point *data, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211req_getset_appiebuf *iebuf = + (struct ieee80211req_getset_appiebuf *)extra; + int max_iebuf_len; +@@ -3092,7 +3092,7 @@ static int + ieee80211_ioctl_setfilter(struct net_device *dev, struct iw_request_info *info, + void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211req_set_filter *app_filter = (struct ieee80211req_set_filter *)extra; + + if ((extra == NULL) || (app_filter->app_filterype & ~IEEE80211_FILTER_TYPE_ALL)) +@@ -3107,7 +3107,7 @@ static int + ieee80211_ioctl_setkey(struct net_device *dev, struct iw_request_info *info, + void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211req_key *ik = (struct ieee80211req_key *)extra; + struct ieee80211_node *ni; +@@ -3176,7 +3176,7 @@ ieee80211_ioctl_setkey(struct net_device *dev, struct iw_request_info *info, + static int + ieee80211_ioctl_getkey(struct net_device *dev, struct iwreq *iwr) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_node *ni; + struct ieee80211req_key ik; +@@ -3232,7 +3232,7 @@ static int + ieee80211_ioctl_delkey(struct net_device *dev, struct iw_request_info *info, + void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211req_del_key *dk = (struct ieee80211req_del_key *)extra; + int kid; +@@ -3304,7 +3304,7 @@ static int + ieee80211_ioctl_setmlme(struct net_device *dev, struct iw_request_info *info, + void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211req_mlme *mlme = (struct ieee80211req_mlme *)extra; + struct ieee80211_node *ni; +@@ -3392,7 +3392,7 @@ static int + ieee80211_ioctl_wdsmac(struct net_device *dev, struct iw_request_info *info, + void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct sockaddr *sa = (struct sockaddr *)extra; + struct ieee80211com *ic = vap->iv_ic; + +@@ -3419,7 +3419,7 @@ static int + ieee80211_ioctl_wdsdelmac(struct net_device *dev, struct iw_request_info *info, + void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct sockaddr *sa = (struct sockaddr *)extra; + struct ieee80211com *ic = vap->iv_ic; + +@@ -3469,7 +3469,7 @@ static int + ieee80211_ioctl_addmac(struct net_device *dev, struct iw_request_info *info, + void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct sockaddr *sa = (struct sockaddr *)extra; + const struct ieee80211_aclator *acl = vap->iv_acl; + +@@ -3487,7 +3487,7 @@ static int + ieee80211_ioctl_delmac(struct net_device *dev, struct iw_request_info *info, + void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct sockaddr *sa = (struct sockaddr *)extra; + const struct ieee80211_aclator *acl = vap->iv_acl; + +@@ -3505,7 +3505,7 @@ static int + ieee80211_ioctl_setchanlist(struct net_device *dev, + struct iw_request_info *info, void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211req_chanlist *list = + (struct ieee80211req_chanlist *)extra; +@@ -3547,7 +3547,7 @@ static int + ieee80211_ioctl_getchanlist(struct net_device *dev, + struct iw_request_info *info, void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + + memcpy(extra, ic->ic_chan_active, sizeof(ic->ic_chan_active)); +@@ -3558,7 +3558,7 @@ static int + ieee80211_ioctl_getchaninfo(struct net_device *dev, + struct iw_request_info *info, void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211req_chaninfo *chans = + (struct ieee80211req_chaninfo *) extra; +@@ -3602,7 +3602,7 @@ static int + ieee80211_ioctl_setwmmparams(struct net_device *dev, + struct iw_request_info *info, void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + int *param = (int *) extra; + int ac = (param[1] >= 0 && param[1] < WME_NUM_AC) ? + param[1] : WME_AC_BE; +@@ -3691,7 +3691,7 @@ static int + ieee80211_ioctl_getwmmparams(struct net_device *dev, + struct iw_request_info *info, void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + int *param = (int *) extra; + int ac = (param[1] >= 0 && param[1] < WME_NUM_AC) ? + param[1] : WME_AC_BE; +@@ -3727,7 +3727,7 @@ ieee80211_ioctl_getwmmparams(struct net_device *dev, + static int + ieee80211_ioctl_getwpaie(struct net_device *dev, struct iwreq *iwr) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_node *ni; + struct ieee80211req_wpaie wpaie; +@@ -3760,7 +3760,7 @@ ieee80211_ioctl_getwpaie(struct net_device *dev, struct iwreq *iwr) + static int + ieee80211_ioctl_getstastats(struct net_device *dev, struct iwreq *iwr) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_node *ni; + u_int8_t macaddr[IEEE80211_ADDR_LEN]; +@@ -3878,7 +3878,7 @@ get_scan_result(void *arg, const struct ieee80211_scan_entry *se) + static int + ieee80211_ioctl_getscanresults(struct net_device *dev, struct iwreq *iwr) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct scanreq req; + int error; +@@ -4036,7 +4036,7 @@ get_sta_info(void *arg, struct ieee80211_node *ni) + static int + ieee80211_ioctl_getstainfo(struct net_device *dev, struct iwreq *iwr) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + struct stainforeq req; + int error; +@@ -4070,7 +4070,7 @@ ieee80211_ioctl_getstainfo(struct net_device *dev, struct iwreq *iwr) + + static void + pre_announced_chanswitch(struct net_device *dev, u_int32_t channel, u_int32_t tbtt) { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + /* now flag the beacon update to include the channel switch IE */ + ic->ic_flags |= IEEE80211_F_CHANSWITCH; +@@ -4082,7 +4082,7 @@ static int + ieee80211_ioctl_chanswitch(struct net_device *dev, struct iw_request_info *info, + void *w, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct ieee80211com *ic = vap->iv_ic; + int *param = (int *) extra; + +@@ -4127,7 +4127,7 @@ static int + ieee80211_ioctl_giwgenie(struct net_device *dev, + struct iw_request_info *info, struct iw_point *out, char *buf) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + + if (out->length < vap->iv_opt_ie_len) + return -E2BIG; +@@ -4660,7 +4660,7 @@ static int + ieee80211_ioctl_giwencodeext(struct net_device *dev, + struct iw_request_info *info, struct iw_point *erq, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct iw_encode_ext *ext; + struct ieee80211_key *wk; + int error; +@@ -4720,7 +4720,7 @@ static int + ieee80211_ioctl_siwencodeext(struct net_device *dev, + struct iw_request_info *info, struct iw_point *erq, char *extra) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; + struct ieee80211req_key kr; + int error; +@@ -5304,7 +5304,7 @@ static void ieee80211_delete_wlanunit(u_int); + static int + ieee80211_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) + { +- struct ieee80211vap *vap = dev->priv; ++ struct ieee80211vap *vap = netdev_priv(dev); + u_int unit; + + switch (cmd) { _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git