[query] skb alignment in tx path of driver

From: Kalpesh Rathod
Date: Thu Jul 23 2009 - 13:01:23 EST


Hi,

I am writing n/w device driver for sdio wifi card. I am testing it on
embedded platform.
DMA controller on the platform is able to xfer data to sdio only if
source data buf address is 4 byte aligned.

The firmware on the card understands 802.3 frames with snap headers.
So, I convert it to the required format in my driver.
4 byte additional header is also attached to this frame and sent over sdio.
This all conversion effectively adds 12 byes to the frame received in
hard_xmit method.

Problem is, frame received in hard_xmit method is 2 byte aligned.
(skb->data is 2 byte aligned). As a result,
after addition of 12 bytes header, skb->data remains 2 byte aligned
instead of 4 byte aligned. And DMA controller refuses
to transfer it.

So, how can I request IP stack so that frame received in hard_xmit is
on 4 byte aligned boundry?

I believe setting NET_IP_ALIGN will only matter in rx path. is this correct?

Thanks in advance.

Regards,
Kalpesh
--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html