54 #include <linux/module.h>
55 #include <linux/kernel.h>
56 #include <linux/sched.h>
57 #include <linux/types.h>
59 #include <linux/slab.h>
60 #include <linux/wireless.h>
61 #include <linux/netdevice.h>
63 #include <linux/if_ether.h>
66 #include <asm/byteorder.h>
199 "Error: Converting eth to wlan in unknown mode.\n");
214 p80211_wep->
iv, p80211_wep->
icv);
217 "Host en-WEP failed, dropping frame (%d).\n",
226 p80211_hdr->
a3.fc =
fc;
227 p80211_hdr->
a3.dur = 0;
228 p80211_hdr->
a3.seq = 0;
324 if (payload_length <= 8) {
330 payload_length - 8, -1,
331 skb->
data + payload_offset,
332 skb->
data + payload_offset +
336 pr_debug(
"Host de-WEP failed, dropping frame (%d).\n",
338 wlandev->
rx.decrypt_err++;
349 wlandev->
rx.decrypt++;
354 e_llc = (
struct wlan_llc *) (skb->
data + payload_offset);
360 if ((payload_length >=
sizeof(
struct wlan_ethhdr)) &&
361 (e_llc->
dsap != 0xaa || e_llc->
ssap != 0xaa) &&
364 pr_debug(
"802.3 ENCAP len: %d\n", payload_length);
380 }
else if ((payload_length >=
sizeof(
struct wlan_llc) +
382 && (e_llc->
dsap == 0xaa)
383 && (e_llc->
ssap == 0xaa)
384 && (e_llc->
ctl == 0x03)
391 pr_debug(
"SNAP+RFC1042 len: %d\n", payload_length);
396 if (payload_length > netdev->
mtu) {
400 payload_length, netdev->
mtu);
416 }
else if ((payload_length >=
sizeof(
struct wlan_llc) +
418 && (e_llc->
dsap == 0xaa)
419 && (e_llc->
ssap == 0xaa)
420 && (e_llc->
ctl == 0x03)) {
421 pr_debug(
"802.1h/RFC1042 len: %d\n", payload_length);
426 if ((payload_length -
sizeof(
struct wlan_llc) -
432 (
long int)(payload_length -
456 pr_debug(
"NON-ENCAP len: %d\n", payload_length);
463 if (payload_length > netdev->
mtu) {
467 payload_length, netdev->
mtu);
499 orinoco_spy_gather(wlandev, eth_hdr(skb)->
h_source,
565 if (frmmeta ==
NULL) {
566 pr_debug(
"Called w/ bad frmmeta magic.\n");
569 rxmeta = frmmeta->
rx;
570 if (rxmeta ==
NULL) {
571 pr_debug(
"Called w/ bad rxmeta ptr.\n");
579 memset(skb->cb, 0,
sizeof(skb->cb));
615 if (rxmeta ==
NULL) {
630 frmmeta->
rx = rxmeta;
656 if (meta && meta->
rx)