Skip to content

Commit

Permalink
wl1271: Correction to TX block allocation calculation
Browse files Browse the repository at this point in the history
Correct the TX path implementation to allocate sufficient blocks in the
firmware for TX packets.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Oct 27, 2009
1 parent 9d56597 commit 3b4be9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/wl12xx/wl1271_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ 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 = (skb->len) >> TX_HW_BLOCK_SHIFT_DIV;
total_blocks = (total_len) >> TX_HW_BLOCK_SHIFT_DIV;
excluded = (total_blocks << 2) + (skb->len & 0xff) + 34;
total_blocks += (excluded > 252) ? 2 : 1;
total_blocks += TX_HW_BLOCK_SPARE;
Expand Down

0 comments on commit 3b4be9e

Please sign in to comment.