diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2400pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 8e3fbdf48889..103c71164f10 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1007,12 +1007,11 @@ static int rt2400pci_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
1007 | /* | 1007 | /* |
1008 | * TX descriptor initialization | 1008 | * TX descriptor initialization |
1009 | */ | 1009 | */ |
1010 | static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | 1010 | static void rt2400pci_write_tx_desc(struct queue_entry *entry, |
1011 | struct sk_buff *skb, | ||
1012 | struct txentry_desc *txdesc) | 1011 | struct txentry_desc *txdesc) |
1013 | { | 1012 | { |
1014 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); | 1013 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); |
1015 | struct queue_entry_priv_pci *entry_priv = skbdesc->entry->priv_data; | 1014 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; |
1016 | __le32 *txd = entry_priv->desc; | 1015 | __le32 *txd = entry_priv->desc; |
1017 | u32 word; | 1016 | u32 word; |
1018 | 1017 | ||
@@ -1096,7 +1095,7 @@ static void rt2400pci_write_beacon(struct queue_entry *entry, | |||
1096 | /* | 1095 | /* |
1097 | * Write the TX descriptor for the beacon. | 1096 | * Write the TX descriptor for the beacon. |
1098 | */ | 1097 | */ |
1099 | rt2400pci_write_tx_desc(rt2x00dev, entry->skb, txdesc); | 1098 | rt2400pci_write_tx_desc(entry, txdesc); |
1100 | 1099 | ||
1101 | /* | 1100 | /* |
1102 | * Dump beacon to userspace through debugfs. | 1101 | * Dump beacon to userspace through debugfs. |
@@ -1112,24 +1111,24 @@ static void rt2400pci_write_beacon(struct queue_entry *entry, | |||
1112 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | 1111 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); |
1113 | } | 1112 | } |
1114 | 1113 | ||
1115 | static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, | 1114 | static void rt2400pci_kick_tx_queue(struct data_queue *queue) |
1116 | const enum data_queue_qid queue) | ||
1117 | { | 1115 | { |
1116 | struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; | ||
1118 | u32 reg; | 1117 | u32 reg; |
1119 | 1118 | ||
1120 | rt2x00pci_register_read(rt2x00dev, TXCSR0, ®); | 1119 | rt2x00pci_register_read(rt2x00dev, TXCSR0, ®); |
1121 | rt2x00_set_field32(®, TXCSR0_KICK_PRIO, (queue == QID_AC_BE)); | 1120 | rt2x00_set_field32(®, TXCSR0_KICK_PRIO, (queue->qid == QID_AC_BE)); |
1122 | rt2x00_set_field32(®, TXCSR0_KICK_TX, (queue == QID_AC_BK)); | 1121 | rt2x00_set_field32(®, TXCSR0_KICK_TX, (queue->qid == QID_AC_BK)); |
1123 | rt2x00_set_field32(®, TXCSR0_KICK_ATIM, (queue == QID_ATIM)); | 1122 | rt2x00_set_field32(®, TXCSR0_KICK_ATIM, (queue->qid == QID_ATIM)); |
1124 | rt2x00pci_register_write(rt2x00dev, TXCSR0, reg); | 1123 | rt2x00pci_register_write(rt2x00dev, TXCSR0, reg); |
1125 | } | 1124 | } |
1126 | 1125 | ||
1127 | static void rt2400pci_kill_tx_queue(struct rt2x00_dev *rt2x00dev, | 1126 | static void rt2400pci_kill_tx_queue(struct data_queue *queue) |
1128 | const enum data_queue_qid qid) | ||
1129 | { | 1127 | { |
1128 | struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; | ||
1130 | u32 reg; | 1129 | u32 reg; |
1131 | 1130 | ||
1132 | if (qid == QID_BEACON) { | 1131 | if (queue->qid == QID_BEACON) { |
1133 | rt2x00pci_register_write(rt2x00dev, CSR14, 0); | 1132 | rt2x00pci_register_write(rt2x00dev, CSR14, 0); |
1134 | } else { | 1133 | } else { |
1135 | rt2x00pci_register_read(rt2x00dev, TXCSR0, ®); | 1134 | rt2x00pci_register_read(rt2x00dev, TXCSR0, ®); |
@@ -1488,8 +1487,10 @@ static int rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
1488 | spec->channels_info = info; | 1487 | spec->channels_info = info; |
1489 | 1488 | ||
1490 | tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_START); | 1489 | tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_START); |
1491 | for (i = 0; i < 14; i++) | 1490 | for (i = 0; i < 14; i++) { |
1492 | info[i].tx_power1 = TXPOWER_FROM_DEV(tx_power[i]); | 1491 | info[i].max_power = TXPOWER_FROM_DEV(MAX_TXPOWER); |
1492 | info[i].default_power1 = TXPOWER_FROM_DEV(tx_power[i]); | ||
1493 | } | ||
1493 | 1494 | ||
1494 | return 0; | 1495 | return 0; |
1495 | } | 1496 | } |