Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215015
b: refs/heads/master
c: bc8a979
h: refs/heads/master
i:
  215013: 8b9131f
  215011: ff5d4dc
  215007: eb31b56
v: v3
  • Loading branch information
Ivo van Doorn authored and John W. Linville committed Oct 5, 2010
1 parent 7e7e008 commit 9f167c5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 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: ba3b9e5e8c7a12d8ea46cb4a8217c2e9b0720e9c
refs/heads/master: bc8a979e2d85c2bdd507a8b6b09fdafc11ebd73a
14 changes: 13 additions & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2800.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com>
Copyright (C) 2004 - 2010 Ivo van Doorn <IvDoorn@gmail.com>
Copyright (C) 2010 Willow Garage <http://www.willowgarage.com>
Copyright (C) 2009 Alban Browaeys <prahal@yahoo.com>
Copyright (C) 2009 Felix Fietkau <nbd@openwrt.org>
Copyright (C) 2009 Luis Correia <luis.f.correia@gmail.com>
Expand Down Expand Up @@ -1353,6 +1354,9 @@
* PID_TYPE: The PID latched from the PID field in the TXWI, can be used
* to match a frame with its tx result (even though the PID is
* only 4 bits wide).
* PID_QUEUE: Part of PID_TYPE, this is the queue index number (0-3)
* PID_ENTRY: Part of PID_TYPE, this is the queue entry index number (1-3)
* This identification number is calculated by ((idx % 3) + 1).
* TX_SUCCESS: Indicates tx success (1) or failure (0)
* TX_AGGRE: Indicates if the frame was part of an aggregate (1) or not (0)
* TX_ACK_REQUIRED: Indicates if the frame needed to get ack'ed (1) or not (0)
Expand All @@ -1364,6 +1368,8 @@
#define TX_STA_FIFO 0x1718
#define TX_STA_FIFO_VALID FIELD32(0x00000001)
#define TX_STA_FIFO_PID_TYPE FIELD32(0x0000001e)
#define TX_STA_FIFO_PID_QUEUE FIELD32(0x00000006)
#define TX_STA_FIFO_PID_ENTRY FIELD32(0x00000018)
#define TX_STA_FIFO_TX_SUCCESS FIELD32(0x00000020)
#define TX_STA_FIFO_TX_AGGRE FIELD32(0x00000040)
#define TX_STA_FIFO_TX_ACK_REQUIRED FIELD32(0x00000080)
Expand Down Expand Up @@ -2024,13 +2030,19 @@ struct mac_iveiv_entry {
* frame was processed. If multiple frames are aggregated together
* (AMPDU==1) the reported tx status will always contain the packet
* id of the first frame. 0: Don't report tx status for this frame.
* PACKETID_QUEUE: Part of PACKETID, This is the queue index (0-3)
* PACKETID_ENTRY: Part of PACKETID, THis is the queue entry index (1-3)
* This identification number is calculated by ((idx % 3) + 1).
* The (+1) is required to prevent PACKETID to become 0.
*/
#define TXWI_W1_ACK FIELD32(0x00000001)
#define TXWI_W1_NSEQ FIELD32(0x00000002)
#define TXWI_W1_BW_WIN_SIZE FIELD32(0x000000fc)
#define TXWI_W1_WIRELESS_CLI_ID FIELD32(0x0000ff00)
#define TXWI_W1_MPDU_TOTAL_BYTE_COUNT FIELD32(0x0fff0000)
#define TXWI_W1_PACKETID FIELD32(0xf0000000)
#define TXWI_W1_PACKETID_QUEUE FIELD32(0x30000000)
#define TXWI_W1_PACKETID_ENTRY FIELD32(0xc0000000)

/*
* Word2
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/wireless/rt2x00/rt2800lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ void rt2800_write_tx_data(struct queue_entry *entry,
txdesc->key_idx : 0xff);
rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT,
txdesc->length);
rt2x00_set_field32(&word, TXWI_W1_PACKETID, txdesc->qid + 1);
rt2x00_set_field32(&word, TXWI_W1_PACKETID_QUEUE, txdesc->qid);
rt2x00_set_field32(&word, TXWI_W1_PACKETID_ENTRY, (entry->entry_idx % 3) + 1);
rt2x00_desc_write(txwi, 1, word);

/*
Expand Down Expand Up @@ -708,7 +709,7 @@ void rt2800_txdone(struct rt2x00_dev *rt2x00dev)
* Skip this entry when it contains an invalid
* queue identication number.
*/
pid = rt2x00_get_field32(reg, TX_STA_FIFO_PID_TYPE) - 1;
pid = rt2x00_get_field32(reg, TX_STA_FIFO_PID_QUEUE);
if (pid >= QID_RX)
continue;

Expand Down

0 comments on commit 9f167c5

Please sign in to comment.