diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 1d174e42f11e..ab0507110e42 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1161,12 +1161,11 @@ static int rt2500pci_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
1161 | /* | 1161 | /* |
1162 | * TX descriptor initialization | 1162 | * TX descriptor initialization |
1163 | */ | 1163 | */ |
1164 | static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | 1164 | static void rt2500pci_write_tx_desc(struct queue_entry *entry, |
1165 | struct sk_buff *skb, | ||
1166 | struct txentry_desc *txdesc) | 1165 | struct txentry_desc *txdesc) |
1167 | { | 1166 | { |
1168 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); | 1167 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); |
1169 | struct queue_entry_priv_pci *entry_priv = skbdesc->entry->priv_data; | 1168 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; |
1170 | __le32 *txd = entry_priv->desc; | 1169 | __le32 *txd = entry_priv->desc; |
1171 | u32 word; | 1170 | u32 word; |
1172 | 1171 | ||
@@ -1249,7 +1248,7 @@ static void rt2500pci_write_beacon(struct queue_entry *entry, | |||
1249 | /* | 1248 | /* |
1250 | * Write the TX descriptor for the beacon. | 1249 | * Write the TX descriptor for the beacon. |
1251 | */ | 1250 | */ |
1252 | rt2500pci_write_tx_desc(rt2x00dev, entry->skb, txdesc); | 1251 | rt2500pci_write_tx_desc(entry, txdesc); |
1253 | 1252 | ||
1254 | /* | 1253 | /* |
1255 | * Dump beacon to userspace through debugfs. | 1254 | * Dump beacon to userspace through debugfs. |
@@ -1265,24 +1264,24 @@ static void rt2500pci_write_beacon(struct queue_entry *entry, | |||
1265 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | 1264 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); |
1266 | } | 1265 | } |
1267 | 1266 | ||
1268 | static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, | 1267 | static void rt2500pci_kick_tx_queue(struct data_queue *queue) |
1269 | const enum data_queue_qid queue) | ||
1270 | { | 1268 | { |
1269 | struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; | ||
1271 | u32 reg; | 1270 | u32 reg; |
1272 | 1271 | ||
1273 | rt2x00pci_register_read(rt2x00dev, TXCSR0, ®); | 1272 | rt2x00pci_register_read(rt2x00dev, TXCSR0, ®); |
1274 | rt2x00_set_field32(®, TXCSR0_KICK_PRIO, (queue == QID_AC_BE)); | 1273 | rt2x00_set_field32(®, TXCSR0_KICK_PRIO, (queue->qid == QID_AC_BE)); |
1275 | rt2x00_set_field32(®, TXCSR0_KICK_TX, (queue == QID_AC_BK)); | 1274 | rt2x00_set_field32(®, TXCSR0_KICK_TX, (queue->qid == QID_AC_BK)); |
1276 | rt2x00_set_field32(®, TXCSR0_KICK_ATIM, (queue == QID_ATIM)); | 1275 | rt2x00_set_field32(®, TXCSR0_KICK_ATIM, (queue->qid == QID_ATIM)); |
1277 | rt2x00pci_register_write(rt2x00dev, TXCSR0, reg); | 1276 | rt2x00pci_register_write(rt2x00dev, TXCSR0, reg); |
1278 | } | 1277 | } |
1279 | 1278 | ||
1280 | static void rt2500pci_kill_tx_queue(struct rt2x00_dev *rt2x00dev, | 1279 | static void rt2500pci_kill_tx_queue(struct data_queue *queue) |
1281 | const enum data_queue_qid qid) | ||
1282 | { | 1280 | { |
1281 | struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; | ||
1283 | u32 reg; | 1282 | u32 reg; |
1284 | 1283 | ||
1285 | if (qid == QID_BEACON) { | 1284 | if (queue->qid == QID_BEACON) { |
1286 | rt2x00pci_register_write(rt2x00dev, CSR14, 0); | 1285 | rt2x00pci_register_write(rt2x00dev, CSR14, 0); |
1287 | } else { | 1286 | } else { |
1288 | rt2x00pci_register_read(rt2x00dev, TXCSR0, ®); | 1287 | rt2x00pci_register_read(rt2x00dev, TXCSR0, ®); |
@@ -1802,12 +1801,16 @@ static int rt2500pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
1802 | spec->channels_info = info; | 1801 | spec->channels_info = info; |
1803 | 1802 | ||
1804 | tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_START); | 1803 | tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_START); |
1805 | for (i = 0; i < 14; i++) | 1804 | for (i = 0; i < 14; i++) { |
1806 | info[i].tx_power1 = TXPOWER_FROM_DEV(tx_power[i]); | 1805 | info[i].max_power = MAX_TXPOWER; |
1806 | info[i].default_power1 = TXPOWER_FROM_DEV(tx_power[i]); | ||
1807 | } | ||
1807 | 1808 | ||
1808 | if (spec->num_channels > 14) { | 1809 | if (spec->num_channels > 14) { |
1809 | for (i = 14; i < spec->num_channels; i++) | 1810 | for (i = 14; i < spec->num_channels; i++) { |
1810 | info[i].tx_power1 = DEFAULT_TXPOWER; | 1811 | info[i].max_power = MAX_TXPOWER; |
1812 | info[i].default_power1 = DEFAULT_TXPOWER; | ||
1813 | } | ||
1811 | } | 1814 | } |
1812 | 1815 | ||
1813 | return 0; | 1816 | return 0; |