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];
189 if (!(crypt && crypt->
ops))
194 #ifdef CONFIG_IEEE80211_CRYPT_TKIP
198 crypt && crypt->
ops &&
strcmp(crypt->
ops->name,
"TKIP") == 0) {
202 "TX packet to %pM\n",
216 if (crypt->
ops->encrypt_msdu)
217 res = crypt->
ops->encrypt_msdu(frag, hdr_len, crypt->
priv);
218 if (res == 0 && crypt->
ops->encrypt_mpdu)
219 res = crypt->
ops->encrypt_mpdu(frag, hdr_len, crypt->
priv);
224 ieee->
dev->name, frag->
len);
285 switch (ip->
tos & 0xfc) {
305 #define SN_LESS(a, b) (((a-b)&0x800)!=0)
317 if (is_multicast_ether_addr(hdr->
addr1))
321 if(pTcb->PacketLength >= 4096)
335 printk(
"===>can't get TS\n");
341 goto FORCED_AGG_SETTING;
348 goto FORCED_AGG_SETTING;
447 if (is_broadcast_ether_addr(skb->
data+16))
488 if((pHTInfo->
bCurBW40MHz && (HTOpMode == 2 || HTOpMode == 3)) ||
551 pTcb->bTxDisableRateFallBack =
TRUE;
552 pTcb->bTxUseDriverAssingedRate =
TRUE;
557 if(pMgntInfo->ForcedDataRate!= 0)
559 pTcb->bTxDisableRateFallBack =
TRUE;
560 pTcb->bTxUseDriverAssingedRate =
TRUE;
578 if (is_multicast_ether_addr(dst))
596 int i, bytes_per_frag, nr_frags, bytes_last_frag, frag_size;
629 ieee->
dev->name, skb->
len);
633 memset(skb->cb, 0,
sizeof(skb->cb));
646 #ifdef CONFIG_IEEE80211_DEBUG
651 eap_get_type(eap->
type));
696 if (is_multicast_ether_addr(header.
addr1)) {
701 frag_size = ieee->
fts;
720 bytes_per_frag = frag_size -
hdr_len;
727 bytes_per_frag -= crypt->
ops->extra_prefix_len +
728 crypt->
ops->extra_postfix_len;
732 nr_frags = bytes / bytes_per_frag;
733 bytes_last_frag = bytes % bytes_per_frag;
737 bytes_last_frag = bytes_per_frag;
761 for (i = 0; i < nr_frags; i++) {
778 skb_reserve(skb_frag, crypt->
ops->extra_prefix_len);
785 memcpy(frag_hdr, &header, hdr_len);
789 if (i != nr_frags - 1) {
792 bytes = bytes_per_frag;
796 bytes = bytes_last_frag;
844 ieee->
dev->name, skb->
len);
866 if (is_multicast_ether_addr(header.
addr1))
868 if (is_broadcast_ether_addr(header.
addr1))
885 spin_unlock_irqrestore(&ieee->
lock, flags);
903 spin_unlock_irqrestore(&ieee->
lock, flags);
904 netif_stop_queue(dev);