diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2400pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index bb3d83560d02..b3dffcfed835 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -632,15 +632,15 @@ static void rt2400pci_init_rxentry(struct rt2x00_dev *rt2x00dev, | |||
632 | struct queue_entry *entry) | 632 | struct queue_entry *entry) |
633 | { | 633 | { |
634 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; | 634 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; |
635 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); | ||
635 | u32 word; | 636 | u32 word; |
636 | 637 | ||
637 | rt2x00_desc_read(entry_priv->desc, 2, &word); | 638 | rt2x00_desc_read(entry_priv->desc, 2, &word); |
638 | rt2x00_set_field32(&word, RXD_W2_BUFFER_LENGTH, | 639 | rt2x00_set_field32(&word, RXD_W2_BUFFER_LENGTH, entry->skb->len); |
639 | entry->queue->data_size); | ||
640 | rt2x00_desc_write(entry_priv->desc, 2, word); | 640 | rt2x00_desc_write(entry_priv->desc, 2, word); |
641 | 641 | ||
642 | rt2x00_desc_read(entry_priv->desc, 1, &word); | 642 | rt2x00_desc_read(entry_priv->desc, 1, &word); |
643 | rt2x00_set_field32(&word, RXD_W1_BUFFER_ADDRESS, entry_priv->data_dma); | 643 | rt2x00_set_field32(&word, RXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma); |
644 | rt2x00_desc_write(entry_priv->desc, 1, word); | 644 | rt2x00_desc_write(entry_priv->desc, 1, word); |
645 | 645 | ||
646 | rt2x00_desc_read(entry_priv->desc, 0, &word); | 646 | rt2x00_desc_read(entry_priv->desc, 0, &word); |
@@ -1012,7 +1012,7 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1012 | * Start writing the descriptor words. | 1012 | * Start writing the descriptor words. |
1013 | */ | 1013 | */ |
1014 | rt2x00_desc_read(entry_priv->desc, 1, &word); | 1014 | rt2x00_desc_read(entry_priv->desc, 1, &word); |
1015 | rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, entry_priv->data_dma); | 1015 | rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma); |
1016 | rt2x00_desc_write(entry_priv->desc, 1, word); | 1016 | rt2x00_desc_write(entry_priv->desc, 1, word); |
1017 | 1017 | ||
1018 | rt2x00_desc_read(txd, 2, &word); | 1018 | rt2x00_desc_read(txd, 2, &word); |
@@ -1154,7 +1154,7 @@ static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev, | |||
1154 | } | 1154 | } |
1155 | txdesc.retry = rt2x00_get_field32(word, TXD_W0_RETRY_COUNT); | 1155 | txdesc.retry = rt2x00_get_field32(word, TXD_W0_RETRY_COUNT); |
1156 | 1156 | ||
1157 | rt2x00pci_txdone(rt2x00dev, entry, &txdesc); | 1157 | rt2x00lib_txdone(entry, &txdesc); |
1158 | } | 1158 | } |
1159 | } | 1159 | } |
1160 | 1160 | ||
@@ -1366,7 +1366,7 @@ static void rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
1366 | IEEE80211_HW_SIGNAL_DBM; | 1366 | IEEE80211_HW_SIGNAL_DBM; |
1367 | rt2x00dev->hw->extra_tx_headroom = 0; | 1367 | rt2x00dev->hw->extra_tx_headroom = 0; |
1368 | 1368 | ||
1369 | SET_IEEE80211_DEV(rt2x00dev->hw, &rt2x00dev_pci(rt2x00dev)->dev); | 1369 | SET_IEEE80211_DEV(rt2x00dev->hw, rt2x00dev->dev); |
1370 | SET_IEEE80211_PERM_ADDR(rt2x00dev->hw, | 1370 | SET_IEEE80211_PERM_ADDR(rt2x00dev->hw, |
1371 | rt2x00_eeprom_addr(rt2x00dev, | 1371 | rt2x00_eeprom_addr(rt2x00dev, |
1372 | EEPROM_MAC_ADDR_0)); | 1372 | EEPROM_MAC_ADDR_0)); |
@@ -1412,9 +1412,10 @@ static int rt2400pci_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
1412 | rt2400pci_probe_hw_mode(rt2x00dev); | 1412 | rt2400pci_probe_hw_mode(rt2x00dev); |
1413 | 1413 | ||
1414 | /* | 1414 | /* |
1415 | * This device requires the atim queue | 1415 | * This device requires the atim queue and DMA-mapped skbs. |
1416 | */ | 1416 | */ |
1417 | __set_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags); | 1417 | __set_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags); |
1418 | __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags); | ||
1418 | 1419 | ||
1419 | /* | 1420 | /* |
1420 | * Set the rssi offset. | 1421 | * Set the rssi offset. |
@@ -1526,7 +1527,7 @@ static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
1526 | * Write entire beacon with descriptor to register, | 1527 | * Write entire beacon with descriptor to register, |
1527 | * and kick the beacon generator. | 1528 | * and kick the beacon generator. |
1528 | */ | 1529 | */ |
1529 | memcpy(entry_priv->data, skb->data, skb->len); | 1530 | rt2x00queue_map_txskb(rt2x00dev, intf->beacon->skb); |
1530 | rt2x00queue_write_tx_descriptor(intf->beacon, &txdesc); | 1531 | rt2x00queue_write_tx_descriptor(intf->beacon, &txdesc); |
1531 | rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, QID_BEACON); | 1532 | rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, QID_BEACON); |
1532 | 1533 | ||