#include "u_ether.h"
+static gfp_t g_gfp_flags;
/*
* This component encapsulates the Ethernet link glue needed to provide
* but on at least one, checksumming fails otherwise. Note:
* RNDIS headers involve variable numbers of LE32 values.
*/
- skb_reserve(skb, NET_IP_ALIGN);
+ //skb_reserve(skb, NET_IP_ALIGN);
req->buf = skb->data;
req->length = size;
length = skb->len;
}
+
+ // for tx fixup
+ {
+ struct sk_buff *tx_skb;
+ if ((unsigned long)skb->data % 4) {
+ tx_skb = alloc_skb(skb->len + NET_IP_ALIGN, g_gfp_flags);
+ if (tx_skb)
+ memcpy(skb_put(tx_skb, skb->len), skb->data, skb->len);
+ dev_kfree_skb_any(skb);
+ skb = tx_skb;
+ }
+ length = skb->len;
+ }
+ // for tx fixup
+
req->buf = skb->data;
req->context = skb;
req->complete = tx_complete;
static void eth_start(struct eth_dev *dev, gfp_t gfp_flags)
{
DBG(dev, "%s\n", __func__);
+
+ g_gfp_flags = gfp_flags;
/* fill the rx queue */
rx_fill(dev, gfp_flags);