Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville...
authorDavid S. Miller <davem@davemloft.net>
Mon, 15 Feb 2010 01:45:59 +0000 (17:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Feb 2010 01:45:59 +0000 (17:45 -0800)
1  2 
drivers/net/wireless/adm8211.c
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/base.h
drivers/net/wireless/b43/main.c
drivers/net/wireless/b43legacy/main.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/libertas/dev.h
drivers/net/wireless/libertas/main.c
drivers/net/wireless/rt2x00/rt2400pci.c
drivers/net/wireless/rt2x00/rt2500pci.c
drivers/net/wireless/rt2x00/rt61pci.c

@@@ -39,7 -39,7 +39,7 @@@ static unsigned int rx_ring_size __read
  module_param(tx_ring_size, uint, 0);
  module_param(rx_ring_size, uint, 0);
  
 -static struct pci_device_id adm8211_pci_id_table[] __devinitdata = {
 +static DEFINE_PCI_DEVICE_TABLE(adm8211_pci_id_table) = {
        /* ADMtek ADM8211 */
        { PCI_DEVICE(0x10B7, 0x6000) }, /* 3Com 3CRSHPW796 */
        { PCI_DEVICE(0x1200, 0x8201) }, /* ? */
@@@ -302,18 -302,6 +302,6 @@@ static int adm8211_get_stats(struct iee
        return 0;
  }
  
- static int adm8211_get_tx_stats(struct ieee80211_hw *dev,
-                               struct ieee80211_tx_queue_stats *stats)
- {
-       struct adm8211_priv *priv = dev->priv;
-       stats[0].len = priv->cur_tx - priv->dirty_tx;
-       stats[0].limit = priv->tx_ring_size - 2;
-       stats[0].count = priv->dirty_tx;
-       return 0;
- }
  static void adm8211_interrupt_tci(struct ieee80211_hw *dev)
  {
        struct adm8211_priv *priv = dev->priv;
@@@ -1773,7 -1761,6 +1761,6 @@@ static const struct ieee80211_ops adm82
        .prepare_multicast      = adm8211_prepare_multicast,
        .configure_filter       = adm8211_configure_filter,
        .get_stats              = adm8211_get_stats,
-       .get_tx_stats           = adm8211_get_tx_stats,
        .get_tsf                = adm8211_get_tsft
  };
  
@@@ -83,7 -83,7 +83,7 @@@ MODULE_VERSION("0.6.0 (EXPERIMENTAL)")
  
  
  /* Known PCI ids */
 -static const struct pci_device_id ath5k_pci_id_table[] = {
 +static DEFINE_PCI_DEVICE_TABLE(ath5k_pci_id_table) = {
        { PCI_VDEVICE(ATHEROS, 0x0207) }, /* 5210 early */
        { PCI_VDEVICE(ATHEROS, 0x0007) }, /* 5210 */
        { PCI_VDEVICE(ATHEROS, 0x0011) }, /* 5311 - this is on AHB bus !*/
@@@ -241,8 -241,6 +241,6 @@@ static int ath5k_set_key(struct ieee802
                struct ieee80211_key_conf *key);
  static int ath5k_get_stats(struct ieee80211_hw *hw,
                struct ieee80211_low_level_stats *stats);
- static int ath5k_get_tx_stats(struct ieee80211_hw *hw,
-               struct ieee80211_tx_queue_stats *stats);
  static u64 ath5k_get_tsf(struct ieee80211_hw *hw);
  static void ath5k_set_tsf(struct ieee80211_hw *hw, u64 tsf);
  static void ath5k_reset_tsf(struct ieee80211_hw *hw);
@@@ -269,7 -267,6 +267,6 @@@ static const struct ieee80211_ops ath5k
        .set_key        = ath5k_set_key,
        .get_stats      = ath5k_get_stats,
        .conf_tx        = NULL,
-       .get_tx_stats   = ath5k_get_tx_stats,
        .get_tsf        = ath5k_get_tsf,
        .set_tsf        = ath5k_set_tsf,
        .reset_tsf      = ath5k_reset_tsf,
@@@ -1249,6 -1246,29 +1246,29 @@@ ath5k_rxbuf_setup(struct ath5k_softc *s
        return 0;
  }
  
+ static enum ath5k_pkt_type get_hw_packet_type(struct sk_buff *skb)
+ {
+       struct ieee80211_hdr *hdr;
+       enum ath5k_pkt_type htype;
+       __le16 fc;
+       hdr = (struct ieee80211_hdr *)skb->data;
+       fc = hdr->frame_control;
+       if (ieee80211_is_beacon(fc))
+               htype = AR5K_PKT_TYPE_BEACON;
+       else if (ieee80211_is_probe_resp(fc))
+               htype = AR5K_PKT_TYPE_PROBE_RESP;
+       else if (ieee80211_is_atim(fc))
+               htype = AR5K_PKT_TYPE_ATIM;
+       else if (ieee80211_is_pspoll(fc))
+               htype = AR5K_PKT_TYPE_PSPOLL;
+       else
+               htype = AR5K_PKT_TYPE_NORMAL;
+       return htype;
+ }
  static int
  ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf,
                  struct ath5k_txq *txq)
                        sc->vif, pktlen, info));
        }
        ret = ah->ah_setup_tx_desc(ah, ds, pktlen,
-               ieee80211_get_hdrlen_from_skb(skb), AR5K_PKT_TYPE_NORMAL,
+               ieee80211_get_hdrlen_from_skb(skb),
+               get_hw_packet_type(skb),
                (sc->power_level * 2),
                hw_rate,
                info->control.rates[0].count, keyidx, ah->ah_tx_ant, flags,
  
        spin_lock_bh(&txq->lock);
        list_add_tail(&bf->list, &txq->q);
-       sc->tx_stats[txq->qnum].len++;
        if (txq->link == NULL) /* is this first packet? */
                ath5k_hw_set_txdp(ah, txq->qnum, bf->daddr);
        else /* no, so only link it */
@@@ -1581,7 -1601,6 +1601,6 @@@ ath5k_txq_drainq(struct ath5k_softc *sc
                ath5k_txbuf_free(sc, bf);
  
                spin_lock_bh(&sc->txbuflock);
-               sc->tx_stats[txq->qnum].len--;
                list_move_tail(&bf->list, &sc->txbuf);
                sc->txbuf_len++;
                spin_unlock_bh(&sc->txbuflock);
@@@ -2011,10 -2030,8 +2030,8 @@@ ath5k_tx_processq(struct ath5k_softc *s
                }
  
                ieee80211_tx_status(sc->hw, skb);
-               sc->tx_stats[txq->qnum].count++;
  
                spin_lock(&sc->txbuflock);
-               sc->tx_stats[txq->qnum].len--;
                list_move_tail(&bf->list, &sc->txbuf);
                sc->txbuf_len++;
                spin_unlock(&sc->txbuflock);
@@@ -3116,17 -3133,6 +3133,6 @@@ ath5k_get_stats(struct ieee80211_hw *hw
        return 0;
  }
  
- static int
- ath5k_get_tx_stats(struct ieee80211_hw *hw,
-               struct ieee80211_tx_queue_stats *stats)
- {
-       struct ath5k_softc *sc = hw->priv;
-       memcpy(stats, &sc->tx_stats, sizeof(sc->tx_stats));
-       return 0;
- }
  static u64
  ath5k_get_tsf(struct ieee80211_hw *hw)
  {
@@@ -36,7 -36,7 +36,7 @@@
   */
  
  /*
 - * Defintions for the Atheros Wireless LAN controller driver.
 + * Definitions for the Atheros Wireless LAN controller driver.
   */
  #ifndef _DEV_ATH_ATHVAR_H
  #define _DEV_ATH_ATHVAR_H
@@@ -117,7 -117,6 +117,6 @@@ struct ath5k_softc 
        struct pci_dev          *pdev;          /* for dma mapping */
        void __iomem            *iobase;        /* address of the device */
        struct mutex            lock;           /* dev-level lock */
-       struct ieee80211_tx_queue_stats tx_stats[AR5K_NUM_TX_QUEUES];
        struct ieee80211_low_level_stats ll_stats;
        struct ieee80211_hw     *hw;            /* IEEE 802.11 common */
        struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
        struct ath5k_txq        *cabq;          /* content after beacon */
  
        int                     power_level;    /* Requested tx power in dbm */
 -      bool                    assoc;          /* assocate state */
 +      bool                    assoc;          /* associate state */
        bool                    enable_beacon;  /* true if beacons are on */
  };
  
@@@ -637,10 -637,17 +637,17 @@@ static void b43_upload_card_macaddress(
  static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time)
  {
        /* slot_time is in usec. */
-       if (dev->phy.type != B43_PHYTYPE_G)
+       /* This test used to exit for all but a G PHY. */
+       if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
                return;
-       b43_write16(dev, 0x684, 510 + slot_time);
-       b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time);
+       b43_write16(dev, B43_MMIO_IFSSLOT, 510 + slot_time);
+       /* Shared memory location 0x0010 is the slot time and should be
+        * set to slot_time; however, this register is initially 0 and changing
+        * the value adversely affects the transmit rate for BCM4311
+        * devices. Until this behavior is unterstood, delete this step
+        *
+        * b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time);
+        */
  }
  
  static void b43_short_slot_timing_enable(struct b43_wldev *dev)
@@@ -2969,7 -2976,7 +2976,7 @@@ static void do_periodic_work(struct b43
  /* Periodic work locking policy:
   *    The whole periodic work handler is protected by
   *    wl->mutex. If another lock is needed somewhere in the
 - *    pwork callchain, it's aquired in-place, where it's needed.
 + *    pwork callchain, it's acquired in-place, where it's needed.
   */
  static void b43_periodic_work_handler(struct work_struct *work)
  {
@@@ -3349,27 -3356,6 +3356,6 @@@ out_unlock
        return err;
  }
  
- static int b43_op_get_tx_stats(struct ieee80211_hw *hw,
-                              struct ieee80211_tx_queue_stats *stats)
- {
-       struct b43_wl *wl = hw_to_b43_wl(hw);
-       struct b43_wldev *dev;
-       int err = -ENODEV;
-       mutex_lock(&wl->mutex);
-       dev = wl->current_dev;
-       if (dev && b43_status(dev) >= B43_STAT_STARTED) {
-               if (b43_using_pio_transfers(dev))
-                       b43_pio_get_tx_stats(dev, stats);
-               else
-                       b43_dma_get_tx_stats(dev, stats);
-               err = 0;
-       }
-       mutex_unlock(&wl->mutex);
-       return err;
- }
  static int b43_op_get_stats(struct ieee80211_hw *hw,
                            struct ieee80211_low_level_stats *stats)
  {
@@@ -3980,6 -3966,7 +3966,7 @@@ static int b43_wireless_core_start(stru
        }
  
        /* We are ready to run. */
+       ieee80211_wake_queues(dev->wl->hw);
        b43_set_status(dev, B43_STAT_STARTED);
  
        /* Start data flow (TX/RX). */
@@@ -4389,8 -4376,6 +4376,6 @@@ static int b43_wireless_core_init(struc
  
        ieee80211_wake_queues(dev->wl->hw);
  
-       ieee80211_wake_queues(dev->wl->hw);
        b43_set_status(dev, B43_STAT_INITIALIZED);
  
  out:
@@@ -4596,7 -4581,6 +4581,6 @@@ static const struct ieee80211_ops b43_h
        .set_key                = b43_op_set_key,
        .update_tkip_key        = b43_op_update_tkip_key,
        .get_stats              = b43_op_get_stats,
-       .get_tx_stats           = b43_op_get_tx_stats,
        .get_tsf                = b43_op_get_tsf,
        .set_tsf                = b43_op_set_tsf,
        .start                  = b43_op_start,
@@@ -2279,7 -2279,7 +2279,7 @@@ static void do_periodic_work(struct b43
  /* Periodic work locking policy:
   *    The whole periodic work handler is protected by
   *    wl->mutex. If another lock is needed somewhere in the
 - *    pwork callchain, it's aquired in-place, where it's needed.
 + *    pwork callchain, it's acquired in-place, where it's needed.
   */
  static void b43legacy_periodic_work_handler(struct work_struct *work)
  {
@@@ -2446,29 -2446,6 +2446,6 @@@ static int b43legacy_op_conf_tx(struct 
        return 0;
  }
  
- static int b43legacy_op_get_tx_stats(struct ieee80211_hw *hw,
-                                    struct ieee80211_tx_queue_stats *stats)
- {
-       struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
-       struct b43legacy_wldev *dev = wl->current_dev;
-       unsigned long flags;
-       int err = -ENODEV;
-       if (!dev)
-               goto out;
-       spin_lock_irqsave(&wl->irq_lock, flags);
-       if (likely(b43legacy_status(dev) >= B43legacy_STAT_STARTED)) {
-               if (b43legacy_using_pio(dev))
-                       b43legacy_pio_get_tx_stats(dev, stats);
-               else
-                       b43legacy_dma_get_tx_stats(dev, stats);
-               err = 0;
-       }
-       spin_unlock_irqrestore(&wl->irq_lock, flags);
- out:
-       return err;
- }
  static int b43legacy_op_get_stats(struct ieee80211_hw *hw,
                                  struct ieee80211_low_level_stats *stats)
  {
@@@ -2923,6 -2900,7 +2900,7 @@@ static int b43legacy_wireless_core_star
                goto out;
        }
        /* We are ready to run. */
+       ieee80211_wake_queues(dev->wl->hw);
        b43legacy_set_status(dev, B43legacy_STAT_STARTED);
  
        /* Start data flow (TX/RX) */
@@@ -3343,6 -3321,7 +3321,7 @@@ static int b43legacy_wireless_core_init
        b43legacy_security_init(dev);
        b43legacy_rng_init(wl);
  
+       ieee80211_wake_queues(dev->wl->hw);
        b43legacy_set_status(dev, B43legacy_STAT_INITIALIZED);
  
        b43legacy_leds_init(dev);
@@@ -3511,7 -3490,6 +3490,6 @@@ static const struct ieee80211_ops b43le
        .bss_info_changed       = b43legacy_op_bss_info_changed,
        .configure_filter       = b43legacy_op_configure_filter,
        .get_stats              = b43legacy_op_get_stats,
-       .get_tx_stats           = b43legacy_op_get_tx_stats,
        .start                  = b43legacy_op_start,
        .stop                   = b43legacy_op_stop,
        .set_tim                = b43legacy_op_beacon_set_tim,
@@@ -2631,7 -2631,7 +2631,7 @@@ static int iwl_mac_setup_register(struc
         */
        hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
  
-       hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX;
+       hw->wiphy->max_scan_ssids = PROBE_OPTION_MAX + 1;
        /* we create the 802.11 header and a zero-length SSID element */
        hw->wiphy->max_scan_ie_len = IWL_MAX_PROBE_REQUEST - 24 - 2;
  
@@@ -3440,7 -3440,6 +3440,6 @@@ static struct ieee80211_ops iwl_hw_ops 
        .set_key = iwl_mac_set_key,
        .update_tkip_key = iwl_mac_update_tkip_key,
        .get_stats = iwl_mac_get_stats,
-       .get_tx_stats = iwl_mac_get_tx_stats,
        .conf_tx = iwl_mac_conf_tx,
        .reset_tsf = iwl_mac_reset_tsf,
        .bss_info_changed = iwl_bss_info_changed,
@@@ -3769,7 -3768,7 +3768,7 @@@ static void __devexit iwl_pci_remove(st
   *****************************************************************************/
  
  /* Hardware specific file defines the PCI IDs table for that hardware module */
 -static struct pci_device_id iwl_hw_card_ids[] = {
 +static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
  #ifdef CONFIG_IWL4965
        {IWL_PCI_DEVICE(0x4229, PCI_ANY_ID, iwl4965_agn_cfg)},
        {IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)},
@@@ -10,7 -10,7 +10,7 @@@
  #include "scan.h"
  #include "assoc.h"
  
 -
 +#include <linux/kfifo.h>
  
  /** sleep_params */
  struct sleep_params {
@@@ -109,7 -109,6 +109,6 @@@ struct lbs_private 
        struct list_head cmdpendingq; /* pending command buffers */
        wait_queue_head_t cmd_pending;
        struct timer_list command_timer;
-       int nr_retries;
        int cmd_timed_out;
  
        /* Command responses sent from the hardware to the driver */
        u32 resp_len[2];
  
        /* Events sent from hardware to driver */
 -      struct kfifo *event_fifo;
 +      struct kfifo event_fifo;
  
        /** thread to service interrupts */
        struct task_struct *main_thread;
@@@ -459,7 -459,7 +459,7 @@@ static int lbs_thread(void *data
                else if (!list_empty(&priv->cmdpendingq) &&
                                        !(priv->wakeup_dev_required))
                        shouldsleep = 0;        /* We have a command to send */
 -              else if (__kfifo_len(priv->event_fifo))
 +              else if (kfifo_len(&priv->event_fifo))
                        shouldsleep = 0;        /* We have an event to process */
                else
                        shouldsleep = 1;        /* No command */
  
                /* Process hardware events, e.g. card removed, link lost */
                spin_lock_irq(&priv->driver_lock);
 -              while (__kfifo_len(priv->event_fifo)) {
 +              while (kfifo_len(&priv->event_fifo)) {
                        u32 event;
 -                      __kfifo_get(priv->event_fifo, (unsigned char *) &event,
 -                              sizeof(event));
 +
 +                      if (kfifo_out(&priv->event_fifo,
 +                              (unsigned char *) &event, sizeof(event)) !=
 +                              sizeof(event))
 +                                      break;
                        spin_unlock_irq(&priv->driver_lock);
                        lbs_process_event(priv, event);
                        spin_lock_irq(&priv->driver_lock);
                if (priv->cmd_timed_out && priv->cur_cmd) {
                        struct cmd_ctrl_node *cmdnode = priv->cur_cmd;
  
-                       if (++priv->nr_retries > 3) {
-                               lbs_pr_info("Excessive timeouts submitting "
-                                       "command 0x%04x\n",
-                                       le16_to_cpu(cmdnode->cmdbuf->command));
-                               lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
-                               priv->nr_retries = 0;
-                               if (priv->reset_card)
-                                       priv->reset_card(priv);
-                       } else {
-                               priv->cur_cmd = NULL;
-                               priv->dnld_sent = DNLD_RES_RECEIVED;
-                               lbs_pr_info("requeueing command 0x%04x due "
-                                       "to timeout (#%d)\n",
-                                       le16_to_cpu(cmdnode->cmdbuf->command),
-                                       priv->nr_retries);
-                               /* Stick it back at the _top_ of the pending queue
-                                  for immediate resubmission */
-                               list_add(&cmdnode->list, &priv->cmdpendingq);
-                       }
+                       lbs_pr_info("Timeout submitting command 0x%04x\n",
+                               le16_to_cpu(cmdnode->cmdbuf->command));
+                       lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
+                       if (priv->reset_card)
+                               priv->reset_card(priv);
                }
                priv->cmd_timed_out = 0;
  
                if (!priv->fw_ready)
                        continue;
  
@@@ -732,7 -712,7 +715,7 @@@ done
   *  This function handles the timeout of command sending.
   *  It will re-send the same command again.
   */
- static void command_timer_fn(unsigned long data)
+ static void lbs_cmd_timeout_handler(unsigned long data)
  {
        struct lbs_private *priv = (struct lbs_private *)data;
        unsigned long flags;
@@@ -851,7 -831,7 +834,7 @@@ static int lbs_init_adapter(struct lbs_
  
        mutex_init(&priv->lock);
  
-       setup_timer(&priv->command_timer, command_timer_fn,
+       setup_timer(&priv->command_timer, lbs_cmd_timeout_handler,
                (unsigned long)priv);
        setup_timer(&priv->auto_deepsleep_timer, auto_deepsleep_timer_fn,
                        (unsigned long)priv);
        priv->resp_len[0] = priv->resp_len[1] = 0;
  
        /* Create the event FIFO */
 -      priv->event_fifo = kfifo_alloc(sizeof(u32) * 16, GFP_KERNEL, NULL);
 -      if (IS_ERR(priv->event_fifo)) {
 +      ret = kfifo_alloc(&priv->event_fifo, sizeof(u32) * 16, GFP_KERNEL);
 +      if (ret) {
                lbs_pr_err("Out of memory allocating event FIFO buffer\n");
 -              ret = -ENOMEM;
                goto out;
        }
  
@@@ -889,7 -870,8 +872,7 @@@ static void lbs_free_adapter(struct lbs
        lbs_deb_enter(LBS_DEB_MAIN);
  
        lbs_free_cmd_buffer(priv);
 -      if (priv->event_fifo)
 -              kfifo_free(priv->event_fifo);
 +      kfifo_free(&priv->event_fifo);
        del_timer(&priv->command_timer);
        del_timer(&priv->auto_deepsleep_timer);
        kfree(priv->networks);
@@@ -1174,7 -1156,7 +1157,7 @@@ void lbs_queue_event(struct lbs_privat
        if (priv->psstate == PS_STATE_SLEEP)
                priv->psstate = PS_STATE_AWAKE;
  
 -      __kfifo_put(priv->event_fifo, (unsigned char *) &event, sizeof(u32));
 +      kfifo_in(&priv->event_fifo, (unsigned char *) &event, sizeof(u32));
  
        wake_up_interruptible(&priv->waitq);
  
@@@ -1561,7 -1561,6 +1561,6 @@@ static const struct ieee80211_ops rt240
        .get_stats              = rt2x00mac_get_stats,
        .bss_info_changed       = rt2x00mac_bss_info_changed,
        .conf_tx                = rt2400pci_conf_tx,
-       .get_tx_stats           = rt2x00mac_get_tx_stats,
        .get_tsf                = rt2400pci_get_tsf,
        .tx_last_beacon         = rt2400pci_tx_last_beacon,
        .rfkill_poll            = rt2x00mac_rfkill_poll,
@@@ -1642,7 -1641,7 +1641,7 @@@ static const struct rt2x00_ops rt2400pc
  /*
   * RT2400pci module information.
   */
 -static struct pci_device_id rt2400pci_device_table[] = {
 +static DEFINE_PCI_DEVICE_TABLE(rt2400pci_device_table) = {
        { PCI_DEVICE(0x1814, 0x0101), PCI_DEVICE_DATA(&rt2400pci_ops) },
        { 0, }
  };
@@@ -1859,7 -1859,6 +1859,6 @@@ static const struct ieee80211_ops rt250
        .get_stats              = rt2x00mac_get_stats,
        .bss_info_changed       = rt2x00mac_bss_info_changed,
        .conf_tx                = rt2x00mac_conf_tx,
-       .get_tx_stats           = rt2x00mac_get_tx_stats,
        .get_tsf                = rt2500pci_get_tsf,
        .tx_last_beacon         = rt2500pci_tx_last_beacon,
        .rfkill_poll            = rt2x00mac_rfkill_poll,
@@@ -1940,7 -1939,7 +1939,7 @@@ static const struct rt2x00_ops rt2500pc
  /*
   * RT2500pci module information.
   */
 -static struct pci_device_id rt2500pci_device_table[] = {
 +static DEFINE_PCI_DEVICE_TABLE(rt2500pci_device_table) = {
        { PCI_DEVICE(0x1814, 0x0201), PCI_DEVICE_DATA(&rt2500pci_ops) },
        { 0, }
  };
@@@ -2730,7 -2730,6 +2730,6 @@@ static const struct ieee80211_ops rt61p
        .get_stats              = rt2x00mac_get_stats,
        .bss_info_changed       = rt2x00mac_bss_info_changed,
        .conf_tx                = rt61pci_conf_tx,
-       .get_tx_stats           = rt2x00mac_get_tx_stats,
        .get_tsf                = rt61pci_get_tsf,
        .rfkill_poll            = rt2x00mac_rfkill_poll,
  };
@@@ -2807,7 -2806,7 +2806,7 @@@ static const struct rt2x00_ops rt61pci_
  /*
   * RT61pci module information.
   */
 -static struct pci_device_id rt61pci_device_table[] = {
 +static DEFINE_PCI_DEVICE_TABLE(rt61pci_device_table) = {
        /* RT2561s */
        { PCI_DEVICE(0x1814, 0x0301), PCI_DEVICE_DATA(&rt61pci_ops) },
        /* RT2561 v2 */