Lines 1048-1058
Link Here
|
1048 |
* incoming fragments |
1048 |
* incoming fragments |
1049 |
* XXX 4-address/QoS frames? |
1049 |
* XXX 4-address/QoS frames? |
1050 |
*/ |
1050 |
*/ |
1051 |
else if (skb->end - skb->head < ni->ni_vap->iv_dev->mtu + |
1051 |
else if (skb_end_pointer(skb) - skb->head < ni->ni_vap->iv_dev->mtu + |
1052 |
hdrlen) { |
1052 |
hdrlen) { |
1053 |
ni->ni_rxfrag = skb_copy_expand(skb, 0, |
1053 |
ni->ni_rxfrag = skb_copy_expand(skb, 0, |
1054 |
(ni->ni_vap->iv_dev->mtu + hdrlen) - |
1054 |
(ni->ni_vap->iv_dev->mtu + hdrlen) - |
1055 |
(skb->end - skb->head), GFP_ATOMIC); |
1055 |
(skb_end_pointer(skb) - skb->head), GFP_ATOMIC); |
1056 |
dev_kfree_skb(skb); |
1056 |
dev_kfree_skb(skb); |
1057 |
} |
1057 |
} |
1058 |
} |
1058 |
} |
Lines 1066-1072
Link Here
|
1066 |
* we've verified that before |
1066 |
* we've verified that before |
1067 |
*/ |
1067 |
*/ |
1068 |
/* Copy current fragment at end of previous one */ |
1068 |
/* Copy current fragment at end of previous one */ |
1069 |
memcpy(ni->ni_rxfrag->tail, |
1069 |
memcpy(skb_tail_pointer(ni->ni_rxfrag), |
1070 |
skb->data + hdrlen, skb->len - hdrlen); |
1070 |
skb->data + hdrlen, skb->len - hdrlen); |
1071 |
/* Update tail and length */ |
1071 |
/* Update tail and length */ |
1072 |
skb_put(ni->ni_rxfrag, skb->len - hdrlen); |
1072 |
skb_put(ni->ni_rxfrag, skb->len - hdrlen); |
Lines 1136-1143
Link Here
|
1136 |
} |
1136 |
} |
1137 |
if (skb1 != NULL) { |
1137 |
if (skb1 != NULL) { |
1138 |
skb1->dev = dev; |
1138 |
skb1->dev = dev; |
1139 |
skb1->mac.raw = skb1->data; |
1139 |
skb_reset_mac_header(skb1); |
1140 |
skb1->nh.raw = skb1->data + sizeof(struct ether_header); |
1140 |
skb_set_network_header(skb1, sizeof(struct ether_header)); |
1141 |
skb1->protocol = __constant_htons(ETH_P_802_2); |
1141 |
skb1->protocol = __constant_htons(ETH_P_802_2); |
1142 |
/* XXX insert vlan tag before queue it? */ |
1142 |
/* XXX insert vlan tag before queue it? */ |
1143 |
dev_queue_xmit(skb1); |
1143 |
dev_queue_xmit(skb1); |
Lines 2259-2265
Link Here
|
2259 |
if (skb1 == NULL) |
2259 |
if (skb1 == NULL) |
2260 |
return; |
2260 |
return; |
2261 |
skb1->dev = dev; |
2261 |
skb1->dev = dev; |
2262 |
skb1->mac.raw = skb1->data; |
2262 |
skb_reset_mac_header(skb1); |
2263 |
skb1->ip_summed = CHECKSUM_NONE; |
2263 |
skb1->ip_summed = CHECKSUM_NONE; |
2264 |
skb1->pkt_type = PACKET_OTHERHOST; |
2264 |
skb1->pkt_type = PACKET_OTHERHOST; |
2265 |
skb1->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */ |
2265 |
skb1->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */ |
Lines 2533-2540
Link Here
|
2533 |
l2uf->xid[2] = 0x00; |
2533 |
l2uf->xid[2] = 0x00; |
2534 |
|
2534 |
|
2535 |
skb->dev = dev; |
2535 |
skb->dev = dev; |
2536 |
skb->protocol = eth_type_trans(skb, dev); |
2536 |
skb->pkt_type = PACKET_BROADCAST; |
2537 |
skb->mac.raw = skb->data; |
2537 |
skb->protocol = htons(ETH_P_802_2); |
|
|
2538 |
skb_reset_mac_header(skb); |
2538 |
ieee80211_deliver_data(ni, skb); |
2539 |
ieee80211_deliver_data(ni, skb); |
2539 |
return; |
2540 |
return; |
2540 |
} |
2541 |
} |
Lines 3713-3726
Link Here
|
3713 |
{ |
3714 |
{ |
3714 |
struct ethhdr *eth; |
3715 |
struct ethhdr *eth; |
3715 |
|
3716 |
|
3716 |
skb->mac.raw=skb->data; |
3717 |
skb_reset_mac_header(skb); |
3717 |
skb_pull(skb, ETH_HLEN); |
3718 |
skb_pull(skb, ETH_HLEN); |
3718 |
/* |
3719 |
/* |
3719 |
* NB: mac.ethernet is replaced in 2.6.9 by eth_hdr but |
3720 |
* NB: mac.ethernet is replaced in 2.6.9 by eth_hdr but |
3720 |
* since that's an inline and not a define there's |
3721 |
* since that's an inline and not a define there's |
3721 |
* no easy way to do this cleanly. |
3722 |
* no easy way to do this cleanly. |
3722 |
*/ |
3723 |
*/ |
3723 |
eth = (struct ethhdr *)skb->mac.raw; |
3724 |
eth = (struct ethhdr *)skb_mac_header(skb); |
3724 |
|
3725 |
|
3725 |
if (*eth->h_dest & 1) |
3726 |
if (*eth->h_dest & 1) |
3726 |
if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) |
3727 |
if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) |