Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225279
b: refs/heads/master
c: dba5dc1
h: refs/heads/master
i:
  225277: a9ad9de
  225275: c79431c
  225271: ffa2833
  225263: 57312a9
  225247: 085410d
  225215: 59d2f1e
  225151: 47ffeee
  225023: 9e9815e
  224767: 20004d2
  224255: 142e3d1
  223231: 3ba73eb
  221183: 38fc392
v: v3
  • Loading branch information
Ivo van Doorn authored and John W. Linville committed Dec 13, 2010
1 parent a981610 commit 0c33c89
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 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: 64e7d72384c2ecef5a892b2243623af265dd83cc
refs/heads/master: dba5dc1ae9764902f46d5225c9ff40e4f7b614c7
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/rt2x00/rt2x00dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ EXPORT_SYMBOL_GPL(rt2x00lib_dmastart);

void rt2x00lib_dmadone(struct queue_entry *entry)
{
set_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags);
clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags);
rt2x00queue_index_inc(entry->queue, Q_INDEX_DMA_DONE);
}
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2x00queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,16 @@ struct txentry_desc {
* @ENTRY_DATA_IO_FAILED: Hardware indicated that an IO error occured
* while transfering the data to the hardware. No TX status report will
* be expected from the hardware.
* @ENTRY_DATA_STATUS_PENDING: The entry has been send to the device and
* returned. It is now waiting for the status reporting before the
* entry can be reused again.
*/
enum queue_entry_flags {
ENTRY_BCN_ASSIGNED,
ENTRY_OWNER_DEVICE_DATA,
ENTRY_DATA_PENDING,
ENTRY_DATA_IO_FAILED
ENTRY_DATA_IO_FAILED,
ENTRY_DATA_STATUS_PENDING,
};

/**
Expand Down
12 changes: 8 additions & 4 deletions trunk/drivers/net/wireless/rt2x00/rt2x00usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ static void rt2x00usb_work_txdone(struct work_struct *work)
while (!rt2x00queue_empty(queue)) {
entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE);

if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) ||
!test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))
break;

rt2x00usb_work_txdone_entry(entry);
Expand Down Expand Up @@ -237,7 +238,8 @@ static void rt2x00usb_kick_tx_entry(struct queue_entry *entry)
u32 length;
int status;

if (!test_and_clear_bit(ENTRY_DATA_PENDING, &entry->flags))
if (!test_and_clear_bit(ENTRY_DATA_PENDING, &entry->flags) ||
test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))
return;

/*
Expand Down Expand Up @@ -275,7 +277,8 @@ static void rt2x00usb_work_rxdone(struct work_struct *work)
while (!rt2x00queue_empty(rt2x00dev->rx)) {
entry = rt2x00queue_get_entry(rt2x00dev->rx, Q_INDEX_DONE);

if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) ||
!test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))
break;

/*
Expand Down Expand Up @@ -327,7 +330,8 @@ static void rt2x00usb_kick_rx_entry(struct queue_entry *entry)
struct queue_entry_priv_usb *entry_priv = entry->priv_data;
int status;

if (test_and_set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
if (test_and_set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) ||
test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))
return;

rt2x00lib_dmastart(entry);
Expand Down

0 comments on commit 0c33c89

Please sign in to comment.