madwifi: add better hw detection, use a power offset for setting/getting tx power...
authorFelix Fietkau <nbd@openwrt.org>
Sun, 31 May 2009 02:25:32 +0000 (02:25 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 31 May 2009 02:25:32 +0000 (02:25 +0000)
SVN-Revision: 16224

28 files changed:
package/madwifi/patches/384-hwdetect.patch
package/madwifi/patches/385-antenna_fix.patch
package/madwifi/patches/389-autochannel.patch
package/madwifi/patches/393-mbss_vap_auth.patch
package/madwifi/patches/395-ath_ff_unmap.patch
package/madwifi/patches/396-napi_ff_fix.patch
package/madwifi/patches/400-new_hal.patch
package/madwifi/patches/406-monitor_r3711.patch
package/madwifi/patches/408-changeset_r3337.patch
package/madwifi/patches/410-ar231x_2.6.28.patch
package/madwifi/patches/412-fragmentation_fix.patch
package/madwifi/patches/413-rxorn.patch
package/madwifi/patches/414-txpower.patch
package/madwifi/patches/416-wprobe.patch
package/madwifi/patches/417-beacon_txpower.patch
package/madwifi/patches/419-skb_unmap_crash.patch
package/madwifi/patches/420-diversity_fix.patch
package/madwifi/patches/421-channel_handling.patch
package/madwifi/patches/423-phyerr_handling.patch
package/madwifi/patches/424-timing.patch
package/madwifi/patches/425-rc_rexmit.patch
package/madwifi/patches/430-use_netdev_priv.patch
package/madwifi/patches/431-compile_fixes.patch
package/madwifi/patches/432-backport_oops.patch
package/madwifi/patches/434-name-alloc-fix.patch
package/madwifi/patches/436-injection_checks.patch
package/madwifi/patches/437-sysctl_cleanup.patch [new file with mode: 0644]
package/madwifi/patches/438-poweroffset_sysctl.patch [new file with mode: 0644]

index 397b69c2e1a6ef9ae71b34afc0969b22862921f8..b327e786c3de094e34d2bda9cb03a5e08d27a511 100644 (file)
@@ -33,7 +33,7 @@
        /* Allocate space for dynamically determined maximum VAP count */
        sc->sc_bslot = 
                kmalloc(ath_maxvaps * sizeof(struct ieee80211vap*), GFP_KERNEL);
        /* Allocate space for dynamically determined maximum VAP count */
        sc->sc_bslot = 
                kmalloc(ath_maxvaps * sizeof(struct ieee80211vap*), GFP_KERNEL);
-@@ -1508,6 +1520,28 @@ ath_vap_create(struct ieee80211com *ic, 
+@@ -1508,6 +1520,29 @@ ath_vap_create(struct ieee80211com *ic, 
        return vap;
  }
  
        return vap;
  }
  
@@ -55,6 +55,7 @@
 +                      continue;
 +
 +              sc->sc_hwinfo = c;
 +                      continue;
 +
 +              sc->sc_hwinfo = c;
++              sc->sc_poweroffset = c->poweroffset;
 +              break;
 +      }
 +}
 +              break;
 +      }
 +}
  static void
  ath_vap_delete(struct ieee80211vap *vap)
  {
  static void
  ath_vap_delete(struct ieee80211vap *vap)
  {
-@@ -10821,6 +10855,12 @@ ath_ioctl(struct net_device *dev, struct
+@@ -10225,6 +10260,7 @@ static u_int32_t
+ ath_set_clamped_maxtxpower(struct ath_softc *sc, 
+               u_int32_t new_clamped_maxtxpower)
+ {
++      new_clamped_maxtxpower -= sc->sc_poweroffset;
+       (void)ath_hal_settxpowlimit(sc->sc_ah, new_clamped_maxtxpower);
+       return ath_get_clamped_maxtxpower(sc);
+ }
+@@ -10238,6 +10274,7 @@ ath_get_clamped_maxtxpower(struct ath_so
+ {
+       u_int32_t clamped_maxtxpower;
+       (void)ath_hal_getmaxtxpow(sc->sc_ah, &clamped_maxtxpower);
++      clamped_maxtxpower += sc->sc_poweroffset;
+       return clamped_maxtxpower;
+ }
+@@ -10821,6 +10858,12 @@ ath_ioctl(struct net_device *dev, struct
   * is to add module parameters.
   */
  
   * is to add module parameters.
   */
  
@@ -75,7 +92,7 @@
  /*
   * Dynamic (i.e. per-device) sysctls.  These are automatically
   * mirrored in /proc/sys.
  /*
   * Dynamic (i.e. per-device) sysctls.  These are automatically
   * mirrored in /proc/sys.
-@@ -10900,6 +10940,38 @@ ath_sysctl_get_intmit(struct ath_softc *
+@@ -10900,6 +10943,38 @@ ath_sysctl_get_intmit(struct ath_softc *
  }
  
  static int
  }
  
  static int
  ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos)
  {
        struct ath_softc *sc = ctl->extra1;
  ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos)
  {
        struct ath_softc *sc = ctl->extra1;
-@@ -11179,6 +11251,24 @@ static int maxint = 0x7fffffff;               /* 32-b
+@@ -11179,6 +11254,24 @@ static int maxint = 0x7fffffff;               /* 32-b
  
  static const ctl_table ath_sysctl_template[] = {
        { .ctl_name     = CTL_AUTO,
  
  static const ctl_table ath_sysctl_template[] = {
        { .ctl_name     = CTL_AUTO,
  
        unsigned int    sc_invalid:1;           /* being detached */
        unsigned int    sc_mrretry:1;           /* multi-rate retry support */
  
        unsigned int    sc_invalid:1;           /* being detached */
        unsigned int    sc_mrretry:1;           /* multi-rate retry support */
-@@ -929,4 +935,15 @@ int ar_device(int devid);
+@@ -683,6 +689,7 @@ struct ath_softc {
+       const HAL_RATE_TABLE *sc_quarter_rates; /* quarter rate table */
+       HAL_OPMODE sc_opmode;                   /* current hal operating mode */
+       enum ieee80211_phymode sc_curmode;      /* current phy mode */
++      u_int sc_poweroffset;                   /* hardware power offset */
+       u_int16_t sc_curtxpow;                  /* current tx power limit */
+       u_int16_t sc_curaid;                    /* current association id */
+       HAL_CHANNEL sc_curchan;                 /* current h/w channel */
+@@ -929,4 +936,16 @@ int ar_device(int devid);
  
  void ath_radar_detected(struct ath_softc *sc, const char* message);
  
  
  void ath_radar_detected(struct ath_softc *sc, const char* message);
  
 +      u32 id;
 +      u32 subvendor;
 +      u32 subid;
 +      u32 id;
 +      u32 subvendor;
 +      u32 subid;
++      u32 poweroffset;
 +};
 +
 +extern void ath_hw_detect(struct ath_softc *sc, const struct ath_hw_detect *cards, int n_cards, u32 vendor, u32 id, u32 subvendor, u32 subid);
 +};
 +
 +extern void ath_hw_detect(struct ath_softc *sc, const struct ath_hw_detect *cards, int n_cards, u32 vendor, u32 id, u32 subvendor, u32 subid);
  
  #include <asm/io.h>
  #include <asm/uaccess.h>
  
  #include <asm/io.h>
  #include <asm/uaccess.h>
-@@ -181,12 +182,97 @@ exit_ath_wmac(u_int16_t wlanNum, struct 
+@@ -181,12 +182,32 @@ exit_ath_wmac(u_int16_t wlanNum, struct 
        return 0;
  }
  
 +static const char ubnt[] = "Ubiquiti Networks";
        return 0;
  }
  
 +static const char ubnt[] = "Ubiquiti Networks";
++/* { vendorname, cardname, vendorid, cardid, subsys vendorid, subsys id, poweroffset } */
 +static const struct ath_hw_detect cards[] = {
 +static const struct ath_hw_detect cards[] = {
-+      {
-+              .vendor_name = ubnt,
-+              .card_name = "PowerStation2 (18V)",
-+              .vendor = PCI_ANY_ID,
-+              .id = PCI_ANY_ID,
-+              .subvendor = PCI_ANY_ID,
-+              .subid = 0xb102,
-+      },
-+      {
-+              .vendor_name = ubnt,
-+              .card_name = "PowerStation2 (16D)",
-+              .vendor = PCI_ANY_ID,
-+              .id = PCI_ANY_ID,
-+              .subvendor = PCI_ANY_ID,
-+              .subid = 0xb202,
-+      },
-+      {
-+              .vendor_name = ubnt,
-+              .card_name = "PowerStation2 (EXT)",
-+              .vendor = PCI_ANY_ID,
-+              .id = PCI_ANY_ID,
-+              .subvendor = PCI_ANY_ID,
-+              .subid = 0xb302,
-+      },
-+      {
-+              .vendor_name = ubnt,
-+              .card_name = "PowerStation5 (22V)",
-+              .vendor = PCI_ANY_ID,
-+              .id = PCI_ANY_ID,
-+              .subvendor = PCI_ANY_ID,
-+              .subid = 0xb105,
-+      },
-+      {
-+              .vendor_name = ubnt,
-+              .card_name = "PowerStation5 (EXT)",
-+              .vendor = PCI_ANY_ID,
-+              .id = PCI_ANY_ID,
-+              .subvendor = PCI_ANY_ID,
-+              .subid = 0xb305,
-+      },
-+      {
-+              .vendor_name = ubnt,
-+              .card_name = "WispStation5",
-+              .vendor = PCI_ANY_ID,
-+              .id = PCI_ANY_ID,
-+              .subvendor = PCI_ANY_ID,
-+              .subid = 0xa105,
-+      },
-+      {
-+              .vendor_name = ubnt,
-+              .card_name = "LiteStation2",
-+              .vendor = PCI_ANY_ID,
-+              .id = PCI_ANY_ID,
-+              .subvendor = PCI_ANY_ID,
-+              .subid = 0xa002,
-+      },
-+      {
-+              .vendor_name = ubnt,
-+              .card_name = "LiteStation5",
-+              .vendor = PCI_ANY_ID,
-+              .id = PCI_ANY_ID,
-+              .subvendor = PCI_ANY_ID,
-+              .subid = 0xa005,
-+      },
-+      {
-+              .vendor_name = ubnt,
-+              .card_name = "NanoStation2",
-+              .vendor = PCI_ANY_ID,
-+              .id = PCI_ANY_ID,
-+              .subvendor = PCI_ANY_ID,
-+              .subid = 0xc002,
-+      },
-+      {
-+              .vendor_name = ubnt,
-+              .card_name = "NanoStation5",
-+              .vendor = PCI_ANY_ID,
-+              .id = PCI_ANY_ID,
-+              .subvendor = PCI_ANY_ID,
-+              .subid = 0xc005,
-+      },
++      { ubnt, "PowerStation2 (18V)", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xb102 },
++      { ubnt, "PowerStation2 (16D)", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xb202 },
++      { ubnt, "PowerStation2 (EXT)", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xb302 },
++      { ubnt, "PowerStation5 (22V)", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xb105 },
++      { ubnt, "PowerStation5 (EXT)", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xb305 },
++      { ubnt, "WispStation5",        PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xa105 },
++      { ubnt, "LiteStation2",        PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xa002 },
++      { ubnt, "LiteStation5",        PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xa005 },
++      { ubnt, "NanoStation2",        PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc002 },
++      { ubnt, "NanoStation5",        PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc005 },
++      { ubnt, "NanoStation Loco2",   PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc102 },
++      { ubnt, "NanoStation Loco5",   PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc105 },
++      { ubnt, "Bullet2",             PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc202 },
++      { ubnt, "Bullet5",             PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc205 },
 +};
 +
  static int
 +};
 +
  static int
  
        if (((wlanNum != 0) && (wlanNum != 1)) ||
                (sclist[wlanNum] != NULL))
  
        if (((wlanNum != 0) && (wlanNum != 1)) ||
                (sclist[wlanNum] != NULL))
-@@ -248,6 +334,16 @@ init_ath_wmac(u_int16_t devid, u_int16_t
+@@ -248,6 +269,16 @@ init_ath_wmac(u_int16_t devid, u_int16_t
        sc->aps_sc.sc_softled = 1; /* SoftLED over GPIO */
        sc->aps_sc.sc_ledpin = config->board->sysLedGpio;
        sc->aps_sc.sc_invalid = 0;
        sc->aps_sc.sc_softled = 1; /* SoftLED over GPIO */
        sc->aps_sc.sc_ledpin = config->board->sysLedGpio;
        sc->aps_sc.sc_invalid = 0;
        return 0;
  
   bad4:
        return 0;
  
   bad4:
+--- a/ath/if_ath_pci.c
++++ b/ath/if_ath_pci.c
+@@ -123,6 +123,33 @@ static u16 ath_devidmap[][2] = {
+       { 0xff1a, 0x001a }
+ };
++static const char ubnt[] = "Ubiquiti Networks";
++/* { vendorname, cardname, vendorid, cardid, subsys vendorid, subsys id, poweroffset } */
++static const struct ath_hw_detect cards[] = {
++      { ubnt, "XR2",     0x168c, 0x001b, 0x0777, 0x3002, 10 },
++      { ubnt, "XR2",     0x168c, 0x001b, 0x7777, 0x3002, 10 },
++      { ubnt, "XR2.3",   0x168c, 0x001b, 0x0777, 0x3b02, 10 },
++      { ubnt, "XR2.6",   0x168c, 0x001b, 0x0777, 0x3c02, 10 },
++      { ubnt, "XR3-2.8", 0x168c, 0x001b, 0x0777, 0x3b03, 10 },
++      { ubnt, "XR3-3.6", 0x168c, 0x001b, 0x0777, 0x3c03, 10 },
++      { ubnt, "XR3",     0x168c, 0x001b, 0x0777, 0x3003, 10 },
++      { ubnt, "XR4",     0x168c, 0x001b, 0x0777, 0x3004, 10 },
++      { ubnt, "XR5",     0x168c, 0x001b, 0x0777, 0x3005, 10 },
++      { ubnt, "XR5",     0x168c, 0x001b, 0x7777, 0x3005, 10 },
++      { ubnt, "XR7",     0x168c, 0x001b, 0x0777, 0x3007, 10 },
++      { ubnt, "XR9",     0x168c, 0x001b, 0x0777, 0x3009, 10 },
++      { ubnt, "SRC",     0x168c, 0x0013, 0x168c, 0x1042, 1 },
++      { ubnt, "SR2",     0x168c, 0x0013, 0x0777, 0x2041, 10 },
++      { ubnt, "SR4",     0x168c, 0x0013, 0x0777, 0x2004, 6 },
++      { ubnt, "SR4",     0x168c, 0x0013, 0x7777, 0x2004, 6 },
++      { ubnt, "SR4C",    0x168c, 0x0013, 0x0777, 0x1004, 6 },
++      { ubnt, "SR4C",    0x168c, 0x0013, 0x7777, 0x1004, 6 },
++      { ubnt, "SR5",     0x168c, 0x0013, 0x168c, 0x2042, 7 },
++      { ubnt, "SR9",     0x168c, 0x0013, 0x7777, 0x2009, 12 },
++      { ubnt, "SR71A",   0x168c, 0x0027, 0x168c, 0x2082, 10 },
++      { ubnt, "SR71",    0x168c, 0x0027, 0x0777, 0x4082, 10 },
++};
++
+ static int
+ ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+ {
+@@ -257,6 +284,10 @@ ath_pci_probe(struct pci_dev *pdev, cons
+       printk(KERN_INFO "%s: %s: %s: mem=0x%lx, irq=%d\n",
+               dev_info, dev->name, athname ? athname : "Atheros ???", phymem, dev->irq);
++      ath_hw_detect(&sc->aps_sc, cards, ARRAY_SIZE(cards),
++              pdev->vendor, pdev->device,
++              pdev->subsystem_vendor, pdev->subsystem_device);
++
+       /* ready to process interrupts */
+       sc->aps_sc.sc_invalid = 0;
index 9e34304402e20c9856edc17cc09329945963f438..e3899643be6dbf7b60654e6ad59045942a30b169 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -6668,6 +6668,7 @@ ath_setdefantenna(struct ath_softc *sc, 
+@@ -6669,6 +6669,7 @@ ath_setdefantenna(struct ath_softc *sc, 
        struct ath_hal *ah = sc->sc_ah;
  
        /* XXX block beacon interrupts */
        struct ath_hal *ah = sc->sc_ah;
  
        /* XXX block beacon interrupts */
index c818b89ef9f3f22fe547aab96a2222799a581e43..06c5c12a7d9a72988c794a20f8d02b4ce9987c6a 100644 (file)
@@ -8,7 +8,7 @@
  
  /* calibrate every 30 secs in steady state but check every second at first. */
  static int ath_calinterval = ATH_SHORT_CALINTERVAL;
  
  /* calibrate every 30 secs in steady state but check every second at first. */
  static int ath_calinterval = ATH_SHORT_CALINTERVAL;
-@@ -2580,6 +2581,7 @@ ath_init(struct net_device *dev)
+@@ -2581,6 +2582,7 @@ ath_init(struct net_device *dev)
         * be followed by initialization of the appropriate bits
         * and then setup of the interrupt mask.
         */
         * be followed by initialization of the appropriate bits
         * and then setup of the interrupt mask.
         */
@@ -16,7 +16,7 @@
        sc->sc_curchan.channel = ic->ic_curchan->ic_freq;
        sc->sc_curchan.channelFlags = ath_chan2flags(ic->ic_curchan);
        if (!ath_hal_reset(ah, sc->sc_opmode, &sc->sc_curchan, AH_FALSE, &status)) {
        sc->sc_curchan.channel = ic->ic_curchan->ic_freq;
        sc->sc_curchan.channelFlags = ath_chan2flags(ic->ic_curchan);
        if (!ath_hal_reset(ah, sc->sc_opmode, &sc->sc_curchan, AH_FALSE, &status)) {
-@@ -2913,6 +2915,48 @@ ath_hw_check_atim(struct ath_softc *sc, 
+@@ -2914,6 +2916,48 @@ ath_hw_check_atim(struct ath_softc *sc, 
        return 0;
  }
  
        return 0;
  }
  
@@ -65,7 +65,7 @@
  
  /*
   * Reset the hardware w/o losing operational state.  This is
  
  /*
   * Reset the hardware w/o losing operational state.  This is
-@@ -2940,6 +2984,7 @@ ath_reset(struct net_device *dev)
+@@ -2941,6 +2985,7 @@ ath_reset(struct net_device *dev)
         * Convert to a HAL channel description with the flags
         * constrained to reflect the current operating mode.
         */
         * Convert to a HAL channel description with the flags
         * constrained to reflect the current operating mode.
         */
@@ -73,7 +73,7 @@
        c = ic->ic_curchan;
        sc->sc_curchan.channel = c->ic_freq;
        sc->sc_curchan.channelFlags = ath_chan2flags(c);
        c = ic->ic_curchan;
        sc->sc_curchan.channel = c->ic_freq;
        sc->sc_curchan.channelFlags = ath_chan2flags(c);
-@@ -9022,6 +9067,7 @@ ath_chan_set(struct ath_softc *sc, struc
+@@ -9023,6 +9068,7 @@ ath_chan_set(struct ath_softc *sc, struc
        u_int8_t channel_change_required = 0;
        struct timeval tv;
  
        u_int8_t channel_change_required = 0;
        struct timeval tv;
  
@@ -81,7 +81,7 @@
        /*
         * Convert to a HAL channel description with
         * the flags constrained to reflect the current
        /*
         * Convert to a HAL channel description with
         * the flags constrained to reflect the current
-@@ -9030,6 +9076,14 @@ ath_chan_set(struct ath_softc *sc, struc
+@@ -9031,6 +9077,14 @@ ath_chan_set(struct ath_softc *sc, struc
        memset(&hchan, 0, sizeof(HAL_CHANNEL));
        hchan.channel = chan->ic_freq;
        hchan.channelFlags = ath_chan2flags(chan);
        memset(&hchan, 0, sizeof(HAL_CHANNEL));
        hchan.channel = chan->ic_freq;
        hchan.channelFlags = ath_chan2flags(chan);
@@ -98,7 +98,7 @@
        do_gettimeofday(&tv);
 --- a/ath/if_athvar.h
 +++ b/ath/if_athvar.h
        do_gettimeofday(&tv);
 --- a/ath/if_athvar.h
 +++ b/ath/if_athvar.h
-@@ -773,6 +773,7 @@ struct ath_softc {
+@@ -774,6 +774,7 @@ struct ath_softc {
        struct ieee80211vap **sc_bslot;         /* beacon xmit slots */
        int sc_bnext;                           /* next slot for beacon xmit */
  
        struct ieee80211vap **sc_bslot;         /* beacon xmit slots */
        int sc_bnext;                           /* next slot for beacon xmit */
  
index e1c9cae0d0be2fa5bdde54b9bed19191a7e19531..e4c50f9d82933228b9903cb96a26bc313fe03a6b 100644 (file)
  
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
  
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -6588,9 +6588,8 @@ ath_recv_mgmt(struct ieee80211vap * vap,
+@@ -6589,9 +6589,8 @@ ath_recv_mgmt(struct ieee80211vap * vap,
  
        sc->sc_recv_mgmt(vap, ni_or_null, skb, subtype, rssi, rtsf);
  
  
        sc->sc_recv_mgmt(vap, ni_or_null, skb, subtype, rssi, rtsf);
  
                 (const struct ieee80211_frame_min *)skb->data);
        if (ni == NULL) {
                DPRINTF(sc, ATH_DEBUG_BEACON, "Dropping; node unknown.\n");
                 (const struct ieee80211_frame_min *)skb->data);
        if (ni == NULL) {
                DPRINTF(sc, ATH_DEBUG_BEACON, "Dropping; node unknown.\n");
-@@ -6745,7 +6744,9 @@ ath_rx_poll(struct net_device *dev, int 
+@@ -6746,7 +6745,9 @@ ath_rx_poll(struct net_device *dev, int 
        struct ath_desc *ds;
        struct ath_rx_status *rs;
        struct sk_buff *skb = NULL;
        struct ath_desc *ds;
        struct ath_rx_status *rs;
        struct sk_buff *skb = NULL;
        unsigned int len;
        int type;
        u_int phyerr;
        unsigned int len;
        int type;
        u_int phyerr;
-@@ -6900,12 +6901,15 @@ rx_accept:
+@@ -6901,12 +6902,15 @@ rx_accept:
                skb_trim(skb, skb->len - IEEE80211_CRC_LEN);
  
                if (mic_fail) {
                skb_trim(skb, skb->len - IEEE80211_CRC_LEN);
  
                if (mic_fail) {
  
                        if (ni && ni->ni_table) {
                                ieee80211_check_mic(ni, skb);
  
                        if (ni && ni->ni_table) {
                                ieee80211_check_mic(ni, skb);
-@@ -6967,11 +6971,24 @@ drop_micfail:
+@@ -6968,11 +6972,24 @@ drop_micfail:
                 * for its use.  If the sender is unknown spam the
                 * frame; it'll be dropped where it's not wanted.
                 */
                 * for its use.  If the sender is unknown spam the
                 * frame; it'll be dropped where it's not wanted.
                 */
                        ATH_RSSI_LPF(ATH_NODE(ni)->an_avgrssi, rs->rs_rssi);
                        type = ieee80211_input(ni->ni_vap, ni, skb, rs->rs_rssi, bf->bf_tsf);
                        ieee80211_unref_node(&ni);
                        ATH_RSSI_LPF(ATH_NODE(ni)->an_avgrssi, rs->rs_rssi);
                        type = ieee80211_input(ni->ni_vap, ni, skb, rs->rs_rssi, bf->bf_tsf);
                        ieee80211_unref_node(&ni);
-@@ -6980,24 +6997,35 @@ drop_micfail:
+@@ -6981,24 +6998,35 @@ drop_micfail:
                         * No key index or no entry, do a lookup and
                         * add the node to the mapping table if possible.
                         */
                         * No key index or no entry, do a lookup and
                         * add the node to the mapping table if possible.
                         */
index 6ba99caf31a7486d3f4ae1d3c438efe72f30fdce..4f88d039e8537cf9774b057b832000c283febf19 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -13527,7 +13527,7 @@ cleanup_ath_buf(struct ath_softc *sc, st
+@@ -13530,7 +13530,7 @@ cleanup_ath_buf(struct ath_softc *sc, st
                                bus_unmap_single(
                                        sc->sc_bdev,
                                        bf->bf_skbaddrff[i], 
                                bus_unmap_single(
                                        sc->sc_bdev,
                                        bf->bf_skbaddrff[i], 
index fbfd30e266141d66a055e783cdc4a7ba4aaf35ff..695a445f68deeddf3411ec65b91fcb6d6bdbb42e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -6733,10 +6733,10 @@ ath_rx_poll(struct net_device *dev, int 
+@@ -6734,10 +6734,10 @@ ath_rx_poll(struct net_device *dev, int 
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
        struct ath_softc *sc = container_of(napi, struct ath_softc, sc_napi);
        struct net_device *dev = sc->sc_dev;
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
        struct ath_softc *sc = container_of(napi, struct ath_softc, sc_napi);
        struct net_device *dev = sc->sc_dev;
@@ -13,7 +13,7 @@
  #endif
        struct ath_buf *bf;
        struct ieee80211com *ic = &sc->sc_ic;
  #endif
        struct ath_buf *bf;
        struct ieee80211com *ic = &sc->sc_ic;
-@@ -6779,13 +6779,15 @@ process_rx_again:
+@@ -6780,13 +6780,15 @@ process_rx_again:
                        break;
                }
  
                        break;
                }
  
@@ -33,7 +33,7 @@
  
                skb = bf->bf_skb;
                if (skb == NULL) {
  
                skb = bf->bf_skb;
                if (skb == NULL) {
-@@ -7069,8 +7071,8 @@ rx_next:
+@@ -7070,8 +7072,8 @@ rx_next:
                if (sc->sc_isr & HAL_INT_RX) {
                        u_int64_t hw_tsf = ath_hal_gettsf64(ah);
                        sc->sc_isr &= ~HAL_INT_RX;
                if (sc->sc_isr & HAL_INT_RX) {
                        u_int64_t hw_tsf = ath_hal_gettsf64(ah);
                        sc->sc_isr &= ~HAL_INT_RX;
index 7de829ae7d39e7099c7b4c2db00e843f0c94409b..d994c3a2f037a328f10b7fc5eeae102d6530aa0d 100644 (file)
@@ -15,7 +15,7 @@
        /*
         * Check if the MAC has multi-rate retry support.
         * We do this by trying to setup a fake extended
        /*
         * Check if the MAC has multi-rate retry support.
         * We do this by trying to setup a fake extended
-@@ -7563,7 +7571,7 @@ ath_txq_setup(struct ath_softc *sc, int 
+@@ -7564,7 +7572,7 @@ ath_txq_setup(struct ath_softc *sc, int 
        if (qtype == HAL_TX_QUEUE_UAPSD)
                qi.tqi_qflags = HAL_TXQ_TXDESCINT_ENABLE;
        else
        if (qtype == HAL_TX_QUEUE_UAPSD)
                qi.tqi_qflags = HAL_TXQ_TXDESCINT_ENABLE;
        else
index 13d1d5490495b2ac3212019c0ba91253a80b526d..4e2c6aefb7afe78cebe074bdfce57f08b27da1ca 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -6529,7 +6529,7 @@ ath_capture(struct net_device *dev, cons
+@@ -6530,7 +6530,7 @@ ath_capture(struct net_device *dev, cons
  
        /* Never copy the SKB, as it is ours on the RX side, and this is the 
         * last process on the TX side and we only modify our own headers. */
  
        /* Never copy the SKB, as it is ours on the RX side, and this is the 
         * last process on the TX side and we only modify our own headers. */
@@ -9,7 +9,7 @@
        if (tskb == NULL) {
                DPRINTF(sc, ATH_DEBUG_ANY,
                        "Dropping; ath_skb_removepad failed!\n");
        if (tskb == NULL) {
                DPRINTF(sc, ATH_DEBUG_ANY,
                        "Dropping; ath_skb_removepad failed!\n");
-@@ -6537,6 +6537,8 @@ ath_capture(struct net_device *dev, cons
+@@ -6538,6 +6538,8 @@ ath_capture(struct net_device *dev, cons
        }
        
        ieee80211_input_monitor(ic, tskb, bf, tx, tsf, sc);
        }
        
        ieee80211_input_monitor(ic, tskb, bf, tx, tsf, sc);
index 78f89d273a44d9d23105aa6dcce8bf42c07c1df6..c78daf4c69daf31be4260f1c0b4f6a2f077e8b22 100644 (file)
@@ -10,7 +10,7 @@
  Please let us know if you think your name should be mentioned here!
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
  Please let us know if you think your name should be mentioned here!
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -3146,7 +3146,7 @@ ath_tx_startraw(struct net_device *dev, 
+@@ -3147,7 +3147,7 @@ ath_tx_startraw(struct net_device *dev, 
        struct ath_softc *sc = dev->priv;
        struct ath_hal *ah = sc->sc_ah;
        struct ieee80211_phy_params *ph = (struct ieee80211_phy_params *)
        struct ath_softc *sc = dev->priv;
        struct ath_hal *ah = sc->sc_ah;
        struct ieee80211_phy_params *ph = (struct ieee80211_phy_params *)
index 87177c3986e7d9951e2ab6ae3ac0cca11fa53d3a..30d1c56a4c74e18cef86ee1ffc8225765c25577d 100644 (file)
 -}
 -
  static const char ubnt[] = "Ubiquiti Networks";
 -}
 -
  static const char ubnt[] = "Ubiquiti Networks";
+ /* { vendorname, cardname, vendorid, cardid, subsys vendorid, subsys id, poweroffset } */
  static const struct ath_hw_detect cards[] = {
  static const struct ath_hw_detect cards[] = {
-       {
-@@ -266,6 +238,114 @@ static const struct ath_hw_detect cards[
-       },
+@@ -201,6 +173,114 @@ static const struct ath_hw_detect cards[
+       { ubnt, "Bullet5",             PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc205 },
  };
  
 +static void
  };
  
 +static void
  static int
  init_ath_wmac(u_int16_t devid, u_int16_t wlanNum, struct ar531x_config *config)
  {
  static int
  init_ath_wmac(u_int16_t devid, u_int16_t wlanNum, struct ar531x_config *config)
  {
-@@ -318,7 +398,7 @@ init_ath_wmac(u_int16_t devid, u_int16_t
+@@ -253,7 +333,7 @@ init_ath_wmac(u_int16_t devid, u_int16_t
        sc->aps_sc.sc_iobase = (void __iomem *) dev->mem_start;
        sc->aps_sc.sc_bdev = NULL;
  
        sc->aps_sc.sc_iobase = (void __iomem *) dev->mem_start;
        sc->aps_sc.sc_bdev = NULL;
  
                printk(KERN_WARNING "%s: %s: request_irq failed\n", dev_info, dev->name);
                goto bad3;
        }
                printk(KERN_WARNING "%s: %s: request_irq failed\n", dev_info, dev->name);
                goto bad3;
        }
-@@ -328,21 +408,12 @@ init_ath_wmac(u_int16_t devid, u_int16_t
+@@ -263,21 +343,12 @@ init_ath_wmac(u_int16_t devid, u_int16_t
        athname = ath_hal_probe(ATHEROS_VENDOR_ID, devid);
        printk(KERN_INFO "%s: %s: %s: mem=0x%lx, irq=%d\n",
                dev_info, dev->name, athname ? athname : "Atheros ???", dev->mem_start, dev->irq);
        athname = ath_hal_probe(ATHEROS_VENDOR_ID, devid);
        printk(KERN_INFO "%s: %s: %s: mem=0x%lx, irq=%d\n",
                dev_info, dev->name, athname ? athname : "Atheros ???", dev->mem_start, dev->irq);
  
        return 0;
  
  
        return 0;
  
-@@ -357,6 +428,29 @@ init_ath_wmac(u_int16_t devid, u_int16_t
+@@ -292,6 +363,29 @@ init_ath_wmac(u_int16_t devid, u_int16_t
        return -ENODEV;
  }
  
        return -ENODEV;
  }
  
  static int ahb_wmac_probe(struct platform_device *pdev)
  {
        u_int16_t devid;
  static int ahb_wmac_probe(struct platform_device *pdev)
  {
        u_int16_t devid;
-@@ -377,11 +471,18 @@ static int ahb_wmac_remove(struct platfo
+@@ -312,11 +406,18 @@ static int ahb_wmac_remove(struct platfo
        return 0;
  }
  
        return 0;
  }
  
index dbe9f8e4f6413efa796080180b57c273fafaae20..92c411b2bf46ab63622fdc3c1861a69eeef27299 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -3683,6 +3683,7 @@ ff_bypass:
+@@ -3684,6 +3684,7 @@ ff_bypass:
                 *  already alloc'd
                 */
                ATH_TXBUF_LOCK_IRQ(sc);
                 *  already alloc'd
                 */
                ATH_TXBUF_LOCK_IRQ(sc);
index b4174716d7974505aaac13aa6775f7fcda4cf308..0e8d885da6cac6c417bd8bd48abf13a9177a406b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -2307,6 +2307,17 @@ ath_intr(int irq, void *dev_id, struct p
+@@ -2308,6 +2308,17 @@ ath_intr(int irq, void *dev_id, struct p
  
        sc->sc_isr = status;
        status &= sc->sc_imask;                 /* discard unasked for bits */
  
        sc->sc_isr = status;
        status &= sc->sc_imask;                 /* discard unasked for bits */
@@ -18,7 +18,7 @@
        /* As soon as we know we have a real interrupt we intend to service, 
         * we will check to see if we need an initial hardware TSF reading. 
         * Normally we would just populate this all the time to keep things
        /* As soon as we know we have a real interrupt we intend to service, 
         * we will check to see if we need an initial hardware TSF reading. 
         * Normally we would just populate this all the time to keep things
-@@ -2319,10 +2330,6 @@ ath_intr(int irq, void *dev_id, struct p
+@@ -2320,10 +2331,6 @@ ath_intr(int irq, void *dev_id, struct p
                sc->sc_stats.ast_hardware++;
                ath_hal_intrset(ah, 0);         /* disable intr's until reset */
                ATH_SCHEDULE_TQUEUE(&sc->sc_fataltq, &needmark);
                sc->sc_stats.ast_hardware++;
                ath_hal_intrset(ah, 0);         /* disable intr's until reset */
                ATH_SCHEDULE_TQUEUE(&sc->sc_fataltq, &needmark);
index 68e7942d48e37b06b63b1b0e9cfd30aebe985b2b..662afe7d93c971850c5a975e198ce82927309a3d 100644 (file)
  
  static void ath_poll_disable(struct net_device *dev);
  static void ath_poll_enable(struct net_device *dev);
  
  static void ath_poll_disable(struct net_device *dev);
  static void ath_poll_enable(struct net_device *dev);
-@@ -3167,7 +3166,7 @@ ath_tx_startraw(struct net_device *dev, 
+@@ -3168,7 +3167,7 @@ ath_tx_startraw(struct net_device *dev, 
        try0 = ph->try0;
        rt = sc->sc_currates;
        txrate = dot11_to_ratecode(sc, rt, ph->rate0);
        try0 = ph->try0;
        rt = sc->sc_currates;
        txrate = dot11_to_ratecode(sc, rt, ph->rate0);
        hdrlen = ieee80211_anyhdrsize(wh);
        pktlen = skb->len + IEEE80211_CRC_LEN;
  
        hdrlen = ieee80211_anyhdrsize(wh);
        pktlen = skb->len + IEEE80211_CRC_LEN;
  
-@@ -8389,7 +8388,7 @@ ath_tx_start(struct net_device *dev, str
+@@ -8390,7 +8389,7 @@ ath_tx_start(struct net_device *dev, str
                            pktlen,                     /* packet length */
                            hdrlen,                     /* header length */
                            atype,                      /* Atheros packet type */
                            pktlen,                     /* packet length */
                            hdrlen,                     /* header length */
                            atype,                      /* Atheros packet type */
                            txrate, try0,               /* series 0 rate/tries */
                            keyix,                      /* key cache index */
                            antenna,                    /* antenna mode */
                            txrate, try0,               /* series 0 rate/tries */
                            keyix,                      /* key cache index */
                            antenna,                    /* antenna mode */
-@@ -10380,59 +10379,16 @@ ath_get_clamped_maxtxpower(struct ath_so
+@@ -10383,59 +10382,16 @@ ath_get_clamped_maxtxpower(struct ath_so
  
  /* XXX: this function needs some locking to avoid being called 
   * twice/interrupted */
  
  /* XXX: this function needs some locking to avoid being called 
   * twice/interrupted */
index 0eb5f8928df32d61139eda42f5e935226b0fdcb9..aa0c638c24611805b84f07f3a29d49f9a20ba619 100644 (file)
        return vap;
  }
  
        return vap;
  }
  
-@@ -1605,6 +1607,7 @@ ath_vap_delete(struct ieee80211vap *vap)
+@@ -1606,6 +1608,7 @@ ath_vap_delete(struct ieee80211vap *vap)
                decrease = 0;
  
        ieee80211_vap_detach(vap);
                decrease = 0;
  
        ieee80211_vap_detach(vap);
        /* NB: memory is reclaimed through dev->destructor callback */
        if (decrease)
                sc->sc_nvaps--;
        /* NB: memory is reclaimed through dev->destructor callback */
        if (decrease)
                sc->sc_nvaps--;
-@@ -5939,6 +5942,7 @@ ath_node_cleanup(struct ieee80211_node *
+@@ -5940,6 +5943,7 @@ ath_node_cleanup(struct ieee80211_node *
        /* Clean up node-specific rate things - this currently appears to 
         * always be a no-op */
        sc->sc_rc->ops->node_cleanup(sc, ATH_NODE(ni));
        /* Clean up node-specific rate things - this currently appears to 
         * always be a no-op */
        sc->sc_rc->ops->node_cleanup(sc, ATH_NODE(ni));
  
        ATH_NODE_UAPSD_LOCK_IRQ(an);
  #ifdef IEEE80211_DEBUG_REFCNT
  
        ATH_NODE_UAPSD_LOCK_IRQ(an);
  #ifdef IEEE80211_DEBUG_REFCNT
-@@ -7009,6 +7013,8 @@ drop_micfail:
+@@ -7010,6 +7014,8 @@ drop_micfail:
                                goto lookup_slowpath;
                        }
                        ATH_RSSI_LPF(ATH_NODE(ni)->an_avgrssi, rs->rs_rssi);
                                goto lookup_slowpath;
                        }
                        ATH_RSSI_LPF(ATH_NODE(ni)->an_avgrssi, rs->rs_rssi);
                        type = ieee80211_input(ni->ni_vap, ni, skb, rs->rs_rssi, bf->bf_tsf);
                        ieee80211_unref_node(&ni);
                } else {
                        type = ieee80211_input(ni->ni_vap, ni, skb, rs->rs_rssi, bf->bf_tsf);
                        ieee80211_unref_node(&ni);
                } else {
-@@ -7019,15 +7025,22 @@ drop_micfail:
+@@ -7020,15 +7026,22 @@ drop_micfail:
  
  lookup_slowpath:
                        vap = ieee80211_find_rxvap(ic, wh->i_addr1);
  
  lookup_slowpath:
                        vap = ieee80211_find_rxvap(ic, wh->i_addr1);
                                type = ieee80211_input(vap, ni, skb, rs->rs_rssi, bf->bf_tsf);
                                /*
                                 * If the station has a key cache slot assigned
                                type = ieee80211_input(vap, ni, skb, rs->rs_rssi, bf->bf_tsf);
                                /*
                                 * If the station has a key cache slot assigned
-@@ -8607,6 +8620,7 @@ ath_tx_processq(struct ath_softc *sc, st
+@@ -8608,6 +8621,7 @@ ath_tx_processq(struct ath_softc *sc, st
                                sc->sc_stats.ast_tx_rssi = ts->ts_rssi;
                                ATH_RSSI_LPF(an->an_halstats.ns_avgtxrssi,
                                        ts->ts_rssi);
                                sc->sc_stats.ast_tx_rssi = ts->ts_rssi;
                                ATH_RSSI_LPF(an->an_halstats.ns_avgtxrssi,
                                        ts->ts_rssi);
                                if (bf->bf_skb->priority == WME_AC_VO ||
                                    bf->bf_skb->priority == WME_AC_VI)
                                        ni->ni_ic->ic_wme.wme_hipri_traffic++;
                                if (bf->bf_skb->priority == WME_AC_VO ||
                                    bf->bf_skb->priority == WME_AC_VI)
                                        ni->ni_ic->ic_wme.wme_hipri_traffic++;
-@@ -10106,6 +10120,7 @@ ath_newassoc(struct ieee80211_node *ni, 
+@@ -10107,6 +10121,7 @@ ath_newassoc(struct ieee80211_node *ni, 
        struct ath_softc *sc = ic->ic_dev->priv;
  
        sc->sc_rc->ops->newassoc(sc, ATH_NODE(ni), isnew);
        struct ath_softc *sc = ic->ic_dev->priv;
  
        sc->sc_rc->ops->newassoc(sc, ATH_NODE(ni), isnew);
index 80d810a7db434354a9a876581d17efff21ce7921..5a336f8e527cdb8ba8b9d5c5a8192560e2422943 100644 (file)
@@ -9,7 +9,7 @@
  static int countrycode = -1;
  static int maxvaps = -1;
  static int outdoor = -1;
  static int countrycode = -1;
  static int maxvaps = -1;
  static int outdoor = -1;
-@@ -4931,6 +4931,7 @@ ath_beacon_setup(struct ath_softc *sc, s
+@@ -4932,6 +4932,7 @@ ath_beacon_setup(struct ath_softc *sc, s
        (((_ic)->ic_flags & (IEEE80211_F_SHPREAMBLE | IEEE80211_F_USEBARKER))\
                == IEEE80211_F_SHPREAMBLE)
        struct ieee80211com *ic = bf->bf_node->ni_ic;
        (((_ic)->ic_flags & (IEEE80211_F_SHPREAMBLE | IEEE80211_F_USEBARKER))\
                == IEEE80211_F_SHPREAMBLE)
        struct ieee80211com *ic = bf->bf_node->ni_ic;
@@ -17,7 +17,7 @@
        struct sk_buff *skb = bf->bf_skb;
        struct ath_hal *ah = sc->sc_ah;
        struct ath_desc *ds;
        struct sk_buff *skb = bf->bf_skb;
        struct ath_hal *ah = sc->sc_ah;
        struct ath_desc *ds;
-@@ -4998,7 +4999,7 @@ ath_beacon_setup(struct ath_softc *sc, s
+@@ -4999,7 +5000,7 @@ ath_beacon_setup(struct ath_softc *sc, s
                skb->len + IEEE80211_CRC_LEN,   /* frame length */
                sizeof(struct ieee80211_frame), /* header length */
                HAL_PKT_TYPE_BEACON,            /* Atheros packet type */
                skb->len + IEEE80211_CRC_LEN,   /* frame length */
                sizeof(struct ieee80211_frame), /* header length */
                HAL_PKT_TYPE_BEACON,            /* Atheros packet type */
index 90c67edf58fc3a7e602fee4ac62f3d0d1bf44d96..54fd544d74ce4891790854050f4d1286f9e6cee5 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -13493,7 +13493,7 @@ cleanup_ath_buf(struct ath_softc *sc, st
+@@ -13496,7 +13496,7 @@ cleanup_ath_buf(struct ath_softc *sc, st
        if (bf == NULL) 
                return bf;
  
        if (bf == NULL) 
                return bf;
  
@@ -9,7 +9,7 @@
                bus_unmap_single(
                        sc->sc_bdev,
                        bf->bf_skbaddr, 
                bus_unmap_single(
                        sc->sc_bdev,
                        bf->bf_skbaddr, 
-@@ -13501,8 +13501,6 @@ cleanup_ath_buf(struct ath_softc *sc, st
+@@ -13504,8 +13504,6 @@ cleanup_ath_buf(struct ath_softc *sc, st
                                sc->sc_rxbufsize : bf->bf_skb->len),
                        direction);
                bf->bf_skbaddr = 0;
                                sc->sc_rxbufsize : bf->bf_skb->len),
                        direction);
                bf->bf_skbaddr = 0;
index bfb4f7620c42cd23afe8c29e88a3dd4652935a92..8ec805c15ca0a173a12e1dccc027642b93b0c80b 100644 (file)
@@ -8,7 +8,7 @@
        sc->sc_rc = ieee80211_rate_attach(sc, ratectl);
        if (sc->sc_rc == NULL) {
                error = EIO;
        sc->sc_rc = ieee80211_rate_attach(sc, ratectl);
        if (sc->sc_rc == NULL) {
                error = EIO;
-@@ -2623,9 +2622,6 @@ ath_init(struct net_device *dev)
+@@ -2624,9 +2623,6 @@ ath_init(struct net_device *dev)
        ath_radar_update(sc);
        ath_rp_flush(sc);
  
        ath_radar_update(sc);
        ath_rp_flush(sc);
  
@@ -18,7 +18,7 @@
        /*
         * Setup the hardware after reset: the key cache
         * is filled as needed and the receive engine is
        /*
         * Setup the hardware after reset: the key cache
         * is filled as needed and the receive engine is
-@@ -3018,7 +3014,6 @@ ath_reset(struct net_device *dev)
+@@ -3019,7 +3015,6 @@ ath_reset(struct net_device *dev)
        ath_setintmit(sc);
        ath_update_txpow(sc);           /* update tx power state */
        ath_radar_update(sc);
        ath_setintmit(sc);
        ath_update_txpow(sc);           /* update tx power state */
        ath_radar_update(sc);
@@ -26,7 +26,7 @@
        if (ath_startrecv(sc) != 0)     /* restart recv */
                EPRINTF(sc, "Unable to start receive logic.\n");
        if (sc->sc_softled)
        if (ath_startrecv(sc) != 0)     /* restart recv */
                EPRINTF(sc, "Unable to start receive logic.\n");
        if (sc->sc_softled)
-@@ -5352,27 +5347,6 @@ ath_beacon_send(struct ath_softc *sc, in
+@@ -5353,27 +5348,6 @@ ath_beacon_send(struct ath_softc *sc, in
        } else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot))
                ath_setslottime(sc);            /* commit change to hardware */
  
        } else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot))
                ath_setslottime(sc);            /* commit change to hardware */
  
@@ -54,7 +54,7 @@
        if (bfaddr != 0) {
                /*
                 * Stop any current DMA and put the new frame(s) on the queue.
        if (bfaddr != 0) {
                /*
                 * Stop any current DMA and put the new frame(s) on the queue.
-@@ -6733,9 +6707,8 @@ ath_setdefantenna(struct ath_softc *sc, 
+@@ -6734,9 +6708,8 @@ ath_setdefantenna(struct ath_softc *sc, 
  {
        struct ath_hal *ah = sc->sc_ah;
  
  {
        struct ath_hal *ah = sc->sc_ah;
  
@@ -65,7 +65,7 @@
        if (sc->sc_defant != antenna)
                sc->sc_stats.ast_ant_defswitch++;
        sc->sc_defant = antenna;
        if (sc->sc_defant != antenna)
                sc->sc_stats.ast_ant_defswitch++;
        sc->sc_defant = antenna;
-@@ -11154,7 +11127,7 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+@@ -11157,7 +11130,7 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
                                        break;
                                }
                                sc->sc_diversity = val;
                                        break;
                                }
                                sc->sc_diversity = val;
index 6531a9ec19fdeb6659dd5e22a3301b4b32701ae4..8ccecdfdd2dcac894d44093a35833b55d2b1d247 100644 (file)
  #ifdef ATH_SUPERG_XR
        ic->ic_ath_cap |= (ath_hal_xrsupported(ah) ? IEEE80211_ATHC_XR : 0);
  #endif
  #ifdef ATH_SUPERG_XR
        ic->ic_ath_cap |= (ath_hal_xrsupported(ah) ? IEEE80211_ATHC_XR : 0);
  #endif
-@@ -4469,17 +4485,17 @@ ath_mode_init(struct net_device *dev)
+@@ -4470,17 +4486,17 @@ ath_mode_init(struct net_device *dev)
   * Set the slot time based on the current setting.
   */
  static void
   * Set the slot time based on the current setting.
   */
  static void
        sc->sc_updateslot = OK;
  }
  
        sc->sc_updateslot = OK;
  }
  
-@@ -4501,7 +4517,7 @@ ath_updateslot(struct net_device *dev)
+@@ -4502,7 +4518,7 @@ ath_updateslot(struct net_device *dev)
        if (ic->ic_opmode == IEEE80211_M_HOSTAP)
                sc->sc_updateslot = UPDATE;
        else if (dev->flags & IFF_RUNNING)
        if (ic->ic_opmode == IEEE80211_M_HOSTAP)
                sc->sc_updateslot = UPDATE;
        else if (dev->flags & IFF_RUNNING)
  }
  
  #ifdef ATH_SUPERG_DYNTURBO
  }
  
  #ifdef ATH_SUPERG_DYNTURBO
-@@ -5345,7 +5361,7 @@ ath_beacon_send(struct ath_softc *sc, in
+@@ -5346,7 +5362,7 @@ ath_beacon_send(struct ath_softc *sc, in
                sc->sc_updateslot = COMMIT;     /* commit next beacon */
                sc->sc_slotupdate = slot;
        } else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot))
                sc->sc_updateslot = COMMIT;     /* commit next beacon */
                sc->sc_slotupdate = slot;
        } else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot))
  
        if (bfaddr != 0) {
                /*
  
        if (bfaddr != 0) {
                /*
-@@ -7798,12 +7814,14 @@ ath_get_ivlen(struct ieee80211_key *k)
+@@ -7799,12 +7815,14 @@ ath_get_ivlen(struct ieee80211_key *k)
   * Get transmit rate index using rate in Kbps
   */
  static __inline int
   * Get transmit rate index using rate in Kbps
   */
  static __inline int
                        ndx = i;
                        break;
                }
                        ndx = i;
                        break;
                }
-@@ -8096,7 +8114,7 @@ ath_tx_start(struct net_device *dev, str
+@@ -8097,7 +8115,7 @@ ath_tx_start(struct net_device *dev, str
                atype = HAL_PKT_TYPE_NORMAL;            /* default */
  
                if (ismcast) {
                atype = HAL_PKT_TYPE_NORMAL;            /* default */
  
                if (ismcast) {
                        txrate = rt->info[rix].rateCode;
                        if (shortPreamble)
                                txrate |= rt->info[rix].shortPreamble;
                        txrate = rt->info[rix].rateCode;
                        if (shortPreamble)
                                txrate |= rt->info[rix].shortPreamble;
-@@ -9063,7 +9081,7 @@ ath_chan_change(struct ath_softc *sc, st
+@@ -9064,7 +9082,7 @@ ath_chan_change(struct ath_softc *sc, st
        struct net_device *dev = sc->sc_dev;
        enum ieee80211_phymode mode;
  
        struct net_device *dev = sc->sc_dev;
        enum ieee80211_phymode mode;
  
  
        ath_rate_setup(dev, mode);
        ath_setcurmode(sc, mode);
  
        ath_rate_setup(dev, mode);
        ath_setcurmode(sc, mode);
-@@ -10120,8 +10138,7 @@ ath_newassoc(struct ieee80211_node *ni, 
+@@ -10121,8 +10139,7 @@ ath_newassoc(struct ieee80211_node *ni, 
  }
  
  static int
  }
  
  static int
  {
        struct ath_softc *sc = dev->priv;
        struct ieee80211com *ic = &sc->sc_ic;
  {
        struct ath_softc *sc = dev->priv;
        struct ieee80211com *ic = &sc->sc_ic;
-@@ -10135,17 +10152,31 @@ ath_getchannels(struct net_device *dev, 
+@@ -10136,17 +10153,31 @@ ath_getchannels(struct net_device *dev, 
                EPRINTF(sc, "Insufficient memory for channel table!\n");
                return -ENOMEM;
        }
                EPRINTF(sc, "Insufficient memory for channel table!\n");
                return -ENOMEM;
        }
        /*
         * Convert HAL channels to ieee80211 ones.
         */
        /*
         * Convert HAL channels to ieee80211 ones.
         */
-@@ -10389,7 +10420,7 @@ ath_xr_rate_setup(struct net_device *dev
+@@ -10392,7 +10423,7 @@ ath_xr_rate_setup(struct net_device *dev
        struct ieee80211com *ic = &sc->sc_ic;
        const HAL_RATE_TABLE *rt;
        struct ieee80211_rateset *rs;
        struct ieee80211com *ic = &sc->sc_ic;
        const HAL_RATE_TABLE *rt;
        struct ieee80211_rateset *rs;
        sc->sc_xr_rates = ath_hal_getratetable(ah, HAL_MODE_XR);
        rt = sc->sc_xr_rates;
        if (rt == NULL)
        sc->sc_xr_rates = ath_hal_getratetable(ah, HAL_MODE_XR);
        rt = sc->sc_xr_rates;
        if (rt == NULL)
-@@ -10402,57 +10433,16 @@ ath_xr_rate_setup(struct net_device *dev
+@@ -10405,57 +10436,16 @@ ath_xr_rate_setup(struct net_device *dev
        } else
                maxrates = rt->rateCount;
        rs = &ic->ic_sup_xr_rates;
        } else
                maxrates = rt->rateCount;
        rs = &ic->ic_sup_xr_rates;
  static int
  ath_rate_setup(struct net_device *dev, u_int mode)
  {
  static int
  ath_rate_setup(struct net_device *dev, u_int mode)
  {
-@@ -10461,7 +10451,7 @@ ath_rate_setup(struct net_device *dev, u
+@@ -10464,7 +10454,7 @@ ath_rate_setup(struct net_device *dev, u
        struct ieee80211com *ic = &sc->sc_ic;
        const HAL_RATE_TABLE *rt;
        struct ieee80211_rateset *rs;
        struct ieee80211com *ic = &sc->sc_ic;
        const HAL_RATE_TABLE *rt;
        struct ieee80211_rateset *rs;
  
        switch (mode) {
        case IEEE80211_MODE_11A:
  
        switch (mode) {
        case IEEE80211_MODE_11A:
-@@ -10479,6 +10469,12 @@ ath_rate_setup(struct net_device *dev, u
+@@ -10482,6 +10472,12 @@ ath_rate_setup(struct net_device *dev, u
        case IEEE80211_MODE_TURBO_G:
                sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_108G);
                break;
        case IEEE80211_MODE_TURBO_G:
                sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_108G);
                break;
        default:
                DPRINTF(sc, ATH_DEBUG_ANY, "Invalid mode %u\n", mode);
                return 0;
        default:
                DPRINTF(sc, ATH_DEBUG_ANY, "Invalid mode %u\n", mode);
                return 0;
-@@ -10493,10 +10489,16 @@ ath_rate_setup(struct net_device *dev, u
+@@ -10496,10 +10492,16 @@ ath_rate_setup(struct net_device *dev, u
                maxrates = IEEE80211_RATE_MAXSIZE;
        } else
                maxrates = rt->rateCount;
                maxrates = IEEE80211_RATE_MAXSIZE;
        } else
                maxrates = rt->rateCount;
        return 1;
  }
  
        return 1;
  }
  
-@@ -10525,13 +10527,18 @@ ath_setcurmode(struct ath_softc *sc, enu
+@@ -10528,13 +10530,18 @@ ath_setcurmode(struct ath_softc *sc, enu
                {   0, 500, 130 },
        };
        const HAL_RATE_TABLE *rt;
                {   0, 500, 130 },
        };
        const HAL_RATE_TABLE *rt;
        memset(sc->sc_hwmap, 0, sizeof(sc->sc_hwmap));
        for (i = 0; i < 32; i++) {
                u_int8_t ix = rt->rateCodeToIndex[i];
        memset(sc->sc_hwmap, 0, sizeof(sc->sc_hwmap));
        for (i = 0; i < 32; i++) {
                u_int8_t ix = rt->rateCodeToIndex[i];
-@@ -10541,7 +10548,7 @@ ath_setcurmode(struct ath_softc *sc, enu
+@@ -10544,7 +10551,7 @@ ath_setcurmode(struct ath_softc *sc, enu
                        continue;
                }
                sc->sc_hwmap[i].ieeerate =
                        continue;
                }
                sc->sc_hwmap[i].ieeerate =
                if (rt->info[ix].shortPreamble ||
                    rt->info[ix].phy == IEEE80211_T_OFDM)
                        sc->sc_hwmap[i].flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
                if (rt->info[ix].shortPreamble ||
                    rt->info[ix].phy == IEEE80211_T_OFDM)
                        sc->sc_hwmap[i].flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
-@@ -10942,9 +10949,106 @@ enum {
+@@ -10945,9 +10952,106 @@ enum {
        ATH_MAXVAPS             = 26,
        ATH_INTMIT                      = 27,
        ATH_NOISE_IMMUNITY      = 28,
        ATH_MAXVAPS             = 26,
        ATH_INTMIT                      = 27,
        ATH_NOISE_IMMUNITY      = 28,
  static int
  ath_sysctl_set_intmit(struct ath_softc *sc, long ctl, u_int val)
  {
  static int
  ath_sysctl_set_intmit(struct ath_softc *sc, long ctl, u_int val)
  {
-@@ -11023,6 +11127,7 @@ static int
+@@ -11026,6 +11130,7 @@ static int
  ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos)
  {
        struct ath_softc *sc = ctl->extra1;
  ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos)
  {
        struct ath_softc *sc = ctl->extra1;
        struct ath_hal *ah = sc->sc_ah;
        u_int val;
        u_int tab_3_val[3];
        struct ath_hal *ah = sc->sc_ah;
        u_int val;
        u_int tab_3_val[3];
-@@ -11046,25 +11151,34 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+@@ -11049,25 +11154,34 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
                                lenp, ppos);
                if (ret == 0) {
                        switch ((long)ctl->extra2) {
                                lenp, ppos);
                if (ret == 0) {
                        switch ((long)ctl->extra2) {
                                break;
                        case ATH_SOFTLED:
                                if (val != sc->sc_softled) {
                                break;
                        case ATH_SOFTLED:
                                if (val != sc->sc_softled) {
-@@ -11217,6 +11331,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+@@ -11220,6 +11334,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
                }
        } else {
                switch ((long)ctl->extra2) {
                }
        } else {
                switch ((long)ctl->extra2) {
                case ATH_SLOTTIME:
                        val = ath_hal_getslottime(ah);
                        break;
                case ATH_SLOTTIME:
                        val = ath_hal_getslottime(ah);
                        break;
-@@ -11235,6 +11352,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+@@ -11238,6 +11355,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
                case ATH_COUNTRYCODE:
                        ath_hal_getcountrycode(ah, &val);
                        break;
                case ATH_COUNTRYCODE:
                        ath_hal_getcountrycode(ah, &val);
                        break;
                case ATH_MAXVAPS:
                        val = ath_maxvaps;
                        break;
                case ATH_MAXVAPS:
                        val = ath_maxvaps;
                        break;
-@@ -11348,11 +11468,17 @@ static const ctl_table ath_sysctl_templa
+@@ -11351,11 +11471,17 @@ static const ctl_table ath_sysctl_templa
        },
        { .ctl_name     = CTL_AUTO,
          .procname     = "countrycode",
        },
        { .ctl_name     = CTL_AUTO,
          .procname     = "countrycode",
          .procname     = "maxvaps",
          .mode         = 0444,
          .proc_handler = ath_sysctl_halparam,
          .procname     = "maxvaps",
          .mode         = 0444,
          .proc_handler = ath_sysctl_halparam,
-@@ -11360,7 +11486,7 @@ static const ctl_table ath_sysctl_templa
+@@ -11363,7 +11489,7 @@ static const ctl_table ath_sysctl_templa
        },
        { .ctl_name     = CTL_AUTO,
          .procname     = "regdomain",
        },
        { .ctl_name     = CTL_AUTO,
          .procname     = "regdomain",
          .proc_handler = ath_sysctl_halparam,
          .extra2       = (void *)ATH_REGDOMAIN,
        },
          .proc_handler = ath_sysctl_halparam,
          .extra2       = (void *)ATH_REGDOMAIN,
        },
-@@ -11423,6 +11549,12 @@ static const ctl_table ath_sysctl_templa
+@@ -11426,6 +11552,12 @@ static const ctl_table ath_sysctl_templa
          .extra2       = (void *)ATH_ACKRATE,
        },
        { .ctl_name     = CTL_AUTO,
          .extra2       = (void *)ATH_ACKRATE,
        },
        { .ctl_name     = CTL_AUTO,
          .procname     = "rp",
          .mode         = 0200,
          .proc_handler = ath_sysctl_halparam,
          .procname     = "rp",
          .mode         = 0200,
          .proc_handler = ath_sysctl_halparam,
-@@ -11663,13 +11795,6 @@ static ctl_table ath_static_sysctls[] = 
+@@ -11666,13 +11798,6 @@ static ctl_table ath_static_sysctls[] = 
        },
  #endif
        { .ctl_name     = CTL_AUTO,
        },
  #endif
        { .ctl_name     = CTL_AUTO,
          .procname     = "maxvaps",
          .mode         = 0444,
          .data         = &ath_maxvaps,
          .procname     = "maxvaps",
          .mode         = 0444,
          .data         = &ath_maxvaps,
-@@ -11677,13 +11802,6 @@ static ctl_table ath_static_sysctls[] = 
+@@ -11680,13 +11805,6 @@ static ctl_table ath_static_sysctls[] = 
          .proc_handler = proc_dointvec
        },
        { .ctl_name     = CTL_AUTO,
          .proc_handler = proc_dointvec
        },
        { .ctl_name     = CTL_AUTO,
          .data         = &ath_xchanmode,
 --- a/ath/if_athvar.h
 +++ b/ath/if_athvar.h
          .data         = &ath_xchanmode,
 --- a/ath/if_athvar.h
 +++ b/ath/if_athvar.h
-@@ -688,16 +688,17 @@ struct ath_softc {
+@@ -688,17 +688,18 @@ struct ath_softc {
        int8_t sc_ofdm_weak_det; /* OFDM weak frames detection, -1 == auto */
  
        /* rate tables */
        int8_t sc_ofdm_weak_det; /* OFDM weak frames detection, -1 == auto */
  
        /* rate tables */
 -      const HAL_RATE_TABLE *sc_quarter_rates; /* quarter rate table */
        HAL_OPMODE sc_opmode;                   /* current hal operating mode */
        enum ieee80211_phymode sc_curmode;      /* current phy mode */
 -      const HAL_RATE_TABLE *sc_quarter_rates; /* quarter rate table */
        HAL_OPMODE sc_opmode;                   /* current hal operating mode */
        enum ieee80211_phymode sc_curmode;      /* current phy mode */
+       u_int sc_poweroffset;                   /* hardware power offset */
        u_int16_t sc_curtxpow;                  /* current tx power limit */
        u_int16_t sc_curaid;                    /* current association id */
        HAL_CHANNEL sc_curchan;                 /* current h/w channel */
        u_int16_t sc_curtxpow;                  /* current tx power limit */
        u_int16_t sc_curaid;                    /* current association id */
        HAL_CHANNEL sc_curchan;                 /* current h/w channel */
        u_int8_t sc_curbssid[IEEE80211_ADDR_LEN];
        u_int8_t        sc_rixmap[256];                 /* IEEE to h/w rate table ix */
        struct {
        u_int8_t sc_curbssid[IEEE80211_ADDR_LEN];
        u_int8_t        sc_rixmap[256];                 /* IEEE to h/w rate table ix */
        struct {
-@@ -808,6 +809,8 @@ struct ath_softc {
+@@ -809,6 +810,8 @@ struct ath_softc {
        u_int32_t sc_dturbo_bw_turbo;           /* bandwidth threshold */
  #endif
        u_int sc_slottimeconf;                  /* manual override for slottime */
        u_int32_t sc_dturbo_bw_turbo;           /* bandwidth threshold */
  #endif
        u_int sc_slottimeconf;                  /* manual override for slottime */
  
        struct timer_list sc_dfs_excl_timer;    /* mark expiration timer task */
        struct timer_list sc_dfs_cac_timer;     /* dfs wait timer */
  
        struct timer_list sc_dfs_excl_timer;    /* mark expiration timer task */
        struct timer_list sc_dfs_cac_timer;     /* dfs wait timer */
-@@ -826,6 +829,7 @@ struct ath_softc {
+@@ -827,6 +830,7 @@ struct ath_softc {
        int sc_rp_num;
        int sc_rp_min;
        HAL_BOOL (*sc_rp_analyse)(struct ath_softc *sc);
        int sc_rp_num;
        int sc_rp_min;
        HAL_BOOL (*sc_rp_analyse)(struct ath_softc *sc);
        struct ATH_TQ_STRUCT sc_rp_tq;
        
        int sc_rp_ignored;                      /* if set, we ignored all 
        struct ATH_TQ_STRUCT sc_rp_tq;
        
        int sc_rp_ignored;                      /* if set, we ignored all 
-@@ -941,6 +945,48 @@ int ar_device(int devid);
+@@ -942,6 +946,48 @@ int ar_device(int devid);
          DEV_NAME(_v->iv_ic->ic_dev))
  
  void ath_radar_detected(struct ath_softc *sc, const char* message);
          DEV_NAME(_v->iv_ic->ic_dev))
  
  void ath_radar_detected(struct ath_softc *sc, const char* message);
index b5059af6255bcb0cc1a5f053b240c575317a3303..7f3cbafe23a2ea6aab1db0bbbe8964a700ac4d7a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -4390,13 +4390,12 @@ ath_key_update_end(struct ieee80211vap *
+@@ -4391,13 +4391,12 @@ ath_key_update_end(struct ieee80211vap *
  static u_int32_t
  ath_calcrxfilter(struct ath_softc *sc)
  {
  static u_int32_t
  ath_calcrxfilter(struct ath_softc *sc)
  {
@@ -15,7 +15,7 @@
                 HAL_RX_FILTER_UCAST | HAL_RX_FILTER_BCAST |
                 HAL_RX_FILTER_MCAST;
        if (ic->ic_opmode != IEEE80211_M_STA)
                 HAL_RX_FILTER_UCAST | HAL_RX_FILTER_BCAST |
                 HAL_RX_FILTER_MCAST;
        if (ic->ic_opmode != IEEE80211_M_STA)
-@@ -4415,9 +4414,8 @@ ath_calcrxfilter(struct ath_softc *sc)
+@@ -4416,9 +4415,8 @@ ath_calcrxfilter(struct ath_softc *sc)
        if (sc->sc_hasintmit && !sc->sc_needmib && ath_hal_getintmit(ah, NULL))
                rfilt |= HAL_RX_FILTER_PHYERR;
        if (sc->sc_curchan.privFlags & CHANNEL_DFS)
        if (sc->sc_hasintmit && !sc->sc_needmib && ath_hal_getintmit(ah, NULL))
                rfilt |= HAL_RX_FILTER_PHYERR;
        if (sc->sc_curchan.privFlags & CHANNEL_DFS)
index b4c00bd64b1010ca9d6d6423531624ddf5855391..93b699694fb2ef8c4ff57c0b0fc9e55dfe805d5f 100644 (file)
@@ -16,7 +16,7 @@
  
        return 0;
  bad3:
  
        return 0;
  bad3:
-@@ -2672,6 +2674,7 @@ ath_init(struct net_device *dev)
+@@ -2673,6 +2675,7 @@ ath_init(struct net_device *dev)
         */
        ath_chan_change(sc, ic->ic_curchan);
        ath_set_ack_bitrate(sc, sc->sc_ackrate);
         */
        ath_chan_change(sc, ic->ic_curchan);
        ath_set_ack_bitrate(sc, sc->sc_ackrate);
@@ -24,7 +24,7 @@
        dev->flags |= IFF_RUNNING;              /* we are ready to go */
        ieee80211_start_running(ic);            /* start all VAPs */
  #ifdef ATH_TX99_DIAG
        dev->flags |= IFF_RUNNING;              /* we are ready to go */
        ieee80211_start_running(ic);            /* start all VAPs */
  #ifdef ATH_TX99_DIAG
-@@ -4483,17 +4486,52 @@ ath_mode_init(struct net_device *dev)
+@@ -4484,17 +4487,52 @@ ath_mode_init(struct net_device *dev)
   * Set the slot time based on the current setting.
   */
  static void
   * Set the slot time based on the current setting.
   */
  static void
@@ -82,7 +82,7 @@
        sc->sc_updateslot = OK;
  }
  
        sc->sc_updateslot = OK;
  }
  
-@@ -4515,7 +4553,7 @@ ath_updateslot(struct net_device *dev)
+@@ -4516,7 +4554,7 @@ ath_updateslot(struct net_device *dev)
        if (ic->ic_opmode == IEEE80211_M_HOSTAP)
                sc->sc_updateslot = UPDATE;
        else if (dev->flags & IFF_RUNNING)
        if (ic->ic_opmode == IEEE80211_M_HOSTAP)
                sc->sc_updateslot = UPDATE;
        else if (dev->flags & IFF_RUNNING)
@@ -91,7 +91,7 @@
  }
  
  #ifdef ATH_SUPERG_DYNTURBO
  }
  
  #ifdef ATH_SUPERG_DYNTURBO
-@@ -5359,7 +5397,7 @@ ath_beacon_send(struct ath_softc *sc, in
+@@ -5360,7 +5398,7 @@ ath_beacon_send(struct ath_softc *sc, in
                sc->sc_updateslot = COMMIT;     /* commit next beacon */
                sc->sc_slotupdate = slot;
        } else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot))
                sc->sc_updateslot = COMMIT;     /* commit next beacon */
                sc->sc_slotupdate = slot;
        } else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot))
  
        if (bfaddr != 0) {
                /*
  
        if (bfaddr != 0) {
                /*
-@@ -9429,7 +9467,8 @@ ath_set_coverageclass(struct ieee80211co
+@@ -9430,7 +9468,8 @@ ath_set_coverageclass(struct ieee80211co
  {
        struct ath_softc *sc = ic->ic_dev->priv;
  
  {
        struct ath_softc *sc = ic->ic_dev->priv;
  
  
        return;
  }
  
        return;
  }
-@@ -10950,6 +10989,7 @@ enum {
+@@ -10953,6 +10992,7 @@ enum {
        ATH_OFDM_WEAK_DET       = 29,
        ATH_CHANBW              = 30,
        ATH_OUTDOOR             = 31,
        ATH_OFDM_WEAK_DET       = 29,
        ATH_CHANBW              = 30,
        ATH_OUTDOOR             = 31,
  };
  
  /*
  };
  
  /*
-@@ -11162,21 +11202,31 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+@@ -11165,21 +11205,31 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
                                        sc->sc_slottimeconf = val;
                                else
                                        sc->sc_slottimeconf = 0;
                                        sc->sc_slottimeconf = val;
                                else
                                        sc->sc_slottimeconf = 0;
                                break;
                        case ATH_SOFTLED:
                                if (val != sc->sc_softled) {
                                break;
                        case ATH_SOFTLED:
                                if (val != sc->sc_softled) {
-@@ -11332,6 +11382,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+@@ -11335,6 +11385,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
                case ATH_CHANBW:
                        val = sc->sc_chanbw ?: 20;
                        break;
                case ATH_CHANBW:
                        val = sc->sc_chanbw ?: 20;
                        break;
                case ATH_SLOTTIME:
                        val = ath_hal_getslottime(ah);
                        break;
                case ATH_SLOTTIME:
                        val = ath_hal_getslottime(ah);
                        break;
-@@ -11453,6 +11506,12 @@ static const ctl_table ath_sysctl_templa
+@@ -11456,6 +11509,12 @@ static const ctl_table ath_sysctl_templa
          .extra2       = (void *)ATH_CTSTIMEOUT,
        },
        { .ctl_name     = CTL_AUTO,
          .extra2       = (void *)ATH_CTSTIMEOUT,
        },
        { .ctl_name     = CTL_AUTO,
  struct ath_softc {
        struct ieee80211com sc_ic;              /* NB: must be first */
        struct net_device *sc_dev;
  struct ath_softc {
        struct ieee80211com sc_ic;              /* NB: must be first */
        struct net_device *sc_dev;
-@@ -838,6 +847,8 @@ struct ath_softc {
+@@ -839,6 +848,8 @@ struct ath_softc {
                                                 * detected radars */
        u_int32_t sc_nexttbtt;
        u_int64_t sc_last_tsf;
                                                 * detected radars */
        u_int32_t sc_nexttbtt;
        u_int64_t sc_last_tsf;
  };
  
  typedef void (*ath_callback) (struct ath_softc *);
  };
  
  typedef void (*ath_callback) (struct ath_softc *);
-@@ -945,49 +956,76 @@ int ar_device(int devid);
+@@ -946,49 +957,76 @@ int ar_device(int devid);
          DEV_NAME(_v->iv_ic->ic_dev))
  
  void ath_radar_detected(struct ath_softc *sc, const char* message);
          DEV_NAME(_v->iv_ic->ic_dev))
  
  void ath_radar_detected(struct ath_softc *sc, const char* message);
index 407e4b3c16f1621690092416d2c9fc3e18e34f43..3098169e7d8d24349e3a0726245bd32ec42a5034 100644 (file)
@@ -20,7 +20,7 @@
  struct ath_ratectrl {
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
  struct ath_ratectrl {
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -8634,6 +8634,8 @@ ath_tx_processq(struct ath_softc *sc, st
+@@ -8635,6 +8635,8 @@ ath_tx_processq(struct ath_softc *sc, st
  
                ni = bf->bf_node;
                if (ni != NULL) {
  
                ni = bf->bf_node;
                if (ni != NULL) {
@@ -29,7 +29,7 @@
                        an = ATH_NODE(ni);
                        if (ts->ts_status == 0) {
                                u_int8_t txant = ts->ts_antenna;
                        an = ATH_NODE(ni);
                        if (ts->ts_status == 0) {
                                u_int8_t txant = ts->ts_antenna;
-@@ -8686,15 +8688,43 @@ ath_tx_processq(struct ath_softc *sc, st
+@@ -8687,15 +8689,43 @@ ath_tx_processq(struct ath_softc *sc, st
                        lr = ts->ts_longretry;
                        sc->sc_stats.ast_tx_shortretry += sr;
                        sc->sc_stats.ast_tx_longretry += lr;
                        lr = ts->ts_longretry;
                        sc->sc_stats.ast_tx_shortretry += sr;
                        sc->sc_stats.ast_tx_longretry += lr;
index 7c420ebd503fddb29a97de88caa330a7c4d4ee18..37a9b28146bbdf55562353c3089f87ac4cc6fba6 100644 (file)
@@ -20,7 +20,7 @@
        if ((!rt) || (rate < 0) || (rate >= ARRAY_SIZE(sc->sc_hwmap)))
 --- a/ath/if_ath_ahb.c
 +++ b/ath/if_ath_ahb.c
        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;
  
        if (!dev)
                return -ENOMEM;
  
@@ -29,7 +29,7 @@
        sc->aps_sc.sc_dev = dev;
  
        dev->irq = platform_get_irq(pdev, 0);
        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;
        }
                printk(KERN_ERR "%s: no memory for device state\n", dev_info);
                goto bad2;
        }
@@ -76,7 +76,7 @@
        ieee80211_vap_setup(ic, dev, name, opmode, flags, master);
        /* override with driver methods */
        vap = &avp->av_vap;
        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;
  ath_vap_delete(struct ieee80211vap *vap)
  {
        struct net_device *dev = vap->iv_ic->ic_dev;
@@ -85,7 +85,7 @@
        struct ath_hal *ah = sc->sc_ah;
        struct ath_vap *avp = ATH_VAP(vap);
        int decrease = 1;
        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
  ath_suspend(struct net_device *dev)
  {
  #ifdef AR_DEBUG
@@ -94,7 +94,7 @@
  #endif
  
        DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
  #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
  ath_resume(struct net_device *dev)
  {
  #ifdef AR_DEBUG
  #endif
  
        DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
  #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;
  #endif
  {
        struct net_device *dev = dev_id;
        struct ath_hal *ah = sc->sc_ah;
        u_int64_t hw_tsf = 0;
        HAL_INT status;
        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;
  ath_fatal_tasklet(TQUEUE_ARG data)
  {
        struct net_device *dev = (struct net_device *)data;
  
        EPRINTF(sc, "Hardware error; resetting.\n");
        ath_reset(dev);
  
        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;
  ath_rxorn_tasklet(TQUEUE_ARG data)
  {
        struct net_device *dev = (struct net_device *)data;
  
        EPRINTF(sc, "Receive FIFO overrun; resetting.\n");
        ath_reset(dev);
  
        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;
  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
  
        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)
  {
  static int
  ath_init(struct net_device *dev)
  {
        struct ieee80211com *ic = &sc->sc_ic;
        struct ath_hal *ah = sc->sc_ah;
        HAL_STATUS status;
        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)
  {
  static int
  ath_stop_locked(struct net_device *dev)
  {
        struct ieee80211com *ic = &sc->sc_ic;
        struct ath_hal *ah = sc->sc_ah;
  
        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)
  {
  static int
  ath_stop(struct net_device *dev)
  {
        int error;
  
        ATH_LOCK(sc);
        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)
  {
  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;
        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)
  {
  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*. */
        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)
  {
  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;
        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;
  ath_mgtstart(struct ieee80211com *ic, struct sk_buff *skb)
  {
        struct net_device *dev = ic->ic_dev;
        struct ath_buf *bf = NULL;
        int error;
  
        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;
  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
  
        /*
         * 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 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;
        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;
        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
  
        /*
         * 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)
  {
  
  static void ath_poll_enable(struct net_device *dev)
  {
  
        /* NB: see above */
        if (!in_softirq()) {
  
        /* 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
  {
        struct net_device *dev = vap->iv_ic->ic_dev;
  #ifdef AR_DEBUG
  #endif
  
        DPRINTF(sc, ATH_DEBUG_KEYCACHE, "Begin\n");
  #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
  {
        struct net_device *dev = vap->iv_ic->ic_dev;
  #ifdef AR_DEBUG
  #endif
  
        DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
  #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)
  {
  static void
  ath_mode_init(struct net_device *dev)
  {
        struct ath_hal *ah = sc->sc_ah;
        u_int32_t rfilt, mfilt[2];
  
        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)
  {
  static void
  ath_updateslot(struct net_device *dev)
  {
        struct ieee80211com *ic = &sc->sc_ic;
  
        /*
        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;
        (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)) {
  
  
        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;
  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) {
        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;
  ath_turbo_switch_mode(unsigned long data)
  {
        struct net_device *dev = (struct net_device *)data;
        struct ieee80211com *ic = &sc->sc_ic;
        unsigned int newflags;
  
        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;
  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
        /*
         * 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 
  {
  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) {
        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;
  #endif
  {
        struct ieee80211com *ic = ni->ni_ic;
        struct ath_node *an = ATH_NODE(ni);
        struct ath_buf *bf;
  
        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
  {
  ath_node_free(struct ieee80211_node *ni)
  #endif
  {
  
  #ifdef IEEE80211_DEBUG_REFCNT
        sc->sc_node_free_debug(ni, func, line);
  
  #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;
  #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;
        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)
  {
  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;
    
        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)
  {
  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
  #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
        struct net_device *dev = sc->sc_dev;
        int rx_limit = budget;
  #else
        int rx_limit = min(dev->quota, *budget);
  #endif
        struct ath_buf *bf;
        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 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;
        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;
  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;
        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)
  {
  static int
  ath_wme_update(struct ieee80211com *ic)
  {
  
        if (sc->sc_uapsdq)
                ath_txq_update(sc, sc->sc_uapsdq, WME_AC_VO);
  
        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_node *an = ATH_NODE(ni);
        struct ath_buf *bf;
        struct ath_txq *txq;
  
        ATH_NODE_UAPSD_LOCK_IRQ(an);
        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 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;
        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;
  ath_tx_tasklet_q0(TQUEUE_ARG data)
  {
        struct net_device *dev = (struct net_device *)data;
        unsigned long flags;
  
  process_tx_again:
        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;
  ath_tx_tasklet_q0123(TQUEUE_ARG data)
  {
        struct net_device *dev = (struct net_device *)data;
        unsigned long flags;
  
  process_tx_again:
        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;
  ath_tx_tasklet(TQUEUE_ARG data)
  {
        struct net_device *dev = (struct net_device *)data;
        unsigned int i;
        unsigned long flags;
  
        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)
  {
  static void
  ath_tx_timeout(struct net_device *dev)
  {
  
        if (ath_chan_unavail(sc))
                return;
  
        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;
  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; */
        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;
  ath_scan_start(struct ieee80211com *ic)
  {
        struct net_device *dev = ic->ic_dev;
        struct ath_hal *ah = sc->sc_ah;
        u_int32_t rfilt;
  
        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;
  ath_scan_end(struct ieee80211com *ic)
  {
        struct net_device *dev = ic->ic_dev;
        struct ath_hal *ah = sc->sc_ah;
        u_int32_t rfilt;
  
        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;
  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));
  
        (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)
  {
  static void
  ath_set_coverageclass(struct ieee80211com *ic)
  {
  
        sc->sc_coverage = ic->ic_coverageclass * 3;
        ath_set_timing(sc);
  
        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)
  {
  static u_int
  ath_mhz2ieee(struct ieee80211com *ic, u_int freq, u_int flags)
  {
  
        return (ath_hal_mhz2ieee(sc->sc_ah, freq, 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_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;
        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;
  {
  #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;
  
        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;
  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);
        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;
  {
        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);
  
        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)
  {
  static int
  ath_getchannels(struct net_device *dev)
  {
        struct ieee80211com *ic = &sc->sc_ic;
        struct ath_hal *ah = sc->sc_ah;
        HAL_CHANNEL *chans;
        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)
  {
  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;
        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)
  {
  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;
        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;
  {
        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, 
        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)
  {
  static struct net_device_stats *
  ath_getstats(struct net_device *dev)
  {
        struct net_device_stats *stats = &sc->sc_devstats;
  
        /* update according to private statistics */
        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)
  {
  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;
        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)
  {
  static int
  ath_change_mtu(struct net_device *dev, int mtu)
  {
        int error = 0;
  
        if (!(ATH_MIN_MTU < mtu && mtu <= ATH_MAX_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)
  {
  static int
  ath_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
  {
        struct ieee80211com *ic = &sc->sc_ic;
        int error;
  
        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)
  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;
        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;
  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);
        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;
  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;
        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;
  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"
  
        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;
  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;
  
        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;
  ath_get_dfs_testmode(struct ieee80211com *ic)
  {
        struct net_device *dev = ic->ic_dev;
        return sc->sc_dfs_testmode;
  }
  
        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;
  ath_set_dfs_testmode(struct ieee80211com *ic, int value)
  {
        struct net_device *dev = ic->ic_dev;
        sc->sc_dfs_testmode = !!value;
  }
  
        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;
  ath_get_txcont(struct ieee80211com *ic)
  {
        struct net_device *dev = ic->ic_dev;
        return sc->sc_txcont;
  }
  
        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;
  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) {
        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;
  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;
  }
        /* 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;
  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. */
        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;
  ath_get_txcont_rate(struct ieee80211com *ic)
  {
        struct net_device *dev = ic->ic_dev;
        return sc->sc_txcont_rate ? sc->sc_txcont_rate : 0;
  }
  
        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;
  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;
  }
  
        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;
  ath_get_dfs_cac_time(struct ieee80211com *ic)
  {
        struct net_device *dev = ic->ic_dev;
        return sc->sc_dfs_cac_period;
  }
  
        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;
  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;
  }
  
        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;
  ath_get_dfs_excl_period(struct ieee80211com *ic)
  {
        struct net_device *dev = ic->ic_dev;
        return sc->sc_dfs_excl_period;
  }
  
        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;
  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
        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_dump_hal_map(struct ieee80211com *ic)
  {
        struct net_device *dev = ic->ic_dev;
        ath_hal_dump_map(sc->sc_ah);
        return 0;
  }
        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;
        void *ptr)
  {
        struct net_device *dev = (struct net_device *)ptr;
  
        if (!dev || !sc || dev->open != &ath_init)
                return 0;
  
        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)
  {
  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",
        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)
  {
  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",
        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_registers_dump(struct ieee80211com *ic)
  {
        struct net_device *dev = ic->ic_dev;
        ath_ar5212_registers_dump(sc);
  }
  #endif /* #ifdef ATH_REVERSE_ENGINEERING */
        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_registers_mark(struct ieee80211com *ic)
  {
        struct net_device *dev = ic->ic_dev;
        ath_ar5212_registers_mark(sc);
  }
  #endif /* #ifdef ATH_REVERSE_ENGINEERING */
        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;
  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
  #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;
        }
                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;
  
        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_pci_remove(struct pci_dev *pdev)
  {
        struct net_device *dev = pci_get_drvdata(pdev);
  
        ath_detach(dev);
        if (dev->irq)
  
        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);
        struct net_device *dev = pci_get_drvdata(pdev);
  
        ath_suspend(dev);
        pci_disable_device(pdev);
        return pci_set_power_state(pdev, PCI_D3hot);
  }
        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? */
                return err;
  
        /* XXX - Should this return nonzero on fail? */
index 16485cb8e582a99da86fbc62f29ab22a541ba18c..c4d89b021a2799c32619ab5695fa6592a647deb8 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -2387,7 +2387,9 @@ ath_intr(int irq, void *dev_id, struct p
+@@ -2388,7 +2388,9 @@ ath_intr(int irq, void *dev_id, struct p
                if (status & (HAL_INT_RX | HAL_INT_RXPHY)) {
                        ath_uapsd_processtriggers(sc, hw_tsf);
                        sc->sc_isr &= ~HAL_INT_RX;
                if (status & (HAL_INT_RX | HAL_INT_RXPHY)) {
                        ath_uapsd_processtriggers(sc, hw_tsf);
                        sc->sc_isr &= ~HAL_INT_RX;
@@ -11,7 +11,7 @@
                        if (netif_rx_schedule_prep(dev, &sc->sc_napi))
  #else
                        if (netif_rx_schedule_prep(dev))
                        if (netif_rx_schedule_prep(dev, &sc->sc_napi))
  #else
                        if (netif_rx_schedule_prep(dev))
-@@ -2395,7 +2397,9 @@ ath_intr(int irq, void *dev_id, struct p
+@@ -2396,7 +2398,9 @@ ath_intr(int irq, void *dev_id, struct p
                        {
                                sc->sc_imask &= ~HAL_INT_RX;
                                ath_hal_intrset(ah, sc->sc_imask);
                        {
                                sc->sc_imask &= ~HAL_INT_RX;
                                ath_hal_intrset(ah, sc->sc_imask);
@@ -22,7 +22,7 @@
                                __netif_rx_schedule(dev, &sc->sc_napi);
  #else
                                __netif_rx_schedule(dev);
                                __netif_rx_schedule(dev, &sc->sc_napi);
  #else
                                __netif_rx_schedule(dev);
-@@ -7131,7 +7135,9 @@ rx_next:
+@@ -7132,7 +7136,9 @@ rx_next:
                local_irq_restore(flags);
        }
  
                local_irq_restore(flags);
        }
  
index 5bcfa08093f76566011e46a8599446ec9178cea2..4118fd812a58d0b225f37b7720ead4e5f220ecc7 100644 (file)
@@ -45,7 +45,7 @@ http://madwifi-project.org/changeset/4005
        dev->tx_queue_len = ATH_TXBUF - ATH_TXBUF_MGT_RESERVED;
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
        netif_napi_add(dev, &sc->sc_napi, ath_rx_poll, 64);
        dev->tx_queue_len = ATH_TXBUF - ATH_TXBUF_MGT_RESERVED;
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
        netif_napi_add(dev, &sc->sc_napi, ath_rx_poll, 64);
-@@ -12726,8 +12744,13 @@ ath_rcv_dev_event(struct notifier_block 
+@@ -12729,8 +12747,13 @@ ath_rcv_dev_event(struct notifier_block 
        struct net_device *dev = (struct net_device *)ptr;
        struct ath_softc *sc = (struct ath_softc *)netdev_priv(dev);
  
        struct net_device *dev = (struct net_device *)ptr;
        struct ath_softc *sc = (struct ath_softc *)netdev_priv(dev);
  
index b3bb30067ac73cf3b9cf58592c96ae41cc6de98d..ab277630de60de599add6dc1081f6238d39e3b94 100644 (file)
@@ -1,7 +1,6 @@
-diff -ur madwifi-trunk-r3314/ath/if_ath_ahb.c madwifi-trunk-r3314.patched/ath/if_ath_ahb.c
---- madwifi-trunk-r3314/ath/if_ath_ahb.c       2009-05-17 22:16:05.000000000 +0300
-+++ madwifi-trunk-r3314.patched/ath/if_ath_ahb.c       2009-05-17 22:15:47.000000000 +0300
-@@ -376,6 +376,11 @@
+--- a/ath/if_ath_ahb.c
++++ b/ath/if_ath_ahb.c
+@@ -311,6 +311,11 @@ init_ath_wmac(u_int16_t devid, u_int16_t
        SET_MODULE_OWNER(dev);
        sclist[wlanNum] = sc;
  
        SET_MODULE_OWNER(dev);
        sclist[wlanNum] = sc;
  
@@ -13,10 +12,9 @@ diff -ur madwifi-trunk-r3314/ath/if_ath_ahb.c madwifi-trunk-r3314.patched/ath/if
        switch (wlanNum) {
        case AR531X_WLAN0_NUM:
                if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
        switch (wlanNum) {
        case AR531X_WLAN0_NUM:
                if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
-diff -ur madwifi-trunk-r3314/ath/if_ath_pci.c madwifi-trunk-r3314.patched/ath/if_ath_pci.c
---- madwifi-trunk-r3314/ath/if_ath_pci.c       2009-05-17 22:16:05.000000000 +0300
-+++ madwifi-trunk-r3314.patched/ath/if_ath_pci.c       2009-05-17 22:15:47.000000000 +0300
-@@ -209,6 +209,11 @@
+--- a/ath/if_ath_pci.c
++++ b/ath/if_ath_pci.c
+@@ -236,6 +236,11 @@ ath_pci_probe(struct pci_dev *pdev, cons
         */
        sc->aps_sc.sc_invalid = 1;
  
         */
        sc->aps_sc.sc_invalid = 1;
  
index 7bdd82c0f9926d82451bb14a2adba7ee80b36ef1..d071d37f955b4cf9ee8ccbb864e61a1d45e1480a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
 --- a/ath/if_ath.c
 +++ b/ath/if_ath.c
-@@ -3199,7 +3199,13 @@ ath_tx_startraw(struct net_device *dev, 
+@@ -3200,7 +3200,13 @@ ath_tx_startraw(struct net_device *dev, 
        struct ieee80211_frame *wh;
  
        wh = (struct ieee80211_frame *)skb->data;
        struct ieee80211_frame *wh;
  
        wh = (struct ieee80211_frame *)skb->data;
@@ -14,7 +14,7 @@
        rt = sc->sc_currates;
        txrate = dot11_to_ratecode(sc, rt, ph->rate0);
        power = ph->power > 63 ? 63 : ph->power;
        rt = sc->sc_currates;
        txrate = dot11_to_ratecode(sc, rt, ph->rate0);
        power = ph->power > 63 ? 63 : ph->power;
-@@ -3224,7 +3230,8 @@ ath_tx_startraw(struct net_device *dev, 
+@@ -3225,7 +3231,8 @@ ath_tx_startraw(struct net_device *dev, 
        rt = sc->sc_currates;
        KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
  
        rt = sc->sc_currates;
        KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
  
diff --git a/package/madwifi/patches/437-sysctl_cleanup.patch b/package/madwifi/patches/437-sysctl_cleanup.patch
new file mode 100644 (file)
index 0000000..510c3a6
--- /dev/null
@@ -0,0 +1,73 @@
+--- a/ath/if_ath.c
++++ b/ath/if_ath.c
+@@ -11019,38 +11019,38 @@ enum {
+  * mirrored in /proc/sys.
+  */
+ enum {
+-      ATH_SLOTTIME            = 1,
+-      ATH_ACKTIMEOUT          = 2,
+-      ATH_CTSTIMEOUT          = 3,
+-      ATH_SOFTLED             = 4,
+-      ATH_LEDPIN              = 5,
+-      ATH_COUNTRYCODE         = 6,
+-      ATH_REGDOMAIN           = 7,
+-      ATH_DEBUG               = 8,
+-      ATH_TXANTENNA           = 9,
+-      ATH_RXANTENNA           = 10,
+-      ATH_DIVERSITY           = 11,
+-      ATH_TXINTRPERIOD        = 12,
+-      ATH_FFTXQMIN            = 13,
+-      ATH_XR_POLL_PERIOD      = 14,
+-      ATH_XR_POLL_COUNT       = 15,
+-      ATH_ACKRATE             = 16,
+-      ATH_RP                  = 17,
+-      ATH_RP_PRINT            = 18,
+-      ATH_RP_PRINT_ALL        = 19,
+-      ATH_RP_PRINT_MEM        = 20,
+-      ATH_RP_PRINT_MEM_ALL    = 21,
+-      ATH_RP_FLUSH            = 22,
+-      ATH_PANIC               = 23,
+-      ATH_RP_IGNORED          = 24,
+-      ATH_RADAR_IGNORED       = 25,
+-      ATH_MAXVAPS             = 26,
+-      ATH_INTMIT                      = 27,
+-      ATH_NOISE_IMMUNITY      = 28,
+-      ATH_OFDM_WEAK_DET       = 29,
+-      ATH_CHANBW              = 30,
+-      ATH_OUTDOOR             = 31,
+-      ATH_DISTANCE    = 32,
++      ATH_SLOTTIME,
++      ATH_ACKTIMEOUT,
++      ATH_CTSTIMEOUT,
++      ATH_SOFTLED,
++      ATH_LEDPIN,
++      ATH_COUNTRYCODE,
++      ATH_REGDOMAIN,
++      ATH_DEBUG,
++      ATH_TXANTENNA,
++      ATH_RXANTENNA,
++      ATH_DIVERSITY,
++      ATH_TXINTRPERIOD,
++      ATH_FFTXQMIN,
++      ATH_XR_POLL_PERIOD,
++      ATH_XR_POLL_COUNT,
++      ATH_ACKRATE,
++      ATH_RP,
++      ATH_RP_PRINT,
++      ATH_RP_PRINT_ALL,
++      ATH_RP_PRINT_MEM,
++      ATH_RP_PRINT_MEM_ALL,
++      ATH_RP_FLUSH,
++      ATH_PANIC,
++      ATH_RP_IGNORED,
++      ATH_RADAR_IGNORED,
++      ATH_MAXVAPS,
++      ATH_INTMIT,
++      ATH_NOISE_IMMUNITY,
++      ATH_OFDM_WEAK_DET,
++      ATH_CHANBW,
++      ATH_OUTDOOR,
++      ATH_DISTANCE,
+ };
+ /*
diff --git a/package/madwifi/patches/438-poweroffset_sysctl.patch b/package/madwifi/patches/438-poweroffset_sysctl.patch
new file mode 100644 (file)
index 0000000..2a6d27c
--- /dev/null
@@ -0,0 +1,43 @@
+--- a/ath/if_ath.c
++++ b/ath/if_ath.c
+@@ -11029,6 +11029,7 @@ enum {
+       ATH_DEBUG,
+       ATH_TXANTENNA,
+       ATH_RXANTENNA,
++      ATH_POWEROFFSET,
+       ATH_DIVERSITY,
+       ATH_TXINTRPERIOD,
+       ATH_FFTXQMIN,
+@@ -11309,6 +11310,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+                               ath_debug_global = (val &  ATH_DEBUG_GLOBAL);
+ #endif
+                               break;
++                      case ATH_POWEROFFSET:
++                              sc->sc_poweroffset = val;
++                              break;
+                       case ATH_TXANTENNA:
+                               /*
+                                * antenna can be:
+@@ -11476,6 +11480,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+               case ATH_DEBUG:
+                       val = sc->sc_debug | ath_debug_global;
+                       break;
++              case ATH_POWEROFFSET:
++                      val = sc->sc_poweroffset;
++                      break;
+               case ATH_TXANTENNA:
+                       val = sc->sc_txantenna;
+                       break;
+@@ -11617,6 +11624,12 @@ static const ctl_table ath_sysctl_templa
+       },
+ #endif
+       { .ctl_name     = CTL_AUTO,
++        .procname     = "poweroffset",
++        .mode         = 0644,
++        .proc_handler = ath_sysctl_halparam,
++        .extra2       = (void *)ATH_POWEROFFSET,
++      },
++      { .ctl_name     = CTL_AUTO,
+         .procname     = "txantenna",
+         .mode         = 0644,
+         .proc_handler = ath_sysctl_halparam,