Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247095
b: refs/heads/master
c: ae77ecc
h: refs/heads/master
i:
  247093: a11822c
  247091: d15a89a
  247087: 4264169
v: v3
  • Loading branch information
Shahar Levi authored and Luciano Coelho committed Apr 19, 2011
1 parent 9fe1c77 commit effdc23
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 22 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: 13b107dd9808343d05627f0fba7fbc764c86738e
refs/heads/master: ae77eccf04f8c36769bdba334e1bbcc7bb9d3644
31 changes: 19 additions & 12 deletions trunk/drivers/net/wireless/wl12xx/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,25 @@ void wl1271_rx(struct wl1271 *wl, struct wl1271_fw_common_status *status)
break;
}

/*
* Choose the block we want to read
* For aggregated packets, only the first memory block should
* be retrieved. The FW takes care of the rest.
*/
mem_block = wl1271_rx_get_mem_block(status, drv_rx_counter);
wl->rx_mem_pool_addr.addr = (mem_block << 8) +
le32_to_cpu(wl_mem_map->packet_memory_pool_start);
wl->rx_mem_pool_addr.addr_extra =
wl->rx_mem_pool_addr.addr + 4;
wl1271_write(wl, WL1271_SLV_REG_DATA, &wl->rx_mem_pool_addr,
sizeof(wl->rx_mem_pool_addr), false);
if (wl->chip.id != CHIP_ID_1283_PG20) {
/*
* Choose the block we want to read
* For aggregated packets, only the first memory block
* should be retrieved. The FW takes care of the rest.
*/
mem_block = wl1271_rx_get_mem_block(status,
drv_rx_counter);

wl->rx_mem_pool_addr.addr = (mem_block << 8) +
le32_to_cpu(wl_mem_map->packet_memory_pool_start);

wl->rx_mem_pool_addr.addr_extra =
wl->rx_mem_pool_addr.addr + 4;

wl1271_write(wl, WL1271_SLV_REG_DATA,
&wl->rx_mem_pool_addr,
sizeof(wl->rx_mem_pool_addr), false);
}

/* Read all available packets at once */
wl1271_read(wl, WL1271_SLV_MEM_DATA, wl->aggr_buf,
Expand Down
30 changes: 21 additions & 9 deletions trunk/drivers/net/wireless/wl12xx/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,14 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct sk_buff *skb, u32 extra,
desc = (struct wl1271_tx_hw_descr *)skb_push(
skb, total_len - skb->len);

desc->wl127x_mem.extra_blocks = TX_HW_BLOCK_SPARE;
desc->wl127x_mem.total_mem_blocks = total_blocks;
/* HW descriptor fields change between wl127x and wl128x */
if (wl->chip.id == CHIP_ID_1283_PG20) {
desc->wl128x_mem.total_mem_blocks = total_blocks;
} else {
desc->wl127x_mem.extra_blocks = TX_HW_BLOCK_SPARE;
desc->wl127x_mem.total_mem_blocks = total_blocks;
}

desc->id = id;

wl->tx_blocks_available -= total_blocks;
Expand Down Expand Up @@ -249,6 +255,13 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb,

desc->wl128x_mem.extra_bytes = aligned_len - skb->len;
desc->length = cpu_to_le16(aligned_len >> 2);

wl1271_debug(DEBUG_TX, "tx_fill_hdr: hlid: %d "
"tx_attr: 0x%x len: %d life: %d mem: %d",
desc->hlid, tx_attr,
le16_to_cpu(desc->length),
le16_to_cpu(desc->life_time),
desc->wl128x_mem.total_mem_blocks);
} else {
int pad;

Expand All @@ -260,16 +273,15 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb,
pad = aligned_len - skb->len;
tx_attr |= pad << TX_HW_ATTR_OFST_LAST_WORD_PAD;

wl1271_debug(DEBUG_TX, "tx_fill_hdr: padding: %d", pad);
wl1271_debug(DEBUG_TX, "tx_fill_hdr: pad: %d hlid: %d "
"tx_attr: 0x%x len: %d life: %d mem: %d", pad,
desc->hlid, tx_attr,
le16_to_cpu(desc->length),
le16_to_cpu(desc->life_time),
desc->wl127x_mem.total_mem_blocks);
}

desc->tx_attr = cpu_to_le16(tx_attr);

wl1271_debug(DEBUG_TX, "tx_fill_hdr: hlid: %d tx_attr: 0x%x "
"len: %d life: %d mem: %d",
desc->hlid, le16_to_cpu(desc->tx_attr),
le16_to_cpu(desc->length), le16_to_cpu(desc->life_time),
desc->wl127x_mem.total_mem_blocks);
}

/* caller must hold wl->mutex */
Expand Down

0 comments on commit effdc23

Please sign in to comment.