Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78996
b: refs/heads/master
c: 3957ccb
h: refs/heads/master
v: v3
  • Loading branch information
Ivo van Doorn authored and David S. Miller committed Jan 28, 2008
1 parent 270d662 commit d746178
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 59 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 797a54c68e0eb551c60e3dc843627f967919a951
refs/heads/master: 3957ccb56e17ca839265ccb292c4c6850dcf5d32
20 changes: 1 addition & 19 deletions trunk/drivers/net/wireless/rt2x00/rt2400pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,26 +1167,8 @@ static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev, const int queue)
tx_status = rt2x00_get_field32(word, TXD_W0_RESULT);
retry = rt2x00_get_field32(word, TXD_W0_RETRY_COUNT);

rt2x00lib_txdone(entry, tx_status, retry);

/*
* Make this entry available for reuse.
*/
entry->flags = 0;
rt2x00_set_field32(&word, TXD_W0_VALID, 0);
rt2x00_desc_write(txd, 0, word);
rt2x00_ring_index_done_inc(ring);
rt2x00pci_txdone(rt2x00dev, entry, tx_status, retry);
}

/*
* If the data ring was full before the txdone handler
* we must make sure the packet queue in the mac80211 stack
* is reenabled when the txdone handler has finished.
*/
entry = ring->entry;
if (!rt2x00_ring_full(ring))
ieee80211_wake_queue(rt2x00dev->hw,
entry->tx_status.control.queue);
}

static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance)
Expand Down
20 changes: 1 addition & 19 deletions trunk/drivers/net/wireless/rt2x00/rt2500pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1298,26 +1298,8 @@ static void rt2500pci_txdone(struct rt2x00_dev *rt2x00dev, const int queue)
tx_status = rt2x00_get_field32(word, TXD_W0_RESULT);
retry = rt2x00_get_field32(word, TXD_W0_RETRY_COUNT);

rt2x00lib_txdone(entry, tx_status, retry);

/*
* Make this entry available for reuse.
*/
entry->flags = 0;
rt2x00_set_field32(&word, TXD_W0_VALID, 0);
rt2x00_desc_write(txd, 0, word);
rt2x00_ring_index_done_inc(ring);
rt2x00pci_txdone(rt2x00dev, entry, tx_status, retry);
}

/*
* If the data ring was full before the txdone handler
* we must make sure the packet queue in the mac80211 stack
* is reenabled when the txdone handler has finished.
*/
entry = ring->entry;
if (!rt2x00_ring_full(ring))
ieee80211_wake_queue(rt2x00dev->hw,
entry->tx_status.control.queue);
}

static irqreturn_t rt2500pci_interrupt(int irq, void *dev_instance)
Expand Down
33 changes: 32 additions & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2x00pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
EXPORT_SYMBOL_GPL(rt2x00pci_write_tx_data);

/*
* RX data handlers.
* TX/RX data handlers.
*/
void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev)
{
Expand Down Expand Up @@ -177,6 +177,37 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev)
}
EXPORT_SYMBOL_GPL(rt2x00pci_rxdone);

void rt2x00pci_txdone(struct rt2x00_dev *rt2x00dev, struct data_entry *entry,
const int tx_status, const int retry)
{
u32 word;

rt2x00lib_txdone(entry, tx_status, retry);

/*
* Make this entry available for reuse.
*/
entry->flags = 0;

rt2x00_desc_read(entry->priv, 0, &word);
rt2x00_set_field32(&word, TXD_ENTRY_OWNER_NIC, 0);
rt2x00_set_field32(&word, TXD_ENTRY_VALID, 0);
rt2x00_desc_write(entry->priv, 0, word);

rt2x00_ring_index_done_inc(entry->ring);

/*
* If the data ring was full before the txdone handler
* we must make sure the packet queue in the mac80211 stack
* is reenabled when the txdone handler has finished.
*/
if (!rt2x00_ring_full(entry->ring))
ieee80211_wake_queue(rt2x00dev->hw,
entry->tx_status.control.queue);

}
EXPORT_SYMBOL_GPL(rt2x00pci_txdone);

/*
* Device initialization handlers.
*/
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2x00pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
struct ieee80211_tx_control *control);

/*
* RX data handlers.
* RX/TX data handlers.
*/
void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev);
void rt2x00pci_txdone(struct rt2x00_dev *rt2x00dev, struct data_entry *entry,
const int tx_status, const int retry);

/*
* Device initialization handlers.
Expand Down
19 changes: 1 addition & 18 deletions trunk/drivers/net/wireless/rt2x00/rt61pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1779,24 +1779,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev)
tx_status = rt2x00_get_field32(reg, STA_CSR4_TX_RESULT);
retry = rt2x00_get_field32(reg, STA_CSR4_RETRY_COUNT);

rt2x00lib_txdone(entry, tx_status, retry);

/*
* Make this entry available for reuse.
*/
entry->flags = 0;
rt2x00_set_field32(&word, TXD_W0_VALID, 0);
rt2x00_desc_write(txd, 0, word);
rt2x00_ring_index_done_inc(entry->ring);

/*
* If the data ring was full before the txdone handler
* we must make sure the packet queue in the mac80211 stack
* is reenabled when the txdone handler has finished.
*/
if (!rt2x00_ring_full(ring))
ieee80211_wake_queue(rt2x00dev->hw,
entry->tx_status.control.queue);
rt2x00pci_txdone(rt2x00dev, entry, tx_status, retry);
}
}

Expand Down

0 comments on commit d746178

Please sign in to comment.