|
Lines 889-895
Link Here
|
| 889 |
pBuf->mac_len = uMacLen; |
889 |
pBuf->mac_len = uMacLen; |
| 890 |
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) |
890 |
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) |
| 891 |
/* Restore VLAN tag stripped by host hardware */ |
891 |
/* Restore VLAN tag stripped by host hardware */ |
| 892 |
if (vlan_tx_tag_present(pBuf) && skb_headroom(pBuf) >= VLAN_ETH_HLEN) |
892 |
if (skb_vlan_tag_present(pBuf) && skb_headroom(pBuf) >= VLAN_ETH_HLEN) |
| 893 |
{ |
893 |
{ |
| 894 |
uint8_t *pMac = (uint8_t*)skb_mac_header(pBuf); |
894 |
uint8_t *pMac = (uint8_t*)skb_mac_header(pBuf); |
| 895 |
struct vlan_ethhdr *pVHdr = (struct vlan_ethhdr *)(pMac - VLAN_HLEN); |
895 |
struct vlan_ethhdr *pVHdr = (struct vlan_ethhdr *)(pMac - VLAN_HLEN); |
|
Lines 899-905
Link Here
|
| 899 |
memmove(pVHdr, pMac, VLAN_ETH_ALEN * 2); |
899 |
memmove(pVHdr, pMac, VLAN_ETH_ALEN * 2); |
| 900 |
# endif |
900 |
# endif |
| 901 |
pVHdr->h_vlan_proto = RT_H2N_U16(ETH_P_8021Q); |
901 |
pVHdr->h_vlan_proto = RT_H2N_U16(ETH_P_8021Q); |
| 902 |
pVHdr->h_vlan_TCI = RT_H2N_U16(vlan_tx_tag_get(pBuf)); |
902 |
pVHdr->h_vlan_TCI = RT_H2N_U16(skb_vlan_tag_get(pBuf)); |
| 903 |
pBuf->mac_header -= VLAN_HLEN; |
903 |
pBuf->mac_header -= VLAN_HLEN; |
| 904 |
pBuf->mac_len += VLAN_HLEN; |
904 |
pBuf->mac_len += VLAN_HLEN; |
| 905 |
} |
905 |
} |