Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194393
b: refs/heads/master
c: 87d5efb
h: refs/heads/master
i:
  194391: a924cba
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and John W. Linville committed Apr 16, 2010
1 parent 4b46721 commit 9cd9b82
Show file tree
Hide file tree
Showing 6 changed files with 43 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: 3f3a1c8031fd87a7d0195d0a8e8101d04c283fcc
refs/heads/master: 87d5efbbd6b6df6111404f9c12ad1b9a957498c5
12 changes: 12 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ar9003_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,23 @@ static void ar9003_hw_rx_enable(struct ath_hw *hw)
REG_WRITE(hw, AR_CR, 0);
}

static void ar9003_hw_set_desc_link(void *ds, u32 ds_link)
{
((struct ar9003_txc *) ds)->link = ds_link;
}

static void ar9003_hw_get_desc_link(void *ds, u32 **ds_link)
{
*ds_link = &((struct ar9003_txc *) ds)->link;
}

void ar9003_hw_attach_mac_ops(struct ath_hw *hw)
{
struct ath_hw_ops *ops = ath9k_hw_ops(hw);

ops->rx_enable = ar9003_hw_rx_enable;
ops->set_desc_link = ar9003_hw_set_desc_link;
ops->get_desc_link = ar9003_hw_get_desc_link;
}

void ath9k_hw_set_rx_bufsize(struct ath_hw *ah, u16 buf_size)
Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/hw-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ static inline void ath9k_hw_rxena(struct ath_hw *ah)
ath9k_hw_ops(ah)->rx_enable(ah);
}

static inline void ath9k_hw_set_desc_link(struct ath_hw *ah, void *ds,
u32 link)
{
ath9k_hw_ops(ah)->set_desc_link(ds, link);
}

static inline void ath9k_hw_get_desc_link(struct ath_hw *ah, void *ds,
u32 **link)
{
ath9k_hw_ops(ah)->get_desc_link(ds, link);
}
/* Private hardware call ops */

/* PHY ops */
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ struct ath_hw_ops {
int restore,
int power_off);
void (*rx_enable)(struct ath_hw *ah);
void (*set_desc_link)(void *ds, u32 link);
void (*get_desc_link)(void *ds, u32 **link);
};

struct ath_hw {
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,25 @@ static void ar9002_hw_rx_enable(struct ath_hw *ah)
REG_WRITE(ah, AR_CR, AR_CR_RXE);
}

static void ar9002_hw_set_desc_link(void *ds, u32 ds_link)
{
((struct ath_desc *) ds)->ds_link = ds_link;
}

static void ar9002_hw_get_desc_link(void *ds, u32 **ds_link)
{
*ds_link = &((struct ath_desc *)ds)->ds_link;
}

void ar9002_hw_attach_mac_ops(struct ath_hw *ah)
{
struct ath_hw_ops *ops = ath9k_hw_ops(ah);

ops->rx_enable = ar9002_hw_rx_enable;
ops->set_desc_link = ar9002_hw_set_desc_link;
ops->get_desc_link = ar9002_hw_get_desc_link;
}

static void ath9k_hw_set_txq_interrupts(struct ath_hw *ah,
struct ath9k_tx_queue_info *qi)
{
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,15 +665,16 @@ static enum ATH_AGGR_STATUS ath_tx_form_aggr(struct ath_softc *sc,
bpad = PADBYTES(al_delta) + (ndelim << 2);

bf->bf_next = NULL;
bf->bf_desc->ds_link = 0;
ath9k_hw_set_desc_link(sc->sc_ah, bf->bf_desc, 0);

/* link buffers of this frame to the aggregate */
ath_tx_addto_baw(sc, tid, bf);
ath9k_hw_set11n_aggr_middle(sc->sc_ah, bf->bf_desc, ndelim);
list_move_tail(&bf->list, bf_q);
if (bf_prev) {
bf_prev->bf_next = bf;
bf_prev->bf_desc->ds_link = bf->bf_daddr;
ath9k_hw_set_desc_link(sc->sc_ah, bf_prev->bf_desc,
bf->bf_daddr);
}
bf_prev = bf;

Expand Down Expand Up @@ -1659,7 +1660,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
list_add_tail(&bf->list, &bf_head);

ds = bf->bf_desc;
ds->ds_link = 0;
ath9k_hw_set_desc_link(ah, ds, 0);

ath9k_hw_set11n_txdesc(ah, ds, bf->bf_frmlen, frm_type, MAX_RATE_POWER,
bf->bf_keyix, bf->bf_keytype, bf->bf_flags);
Expand Down

0 comments on commit 9cd9b82

Please sign in to comment.