-
- eap_skb = alloc_skb(skb->len + ETH_HLEN, GFP_KERNEL);
- if (!eap_skb) {
- esp_info("%u memory alloc failed\n", __LINE__);
- dev_kfree_skb_any(skb);
- return;
- }
- eap_skb->dev = priv->ndev;
-
- if (!IS_ALIGNED((unsigned long) eap_skb->data, SKB_DATA_ADDR_ALIGNMENT)) {
- esp_info("%u eap skb unaligned\n", __LINE__);
- }
-
- eth = (struct ethhdr *) skb_put(eap_skb, ETH_HLEN);
- ether_addr_copy(eth->h_dest, /*skb->data*/priv->ndev->dev_addr);
- ether_addr_copy(eth->h_source, /*skb->data+6*/ ap_bssid);
- eth->h_proto = cpu_to_be16(ETH_P_PAE);
-
- skb_put_data(eap_skb, skb->data, skb->len);
- eap_skb->protocol = eth_type_trans(eap_skb, eap_skb->dev);
- dev_kfree_skb_any(skb);
-
- netif_rx(eap_skb);