Skip to content

Commit

Permalink
ath9k: store frame information used by aggregation inside the skb tx …
Browse files Browse the repository at this point in the history
…info

Since the pointers after the rates in the tx info cannot be used anymore
after frames have been queued, this area can be used to store information
that was previously stored in the ath_buf. With these changes, we can delay
the ath_buf assignment in the aggregation code until aggregates are formed.

That will not only make it possible to simplify DMA descriptor setup to
do less rewriting of uncached memory, but will also make it easier to
move aggregation out of the core of the ath9k tx path.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Nov 17, 2010
1 parent 04caf86 commit 2d42efc
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 109 deletions.
15 changes: 9 additions & 6 deletions drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,16 @@ struct ath_config {
* @BUF_AMPDU: This buffer is an ampdu, as part of an aggregate (during TX)
* @BUF_AGGR: Indicates whether the buffer can be aggregated
* (used in aggregation scheduling)
* @BUF_RETRY: Indicates whether the buffer is retried
* @BUF_XRETRY: To denote excessive retries of the buffer
*/
enum buffer_type {
BUF_AMPDU = BIT(2),
BUF_AGGR = BIT(3),
BUF_RETRY = BIT(4),
BUF_XRETRY = BIT(5),
};

#define bf_retries bf_state.bfs_retries
#define bf_isampdu(bf) (bf->bf_state.bf_type & BUF_AMPDU)
#define bf_isaggr(bf) (bf->bf_state.bf_type & BUF_AGGR)
#define bf_isretried(bf) (bf->bf_state.bf_type & BUF_RETRY)
#define bf_isxretried(bf) (bf->bf_state.bf_type & BUF_XRETRY)

#define ATH_TXSTATUS_RING_SIZE 64
Expand Down Expand Up @@ -207,8 +203,15 @@ struct ath_atx_ac {
struct list_head tid_q;
};

struct ath_frame_info {
int framelen;
u32 keyix;
enum ath9k_key_type keytype;
u8 retries;
u16 seqno;
};

struct ath_buf_state {
int bfs_retries;
u8 bf_type;
u8 bfs_paprd;
enum ath9k_internal_frame_type bfs_ftype;
Expand Down Expand Up @@ -260,9 +263,9 @@ struct ath_node {

struct ath_tx_control {
struct ath_txq *txq;
struct ath_node *an;
int if_id;
enum ath9k_internal_frame_type frame_type;
int frmlen;
u8 paprd;
};

Expand Down
Loading

0 comments on commit 2d42efc

Please sign in to comment.