34 #include <linux/compiler.h>
36 #include <linux/errno.h>
37 #include <linux/if_arp.h>
38 #include <linux/in6.h>
41 #include <linux/kernel.h>
42 #include <linux/module.h>
43 #include <linux/netdevice.h>
44 #include <linux/pci.h>
47 #include <linux/slab.h>
48 #include <linux/tcp.h>
49 #include <linux/types.h>
50 #include <linux/wireless.h>
52 #include <asm/uaccess.h>
53 #include <linux/if_vlan.h>
168 if (h_proto == 0x8137 || h_proto == 0x80f3)
172 snap->
oui[0] = oui[0];
173 snap->
oui[1] = oui[1];
174 snap->
oui[2] = oui[2];
190 if (!crypt || !crypt->
ops)
193 #ifdef CONFIG_IEEE80211_CRYPT_TKIP
197 crypt && crypt->
ops &&
strcmp(crypt->
ops->name,
"TKIP") == 0) {
201 "TX packet to %pM\n",
215 if (crypt->
ops->encrypt_msdu)
216 res = crypt->
ops->encrypt_msdu(frag, hdr_len, crypt->
priv);
217 if (res == 0 && crypt->
ops->encrypt_mpdu)
218 res = crypt->
ops->encrypt_mpdu(frag, hdr_len, crypt->
priv);
223 ieee->
dev->name, frag->
len);
279 unsigned int wme_UP = 0;
289 wme_UP = (ih->
tos >> 5)&0x07;
291 #ifndef VLAN_PRI_SHIFT
292 #define VLAN_PRI_SHIFT 13
293 #define VLAN_PRI_MASK 7
313 int i, bytes_per_frag, nr_frags, bytes_last_frag, frag_size;
345 ieee->
dev->name, skb->
len);
362 #ifdef CONFIG_IEEE80211_DEBUG
363 if (crypt && !encrypt && ether_type ==
ETH_P_PAE) {
367 eap_get_type(eap->
type));
416 if (is_multicast_ether_addr(header.
addr1)) {
422 frag_size = ieee->
fts;
440 bytes_per_frag = frag_size -
hdr_len;
447 bytes_per_frag -= crypt->
ops->extra_prefix_len +
448 crypt->
ops->extra_postfix_len;
452 nr_frags = bytes / bytes_per_frag;
453 bytes_last_frag = bytes % bytes_per_frag;
457 bytes_last_frag = bytes_per_frag;
471 for (i = 0; i < nr_frags; i++) {
475 skb_reserve(skb_frag, crypt->
ops->extra_prefix_len);
478 memcpy(frag_hdr, &header, hdr_len);
482 if (i != nr_frags - 1) {
485 bytes = bytes_per_frag;
489 bytes = bytes_last_frag;
540 ieee->
dev->name, skb->
len);
557 spin_unlock_irqrestore(&ieee->
lock, flags);
575 spin_unlock_irqrestore(&ieee->
lock, flags);
576 netif_stop_queue(dev);