aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2400pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2400pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 798f625e38f7..5f5204b82891 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1,5 +1,5 @@
1/* 1/*
2 Copyright (C) 2004 - 2009 rt2x00 SourceForge Project 2 Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com>
3 <http://rt2x00.serialmonkey.com> 3 <http://rt2x00.serialmonkey.com>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
@@ -31,6 +31,7 @@
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/pci.h> 32#include <linux/pci.h>
33#include <linux/eeprom_93cx6.h> 33#include <linux/eeprom_93cx6.h>
34#include <linux/slab.h>
34 35
35#include "rt2x00.h" 36#include "rt2x00.h"
36#include "rt2x00pci.h" 37#include "rt2x00pci.h"
@@ -451,7 +452,7 @@ static void rt2400pci_config_channel(struct rt2x00_dev *rt2x00dev,
451 /* 452 /*
452 * RF2420 chipset don't need any additional actions. 453 * RF2420 chipset don't need any additional actions.
453 */ 454 */
454 if (rt2x00_rf(&rt2x00dev->chip, RF2420)) 455 if (rt2x00_rf(rt2x00dev, RF2420))
455 return; 456 return;
456 457
457 /* 458 /*
@@ -1340,10 +1341,10 @@ static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
1340 */ 1341 */
1341 value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE); 1342 value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE);
1342 rt2x00pci_register_read(rt2x00dev, CSR0, &reg); 1343 rt2x00pci_register_read(rt2x00dev, CSR0, &reg);
1343 rt2x00_set_chip_rf(rt2x00dev, value, reg); 1344 rt2x00_set_chip(rt2x00dev, RT2460, value,
1345 rt2x00_get_field32(reg, CSR0_REVISION));
1344 1346
1345 if (!rt2x00_rf(&rt2x00dev->chip, RF2420) && 1347 if (!rt2x00_rf(rt2x00dev, RF2420) && !rt2x00_rf(rt2x00dev, RF2421)) {
1346 !rt2x00_rf(&rt2x00dev->chip, RF2421)) {
1347 ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); 1348 ERROR(rt2x00dev, "Invalid RF chipset detected.\n");
1348 return -ENODEV; 1349 return -ENODEV;
1349 } 1350 }
@@ -1431,7 +1432,6 @@ static int rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
1431 IEEE80211_HW_SIGNAL_DBM | 1432 IEEE80211_HW_SIGNAL_DBM |
1432 IEEE80211_HW_SUPPORTS_PS | 1433 IEEE80211_HW_SUPPORTS_PS |
1433 IEEE80211_HW_PS_NULLFUNC_STACK; 1434 IEEE80211_HW_PS_NULLFUNC_STACK;
1434 rt2x00dev->hw->extra_tx_headroom = 0;
1435 1435
1436 SET_IEEE80211_DEV(rt2x00dev->hw, rt2x00dev->dev); 1436 SET_IEEE80211_DEV(rt2x00dev->hw, rt2x00dev->dev);
1437 SET_IEEE80211_PERM_ADDR(rt2x00dev->hw, 1437 SET_IEEE80211_PERM_ADDR(rt2x00dev->hw,
@@ -1562,7 +1562,6 @@ static const struct ieee80211_ops rt2400pci_mac80211_ops = {
1562 .get_stats = rt2x00mac_get_stats, 1562 .get_stats = rt2x00mac_get_stats,
1563 .bss_info_changed = rt2x00mac_bss_info_changed, 1563 .bss_info_changed = rt2x00mac_bss_info_changed,
1564 .conf_tx = rt2400pci_conf_tx, 1564 .conf_tx = rt2400pci_conf_tx,
1565 .get_tx_stats = rt2x00mac_get_tx_stats,
1566 .get_tsf = rt2400pci_get_tsf, 1565 .get_tsf = rt2400pci_get_tsf,
1567 .tx_last_beacon = rt2400pci_tx_last_beacon, 1566 .tx_last_beacon = rt2400pci_tx_last_beacon,
1568 .rfkill_poll = rt2x00mac_rfkill_poll, 1567 .rfkill_poll = rt2x00mac_rfkill_poll,
@@ -1622,27 +1621,28 @@ static const struct data_queue_desc rt2400pci_queue_atim = {
1622}; 1621};
1623 1622
1624static const struct rt2x00_ops rt2400pci_ops = { 1623static const struct rt2x00_ops rt2400pci_ops = {
1625 .name = KBUILD_MODNAME, 1624 .name = KBUILD_MODNAME,
1626 .max_sta_intf = 1, 1625 .max_sta_intf = 1,
1627 .max_ap_intf = 1, 1626 .max_ap_intf = 1,
1628 .eeprom_size = EEPROM_SIZE, 1627 .eeprom_size = EEPROM_SIZE,
1629 .rf_size = RF_SIZE, 1628 .rf_size = RF_SIZE,
1630 .tx_queues = NUM_TX_QUEUES, 1629 .tx_queues = NUM_TX_QUEUES,
1631 .rx = &rt2400pci_queue_rx, 1630 .extra_tx_headroom = 0,
1632 .tx = &rt2400pci_queue_tx, 1631 .rx = &rt2400pci_queue_rx,
1633 .bcn = &rt2400pci_queue_bcn, 1632 .tx = &rt2400pci_queue_tx,
1634 .atim = &rt2400pci_queue_atim, 1633 .bcn = &rt2400pci_queue_bcn,
1635 .lib = &rt2400pci_rt2x00_ops, 1634 .atim = &rt2400pci_queue_atim,
1636 .hw = &rt2400pci_mac80211_ops, 1635 .lib = &rt2400pci_rt2x00_ops,
1636 .hw = &rt2400pci_mac80211_ops,
1637#ifdef CONFIG_RT2X00_LIB_DEBUGFS 1637#ifdef CONFIG_RT2X00_LIB_DEBUGFS
1638 .debugfs = &rt2400pci_rt2x00debug, 1638 .debugfs = &rt2400pci_rt2x00debug,
1639#endif /* CONFIG_RT2X00_LIB_DEBUGFS */ 1639#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
1640}; 1640};
1641 1641
1642/* 1642/*
1643 * RT2400pci module information. 1643 * RT2400pci module information.
1644 */ 1644 */
1645static struct pci_device_id rt2400pci_device_table[] = { 1645static DEFINE_PCI_DEVICE_TABLE(rt2400pci_device_table) = {
1646 { PCI_DEVICE(0x1814, 0x0101), PCI_DEVICE_DATA(&rt2400pci_ops) }, 1646 { PCI_DEVICE(0x1814, 0x0101), PCI_DEVICE_DATA(&rt2400pci_ops) },
1647 { 0, } 1647 { 0, }
1648}; 1648};