if ((!rt) || (rate < 0) || (rate >= ARRAY_SIZE(sc->sc_hwmap)))
--- a/ath/if_ath_ahb.c
+++ b/ath/if_ath_ahb.c
-@@ -268,7 +268,7 @@ static int ahb_wmac_probe(struct platfor
+@@ -203,7 +203,7 @@ static int ahb_wmac_probe(struct platfor
if (!dev)
return -ENOMEM;
sc->aps_sc.sc_dev = dev;
dev->irq = platform_get_irq(pdev, 0);
-@@ -365,7 +365,7 @@ init_ath_wmac(u_int16_t devid, u_int16_t
+@@ -300,7 +300,7 @@ init_ath_wmac(u_int16_t devid, u_int16_t
printk(KERN_ERR "%s: no memory for device state\n", dev_info);
goto bad2;
}
ieee80211_vap_setup(ic, dev, name, opmode, flags, master);
/* override with driver methods */
vap = &avp->av_vap;
-@@ -1570,7 +1570,7 @@ static void
+@@ -1571,7 +1571,7 @@ static void
ath_vap_delete(struct ieee80211vap *vap)
{
struct net_device *dev = vap->iv_ic->ic_dev;
struct ath_hal *ah = sc->sc_ah;
struct ath_vap *avp = ATH_VAP(vap);
int decrease = 1;
-@@ -1672,7 +1672,7 @@ void
+@@ -1673,7 +1673,7 @@ void
ath_suspend(struct net_device *dev)
{
#ifdef AR_DEBUG
#endif
DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
-@@ -1683,7 +1683,7 @@ void
+@@ -1684,7 +1684,7 @@ void
ath_resume(struct net_device *dev)
{
#ifdef AR_DEBUG
#endif
DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
-@@ -2247,7 +2247,7 @@ ath_intr(int irq, void *dev_id, struct p
+@@ -2248,7 +2248,7 @@ ath_intr(int irq, void *dev_id, struct p
#endif
{
struct net_device *dev = dev_id;
struct ath_hal *ah = sc->sc_ah;
u_int64_t hw_tsf = 0;
HAL_INT status;
-@@ -2468,7 +2468,7 @@ static void
+@@ -2469,7 +2469,7 @@ static void
ath_fatal_tasklet(TQUEUE_ARG data)
{
struct net_device *dev = (struct net_device *)data;
EPRINTF(sc, "Hardware error; resetting.\n");
ath_reset(dev);
-@@ -2478,7 +2478,7 @@ static void
+@@ -2479,7 +2479,7 @@ static void
ath_rxorn_tasklet(TQUEUE_ARG data)
{
struct net_device *dev = (struct net_device *)data;
EPRINTF(sc, "Receive FIFO overrun; resetting.\n");
ath_reset(dev);
-@@ -2488,7 +2488,7 @@ static void
+@@ -2489,7 +2489,7 @@ static void
ath_bmiss_tasklet(TQUEUE_ARG data)
{
struct net_device *dev = (struct net_device *)data;
if (time_before(jiffies, sc->sc_ic.ic_bmiss_guard)) {
/* Beacon miss interrupt occured too short after last beacon
-@@ -2567,7 +2567,7 @@ done:
+@@ -2568,7 +2568,7 @@ done:
static int
ath_init(struct net_device *dev)
{
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc->sc_ah;
HAL_STATUS status;
-@@ -2692,7 +2692,7 @@ done:
+@@ -2693,7 +2693,7 @@ done:
static int
ath_stop_locked(struct net_device *dev)
{
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc->sc_ah;
-@@ -2777,7 +2777,7 @@ static void ath_set_beacon_cal(struct at
+@@ -2778,7 +2778,7 @@ static void ath_set_beacon_cal(struct at
static int
ath_stop(struct net_device *dev)
{
int error;
ATH_LOCK(sc);
-@@ -2997,7 +2997,7 @@ ath_fetch_idle_time(struct ath_softc *sc
+@@ -2998,7 +2998,7 @@ ath_fetch_idle_time(struct ath_softc *sc
static int
ath_reset(struct net_device *dev)
{
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc->sc_ah;
struct ieee80211_channel *c;
-@@ -3163,7 +3163,7 @@ dot11_to_ratecode(struct ath_softc *sc,
+@@ -3164,7 +3164,7 @@ dot11_to_ratecode(struct ath_softc *sc,
static int
ath_tx_startraw(struct net_device *dev, struct ath_buf *bf, struct sk_buff *skb)
{
struct ath_hal *ah = sc->sc_ah;
struct ieee80211_phy_params *ph = (struct ieee80211_phy_params *)
(SKB_CB(skb) + 1); /* NB: SKB_CB casts to CB struct*. */
-@@ -3476,7 +3476,7 @@ _take_txbuf(struct ath_softc *sc, int fo
+@@ -3477,7 +3477,7 @@ _take_txbuf(struct ath_softc *sc, int fo
static int
ath_hardstart(struct sk_buff *skb, struct net_device *dev)
{
struct ieee80211_node *ni = NULL;
struct ath_buf *bf = NULL;
ath_bufhead bf_head;
-@@ -3791,7 +3791,7 @@ static int
+@@ -3792,7 +3792,7 @@ static int
ath_mgtstart(struct ieee80211com *ic, struct sk_buff *skb)
{
struct net_device *dev = ic->ic_dev;
struct ath_buf *bf = NULL;
int error;
-@@ -4150,7 +4150,7 @@ static ieee80211_keyix_t
+@@ -4151,7 +4151,7 @@ static ieee80211_keyix_t
ath_key_alloc(struct ieee80211vap *vap, const struct ieee80211_key *k)
{
struct net_device *dev = vap->iv_ic->ic_dev;
/*
* Group key allocation must be handled specially for
-@@ -4215,7 +4215,7 @@ ath_key_delete(struct ieee80211vap *vap,
+@@ -4216,7 +4216,7 @@ ath_key_delete(struct ieee80211vap *vap,
struct ieee80211_node *ninfo)
{
struct net_device *dev = vap->iv_ic->ic_dev;
struct ath_hal *ah = sc->sc_ah;
struct ieee80211_node *ni = NULL;
const struct ieee80211_cipher *cip = k->wk_cipher;
-@@ -4291,14 +4291,14 @@ ath_key_set(struct ieee80211vap *vap, co
+@@ -4292,14 +4292,14 @@ ath_key_set(struct ieee80211vap *vap, co
const u_int8_t mac[IEEE80211_ADDR_LEN])
{
struct net_device *dev = vap->iv_ic->ic_dev;
/*
* XXX Using in_softirq is not right since we might
-@@ -4316,7 +4316,7 @@ static void ath_poll_disable(struct net_
+@@ -4317,7 +4317,7 @@ static void ath_poll_disable(struct net_
static void ath_poll_enable(struct net_device *dev)
{
/* NB: see above */
if (!in_softirq()) {
-@@ -4342,7 +4342,7 @@ ath_key_update_begin(struct ieee80211vap
+@@ -4343,7 +4343,7 @@ ath_key_update_begin(struct ieee80211vap
{
struct net_device *dev = vap->iv_ic->ic_dev;
#ifdef AR_DEBUG
#endif
DPRINTF(sc, ATH_DEBUG_KEYCACHE, "Begin\n");
-@@ -4360,7 +4360,7 @@ ath_key_update_end(struct ieee80211vap *
+@@ -4361,7 +4361,7 @@ ath_key_update_end(struct ieee80211vap *
{
struct net_device *dev = vap->iv_ic->ic_dev;
#ifdef AR_DEBUG
#endif
DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
-@@ -4453,7 +4453,7 @@ ath_merge_mcast(struct ath_softc *sc, u_
+@@ -4454,7 +4454,7 @@ ath_merge_mcast(struct ath_softc *sc, u_
static void
ath_mode_init(struct net_device *dev)
{
struct ath_hal *ah = sc->sc_ah;
u_int32_t rfilt, mfilt[2];
-@@ -4539,7 +4539,7 @@ ath_set_timing(struct ath_softc *sc)
+@@ -4540,7 +4540,7 @@ ath_set_timing(struct ath_softc *sc)
static void
ath_updateslot(struct net_device *dev)
{
struct ieee80211com *ic = &sc->sc_ic;
/*
-@@ -4569,7 +4569,7 @@ ath_beacon_dturbo_config(struct ieee8021
+@@ -4570,7 +4570,7 @@ ath_beacon_dturbo_config(struct ieee8021
(vap->iv_bss && (vap->iv_bss->ni_ath_flags & (IEEE80211_ATHC_TURBOP)) == \
(IEEE80211_ATHC_TURBOP))
struct ieee80211com *ic = vap->iv_ic;
if (ic->ic_opmode == IEEE80211_M_HOSTAP && IS_CAPABLE(vap)) {
-@@ -4617,7 +4617,7 @@ static void
+@@ -4618,7 +4618,7 @@ static void
ath_beacon_dturbo_update(struct ieee80211vap *vap, int *needmark, u_int8_t dtim)
{
struct ieee80211com *ic = vap->iv_ic;
u_int32_t bss_traffic;
if (sc->sc_ignore_ar) {
-@@ -4758,7 +4758,7 @@ static void
+@@ -4759,7 +4759,7 @@ static void
ath_turbo_switch_mode(unsigned long data)
{
struct net_device *dev = (struct net_device *)data;
struct ieee80211com *ic = &sc->sc_ic;
unsigned int newflags;
-@@ -5437,7 +5437,7 @@ static void
+@@ -5438,7 +5438,7 @@ static void
ath_bstuck_tasklet(TQUEUE_ARG data)
{
struct net_device *dev = (struct net_device *)data;
/*
* XXX:if the bmisscount is cleared while the
* tasklet execution is pending, the following
-@@ -5890,7 +5890,7 @@ ath_node_alloc_debug(struct ieee80211vap
+@@ -5891,7 +5891,7 @@ ath_node_alloc_debug(struct ieee80211vap
ath_node_alloc(struct ieee80211vap *vap)
#endif
{
const size_t space = sizeof(struct ath_node) + sc->sc_rc->arc_space;
struct ath_node *an = kmalloc(space, GFP_ATOMIC);
if (an != NULL) {
-@@ -5926,7 +5926,7 @@ ath_node_cleanup(struct ieee80211_node *
+@@ -5927,7 +5927,7 @@ ath_node_cleanup(struct ieee80211_node *
#endif
{
struct ieee80211com *ic = ni->ni_ic;
struct ath_node *an = ATH_NODE(ni);
struct ath_buf *bf;
-@@ -5984,7 +5984,7 @@ ath_node_free_debug(struct ieee80211_nod
+@@ -5985,7 +5985,7 @@ ath_node_free_debug(struct ieee80211_nod
ath_node_free(struct ieee80211_node *ni)
#endif
{
#ifdef IEEE80211_DEBUG_REFCNT
sc->sc_node_free_debug(ni, func, line);
-@@ -6032,7 +6032,7 @@ ath_node_move_data(const struct ieee8021
+@@ -6033,7 +6033,7 @@ ath_node_move_data(const struct ieee8021
#ifdef NOT_YET
struct ath_txq *txq = NULL;
struct ieee80211com *ic = ni->ni_ic;
struct ath_buf *bf, *prev, *bf_tmp, *bf_tmp1;
struct ath_hal *ah = sc->sc_ah;
struct sk_buff *skb = NULL;
-@@ -6552,7 +6552,7 @@ static void
+@@ -6553,7 +6553,7 @@ static void
ath_capture(struct net_device *dev, const struct ath_buf *bf,
struct sk_buff *skb, u_int64_t tsf, unsigned int tx)
{
struct ieee80211com *ic = &sc->sc_ic;
struct sk_buff *tskb = NULL;
-@@ -6612,7 +6612,7 @@ static void
+@@ -6613,7 +6613,7 @@ static void
ath_recv_mgmt(struct ieee80211vap * vap, struct ieee80211_node *ni_or_null,
struct sk_buff *skb, int subtype, int rssi, u_int64_t rtsf)
{
#ifdef AR_DEBUG
struct ieee80211_frame *wh = (struct ieee80211_frame *)skb->data;
#endif
-@@ -6779,7 +6779,7 @@ ath_rx_poll(struct net_device *dev, int
+@@ -6780,7 +6780,7 @@ ath_rx_poll(struct net_device *dev, int
struct net_device *dev = sc->sc_dev;
int rx_limit = budget;
#else
int rx_limit = min(dev->quota, *budget);
#endif
struct ath_buf *bf;
-@@ -7301,7 +7301,7 @@ static void ath_grppoll_start(struct iee
+@@ -7302,7 +7302,7 @@ static void ath_grppoll_start(struct iee
struct sk_buff *skb = NULL;
struct ath_buf *bf, *head = NULL;
struct ieee80211com *ic = vap->iv_ic;
struct ath_hal *ah = sc->sc_ah;
u_int8_t rate;
unsigned int ctsrate = 0, ctsduration = 0;
-@@ -7519,7 +7519,7 @@ static void ath_grppoll_start(struct iee
+@@ -7520,7 +7520,7 @@ static void ath_grppoll_start(struct iee
static void ath_grppoll_stop(struct ieee80211vap *vap)
{
struct ieee80211com *ic = vap->iv_ic;
struct ath_hal *ah = sc->sc_ah;
struct ath_txq *txq = &sc->sc_grpplq;
struct ath_buf *bf;
-@@ -7731,7 +7731,7 @@ ath_txq_update(struct ath_softc *sc, str
+@@ -7732,7 +7732,7 @@ ath_txq_update(struct ath_softc *sc, str
static int
ath_wme_update(struct ieee80211com *ic)
{
if (sc->sc_uapsdq)
ath_txq_update(sc, sc->sc_uapsdq, WME_AC_VO);
-@@ -7750,7 +7750,7 @@ ath_uapsd_flush(struct ieee80211_node *n
+@@ -7751,7 +7751,7 @@ ath_uapsd_flush(struct ieee80211_node *n
{
struct ath_node *an = ATH_NODE(ni);
struct ath_buf *bf;
struct ath_txq *txq;
ATH_NODE_UAPSD_LOCK_IRQ(an);
-@@ -7941,7 +7941,7 @@ ath_tx_start(struct net_device *dev, str
+@@ -7942,7 +7942,7 @@ ath_tx_start(struct net_device *dev, str
struct ath_buf *bf, struct sk_buff *skb, int nextfraglen)
{
#define MIN(a,b) ((a) < (b) ? (a) : (b))
struct ieee80211com *ic = ni->ni_ic;
struct ieee80211vap *vap = ni->ni_vap;
struct ath_hal *ah = sc->sc_ah;
-@@ -8850,7 +8850,7 @@ static void
+@@ -8851,7 +8851,7 @@ static void
ath_tx_tasklet_q0(TQUEUE_ARG data)
{
struct net_device *dev = (struct net_device *)data;
unsigned long flags;
process_tx_again:
-@@ -8881,7 +8881,7 @@ static void
+@@ -8882,7 +8882,7 @@ static void
ath_tx_tasklet_q0123(TQUEUE_ARG data)
{
struct net_device *dev = (struct net_device *)data;
unsigned long flags;
process_tx_again:
-@@ -8926,7 +8926,7 @@ static void
+@@ -8927,7 +8927,7 @@ static void
ath_tx_tasklet(TQUEUE_ARG data)
{
struct net_device *dev = (struct net_device *)data;
unsigned int i;
unsigned long flags;
-@@ -8954,7 +8954,7 @@ process_tx_again:
+@@ -8955,7 +8955,7 @@ process_tx_again:
static void
ath_tx_timeout(struct net_device *dev)
{
if (ath_chan_unavail(sc))
return;
-@@ -9362,7 +9362,7 @@ static void
+@@ -9363,7 +9363,7 @@ static void
ath_calibrate(unsigned long arg)
{
struct net_device *dev = (struct net_device *)arg;
struct ath_hal *ah = sc->sc_ah;
struct ieee80211com *ic = &sc->sc_ic;
/* u_int32_t nchans; */
-@@ -9437,7 +9437,7 @@ static void
+@@ -9438,7 +9438,7 @@ static void
ath_scan_start(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
struct ath_hal *ah = sc->sc_ah;
u_int32_t rfilt;
-@@ -9457,7 +9457,7 @@ static void
+@@ -9458,7 +9458,7 @@ static void
ath_scan_end(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
struct ath_hal *ah = sc->sc_ah;
u_int32_t rfilt;
-@@ -9475,7 +9475,7 @@ static void
+@@ -9476,7 +9476,7 @@ static void
ath_set_channel(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
(void) ath_chan_set(sc, ic->ic_curchan);
ic->ic_channoise = ath_hal_get_channel_noise(sc->sc_ah, &(sc->sc_curchan));
-@@ -9492,7 +9492,7 @@ ath_set_channel(struct ieee80211com *ic)
+@@ -9493,7 +9493,7 @@ ath_set_channel(struct ieee80211com *ic)
static void
ath_set_coverageclass(struct ieee80211com *ic)
{
sc->sc_coverage = ic->ic_coverageclass * 3;
ath_set_timing(sc);
-@@ -9503,7 +9503,7 @@ ath_set_coverageclass(struct ieee80211co
+@@ -9504,7 +9504,7 @@ ath_set_coverageclass(struct ieee80211co
static u_int
ath_mhz2ieee(struct ieee80211com *ic, u_int freq, u_int flags)
{
return (ath_hal_mhz2ieee(sc->sc_ah, freq, flags));
}
-@@ -9518,7 +9518,7 @@ ath_newstate(struct ieee80211vap *vap, e
+@@ -9519,7 +9519,7 @@ ath_newstate(struct ieee80211vap *vap, e
struct ath_vap *avp = ATH_VAP(vap);
struct ieee80211com *ic = vap->iv_ic;
struct net_device *dev = ic->ic_dev;
struct ath_hal *ah = sc->sc_ah;
struct ieee80211_node *ni, *wds_ni;
unsigned int i;
-@@ -9958,7 +9958,7 @@ ath_setup_comp(struct ieee80211_node *ni
+@@ -9959,7 +9959,7 @@ ath_setup_comp(struct ieee80211_node *ni
{
#define IEEE80211_KEY_XR (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV)
struct ieee80211vap *vap = ni->ni_vap;
struct ath_node *an = ATH_NODE(ni);
ieee80211_keyix_t keyix;
-@@ -10012,7 +10012,7 @@ static void
+@@ -10013,7 +10013,7 @@ static void
ath_setup_stationkey(struct ieee80211_node *ni)
{
struct ieee80211vap *vap = ni->ni_vap;
ieee80211_keyix_t keyix;
keyix = ath_key_alloc(vap, &ni->ni_ucastkey);
-@@ -10173,7 +10173,7 @@ ath_newassoc(struct ieee80211_node *ni,
+@@ -10174,7 +10174,7 @@ ath_newassoc(struct ieee80211_node *ni,
{
struct ieee80211com *ic = ni->ni_ic;
struct ieee80211vap *vap = ni->ni_vap;
sc->sc_rc->ops->newassoc(sc, ATH_NODE(ni), isnew);
ath_wprobe_node_join(ni->ni_vap, ni);
-@@ -10204,7 +10204,7 @@ ath_newassoc(struct ieee80211_node *ni,
+@@ -10205,7 +10205,7 @@ ath_newassoc(struct ieee80211_node *ni,
static int
ath_getchannels(struct net_device *dev)
{
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc->sc_ah;
HAL_CHANNEL *chans;
-@@ -10479,7 +10479,7 @@ ath_update_txpow(struct ath_softc *sc)
+@@ -10482,7 +10482,7 @@ ath_update_txpow(struct ath_softc *sc)
static int
ath_xr_rate_setup(struct net_device *dev)
{
struct ath_hal *ah = sc->sc_ah;
struct ieee80211com *ic = &sc->sc_ic;
const HAL_RATE_TABLE *rt;
-@@ -10510,7 +10510,7 @@ ath_xr_rate_setup(struct net_device *dev
+@@ -10513,7 +10513,7 @@ ath_xr_rate_setup(struct net_device *dev
static int
ath_rate_setup(struct net_device *dev, u_int mode)
{
struct ath_hal *ah = sc->sc_ah;
struct ieee80211com *ic = &sc->sc_ic;
const HAL_RATE_TABLE *rt;
-@@ -10757,7 +10757,7 @@ ath_printtxbuf(const struct ath_buf *bf,
+@@ -10760,7 +10760,7 @@ ath_printtxbuf(const struct ath_buf *bf,
{
const struct ath_tx_status *ts = &bf->bf_dsstatus.ds_txstat;
const struct ath_desc *ds = bf->bf_desc;
u_int8_t status = done ? ts->ts_status : 0;
DPRINTF(sc, ATH_DEBUG_ANY,
-@@ -10784,7 +10784,7 @@ ath_printtxbuf(const struct ath_buf *bf,
+@@ -10787,7 +10787,7 @@ ath_printtxbuf(const struct ath_buf *bf,
static struct net_device_stats *
ath_getstats(struct net_device *dev)
{
struct net_device_stats *stats = &sc->sc_devstats;
/* update according to private statistics */
-@@ -10807,7 +10807,7 @@ ath_getstats(struct net_device *dev)
+@@ -10810,7 +10810,7 @@ ath_getstats(struct net_device *dev)
static int
ath_set_mac_address(struct net_device *dev, void *addr)
{
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc->sc_ah;
struct sockaddr *mac = addr;
-@@ -10836,7 +10836,7 @@ ath_set_mac_address(struct net_device *d
+@@ -10839,7 +10839,7 @@ ath_set_mac_address(struct net_device *d
static int
ath_change_mtu(struct net_device *dev, int mtu)
{
int error = 0;
if (!(ATH_MIN_MTU < mtu && mtu <= ATH_MAX_MTU)) {
-@@ -10923,7 +10923,7 @@ bad:
+@@ -10926,7 +10926,7 @@ bad:
static int
ath_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct ieee80211com *ic = &sc->sc_ic;
int error;
-@@ -11804,7 +11804,7 @@ static void
+@@ -11807,7 +11807,7 @@ static void
ath_announce(struct net_device *dev)
{
#define HAL_MODE_DUALBAND (HAL_MODE_11A|HAL_MODE_11B)
struct ath_hal *ah = sc->sc_ah;
u_int modes, cc;
static const int MLEN = 1024;
-@@ -11991,7 +11991,7 @@ static void
+@@ -11994,7 +11994,7 @@ static void
txcont_configure_radio(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
struct ath_hal *ah = sc->sc_ah;
struct ieee80211_wme_state *wme = &ic->ic_wme;
struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
-@@ -12265,7 +12265,7 @@ static void
+@@ -12268,7 +12268,7 @@ static void
txcont_queue_packet(struct ieee80211com *ic, struct ath_txq* txq)
{
struct net_device *dev = ic->ic_dev;
struct ath_hal *ah = sc->sc_ah;
struct ath_buf *bf = NULL;
struct sk_buff *skb = NULL;
-@@ -12398,7 +12398,7 @@ static void
+@@ -12401,7 +12401,7 @@ static void
txcont_on(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
if (IFF_RUNNING != (ic->ic_dev->flags & IFF_RUNNING)) {
EPRINTF(sc, "Cannot enable txcont when"
-@@ -12419,7 +12419,7 @@ static void
+@@ -12422,7 +12422,7 @@ static void
txcont_off(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
if (TAILQ_FIRST(&ic->ic_vaps)->iv_opmode != IEEE80211_M_WDS)
sc->sc_beacons = 1;
-@@ -12433,7 +12433,7 @@ static int
+@@ -12436,7 +12436,7 @@ static int
ath_get_dfs_testmode(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
return sc->sc_dfs_testmode;
}
-@@ -12460,7 +12460,7 @@ static void
+@@ -12463,7 +12463,7 @@ static void
ath_set_dfs_testmode(struct ieee80211com *ic, int value)
{
struct net_device *dev = ic->ic_dev;
sc->sc_dfs_testmode = !!value;
}
-@@ -12470,7 +12470,7 @@ static int
+@@ -12473,7 +12473,7 @@ static int
ath_get_txcont(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
return sc->sc_txcont;
}
-@@ -12488,7 +12488,7 @@ static void
+@@ -12491,7 +12491,7 @@ static void
ath_set_txcont_power(struct ieee80211com *ic, unsigned int txpower)
{
struct net_device *dev = ic->ic_dev;
int new_txcont_power = txpower > IEEE80211_TXPOWER_MAX ?
IEEE80211_TXPOWER_MAX : txpower;
if (sc->sc_txcont_power != new_txcont_power) {
-@@ -12506,7 +12506,7 @@ static int
+@@ -12509,7 +12509,7 @@ static int
ath_get_txcont_power(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
/* VERY conservative default */
return sc->sc_txcont_power ? sc->sc_txcont_power : 0;
}
-@@ -12516,7 +12516,7 @@ ath_get_txcont_power(struct ieee80211com
+@@ -12519,7 +12519,7 @@ ath_get_txcont_power(struct ieee80211com
ath_set_txcont_rate(struct ieee80211com *ic, unsigned int new_rate)
{
struct net_device *dev = ic->ic_dev;
if (sc->sc_txcont_rate != new_rate) {
/* NOTE: This value is sanity checked and dropped down to
* closest rate in txcont_on. */
-@@ -12533,7 +12533,7 @@ ath_set_txcont_rate(struct ieee80211com
+@@ -12536,7 +12536,7 @@ ath_set_txcont_rate(struct ieee80211com
ath_get_txcont_rate(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
return sc->sc_txcont_rate ? sc->sc_txcont_rate : 0;
}
-@@ -12543,7 +12543,7 @@ static void
+@@ -12546,7 +12546,7 @@ static void
ath_set_dfs_cac_time(struct ieee80211com *ic, unsigned int time_s)
{
struct net_device *dev = ic->ic_dev;
sc->sc_dfs_cac_period = time_s;
}
-@@ -12553,7 +12553,7 @@ static unsigned int
+@@ -12556,7 +12556,7 @@ static unsigned int
ath_get_dfs_cac_time(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
return sc->sc_dfs_cac_period;
}
-@@ -12573,7 +12573,7 @@ static void
+@@ -12576,7 +12576,7 @@ static void
ath_set_dfs_excl_period(struct ieee80211com *ic, unsigned int time_s)
{
struct net_device *dev = ic->ic_dev;
sc->sc_dfs_excl_period = time_s;
}
-@@ -12582,7 +12582,7 @@ static unsigned int
+@@ -12585,7 +12585,7 @@ static unsigned int
ath_get_dfs_excl_period(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
return sc->sc_dfs_excl_period;
}
-@@ -12594,7 +12594,7 @@ static unsigned int
+@@ -12597,7 +12597,7 @@ static unsigned int
ath_test_radar(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
if ((ic->ic_flags & IEEE80211_F_DOTH) && (sc->sc_curchan.privFlags & CHANNEL_DFS))
ath_radar_detected(sc, "ath_test_radar from user space");
else
-@@ -12610,7 +12610,7 @@ static unsigned int
+@@ -12613,7 +12613,7 @@ static unsigned int
ath_dump_hal_map(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
ath_hal_dump_map(sc->sc_ah);
return 0;
}
-@@ -12718,7 +12718,7 @@ ath_rcv_dev_event(struct notifier_block
+@@ -12721,7 +12721,7 @@ ath_rcv_dev_event(struct notifier_block
void *ptr)
{
struct net_device *dev = (struct net_device *)ptr;
if (!dev || !sc || dev->open != &ath_init)
return 0;
-@@ -13453,7 +13453,7 @@ static unsigned int
+@@ -13456,7 +13456,7 @@ static unsigned int
ath_read_register(struct ieee80211com *ic, unsigned int address,
unsigned int* value)
{
if (address >= MAX_REGISTER_ADDRESS) {
IPRINTF(sc, "Illegal Atheros register access "
"attempted: 0x%04x >= 0x%04x\n",
-@@ -13483,7 +13483,7 @@ static unsigned int
+@@ -13486,7 +13486,7 @@ static unsigned int
ath_write_register(struct ieee80211com *ic, unsigned int address,
unsigned int value)
{
if (address >= MAX_REGISTER_ADDRESS) {
IPRINTF(sc, "Illegal Atheros register access "
"attempted: 0x%04x >= 0x%04x\n",
-@@ -13511,7 +13511,7 @@ static void
+@@ -13514,7 +13514,7 @@ static void
ath_registers_dump(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
ath_ar5212_registers_dump(sc);
}
#endif /* #ifdef ATH_REVERSE_ENGINEERING */
-@@ -13523,7 +13523,7 @@ static void
+@@ -13526,7 +13526,7 @@ static void
ath_registers_mark(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
ath_ar5212_registers_mark(sc);
}
#endif /* #ifdef ATH_REVERSE_ENGINEERING */
-@@ -13535,7 +13535,7 @@ static void
+@@ -13538,7 +13538,7 @@ static void
ath_registers_dump_delta(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
#endif /* #ifdef ATH_REVERSE_ENGINEERING */
--- a/ath/if_ath_pci.c
+++ b/ath/if_ath_pci.c
-@@ -199,7 +199,7 @@ ath_pci_probe(struct pci_dev *pdev, cons
+@@ -226,7 +226,7 @@ ath_pci_probe(struct pci_dev *pdev, cons
printk(KERN_ERR "%s: no memory for device state\n", dev_info);
goto bad2;
}
sc->aps_sc.sc_dev = dev;
sc->aps_sc.sc_iobase = mem;
-@@ -278,7 +278,7 @@ static void
+@@ -309,7 +309,7 @@ static void
ath_pci_remove(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
ath_detach(dev);
if (dev->irq)
-@@ -296,7 +296,7 @@ ath_pci_suspend(struct pci_dev *pdev, pm
+@@ -327,7 +327,7 @@ ath_pci_suspend(struct pci_dev *pdev, pm
struct net_device *dev = pci_get_drvdata(pdev);
ath_suspend(dev);
pci_disable_device(pdev);
return pci_set_power_state(pdev, PCI_D3hot);
}
-@@ -313,7 +313,7 @@ ath_pci_resume(struct pci_dev *pdev)
+@@ -344,7 +344,7 @@ ath_pci_resume(struct pci_dev *pdev)
return err;
/* XXX - Should this return nonzero on fail? */