mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 21:24:00 +08:00
wl1271: Update TX path block calucation algo
Update the TX path block calculation algorithm based on TI reference. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
3cfd6cf960
commit
207347e498
@ -57,8 +57,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) >> TX_HW_BLOCK_SHIFT_DIV;
|
||||
excluded = (total_blocks << 2) + (skb->len & 0xff) + 34;
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user