Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193671
b: refs/heads/master
c: 5c9417f
h: refs/heads/master
i:
  193669: 2ce6198
  193667: 1132c3a
  193663: 5e77599
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Mar 9, 2010
1 parent f3d7121 commit 83f25ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 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: ac5e1e39c1eeaaff7e6f03bf7cf7a444b42fbc23
refs/heads/master: 5c9417f1656b0f415f4be5a7cd7195ecadd7dd1a
10 changes: 3 additions & 7 deletions trunk/drivers/net/wireless/wl12xx/wl1271_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct sk_buff *skb, u32 extra)
{
struct wl1271_tx_hw_descr *desc;
u32 total_len = skb->len + sizeof(struct wl1271_tx_hw_descr) + extra;
u32 total_blocks, excluded;
u32 total_blocks;
int id, ret = -EBUSY;

/* allocate free identifier for the packet */
Expand All @@ -56,12 +56,8 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct sk_buff *skb, u32 extra)

/* approximate the number of blocks required for this packet
in the firmware */
/* FIXME: try to figure out what is done here and make it cleaner */
total_blocks = (total_len + 20) >> TX_HW_BLOCK_SHIFT_DIV;
excluded = (total_blocks << 2) + ((total_len + 20) & 0xff) + 34;
total_blocks += (excluded > 252) ? 2 : 1;
total_blocks += TX_HW_BLOCK_SPARE;

total_blocks = total_len + TX_HW_BLOCK_SIZE - 1;
total_blocks = total_blocks / TX_HW_BLOCK_SIZE + TX_HW_BLOCK_SPARE;
if (total_blocks <= wl->tx_blocks_available) {
desc = (struct wl1271_tx_hw_descr *)skb_push(
skb, total_len - skb->len);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define __WL1271_TX_H__

#define TX_HW_BLOCK_SPARE 2
#define TX_HW_BLOCK_SHIFT_DIV 8
#define TX_HW_BLOCK_SIZE 252

#define TX_HW_MGMT_PKT_LIFETIME_TU 2000
/* The chipset reference driver states, that the "aid" value 1
Expand Down

0 comments on commit 83f25ea

Please sign in to comment.