Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194445
b: refs/heads/master
c: eb82325
h: refs/heads/master
i:
  194443: 97fb919
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and John W. Linville committed Apr 16, 2010
1 parent c57d13e commit a53b5f7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 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: 5088c2f1a2475546d9a79b515bde6d65b8681e51
refs/heads/master: eb8232535bbeaf51f7c4826265ad96bf966829f3
36 changes: 21 additions & 15 deletions trunk/drivers/net/wireless/ath/ath9k/ar9003_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,33 @@ static void ar9003_hw_rx_enable(struct ath_hw *hw)
REG_WRITE(hw, AR_CR, 0);
}

static u16 ar9003_calc_ptr_chksum(struct ar9003_txc *ads)
{
int checksum;

checksum = ads->info + ads->link
+ ads->data0 + ads->ctl3
+ ads->data1 + ads->ctl5
+ ads->data2 + ads->ctl7
+ ads->data3 + ads->ctl9;

return ((checksum & 0xffff) + (checksum >> 16)) & AR_TxPtrChkSum;
}

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

ads->link = ds_link;
ads->ctl10 &= ~AR_TxPtrChkSum;
ads->ctl10 |= ar9003_calc_ptr_chksum(ads);
}

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

*ds_link = &ads->link;
}

static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)
Expand Down Expand Up @@ -168,19 +187,6 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)
return true;
}

static u16 ar9003_calc_ptr_chksum(struct ar9003_txc *ads)
{
int checksum;

checksum = ads->info + ads->link
+ ads->data0 + ads->ctl3
+ ads->data1 + ads->ctl5
+ ads->data2 + ads->ctl7
+ ads->data3 + ads->ctl9;

return ((checksum & 0xffff) + (checksum >> 16)) & AR_TxPtrChkSum;
}

static void ar9003_hw_fill_txdesc(struct ath_hw *ah, void *ds, u32 seglen,
bool is_firstseg, bool is_lastseg,
const void *ds0, dma_addr_t buf_addr,
Expand Down

0 comments on commit a53b5f7

Please sign in to comment.