diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-11 11:10:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-11 11:10:24 -0400 |
commit | 90768c09bca4f306c00a0cdbcb2f82601231e93e (patch) | |
tree | e1f59bf95e7457e4aee4534d16998a7a146c1b82 | |
parent | 3f0635016246e2fee6e80b4741299833c68b065e (diff) | |
parent | 7951f0b03a63d657c72c7d54d306ef3357e7e604 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
[NETNS][IPV6] tcp - assign the netns for timewait sockets
[IPV4]: Fix byte value boundary check in do_ip_getsockopt().
BNX2X: Correct bringing chip out of reset
[NETFILTER]: nf_nat: autoload IPv4 connection tracking
[NETFILTER]: xt_hashlimit: fix mask calculation
[XFRM]: xfrm_user: fix selector family initialization
rt61pci: rt61pci_beacon_update do not free skb twice
ssb-mipscore: Fix interrupt vectors
ssb-pcicore: Fix IRQ TPS flag handling
mac80211: use short_preamble mode from capability if ERP IE not present
[NET]: Undo code bloat in hot paths due to print_mac().
[TCP]: Don't allow FRTO to take place while MTU is being probed
[TCP]: tcp_simple_retransmit can cause S+L
[TCP]: Fix NewReno's fast rexmit/recovery problems with GSOed skb
[TCP]: Restore 2.6.24 mark_head_lost behavior for newreno/fack
nl80211: fix STA AID bug
b43legacy: fix bcm4303 crash
iwlwifi: fix n-band association problem
ipw2200: set MAC address on radiotap interface
libertas: fix mode initialization problem
26 files changed, 344 insertions, 195 deletions
diff --git a/drivers/net/bnx2x.c b/drivers/net/bnx2x.c index de32b3fba322..7bdb5af35951 100644 --- a/drivers/net/bnx2x.c +++ b/drivers/net/bnx2x.c | |||
@@ -63,8 +63,8 @@ | |||
63 | #include "bnx2x.h" | 63 | #include "bnx2x.h" |
64 | #include "bnx2x_init.h" | 64 | #include "bnx2x_init.h" |
65 | 65 | ||
66 | #define DRV_MODULE_VERSION "1.42.3" | 66 | #define DRV_MODULE_VERSION "1.42.4" |
67 | #define DRV_MODULE_RELDATE "2008/3/9" | 67 | #define DRV_MODULE_RELDATE "2008/4/9" |
68 | #define BNX2X_BC_VER 0x040200 | 68 | #define BNX2X_BC_VER 0x040200 |
69 | 69 | ||
70 | /* Time in jiffies before concluding the transmitter is hung. */ | 70 | /* Time in jiffies before concluding the transmitter is hung. */ |
@@ -6153,7 +6153,7 @@ static int bnx2x_function_init(struct bnx2x *bp, int mode) | |||
6153 | func, mode); | 6153 | func, mode); |
6154 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, | 6154 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, |
6155 | 0xffffffff); | 6155 | 0xffffffff); |
6156 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, | 6156 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, |
6157 | 0xfffc); | 6157 | 0xfffc); |
6158 | bnx2x_init_block(bp, MISC_COMMON_START, MISC_COMMON_END); | 6158 | bnx2x_init_block(bp, MISC_COMMON_START, MISC_COMMON_END); |
6159 | 6159 | ||
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index c49214feae91..7b7b1717b0d1 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -1472,13 +1472,12 @@ static int __netdev_rx(struct net_device *dev, int *quota) | |||
1472 | #ifndef final_version /* Remove after testing. */ | 1472 | #ifndef final_version /* Remove after testing. */ |
1473 | /* You will want this info for the initial debug. */ | 1473 | /* You will want this info for the initial debug. */ |
1474 | if (debug > 5) { | 1474 | if (debug > 5) { |
1475 | DECLARE_MAC_BUF(mac); | 1475 | printk(KERN_DEBUG " Rx data " MAC_FMT " " MAC_FMT |
1476 | DECLARE_MAC_BUF(mac2); | ||
1477 | |||
1478 | printk(KERN_DEBUG " Rx data %s %s" | ||
1479 | " %2.2x%2.2x.\n", | 1476 | " %2.2x%2.2x.\n", |
1480 | print_mac(mac, &skb->data[0]), | 1477 | skb->data[0], skb->data[1], skb->data[2], |
1481 | print_mac(mac2, &skb->data[6]), | 1478 | skb->data[3], skb->data[4], skb->data[5], |
1479 | skb->data[6], skb->data[7], skb->data[8], | ||
1480 | skb->data[9], skb->data[10], skb->data[11], | ||
1482 | skb->data[12], skb->data[13]); | 1481 | skb->data[12], skb->data[13]); |
1483 | } | 1482 | } |
1484 | #endif | 1483 | #endif |
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c index db4ca4f0b846..0ab51a0f35fc 100644 --- a/drivers/net/tokenring/olympic.c +++ b/drivers/net/tokenring/olympic.c | |||
@@ -1438,13 +1438,18 @@ static void olympic_arb_cmd(struct net_device *dev) | |||
1438 | 1438 | ||
1439 | if (olympic_priv->olympic_network_monitor) { | 1439 | if (olympic_priv->olympic_network_monitor) { |
1440 | struct trh_hdr *mac_hdr; | 1440 | struct trh_hdr *mac_hdr; |
1441 | DECLARE_MAC_BUF(mac); | ||
1442 | printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name); | 1441 | printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name); |
1443 | mac_hdr = tr_hdr(mac_frame); | 1442 | mac_hdr = tr_hdr(mac_frame); |
1444 | printk(KERN_WARNING "%s: MAC Frame Dest. Addr: %s\n", | 1443 | printk(KERN_WARNING "%s: MAC Frame Dest. Addr: " |
1445 | dev->name, print_mac(mac, mac_hdr->daddr)); | 1444 | MAC_FMT " \n", dev->name, |
1446 | printk(KERN_WARNING "%s: MAC Frame Srce. Addr: %s\n", | 1445 | mac_hdr->daddr[0], mac_hdr->daddr[1], |
1447 | dev->name, print_mac(mac, mac_hdr->saddr)); | 1446 | mac_hdr->daddr[2], mac_hdr->daddr[3], |
1447 | mac_hdr->daddr[4], mac_hdr->daddr[5]); | ||
1448 | printk(KERN_WARNING "%s: MAC Frame Srce. Addr: " | ||
1449 | MAC_FMT " \n", dev->name, | ||
1450 | mac_hdr->saddr[0], mac_hdr->saddr[1], | ||
1451 | mac_hdr->saddr[2], mac_hdr->saddr[3], | ||
1452 | mac_hdr->saddr[4], mac_hdr->saddr[5]); | ||
1448 | } | 1453 | } |
1449 | netif_rx(mac_frame); | 1454 | netif_rx(mac_frame); |
1450 | dev->last_rx = jiffies; | 1455 | dev->last_rx = jiffies; |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index d1a200ff5fd2..555b70c8b863 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -234,11 +234,12 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
234 | struct scatterlist sg[1+MAX_SKB_FRAGS]; | 234 | struct scatterlist sg[1+MAX_SKB_FRAGS]; |
235 | struct virtio_net_hdr *hdr; | 235 | struct virtio_net_hdr *hdr; |
236 | const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; | 236 | const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; |
237 | DECLARE_MAC_BUF(mac); | ||
238 | 237 | ||
239 | sg_init_table(sg, 1+MAX_SKB_FRAGS); | 238 | sg_init_table(sg, 1+MAX_SKB_FRAGS); |
240 | 239 | ||
241 | pr_debug("%s: xmit %p %s\n", dev->name, skb, print_mac(mac, dest)); | 240 | pr_debug("%s: xmit %p " MAC_FMT "\n", dev->name, skb, |
241 | dest[0], dest[1], dest[2], | ||
242 | dest[3], dest[4], dest[5]); | ||
242 | 243 | ||
243 | /* Encode metadata header at front. */ | 244 | /* Encode metadata header at front. */ |
244 | hdr = skb_vnet_hdr(skb); | 245 | hdr = skb_vnet_hdr(skb); |
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c index 49978bdb4324..4fd73809602e 100644 --- a/drivers/net/wireless/hostap/hostap_80211_rx.c +++ b/drivers/net/wireless/hostap/hostap_80211_rx.c | |||
@@ -635,7 +635,6 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb, | |||
635 | { | 635 | { |
636 | struct ieee80211_hdr_4addr *hdr; | 636 | struct ieee80211_hdr_4addr *hdr; |
637 | int res, hdrlen; | 637 | int res, hdrlen; |
638 | DECLARE_MAC_BUF(mac); | ||
639 | 638 | ||
640 | if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) | 639 | if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) |
641 | return 0; | 640 | return 0; |
@@ -647,8 +646,10 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb, | |||
647 | strcmp(crypt->ops->name, "TKIP") == 0) { | 646 | strcmp(crypt->ops->name, "TKIP") == 0) { |
648 | if (net_ratelimit()) { | 647 | if (net_ratelimit()) { |
649 | printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " | 648 | printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " |
650 | "received packet from %s\n", | 649 | "received packet from " MAC_FMT "\n", |
651 | local->dev->name, print_mac(mac, hdr->addr2)); | 650 | local->dev->name, |
651 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], | ||
652 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); | ||
652 | } | 653 | } |
653 | return -1; | 654 | return -1; |
654 | } | 655 | } |
@@ -657,9 +658,12 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb, | |||
657 | res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); | 658 | res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); |
658 | atomic_dec(&crypt->refcnt); | 659 | atomic_dec(&crypt->refcnt); |
659 | if (res < 0) { | 660 | if (res < 0) { |
660 | printk(KERN_DEBUG "%s: decryption failed (SA=%s" | 661 | printk(KERN_DEBUG "%s: decryption failed (SA=" MAC_FMT |
661 | ") res=%d\n", | 662 | ") res=%d\n", |
662 | local->dev->name, print_mac(mac, hdr->addr2), res); | 663 | local->dev->name, |
664 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], | ||
665 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], | ||
666 | res); | ||
663 | local->comm_tallies.rx_discards_wep_undecryptable++; | 667 | local->comm_tallies.rx_discards_wep_undecryptable++; |
664 | return -1; | 668 | return -1; |
665 | } | 669 | } |
@@ -721,7 +725,6 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
721 | struct ieee80211_crypt_data *crypt = NULL; | 725 | struct ieee80211_crypt_data *crypt = NULL; |
722 | void *sta = NULL; | 726 | void *sta = NULL; |
723 | int keyidx = 0; | 727 | int keyidx = 0; |
724 | DECLARE_MAC_BUF(mac); | ||
725 | 728 | ||
726 | iface = netdev_priv(dev); | 729 | iface = netdev_priv(dev); |
727 | local = iface->local; | 730 | local = iface->local; |
@@ -798,8 +801,10 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
798 | * frames silently instead of filling system log with | 801 | * frames silently instead of filling system log with |
799 | * these reports. */ | 802 | * these reports. */ |
800 | printk(KERN_DEBUG "%s: WEP decryption failed (not set)" | 803 | printk(KERN_DEBUG "%s: WEP decryption failed (not set)" |
801 | " (SA=%s)\n", | 804 | " (SA=" MAC_FMT ")\n", |
802 | local->dev->name, print_mac(mac, hdr->addr2)); | 805 | local->dev->name, |
806 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], | ||
807 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); | ||
803 | #endif | 808 | #endif |
804 | local->comm_tallies.rx_discards_wep_undecryptable++; | 809 | local->comm_tallies.rx_discards_wep_undecryptable++; |
805 | goto rx_dropped; | 810 | goto rx_dropped; |
@@ -813,8 +818,9 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
813 | (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) | 818 | (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) |
814 | { | 819 | { |
815 | printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " | 820 | printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " |
816 | "from %s\n", dev->name, | 821 | "from " MAC_FMT "\n", dev->name, |
817 | print_mac(mac, hdr->addr2)); | 822 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], |
823 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); | ||
818 | /* TODO: could inform hostapd about this so that it | 824 | /* TODO: could inform hostapd about this so that it |
819 | * could send auth failure report */ | 825 | * could send auth failure report */ |
820 | goto rx_dropped; | 826 | goto rx_dropped; |
@@ -982,8 +988,10 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
982 | "unencrypted EAPOL frame\n", local->dev->name); | 988 | "unencrypted EAPOL frame\n", local->dev->name); |
983 | } else { | 989 | } else { |
984 | printk(KERN_DEBUG "%s: encryption configured, but RX " | 990 | printk(KERN_DEBUG "%s: encryption configured, but RX " |
985 | "frame not encrypted (SA=%s)\n", | 991 | "frame not encrypted (SA=" MAC_FMT ")\n", |
986 | local->dev->name, print_mac(mac, hdr->addr2)); | 992 | local->dev->name, |
993 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], | ||
994 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); | ||
987 | goto rx_dropped; | 995 | goto rx_dropped; |
988 | } | 996 | } |
989 | } | 997 | } |
@@ -992,9 +1000,10 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
992 | !hostap_is_eapol_frame(local, skb)) { | 1000 | !hostap_is_eapol_frame(local, skb)) { |
993 | if (net_ratelimit()) { | 1001 | if (net_ratelimit()) { |
994 | printk(KERN_DEBUG "%s: dropped unencrypted RX data " | 1002 | printk(KERN_DEBUG "%s: dropped unencrypted RX data " |
995 | "frame from %s" | 1003 | "frame from " MAC_FMT " (drop_unencrypted=1)\n", |
996 | " (drop_unencrypted=1)\n", | 1004 | dev->name, |
997 | dev->name, print_mac(mac, hdr->addr2)); | 1005 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], |
1006 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); | ||
998 | } | 1007 | } |
999 | goto rx_dropped; | 1008 | goto rx_dropped; |
1000 | } | 1009 | } |
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c index e7afc3ec3e6d..921c984416f8 100644 --- a/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/drivers/net/wireless/hostap/hostap_80211_tx.c | |||
@@ -314,7 +314,6 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb, | |||
314 | struct ieee80211_hdr_4addr *hdr; | 314 | struct ieee80211_hdr_4addr *hdr; |
315 | u16 fc; | 315 | u16 fc; |
316 | int prefix_len, postfix_len, hdr_len, res; | 316 | int prefix_len, postfix_len, hdr_len, res; |
317 | DECLARE_MAC_BUF(mac); | ||
318 | 317 | ||
319 | iface = netdev_priv(skb->dev); | 318 | iface = netdev_priv(skb->dev); |
320 | local = iface->local; | 319 | local = iface->local; |
@@ -329,8 +328,10 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb, | |||
329 | hdr = (struct ieee80211_hdr_4addr *) skb->data; | 328 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
330 | if (net_ratelimit()) { | 329 | if (net_ratelimit()) { |
331 | printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " | 330 | printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " |
332 | "TX packet to %s\n", | 331 | "TX packet to " MAC_FMT "\n", |
333 | local->dev->name, print_mac(mac, hdr->addr1)); | 332 | local->dev->name, |
333 | hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], | ||
334 | hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); | ||
334 | } | 335 | } |
335 | kfree_skb(skb); | 336 | kfree_skb(skb); |
336 | return NULL; | 337 | return NULL; |
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index ad040a3bb8a7..0acd9589c48c 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -632,7 +632,6 @@ static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data) | |||
632 | __le16 *pos; | 632 | __le16 *pos; |
633 | struct sta_info *sta = NULL; | 633 | struct sta_info *sta = NULL; |
634 | char *txt = NULL; | 634 | char *txt = NULL; |
635 | DECLARE_MAC_BUF(mac); | ||
636 | 635 | ||
637 | if (ap->local->hostapd) { | 636 | if (ap->local->hostapd) { |
638 | dev_kfree_skb(skb); | 637 | dev_kfree_skb(skb); |
@@ -684,10 +683,12 @@ static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data) | |||
684 | if (sta) | 683 | if (sta) |
685 | atomic_dec(&sta->users); | 684 | atomic_dec(&sta->users); |
686 | if (txt) { | 685 | if (txt) { |
687 | PDEBUG(DEBUG_AP, "%s: %s auth_cb - alg=%d " | 686 | PDEBUG(DEBUG_AP, "%s: " MAC_FMT " auth_cb - alg=%d " |
688 | "trans#=%d status=%d - %s\n", | 687 | "trans#=%d status=%d - %s\n", |
689 | dev->name, print_mac(mac, hdr->addr1), auth_alg, | 688 | dev->name, |
690 | auth_transaction, status, txt); | 689 | hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], |
690 | hdr->addr1[3], hdr->addr1[4], hdr->addr1[5], | ||
691 | auth_alg, auth_transaction, status, txt); | ||
691 | } | 692 | } |
692 | dev_kfree_skb(skb); | 693 | dev_kfree_skb(skb); |
693 | } | 694 | } |
@@ -703,7 +704,6 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data) | |||
703 | __le16 *pos; | 704 | __le16 *pos; |
704 | struct sta_info *sta = NULL; | 705 | struct sta_info *sta = NULL; |
705 | char *txt = NULL; | 706 | char *txt = NULL; |
706 | DECLARE_MAC_BUF(mac); | ||
707 | 707 | ||
708 | if (ap->local->hostapd) { | 708 | if (ap->local->hostapd) { |
709 | dev_kfree_skb(skb); | 709 | dev_kfree_skb(skb); |
@@ -754,8 +754,11 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data) | |||
754 | if (sta) | 754 | if (sta) |
755 | atomic_dec(&sta->users); | 755 | atomic_dec(&sta->users); |
756 | if (txt) { | 756 | if (txt) { |
757 | PDEBUG(DEBUG_AP, "%s: %s assoc_cb - %s\n", | 757 | PDEBUG(DEBUG_AP, "%s: " MAC_FMT " assoc_cb - %s\n", |
758 | dev->name, print_mac(mac, hdr->addr1), txt); | 758 | dev->name, |
759 | hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], | ||
760 | hdr->addr1[3], hdr->addr1[4], hdr->addr1[5], | ||
761 | txt); | ||
759 | } | 762 | } |
760 | dev_kfree_skb(skb); | 763 | dev_kfree_skb(skb); |
761 | } | 764 | } |
@@ -767,7 +770,6 @@ static void hostap_ap_tx_cb_poll(struct sk_buff *skb, int ok, void *data) | |||
767 | struct ap_data *ap = data; | 770 | struct ap_data *ap = data; |
768 | struct ieee80211_hdr_4addr *hdr; | 771 | struct ieee80211_hdr_4addr *hdr; |
769 | struct sta_info *sta; | 772 | struct sta_info *sta; |
770 | DECLARE_MAC_BUF(mac); | ||
771 | 773 | ||
772 | if (skb->len < 24) | 774 | if (skb->len < 24) |
773 | goto fail; | 775 | goto fail; |
@@ -779,9 +781,11 @@ static void hostap_ap_tx_cb_poll(struct sk_buff *skb, int ok, void *data) | |||
779 | sta->flags &= ~WLAN_STA_PENDING_POLL; | 781 | sta->flags &= ~WLAN_STA_PENDING_POLL; |
780 | spin_unlock(&ap->sta_table_lock); | 782 | spin_unlock(&ap->sta_table_lock); |
781 | } else { | 783 | } else { |
782 | PDEBUG(DEBUG_AP, "%s: STA %s" | 784 | PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT |
783 | " did not ACK activity poll frame\n", | 785 | " did not ACK activity poll frame\n", |
784 | ap->local->dev->name, print_mac(mac, hdr->addr1)); | 786 | ap->local->dev->name, |
787 | hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], | ||
788 | hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); | ||
785 | } | 789 | } |
786 | 790 | ||
787 | fail: | 791 | fail: |
@@ -1306,7 +1310,6 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb, | |||
1306 | struct sta_info *sta = NULL; | 1310 | struct sta_info *sta = NULL; |
1307 | struct ieee80211_crypt_data *crypt; | 1311 | struct ieee80211_crypt_data *crypt; |
1308 | char *txt = ""; | 1312 | char *txt = ""; |
1309 | DECLARE_MAC_BUF(mac); | ||
1310 | 1313 | ||
1311 | len = skb->len - IEEE80211_MGMT_HDR_LEN; | 1314 | len = skb->len - IEEE80211_MGMT_HDR_LEN; |
1312 | 1315 | ||
@@ -1315,8 +1318,9 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb, | |||
1315 | 1318 | ||
1316 | if (len < 6) { | 1319 | if (len < 6) { |
1317 | PDEBUG(DEBUG_AP, "%s: handle_authen - too short payload " | 1320 | PDEBUG(DEBUG_AP, "%s: handle_authen - too short payload " |
1318 | "(len=%d) from %s\n", dev->name, len, | 1321 | "(len=%d) from " MAC_FMT "\n", dev->name, len, |
1319 | print_mac(mac, hdr->addr2)); | 1322 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], |
1323 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); | ||
1320 | return; | 1324 | return; |
1321 | } | 1325 | } |
1322 | 1326 | ||
@@ -1381,8 +1385,10 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb, | |||
1381 | if (time_after(jiffies, sta->u.ap.last_beacon + | 1385 | if (time_after(jiffies, sta->u.ap.last_beacon + |
1382 | (10 * sta->listen_interval * HZ) / 1024)) { | 1386 | (10 * sta->listen_interval * HZ) / 1024)) { |
1383 | PDEBUG(DEBUG_AP, "%s: no beacons received for a while," | 1387 | PDEBUG(DEBUG_AP, "%s: no beacons received for a while," |
1384 | " assuming AP %s is now STA\n", | 1388 | " assuming AP " MAC_FMT " is now STA\n", |
1385 | dev->name, print_mac(mac, sta->addr)); | 1389 | dev->name, |
1390 | sta->addr[0], sta->addr[1], sta->addr[2], | ||
1391 | sta->addr[3], sta->addr[4], sta->addr[5]); | ||
1386 | sta->ap = 0; | 1392 | sta->ap = 0; |
1387 | sta->flags = 0; | 1393 | sta->flags = 0; |
1388 | sta->u.sta.challenge = NULL; | 1394 | sta->u.sta.challenge = NULL; |
@@ -1497,10 +1503,13 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb, | |||
1497 | } | 1503 | } |
1498 | 1504 | ||
1499 | if (resp) { | 1505 | if (resp) { |
1500 | PDEBUG(DEBUG_AP, "%s: %s auth (alg=%d " | 1506 | PDEBUG(DEBUG_AP, "%s: " MAC_FMT " auth (alg=%d " |
1501 | "trans#=%d stat=%d len=%d fc=%04x) ==> %d (%s)\n", | 1507 | "trans#=%d stat=%d len=%d fc=%04x) ==> %d (%s)\n", |
1502 | dev->name, print_mac(mac, hdr->addr2), auth_alg, | 1508 | dev->name, |
1503 | auth_transaction, status_code, len, fc, resp, txt); | 1509 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], |
1510 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], | ||
1511 | auth_alg, auth_transaction, status_code, len, | ||
1512 | fc, resp, txt); | ||
1504 | } | 1513 | } |
1505 | } | 1514 | } |
1506 | 1515 | ||
@@ -1519,14 +1528,15 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb, | |||
1519 | int send_deauth = 0; | 1528 | int send_deauth = 0; |
1520 | char *txt = ""; | 1529 | char *txt = ""; |
1521 | u8 prev_ap[ETH_ALEN]; | 1530 | u8 prev_ap[ETH_ALEN]; |
1522 | DECLARE_MAC_BUF(mac); | ||
1523 | 1531 | ||
1524 | left = len = skb->len - IEEE80211_MGMT_HDR_LEN; | 1532 | left = len = skb->len - IEEE80211_MGMT_HDR_LEN; |
1525 | 1533 | ||
1526 | if (len < (reassoc ? 10 : 4)) { | 1534 | if (len < (reassoc ? 10 : 4)) { |
1527 | PDEBUG(DEBUG_AP, "%s: handle_assoc - too short payload " | 1535 | PDEBUG(DEBUG_AP, "%s: handle_assoc - too short payload " |
1528 | "(len=%d, reassoc=%d) from %s\n", | 1536 | "(len=%d, reassoc=%d) from " MAC_FMT "\n", |
1529 | dev->name, len, reassoc, print_mac(mac, hdr->addr2)); | 1537 | dev->name, len, reassoc, |
1538 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], | ||
1539 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]); | ||
1530 | return; | 1540 | return; |
1531 | } | 1541 | } |
1532 | 1542 | ||
@@ -1603,9 +1613,12 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb, | |||
1603 | } | 1613 | } |
1604 | 1614 | ||
1605 | if (left > 0) { | 1615 | if (left > 0) { |
1606 | PDEBUG(DEBUG_AP, "%s: assoc from %s" | 1616 | PDEBUG(DEBUG_AP, "%s: assoc from " MAC_FMT |
1607 | " with extra data (%d bytes) [", | 1617 | " with extra data (%d bytes) [", |
1608 | dev->name, print_mac(mac, hdr->addr2), left); | 1618 | dev->name, |
1619 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], | ||
1620 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], | ||
1621 | left); | ||
1609 | while (left > 0) { | 1622 | while (left > 0) { |
1610 | PDEBUG2(DEBUG_AP, "<%02x>", *u); | 1623 | PDEBUG2(DEBUG_AP, "<%02x>", *u); |
1611 | u++; left--; | 1624 | u++; left--; |
@@ -1704,10 +1717,15 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb, | |||
1704 | } | 1717 | } |
1705 | 1718 | ||
1706 | #if 0 | 1719 | #if 0 |
1707 | PDEBUG(DEBUG_AP, "%s: %s %sassoc (len=%d " | 1720 | PDEBUG(DEBUG_AP, "%s: " MAC_FMT" %sassoc (len=%d " |
1708 | "prev_ap=%s) => %d(%d) (%s)\n", | 1721 | "prev_ap=" MAC_FMT") => %d(%d) (%s)\n", |
1709 | dev->name, print_mac(mac, hdr->addr2), reassoc ? "re" : "", len, | 1722 | dev->name, |
1710 | print_mac(mac, prev_ap), resp, send_deauth, txt); | 1723 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], |
1724 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], | ||
1725 | reassoc ? "re" : "", len, | ||
1726 | prev_ap[0], prev_ap[1], prev_ap[2], | ||
1727 | prev_ap[3], prev_ap[4], prev_ap[5], | ||
1728 | resp, send_deauth, txt); | ||
1711 | #endif | 1729 | #endif |
1712 | } | 1730 | } |
1713 | 1731 | ||
@@ -1735,9 +1753,11 @@ static void handle_deauth(local_info_t *local, struct sk_buff *skb, | |||
1735 | pos = (__le16 *) body; | 1753 | pos = (__le16 *) body; |
1736 | reason_code = le16_to_cpu(*pos); | 1754 | reason_code = le16_to_cpu(*pos); |
1737 | 1755 | ||
1738 | PDEBUG(DEBUG_AP, "%s: deauthentication: %s len=%d, " | 1756 | PDEBUG(DEBUG_AP, "%s: deauthentication: " MAC_FMT " len=%d, " |
1739 | "reason_code=%d\n", dev->name, print_mac(mac, hdr->addr2), len, | 1757 | "reason_code=%d\n", dev->name, |
1740 | reason_code); | 1758 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], |
1759 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], | ||
1760 | len, reason_code); | ||
1741 | 1761 | ||
1742 | spin_lock_bh(&local->ap->sta_table_lock); | 1762 | spin_lock_bh(&local->ap->sta_table_lock); |
1743 | sta = ap_get_sta(local->ap, hdr->addr2); | 1763 | sta = ap_get_sta(local->ap, hdr->addr2); |
@@ -1748,9 +1768,11 @@ static void handle_deauth(local_info_t *local, struct sk_buff *skb, | |||
1748 | } | 1768 | } |
1749 | spin_unlock_bh(&local->ap->sta_table_lock); | 1769 | spin_unlock_bh(&local->ap->sta_table_lock); |
1750 | if (sta == NULL) { | 1770 | if (sta == NULL) { |
1751 | printk("%s: deauthentication from %s, " | 1771 | printk("%s: deauthentication from " MAC_FMT ", " |
1752 | "reason_code=%d, but STA not authenticated\n", dev->name, | 1772 | "reason_code=%d, but STA not authenticated\n", dev->name, |
1753 | print_mac(mac, hdr->addr2), reason_code); | 1773 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], |
1774 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], | ||
1775 | reason_code); | ||
1754 | } | 1776 | } |
1755 | } | 1777 | } |
1756 | 1778 | ||
@@ -1766,7 +1788,6 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb, | |||
1766 | u16 reason_code; | 1788 | u16 reason_code; |
1767 | __le16 *pos; | 1789 | __le16 *pos; |
1768 | struct sta_info *sta = NULL; | 1790 | struct sta_info *sta = NULL; |
1769 | DECLARE_MAC_BUF(mac); | ||
1770 | 1791 | ||
1771 | len = skb->len - IEEE80211_MGMT_HDR_LEN; | 1792 | len = skb->len - IEEE80211_MGMT_HDR_LEN; |
1772 | 1793 | ||
@@ -1778,9 +1799,11 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb, | |||
1778 | pos = (__le16 *) body; | 1799 | pos = (__le16 *) body; |
1779 | reason_code = le16_to_cpu(*pos); | 1800 | reason_code = le16_to_cpu(*pos); |
1780 | 1801 | ||
1781 | PDEBUG(DEBUG_AP, "%s: disassociation: %s len=%d, " | 1802 | PDEBUG(DEBUG_AP, "%s: disassociation: " MAC_FMT " len=%d, " |
1782 | "reason_code=%d\n", dev->name, print_mac(mac, hdr->addr2), len, | 1803 | "reason_code=%d\n", dev->name, |
1783 | reason_code); | 1804 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], |
1805 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], | ||
1806 | len, reason_code); | ||
1784 | 1807 | ||
1785 | spin_lock_bh(&local->ap->sta_table_lock); | 1808 | spin_lock_bh(&local->ap->sta_table_lock); |
1786 | sta = ap_get_sta(local->ap, hdr->addr2); | 1809 | sta = ap_get_sta(local->ap, hdr->addr2); |
@@ -1791,9 +1814,12 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb, | |||
1791 | } | 1814 | } |
1792 | spin_unlock_bh(&local->ap->sta_table_lock); | 1815 | spin_unlock_bh(&local->ap->sta_table_lock); |
1793 | if (sta == NULL) { | 1816 | if (sta == NULL) { |
1794 | printk("%s: disassociation from %s, " | 1817 | printk("%s: disassociation from " MAC_FMT ", " |
1795 | "reason_code=%d, but STA not authenticated\n", | 1818 | "reason_code=%d, but STA not authenticated\n", |
1796 | dev->name, print_mac(mac, hdr->addr2), reason_code); | 1819 | dev->name, |
1820 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], | ||
1821 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], | ||
1822 | reason_code); | ||
1797 | } | 1823 | } |
1798 | } | 1824 | } |
1799 | 1825 | ||
@@ -1882,16 +1908,20 @@ static void handle_pspoll(local_info_t *local, | |||
1882 | struct sta_info *sta; | 1908 | struct sta_info *sta; |
1883 | u16 aid; | 1909 | u16 aid; |
1884 | struct sk_buff *skb; | 1910 | struct sk_buff *skb; |
1885 | DECLARE_MAC_BUF(mac); | ||
1886 | 1911 | ||
1887 | PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=%s" | 1912 | PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=" MAC_FMT |
1888 | ", TA=%s PWRMGT=%d\n", | 1913 | ", TA=" MAC_FMT " PWRMGT=%d\n", |
1889 | print_mac(mac, hdr->addr1), print_mac(mac, hdr->addr2), | 1914 | hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], |
1915 | hdr->addr1[3], hdr->addr1[4], hdr->addr1[5], | ||
1916 | hdr->addr2[0], hdr->addr2[1], hdr->addr2[2], | ||
1917 | hdr->addr2[3], hdr->addr2[4], hdr->addr2[5], | ||
1890 | !!(le16_to_cpu(hdr->frame_ctl) & IEEE80211_FCTL_PM)); | 1918 | !!(le16_to_cpu(hdr->frame_ctl) & IEEE80211_FCTL_PM)); |
1891 | 1919 | ||
1892 | if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { | 1920 | if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { |
1893 | PDEBUG(DEBUG_AP, "handle_pspoll - addr1(BSSID)=%s" | 1921 | PDEBUG(DEBUG_AP, "handle_pspoll - addr1(BSSID)=" MAC_FMT |
1894 | " not own MAC\n", print_mac(mac, hdr->addr1)); | 1922 | " not own MAC\n", |
1923 | hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], | ||
1924 | hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); | ||
1895 | return; | 1925 | return; |
1896 | } | 1926 | } |
1897 | 1927 | ||
@@ -1969,7 +1999,6 @@ static void handle_wds_oper_queue(struct work_struct *work) | |||
1969 | wds_oper_queue); | 1999 | wds_oper_queue); |
1970 | local_info_t *local = ap->local; | 2000 | local_info_t *local = ap->local; |
1971 | struct wds_oper_data *entry, *prev; | 2001 | struct wds_oper_data *entry, *prev; |
1972 | DECLARE_MAC_BUF(mac); | ||
1973 | 2002 | ||
1974 | spin_lock_bh(&local->lock); | 2003 | spin_lock_bh(&local->lock); |
1975 | entry = local->ap->wds_oper_entries; | 2004 | entry = local->ap->wds_oper_entries; |
@@ -1978,10 +2007,11 @@ static void handle_wds_oper_queue(struct work_struct *work) | |||
1978 | 2007 | ||
1979 | while (entry) { | 2008 | while (entry) { |
1980 | PDEBUG(DEBUG_AP, "%s: %s automatic WDS connection " | 2009 | PDEBUG(DEBUG_AP, "%s: %s automatic WDS connection " |
1981 | "to AP %s\n", | 2010 | "to AP " MAC_FMT "\n", |
1982 | local->dev->name, | 2011 | local->dev->name, |
1983 | entry->type == WDS_ADD ? "adding" : "removing", | 2012 | entry->type == WDS_ADD ? "adding" : "removing", |
1984 | print_mac(mac, entry->addr)); | 2013 | entry->addr[0], entry->addr[1], entry->addr[2], |
2014 | entry->addr[3], entry->addr[4], entry->addr[5]); | ||
1985 | if (entry->type == WDS_ADD) | 2015 | if (entry->type == WDS_ADD) |
1986 | prism2_wds_add(local, entry->addr, 0); | 2016 | prism2_wds_add(local, entry->addr, 0); |
1987 | else if (entry->type == WDS_DEL) | 2017 | else if (entry->type == WDS_DEL) |
@@ -2158,7 +2188,6 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb, | |||
2158 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ | 2188 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ |
2159 | u16 fc, type, stype; | 2189 | u16 fc, type, stype; |
2160 | struct ieee80211_hdr_4addr *hdr; | 2190 | struct ieee80211_hdr_4addr *hdr; |
2161 | DECLARE_MAC_BUF(mac); | ||
2162 | 2191 | ||
2163 | /* FIX: should give skb->len to handler functions and check that the | 2192 | /* FIX: should give skb->len to handler functions and check that the |
2164 | * buffer is long enough */ | 2193 | * buffer is long enough */ |
@@ -2187,8 +2216,9 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb, | |||
2187 | 2216 | ||
2188 | if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { | 2217 | if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { |
2189 | PDEBUG(DEBUG_AP, "handle_ap_item - addr1(BSSID)=" | 2218 | PDEBUG(DEBUG_AP, "handle_ap_item - addr1(BSSID)=" |
2190 | "%s not own MAC\n", | 2219 | MAC_FMT " not own MAC\n", |
2191 | print_mac(mac, hdr->addr1)); | 2220 | hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], |
2221 | hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); | ||
2192 | goto done; | 2222 | goto done; |
2193 | } | 2223 | } |
2194 | 2224 | ||
@@ -2224,14 +2254,18 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb, | |||
2224 | } | 2254 | } |
2225 | 2255 | ||
2226 | if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { | 2256 | if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { |
2227 | PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=%s" | 2257 | PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=" MAC_FMT |
2228 | " not own MAC\n", print_mac(mac, hdr->addr1)); | 2258 | " not own MAC\n", |
2259 | hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], | ||
2260 | hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); | ||
2229 | goto done; | 2261 | goto done; |
2230 | } | 2262 | } |
2231 | 2263 | ||
2232 | if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN)) { | 2264 | if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN)) { |
2233 | PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=%s" | 2265 | PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=" MAC_FMT |
2234 | " not own MAC\n", print_mac(mac, hdr->addr3)); | 2266 | " not own MAC\n", |
2267 | hdr->addr3[0], hdr->addr3[1], hdr->addr3[2], | ||
2268 | hdr->addr3[3], hdr->addr3[4], hdr->addr3[5]); | ||
2235 | goto done; | 2269 | goto done; |
2236 | } | 2270 | } |
2237 | 2271 | ||
@@ -2312,7 +2346,6 @@ static void schedule_packet_send(local_info_t *local, struct sta_info *sta) | |||
2312 | struct sk_buff *skb; | 2346 | struct sk_buff *skb; |
2313 | struct ieee80211_hdr_4addr *hdr; | 2347 | struct ieee80211_hdr_4addr *hdr; |
2314 | struct hostap_80211_rx_status rx_stats; | 2348 | struct hostap_80211_rx_status rx_stats; |
2315 | DECLARE_MAC_BUF(mac); | ||
2316 | 2349 | ||
2317 | if (skb_queue_empty(&sta->tx_buf)) | 2350 | if (skb_queue_empty(&sta->tx_buf)) |
2318 | return; | 2351 | return; |
@@ -2334,7 +2367,9 @@ static void schedule_packet_send(local_info_t *local, struct sta_info *sta) | |||
2334 | hdr->duration_id = cpu_to_le16(sta->aid | BIT(15) | BIT(14)); | 2367 | hdr->duration_id = cpu_to_le16(sta->aid | BIT(15) | BIT(14)); |
2335 | 2368 | ||
2336 | PDEBUG(DEBUG_PS2, "%s: Scheduling buffered packet delivery for STA " | 2369 | PDEBUG(DEBUG_PS2, "%s: Scheduling buffered packet delivery for STA " |
2337 | "%s\n", local->dev->name, print_mac(mac, sta->addr)); | 2370 | MAC_FMT "\n", local->dev->name, |
2371 | sta->addr[0], sta->addr[1], sta->addr[2], | ||
2372 | sta->addr[3], sta->addr[4], sta->addr[5]); | ||
2338 | 2373 | ||
2339 | skb->dev = local->dev; | 2374 | skb->dev = local->dev; |
2340 | 2375 | ||
@@ -2661,7 +2696,6 @@ static int ap_update_sta_tx_rate(struct sta_info *sta, struct net_device *dev) | |||
2661 | int ret = sta->tx_rate; | 2696 | int ret = sta->tx_rate; |
2662 | struct hostap_interface *iface; | 2697 | struct hostap_interface *iface; |
2663 | local_info_t *local; | 2698 | local_info_t *local; |
2664 | DECLARE_MAC_BUF(mac); | ||
2665 | 2699 | ||
2666 | iface = netdev_priv(dev); | 2700 | iface = netdev_priv(dev); |
2667 | local = iface->local; | 2701 | local = iface->local; |
@@ -2689,9 +2723,12 @@ static int ap_update_sta_tx_rate(struct sta_info *sta, struct net_device *dev) | |||
2689 | case 3: sta->tx_rate = 110; break; | 2723 | case 3: sta->tx_rate = 110; break; |
2690 | default: sta->tx_rate = 0; break; | 2724 | default: sta->tx_rate = 0; break; |
2691 | } | 2725 | } |
2692 | PDEBUG(DEBUG_AP, "%s: STA %s" | 2726 | PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT |
2693 | " TX rate raised to %d\n", | 2727 | " TX rate raised to %d\n", |
2694 | dev->name, print_mac(mac, sta->addr), sta->tx_rate); | 2728 | dev->name, |
2729 | sta->addr[0], sta->addr[1], sta->addr[2], | ||
2730 | sta->addr[3], sta->addr[4], sta->addr[5], | ||
2731 | sta->tx_rate); | ||
2695 | } | 2732 | } |
2696 | sta->tx_since_last_failure = 0; | 2733 | sta->tx_since_last_failure = 0; |
2697 | } | 2734 | } |
@@ -2709,7 +2746,6 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx) | |||
2709 | int set_tim, ret; | 2746 | int set_tim, ret; |
2710 | struct ieee80211_hdr_4addr *hdr; | 2747 | struct ieee80211_hdr_4addr *hdr; |
2711 | struct hostap_skb_tx_data *meta; | 2748 | struct hostap_skb_tx_data *meta; |
2712 | DECLARE_MAC_BUF(mac); | ||
2713 | 2749 | ||
2714 | meta = (struct hostap_skb_tx_data *) skb->cb; | 2750 | meta = (struct hostap_skb_tx_data *) skb->cb; |
2715 | ret = AP_TX_CONTINUE; | 2751 | ret = AP_TX_CONTINUE; |
@@ -2745,8 +2781,9 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx) | |||
2745 | * print out any errors here. */ | 2781 | * print out any errors here. */ |
2746 | if (net_ratelimit()) { | 2782 | if (net_ratelimit()) { |
2747 | printk(KERN_DEBUG "AP: drop packet to non-associated " | 2783 | printk(KERN_DEBUG "AP: drop packet to non-associated " |
2748 | "STA %s\n", | 2784 | "STA " MAC_FMT "\n", |
2749 | print_mac(mac, hdr->addr1)); | 2785 | hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], |
2786 | hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]); | ||
2750 | } | 2787 | } |
2751 | #endif | 2788 | #endif |
2752 | local->ap->tx_drop_nonassoc++; | 2789 | local->ap->tx_drop_nonassoc++; |
@@ -2784,9 +2821,11 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx) | |||
2784 | } | 2821 | } |
2785 | 2822 | ||
2786 | if (skb_queue_len(&sta->tx_buf) >= STA_MAX_TX_BUFFER) { | 2823 | if (skb_queue_len(&sta->tx_buf) >= STA_MAX_TX_BUFFER) { |
2787 | PDEBUG(DEBUG_PS, "%s: No more space in STA (%s" | 2824 | PDEBUG(DEBUG_PS, "%s: No more space in STA (" MAC_FMT |
2788 | ")'s PS mode buffer\n", | 2825 | ")'s PS mode buffer\n", |
2789 | local->dev->name, print_mac(mac, sta->addr)); | 2826 | local->dev->name, |
2827 | sta->addr[0], sta->addr[1], sta->addr[2], | ||
2828 | sta->addr[3], sta->addr[4], sta->addr[5]); | ||
2790 | /* Make sure that TIM is set for the station (it might not be | 2829 | /* Make sure that TIM is set for the station (it might not be |
2791 | * after AP wlan hw reset). */ | 2830 | * after AP wlan hw reset). */ |
2792 | /* FIX: should fix hw reset to restore bits based on STA | 2831 | /* FIX: should fix hw reset to restore bits based on STA |
@@ -2850,7 +2889,6 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb) | |||
2850 | struct sta_info *sta; | 2889 | struct sta_info *sta; |
2851 | struct ieee80211_hdr_4addr *hdr; | 2890 | struct ieee80211_hdr_4addr *hdr; |
2852 | struct hostap_skb_tx_data *meta; | 2891 | struct hostap_skb_tx_data *meta; |
2853 | DECLARE_MAC_BUF(mac); | ||
2854 | 2892 | ||
2855 | hdr = (struct ieee80211_hdr_4addr *) skb->data; | 2893 | hdr = (struct ieee80211_hdr_4addr *) skb->data; |
2856 | meta = (struct hostap_skb_tx_data *) skb->cb; | 2894 | meta = (struct hostap_skb_tx_data *) skb->cb; |
@@ -2859,9 +2897,12 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb) | |||
2859 | sta = ap_get_sta(local->ap, hdr->addr1); | 2897 | sta = ap_get_sta(local->ap, hdr->addr1); |
2860 | if (!sta) { | 2898 | if (!sta) { |
2861 | spin_unlock(&local->ap->sta_table_lock); | 2899 | spin_unlock(&local->ap->sta_table_lock); |
2862 | PDEBUG(DEBUG_AP, "%s: Could not find STA %s" | 2900 | PDEBUG(DEBUG_AP, "%s: Could not find STA " MAC_FMT |
2863 | " for this TX error (@%lu)\n", | 2901 | " for this TX error (@%lu)\n", |
2864 | local->dev->name, print_mac(mac, hdr->addr1), jiffies); | 2902 | local->dev->name, |
2903 | hdr->addr1[0], hdr->addr1[1], hdr->addr1[2], | ||
2904 | hdr->addr1[3], hdr->addr1[4], hdr->addr1[5], | ||
2905 | jiffies); | ||
2865 | return; | 2906 | return; |
2866 | } | 2907 | } |
2867 | 2908 | ||
@@ -2888,9 +2929,11 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb) | |||
2888 | case 3: sta->tx_rate = 110; break; | 2929 | case 3: sta->tx_rate = 110; break; |
2889 | default: sta->tx_rate = 0; break; | 2930 | default: sta->tx_rate = 0; break; |
2890 | } | 2931 | } |
2891 | PDEBUG(DEBUG_AP, "%s: STA %s" | 2932 | PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT |
2892 | " TX rate lowered to %d\n", | 2933 | " TX rate lowered to %d\n", |
2893 | local->dev->name, print_mac(mac, sta->addr), | 2934 | local->dev->name, |
2935 | sta->addr[0], sta->addr[1], sta->addr[2], | ||
2936 | sta->addr[3], sta->addr[4], sta->addr[5], | ||
2894 | sta->tx_rate); | 2937 | sta->tx_rate); |
2895 | } | 2938 | } |
2896 | sta->tx_consecutive_exc = 0; | 2939 | sta->tx_consecutive_exc = 0; |
@@ -2956,7 +2999,6 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev, | |||
2956 | struct sta_info *sta; | 2999 | struct sta_info *sta; |
2957 | u16 fc, type, stype; | 3000 | u16 fc, type, stype; |
2958 | struct ieee80211_hdr_4addr *hdr; | 3001 | struct ieee80211_hdr_4addr *hdr; |
2959 | DECLARE_MAC_BUF(mac); | ||
2960 | 3002 | ||
2961 | if (local->ap == NULL) | 3003 | if (local->ap == NULL) |
2962 | return AP_RX_CONTINUE; | 3004 | return AP_RX_CONTINUE; |
@@ -2988,9 +3030,12 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev, | |||
2988 | } else { | 3030 | } else { |
2989 | printk(KERN_DEBUG "%s: dropped received packet" | 3031 | printk(KERN_DEBUG "%s: dropped received packet" |
2990 | " from non-associated STA " | 3032 | " from non-associated STA " |
2991 | "%s" | 3033 | MAC_FMT |
2992 | " (type=0x%02x, subtype=0x%02x)\n", | 3034 | " (type=0x%02x, subtype=0x%02x)\n", |
2993 | dev->name, print_mac(mac, hdr->addr2), | 3035 | dev->name, |
3036 | hdr->addr2[0], hdr->addr2[1], | ||
3037 | hdr->addr2[2], hdr->addr2[3], | ||
3038 | hdr->addr2[4], hdr->addr2[5], | ||
2994 | type >> 2, stype >> 4); | 3039 | type >> 2, stype >> 4); |
2995 | hostap_rx(dev, skb, rx_stats); | 3040 | hostap_rx(dev, skb, rx_stats); |
2996 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ | 3041 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ |
@@ -3025,8 +3070,11 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev, | |||
3025 | * being associated. */ | 3070 | * being associated. */ |
3026 | printk(KERN_DEBUG "%s: rejected received nullfunc " | 3071 | printk(KERN_DEBUG "%s: rejected received nullfunc " |
3027 | "frame without ToDS from not associated STA " | 3072 | "frame without ToDS from not associated STA " |
3028 | "%s\n", | 3073 | MAC_FMT "\n", |
3029 | dev->name, print_mac(mac, hdr->addr2)); | 3074 | dev->name, |
3075 | hdr->addr2[0], hdr->addr2[1], | ||
3076 | hdr->addr2[2], hdr->addr2[3], | ||
3077 | hdr->addr2[4], hdr->addr2[5]); | ||
3030 | hostap_rx(dev, skb, rx_stats); | 3078 | hostap_rx(dev, skb, rx_stats); |
3031 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ | 3079 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ |
3032 | } | 3080 | } |
@@ -3043,9 +3091,12 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev, | |||
3043 | * If BSSID is own, report the dropping of this frame. */ | 3091 | * If BSSID is own, report the dropping of this frame. */ |
3044 | if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) { | 3092 | if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) { |
3045 | printk(KERN_DEBUG "%s: dropped received packet from " | 3093 | printk(KERN_DEBUG "%s: dropped received packet from " |
3046 | "%s with no ToDS flag " | 3094 | MAC_FMT " with no ToDS flag " |
3047 | "(type=0x%02x, subtype=0x%02x)\n", dev->name, | 3095 | "(type=0x%02x, subtype=0x%02x)\n", dev->name, |
3048 | print_mac(mac, hdr->addr2), type >> 2, stype >> 4); | 3096 | hdr->addr2[0], hdr->addr2[1], |
3097 | hdr->addr2[2], hdr->addr2[3], | ||
3098 | hdr->addr2[4], hdr->addr2[5], | ||
3099 | type >> 2, stype >> 4); | ||
3049 | hostap_dump_rx_80211(dev->name, skb, rx_stats); | 3100 | hostap_dump_rx_80211(dev->name, skb, rx_stats); |
3050 | } | 3101 | } |
3051 | ret = AP_RX_DROP; | 3102 | ret = AP_RX_DROP; |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index a56d9fc6354f..98d6ff69d375 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -10192,7 +10192,6 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, | |||
10192 | u8 id, hdr_len, unicast; | 10192 | u8 id, hdr_len, unicast; |
10193 | u16 remaining_bytes; | 10193 | u16 remaining_bytes; |
10194 | int fc; | 10194 | int fc; |
10195 | DECLARE_MAC_BUF(mac); | ||
10196 | 10195 | ||
10197 | hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); | 10196 | hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); |
10198 | switch (priv->ieee->iw_mode) { | 10197 | switch (priv->ieee->iw_mode) { |
@@ -10203,8 +10202,10 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, | |||
10203 | id = ipw_add_station(priv, hdr->addr1); | 10202 | id = ipw_add_station(priv, hdr->addr1); |
10204 | if (id == IPW_INVALID_STATION) { | 10203 | if (id == IPW_INVALID_STATION) { |
10205 | IPW_WARNING("Attempt to send data to " | 10204 | IPW_WARNING("Attempt to send data to " |
10206 | "invalid cell: %s\n", | 10205 | "invalid cell: " MAC_FMT "\n", |
10207 | print_mac(mac, hdr->addr1)); | 10206 | hdr->addr1[0], hdr->addr1[1], |
10207 | hdr->addr1[2], hdr->addr1[3], | ||
10208 | hdr->addr1[4], hdr->addr1[5]); | ||
10208 | goto drop; | 10209 | goto drop; |
10209 | } | 10210 | } |
10210 | } | 10211 | } |
@@ -11576,6 +11577,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv) | |||
11576 | priv->prom_priv->priv = priv; | 11577 | priv->prom_priv->priv = priv; |
11577 | 11578 | ||
11578 | strcpy(priv->prom_net_dev->name, "rtap%d"); | 11579 | strcpy(priv->prom_net_dev->name, "rtap%d"); |
11580 | memcpy(priv->prom_net_dev->dev_addr, priv->mac_addr, ETH_ALEN); | ||
11579 | 11581 | ||
11580 | priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; | 11582 | priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; |
11581 | priv->prom_net_dev->open = ipw_prom_open; | 11583 | priv->prom_net_dev->open = ipw_prom_open; |
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig index b79a35a40ab6..b54ff712e703 100644 --- a/drivers/net/wireless/iwlwifi/Kconfig +++ b/drivers/net/wireless/iwlwifi/Kconfig | |||
@@ -35,7 +35,6 @@ config IWL4965_HT | |||
35 | bool "Enable 802.11n HT features in iwl4965 driver" | 35 | bool "Enable 802.11n HT features in iwl4965 driver" |
36 | depends on EXPERIMENTAL | 36 | depends on EXPERIMENTAL |
37 | depends on IWL4965 && IWL4965_QOS | 37 | depends on IWL4965 && IWL4965_QOS |
38 | depends on n | ||
39 | ---help--- | 38 | ---help--- |
40 | This option enables IEEE 802.11n High Throughput features | 39 | This option enables IEEE 802.11n High Throughput features |
41 | for the iwl4965 driver. | 40 | for the iwl4965 driver. |
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c index 87e145ffe8f1..6a24ed6067e0 100644 --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c | |||
@@ -541,7 +541,7 @@ void lbs_association_worker(struct work_struct *work) | |||
541 | } | 541 | } |
542 | 542 | ||
543 | if (find_any_ssid) { | 543 | if (find_any_ssid) { |
544 | u8 new_mode; | 544 | u8 new_mode = assoc_req->mode; |
545 | 545 | ||
546 | ret = lbs_find_best_network_ssid(priv, assoc_req->ssid, | 546 | ret = lbs_find_best_network_ssid(priv, assoc_req->ssid, |
547 | &assoc_req->ssid_len, assoc_req->mode, &new_mode); | 547 | &assoc_req->ssid_len, assoc_req->mode, &new_mode); |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 93ea212fedd5..ad2e7d53b3da 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2399,10 +2399,8 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2399 | * beacon frame. | 2399 | * beacon frame. |
2400 | */ | 2400 | */ |
2401 | if (skb_headroom(skb) < TXD_DESC_SIZE) { | 2401 | if (skb_headroom(skb) < TXD_DESC_SIZE) { |
2402 | if (pskb_expand_head(skb, TXD_DESC_SIZE, 0, GFP_ATOMIC)) { | 2402 | if (pskb_expand_head(skb, TXD_DESC_SIZE, 0, GFP_ATOMIC)) |
2403 | dev_kfree_skb(skb); | ||
2404 | return -ENOMEM; | 2403 | return -ENOMEM; |
2405 | } | ||
2406 | } | 2404 | } |
2407 | 2405 | ||
2408 | /* | 2406 | /* |
diff --git a/drivers/ssb/driver_mipscore.c b/drivers/ssb/driver_mipscore.c index 3d3dd32bf3ab..a9e7eb45b2e7 100644 --- a/drivers/ssb/driver_mipscore.c +++ b/drivers/ssb/driver_mipscore.c | |||
@@ -109,12 +109,13 @@ static void set_irq(struct ssb_device *dev, unsigned int irq) | |||
109 | clear_irq(bus, oldirq); | 109 | clear_irq(bus, oldirq); |
110 | 110 | ||
111 | /* assign the new one */ | 111 | /* assign the new one */ |
112 | if (irq == 0) | 112 | if (irq == 0) { |
113 | ssb_write32(mdev, SSB_INTVEC, ((1 << irqflag) & ssb_read32(mdev, SSB_INTVEC))); | 113 | ssb_write32(mdev, SSB_INTVEC, ((1 << irqflag) | ssb_read32(mdev, SSB_INTVEC))); |
114 | 114 | } else { | |
115 | irqflag <<= ipsflag_irq_shift[irq]; | 115 | irqflag <<= ipsflag_irq_shift[irq]; |
116 | irqflag |= (ssb_read32(mdev, SSB_IPSFLAG) & ~ipsflag_irq_mask[irq]); | 116 | irqflag |= (ssb_read32(mdev, SSB_IPSFLAG) & ~ipsflag_irq_mask[irq]); |
117 | ssb_write32(mdev, SSB_IPSFLAG, irqflag); | 117 | ssb_write32(mdev, SSB_IPSFLAG, irqflag); |
118 | } | ||
118 | } | 119 | } |
119 | 120 | ||
120 | static void ssb_mips_serial_init(struct ssb_mipscore *mcore) | 121 | static void ssb_mips_serial_init(struct ssb_mipscore *mcore) |
diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c index 74b9a8aea52b..5d777f211699 100644 --- a/drivers/ssb/driver_pcicore.c +++ b/drivers/ssb/driver_pcicore.c | |||
@@ -551,7 +551,7 @@ int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc, | |||
551 | } else { | 551 | } else { |
552 | tmp = ssb_read32(dev, SSB_TPSFLAG); | 552 | tmp = ssb_read32(dev, SSB_TPSFLAG); |
553 | tmp &= SSB_TPSFLAG_BPFLAG; | 553 | tmp &= SSB_TPSFLAG_BPFLAG; |
554 | intvec |= tmp; | 554 | intvec |= (1 << tmp); |
555 | } | 555 | } |
556 | ssb_write32(pdev, SSB_INTVEC, intvec); | 556 | ssb_write32(pdev, SSB_INTVEC, intvec); |
557 | } | 557 | } |
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index bedb2b4ee9d2..72017bf2e577 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -1044,6 +1044,12 @@ int ssb_bus_may_powerdown(struct ssb_bus *bus) | |||
1044 | goto out; | 1044 | goto out; |
1045 | 1045 | ||
1046 | cc = &bus->chipco; | 1046 | cc = &bus->chipco; |
1047 | |||
1048 | if (!cc->dev) | ||
1049 | goto out; | ||
1050 | if (cc->dev->id.revision < 5) | ||
1051 | goto out; | ||
1052 | |||
1047 | ssb_chipco_set_clockmode(cc, SSB_CLKMODE_SLOW); | 1053 | ssb_chipco_set_clockmode(cc, SSB_CLKMODE_SLOW); |
1048 | err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 0); | 1054 | err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 0); |
1049 | if (err) | 1055 | if (err) |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 7de4ea3a04d9..4fd3eb2f8ec2 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -752,6 +752,8 @@ static inline unsigned int tcp_packets_in_flight(const struct tcp_sock *tp) | |||
752 | return tp->packets_out - tcp_left_out(tp) + tp->retrans_out; | 752 | return tp->packets_out - tcp_left_out(tp) + tp->retrans_out; |
753 | } | 753 | } |
754 | 754 | ||
755 | extern int tcp_limit_reno_sacked(struct tcp_sock *tp); | ||
756 | |||
755 | /* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd. | 757 | /* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd. |
756 | * The exception is rate halving phase, when cwnd is decreasing towards | 758 | * The exception is rate halving phase, when cwnd is decreasing towards |
757 | * ssthresh. | 759 | * ssthresh. |
diff --git a/net/atm/lec.c b/net/atm/lec.c index a2efa7ff41f1..3235c57615e4 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
@@ -266,7 +266,6 @@ static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
266 | char buf[300]; | 266 | char buf[300]; |
267 | int i = 0; | 267 | int i = 0; |
268 | #endif /* DUMP_PACKETS >0 */ | 268 | #endif /* DUMP_PACKETS >0 */ |
269 | DECLARE_MAC_BUF(mac); | ||
270 | 269 | ||
271 | pr_debug("lec_start_xmit called\n"); | 270 | pr_debug("lec_start_xmit called\n"); |
272 | if (!priv->lecd) { | 271 | if (!priv->lecd) { |
@@ -374,15 +373,19 @@ static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
374 | if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) { | 373 | if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) { |
375 | pr_debug("%s:lec_start_xmit: queuing packet, ", | 374 | pr_debug("%s:lec_start_xmit: queuing packet, ", |
376 | dev->name); | 375 | dev->name); |
377 | pr_debug("MAC address %s\n", | 376 | pr_debug("MAC address " MAC_FMT "\n", |
378 | print_mac(mac, lec_h->h_dest)); | 377 | lec_h->h_dest[0], lec_h->h_dest[1], |
378 | lec_h->h_dest[2], lec_h->h_dest[3], | ||
379 | lec_h->h_dest[4], lec_h->h_dest[5]); | ||
379 | skb_queue_tail(&entry->tx_wait, skb); | 380 | skb_queue_tail(&entry->tx_wait, skb); |
380 | } else { | 381 | } else { |
381 | pr_debug | 382 | pr_debug |
382 | ("%s:lec_start_xmit: tx queue full or no arp entry, dropping, ", | 383 | ("%s:lec_start_xmit: tx queue full or no arp entry, dropping, ", |
383 | dev->name); | 384 | dev->name); |
384 | pr_debug("MAC address %s\n", | 385 | pr_debug("MAC address " MAC_FMT "\n", |
385 | print_mac(mac, lec_h->h_dest)); | 386 | lec_h->h_dest[0], lec_h->h_dest[1], |
387 | lec_h->h_dest[2], lec_h->h_dest[3], | ||
388 | lec_h->h_dest[4], lec_h->h_dest[5]); | ||
386 | priv->stats.tx_dropped++; | 389 | priv->stats.tx_dropped++; |
387 | dev_kfree_skb(skb); | 390 | dev_kfree_skb(skb); |
388 | } | 391 | } |
@@ -394,8 +397,10 @@ static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
394 | 397 | ||
395 | while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) { | 398 | while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) { |
396 | pr_debug("lec.c: emptying tx queue, "); | 399 | pr_debug("lec.c: emptying tx queue, "); |
397 | pr_debug("MAC address %s\n", | 400 | pr_debug("MAC address " MAC_FMT "\n", |
398 | print_mac(mac, lec_h->h_dest)); | 401 | lec_h->h_dest[0], lec_h->h_dest[1], |
402 | lec_h->h_dest[2], lec_h->h_dest[3], | ||
403 | lec_h->h_dest[4], lec_h->h_dest[5]); | ||
399 | lec_send(vcc, skb2, priv); | 404 | lec_send(vcc, skb2, priv); |
400 | } | 405 | } |
401 | 406 | ||
@@ -449,7 +454,6 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb) | |||
449 | struct lec_arp_table *entry; | 454 | struct lec_arp_table *entry; |
450 | int i; | 455 | int i; |
451 | char *tmp; /* FIXME */ | 456 | char *tmp; /* FIXME */ |
452 | DECLARE_MAC_BUF(mac); | ||
453 | 457 | ||
454 | atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); | 458 | atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); |
455 | mesg = (struct atmlec_msg *)skb->data; | 459 | mesg = (struct atmlec_msg *)skb->data; |
@@ -536,9 +540,14 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb) | |||
536 | struct net_bridge_fdb_entry *f; | 540 | struct net_bridge_fdb_entry *f; |
537 | 541 | ||
538 | pr_debug | 542 | pr_debug |
539 | ("%s: bridge zeppelin asks about %s\n", | 543 | ("%s: bridge zeppelin asks about " MAC_FMT "\n", |
540 | dev->name, | 544 | dev->name, |
541 | print_mac(mac, mesg->content.proxy.mac_addr)); | 545 | mesg->content.proxy.mac_addr[0], |
546 | mesg->content.proxy.mac_addr[1], | ||
547 | mesg->content.proxy.mac_addr[2], | ||
548 | mesg->content.proxy.mac_addr[3], | ||
549 | mesg->content.proxy.mac_addr[4], | ||
550 | mesg->content.proxy.mac_addr[5]); | ||
542 | 551 | ||
543 | if (br_fdb_get_hook == NULL || dev->br_port == NULL) | 552 | if (br_fdb_get_hook == NULL || dev->br_port == NULL) |
544 | break; | 553 | break; |
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index 1e3f87c8c012..200ee1e63728 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c | |||
@@ -271,7 +271,6 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
271 | { | 271 | { |
272 | struct ieee80211_hdr_3addr *hdr; | 272 | struct ieee80211_hdr_3addr *hdr; |
273 | int res, hdrlen; | 273 | int res, hdrlen; |
274 | DECLARE_MAC_BUF(mac); | ||
275 | 274 | ||
276 | if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) | 275 | if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) |
277 | return 0; | 276 | return 0; |
@@ -283,8 +282,12 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
283 | res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); | 282 | res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); |
284 | atomic_dec(&crypt->refcnt); | 283 | atomic_dec(&crypt->refcnt); |
285 | if (res < 0) { | 284 | if (res < 0) { |
286 | IEEE80211_DEBUG_DROP("decryption failed (SA=%s" | 285 | IEEE80211_DEBUG_DROP("decryption failed (SA=" MAC_FMT |
287 | ") res=%d\n", print_mac(mac, hdr->addr2), res); | 286 | ") res=%d\n", |
287 | hdr->addr2[0], hdr->addr2[1], | ||
288 | hdr->addr2[2], hdr->addr2[3], | ||
289 | hdr->addr2[4], hdr->addr2[5], | ||
290 | res); | ||
288 | if (res == -2) | 291 | if (res == -2) |
289 | IEEE80211_DEBUG_DROP("Decryption failed ICV " | 292 | IEEE80211_DEBUG_DROP("Decryption failed ICV " |
290 | "mismatch (key %d)\n", | 293 | "mismatch (key %d)\n", |
@@ -304,7 +307,6 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee, | |||
304 | { | 307 | { |
305 | struct ieee80211_hdr_3addr *hdr; | 308 | struct ieee80211_hdr_3addr *hdr; |
306 | int res, hdrlen; | 309 | int res, hdrlen; |
307 | DECLARE_MAC_BUF(mac); | ||
308 | 310 | ||
309 | if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) | 311 | if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) |
310 | return 0; | 312 | return 0; |
@@ -317,8 +319,12 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee, | |||
317 | atomic_dec(&crypt->refcnt); | 319 | atomic_dec(&crypt->refcnt); |
318 | if (res < 0) { | 320 | if (res < 0) { |
319 | printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" | 321 | printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" |
320 | " (SA=%s keyidx=%d)\n", | 322 | " (SA=" MAC_FMT " keyidx=%d)\n", |
321 | ieee->dev->name, print_mac(mac, hdr->addr2), keyidx); | 323 | ieee->dev->name, |
324 | hdr->addr2[0], hdr->addr2[1], | ||
325 | hdr->addr2[2], hdr->addr2[3], | ||
326 | hdr->addr2[4], hdr->addr2[5], | ||
327 | keyidx); | ||
322 | return -1; | 328 | return -1; |
323 | } | 329 | } |
324 | 330 | ||
@@ -462,8 +468,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
462 | * frames silently instead of filling system log with | 468 | * frames silently instead of filling system log with |
463 | * these reports. */ | 469 | * these reports. */ |
464 | IEEE80211_DEBUG_DROP("Decryption failed (not set)" | 470 | IEEE80211_DEBUG_DROP("Decryption failed (not set)" |
465 | " (SA=%s)\n", | 471 | " (SA=" MAC_FMT ")\n", |
466 | print_mac(mac, hdr->addr2)); | 472 | hdr->addr2[0], hdr->addr2[1], |
473 | hdr->addr2[2], hdr->addr2[3], | ||
474 | hdr->addr2[4], hdr->addr2[5]); | ||
467 | ieee->ieee_stats.rx_discards_undecryptable++; | 475 | ieee->ieee_stats.rx_discards_undecryptable++; |
468 | goto rx_dropped; | 476 | goto rx_dropped; |
469 | } | 477 | } |
@@ -474,8 +482,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
474 | fc & IEEE80211_FCTL_PROTECTED && ieee->host_decrypt && | 482 | fc & IEEE80211_FCTL_PROTECTED && ieee->host_decrypt && |
475 | (keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0) { | 483 | (keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0) { |
476 | printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " | 484 | printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " |
477 | "from %s\n", dev->name, | 485 | "from " MAC_FMT "\n", dev->name, |
478 | print_mac(mac, hdr->addr2)); | 486 | hdr->addr2[0], hdr->addr2[1], |
487 | hdr->addr2[2], hdr->addr2[3], | ||
488 | hdr->addr2[4], hdr->addr2[5]); | ||
479 | /* TODO: could inform hostapd about this so that it | 489 | /* TODO: could inform hostapd about this so that it |
480 | * could send auth failure report */ | 490 | * could send auth failure report */ |
481 | goto rx_dropped; | 491 | goto rx_dropped; |
@@ -653,8 +663,11 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
653 | * configured */ | 663 | * configured */ |
654 | } else { | 664 | } else { |
655 | IEEE80211_DEBUG_DROP("encryption configured, but RX " | 665 | IEEE80211_DEBUG_DROP("encryption configured, but RX " |
656 | "frame not encrypted (SA=%s" | 666 | "frame not encrypted (SA=" |
657 | ")\n", print_mac(mac, hdr->addr2)); | 667 | MAC_FMT ")\n", |
668 | hdr->addr2[0], hdr->addr2[1], | ||
669 | hdr->addr2[2], hdr->addr2[3], | ||
670 | hdr->addr2[4], hdr->addr2[5]); | ||
658 | goto rx_dropped; | 671 | goto rx_dropped; |
659 | } | 672 | } |
660 | } | 673 | } |
@@ -662,9 +675,11 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
662 | if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep && | 675 | if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep && |
663 | !ieee80211_is_eapol_frame(ieee, skb)) { | 676 | !ieee80211_is_eapol_frame(ieee, skb)) { |
664 | IEEE80211_DEBUG_DROP("dropped unencrypted RX data " | 677 | IEEE80211_DEBUG_DROP("dropped unencrypted RX data " |
665 | "frame from %s" | 678 | "frame from " MAC_FMT |
666 | " (drop_unencrypted=1)\n", | 679 | " (drop_unencrypted=1)\n", |
667 | print_mac(mac, hdr->addr2)); | 680 | hdr->addr2[0], hdr->addr2[1], |
681 | hdr->addr2[2], hdr->addr2[3], | ||
682 | hdr->addr2[4], hdr->addr2[5]); | ||
668 | goto rx_dropped; | 683 | goto rx_dropped; |
669 | } | 684 | } |
670 | 685 | ||
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index 876169f3a528..717c411a5c6b 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c | |||
@@ -124,6 +124,7 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int stat | |||
124 | tw->tw_hash = sk->sk_hash; | 124 | tw->tw_hash = sk->sk_hash; |
125 | tw->tw_ipv6only = 0; | 125 | tw->tw_ipv6only = 0; |
126 | tw->tw_prot = sk->sk_prot_creator; | 126 | tw->tw_prot = sk->sk_prot_creator; |
127 | tw->tw_net = sk->sk_net; | ||
127 | atomic_set(&tw->tw_refcnt, 1); | 128 | atomic_set(&tw->tw_refcnt, 1); |
128 | inet_twsk_dead_node_init(tw); | 129 | inet_twsk_dead_node_init(tw); |
129 | __module_get(tw->tw_prot->owner); | 130 | __module_get(tw->tw_prot->owner); |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index f72457b4b0a7..c2921d01e925 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -1132,7 +1132,7 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname, | |||
1132 | } | 1132 | } |
1133 | release_sock(sk); | 1133 | release_sock(sk); |
1134 | 1134 | ||
1135 | if (len < sizeof(int) && len > 0 && val>=0 && val<255) { | 1135 | if (len < sizeof(int) && len > 0 && val>=0 && val<=255) { |
1136 | unsigned char ucval = (unsigned char)val; | 1136 | unsigned char ucval = (unsigned char)val; |
1137 | len = 1; | 1137 | len = 1; |
1138 | if (put_user(len, optlen)) | 1138 | if (put_user(len, optlen)) |
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c index 0d5fa3a54d04..36b4e3bb056f 100644 --- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c | |||
@@ -629,6 +629,8 @@ static int __init nf_nat_init(void) | |||
629 | size_t i; | 629 | size_t i; |
630 | int ret; | 630 | int ret; |
631 | 631 | ||
632 | need_ipv4_conntrack(); | ||
633 | |||
632 | ret = nf_ct_extend_register(&nat_extend); | 634 | ret = nf_ct_extend_register(&nat_extend); |
633 | if (ret < 0) { | 635 | if (ret < 0) { |
634 | printk(KERN_ERR "nf_nat_core: Unable to register extension\n"); | 636 | printk(KERN_ERR "nf_nat_core: Unable to register extension\n"); |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7facdb0f6960..5119856017ab 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1625,13 +1625,11 @@ out: | |||
1625 | return flag; | 1625 | return flag; |
1626 | } | 1626 | } |
1627 | 1627 | ||
1628 | /* If we receive more dupacks than we expected counting segments | 1628 | /* Limits sacked_out so that sum with lost_out isn't ever larger than |
1629 | * in assumption of absent reordering, interpret this as reordering. | 1629 | * packets_out. Returns zero if sacked_out adjustement wasn't necessary. |
1630 | * The only another reason could be bug in receiver TCP. | ||
1631 | */ | 1630 | */ |
1632 | static void tcp_check_reno_reordering(struct sock *sk, const int addend) | 1631 | int tcp_limit_reno_sacked(struct tcp_sock *tp) |
1633 | { | 1632 | { |
1634 | struct tcp_sock *tp = tcp_sk(sk); | ||
1635 | u32 holes; | 1633 | u32 holes; |
1636 | 1634 | ||
1637 | holes = max(tp->lost_out, 1U); | 1635 | holes = max(tp->lost_out, 1U); |
@@ -1639,8 +1637,20 @@ static void tcp_check_reno_reordering(struct sock *sk, const int addend) | |||
1639 | 1637 | ||
1640 | if ((tp->sacked_out + holes) > tp->packets_out) { | 1638 | if ((tp->sacked_out + holes) > tp->packets_out) { |
1641 | tp->sacked_out = tp->packets_out - holes; | 1639 | tp->sacked_out = tp->packets_out - holes; |
1642 | tcp_update_reordering(sk, tp->packets_out + addend, 0); | 1640 | return 1; |
1643 | } | 1641 | } |
1642 | return 0; | ||
1643 | } | ||
1644 | |||
1645 | /* If we receive more dupacks than we expected counting segments | ||
1646 | * in assumption of absent reordering, interpret this as reordering. | ||
1647 | * The only another reason could be bug in receiver TCP. | ||
1648 | */ | ||
1649 | static void tcp_check_reno_reordering(struct sock *sk, const int addend) | ||
1650 | { | ||
1651 | struct tcp_sock *tp = tcp_sk(sk); | ||
1652 | if (tcp_limit_reno_sacked(tp)) | ||
1653 | tcp_update_reordering(sk, tp->packets_out + addend, 0); | ||
1644 | } | 1654 | } |
1645 | 1655 | ||
1646 | /* Emulate SACKs for SACKless connection: account for a new dupack. */ | 1656 | /* Emulate SACKs for SACKless connection: account for a new dupack. */ |
@@ -1681,11 +1691,16 @@ static inline void tcp_reset_reno_sack(struct tcp_sock *tp) | |||
1681 | int tcp_use_frto(struct sock *sk) | 1691 | int tcp_use_frto(struct sock *sk) |
1682 | { | 1692 | { |
1683 | const struct tcp_sock *tp = tcp_sk(sk); | 1693 | const struct tcp_sock *tp = tcp_sk(sk); |
1694 | const struct inet_connection_sock *icsk = inet_csk(sk); | ||
1684 | struct sk_buff *skb; | 1695 | struct sk_buff *skb; |
1685 | 1696 | ||
1686 | if (!sysctl_tcp_frto) | 1697 | if (!sysctl_tcp_frto) |
1687 | return 0; | 1698 | return 0; |
1688 | 1699 | ||
1700 | /* MTU probe and F-RTO won't really play nicely along currently */ | ||
1701 | if (icsk->icsk_mtup.probe_size) | ||
1702 | return 0; | ||
1703 | |||
1689 | if (IsSackFrto()) | 1704 | if (IsSackFrto()) |
1690 | return 1; | 1705 | return 1; |
1691 | 1706 | ||
@@ -2134,11 +2149,13 @@ static void tcp_verify_retransmit_hint(struct tcp_sock *tp, struct sk_buff *skb) | |||
2134 | /* Mark head of queue up as lost. With RFC3517 SACK, the packets is | 2149 | /* Mark head of queue up as lost. With RFC3517 SACK, the packets is |
2135 | * is against sacked "cnt", otherwise it's against facked "cnt" | 2150 | * is against sacked "cnt", otherwise it's against facked "cnt" |
2136 | */ | 2151 | */ |
2137 | static void tcp_mark_head_lost(struct sock *sk, int packets, int fast_rexmit) | 2152 | static void tcp_mark_head_lost(struct sock *sk, int packets) |
2138 | { | 2153 | { |
2139 | struct tcp_sock *tp = tcp_sk(sk); | 2154 | struct tcp_sock *tp = tcp_sk(sk); |
2140 | struct sk_buff *skb; | 2155 | struct sk_buff *skb; |
2141 | int cnt; | 2156 | int cnt, oldcnt; |
2157 | int err; | ||
2158 | unsigned int mss; | ||
2142 | 2159 | ||
2143 | BUG_TRAP(packets <= tp->packets_out); | 2160 | BUG_TRAP(packets <= tp->packets_out); |
2144 | if (tp->lost_skb_hint) { | 2161 | if (tp->lost_skb_hint) { |
@@ -2157,13 +2174,25 @@ static void tcp_mark_head_lost(struct sock *sk, int packets, int fast_rexmit) | |||
2157 | tp->lost_skb_hint = skb; | 2174 | tp->lost_skb_hint = skb; |
2158 | tp->lost_cnt_hint = cnt; | 2175 | tp->lost_cnt_hint = cnt; |
2159 | 2176 | ||
2177 | if (after(TCP_SKB_CB(skb)->end_seq, tp->high_seq)) | ||
2178 | break; | ||
2179 | |||
2180 | oldcnt = cnt; | ||
2160 | if (tcp_is_fack(tp) || tcp_is_reno(tp) || | 2181 | if (tcp_is_fack(tp) || tcp_is_reno(tp) || |
2161 | (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) | 2182 | (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) |
2162 | cnt += tcp_skb_pcount(skb); | 2183 | cnt += tcp_skb_pcount(skb); |
2163 | 2184 | ||
2164 | if (((!fast_rexmit || (tp->lost_out > 0)) && (cnt > packets)) || | 2185 | if (cnt > packets) { |
2165 | after(TCP_SKB_CB(skb)->end_seq, tp->high_seq)) | 2186 | if (tcp_is_sack(tp) || (oldcnt >= packets)) |
2166 | break; | 2187 | break; |
2188 | |||
2189 | mss = skb_shinfo(skb)->gso_size; | ||
2190 | err = tcp_fragment(sk, skb, (packets - oldcnt) * mss, mss); | ||
2191 | if (err < 0) | ||
2192 | break; | ||
2193 | cnt = packets; | ||
2194 | } | ||
2195 | |||
2167 | if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_SACKED_ACKED|TCPCB_LOST))) { | 2196 | if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_SACKED_ACKED|TCPCB_LOST))) { |
2168 | TCP_SKB_CB(skb)->sacked |= TCPCB_LOST; | 2197 | TCP_SKB_CB(skb)->sacked |= TCPCB_LOST; |
2169 | tp->lost_out += tcp_skb_pcount(skb); | 2198 | tp->lost_out += tcp_skb_pcount(skb); |
@@ -2180,17 +2209,17 @@ static void tcp_update_scoreboard(struct sock *sk, int fast_rexmit) | |||
2180 | struct tcp_sock *tp = tcp_sk(sk); | 2209 | struct tcp_sock *tp = tcp_sk(sk); |
2181 | 2210 | ||
2182 | if (tcp_is_reno(tp)) { | 2211 | if (tcp_is_reno(tp)) { |
2183 | tcp_mark_head_lost(sk, 1, fast_rexmit); | 2212 | tcp_mark_head_lost(sk, 1); |
2184 | } else if (tcp_is_fack(tp)) { | 2213 | } else if (tcp_is_fack(tp)) { |
2185 | int lost = tp->fackets_out - tp->reordering; | 2214 | int lost = tp->fackets_out - tp->reordering; |
2186 | if (lost <= 0) | 2215 | if (lost <= 0) |
2187 | lost = 1; | 2216 | lost = 1; |
2188 | tcp_mark_head_lost(sk, lost, fast_rexmit); | 2217 | tcp_mark_head_lost(sk, lost); |
2189 | } else { | 2218 | } else { |
2190 | int sacked_upto = tp->sacked_out - tp->reordering; | 2219 | int sacked_upto = tp->sacked_out - tp->reordering; |
2191 | if (sacked_upto < 0) | 2220 | if (sacked_upto < fast_rexmit) |
2192 | sacked_upto = 0; | 2221 | sacked_upto = fast_rexmit; |
2193 | tcp_mark_head_lost(sk, sacked_upto, fast_rexmit); | 2222 | tcp_mark_head_lost(sk, sacked_upto); |
2194 | } | 2223 | } |
2195 | 2224 | ||
2196 | /* New heuristics: it is possible only after we switched | 2225 | /* New heuristics: it is possible only after we switched |
@@ -2524,7 +2553,7 @@ static void tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag) | |||
2524 | before(tp->snd_una, tp->high_seq) && | 2553 | before(tp->snd_una, tp->high_seq) && |
2525 | icsk->icsk_ca_state != TCP_CA_Open && | 2554 | icsk->icsk_ca_state != TCP_CA_Open && |
2526 | tp->fackets_out > tp->reordering) { | 2555 | tp->fackets_out > tp->reordering) { |
2527 | tcp_mark_head_lost(sk, tp->fackets_out - tp->reordering, 0); | 2556 | tcp_mark_head_lost(sk, tp->fackets_out - tp->reordering); |
2528 | NET_INC_STATS_BH(LINUX_MIB_TCPLOSS); | 2557 | NET_INC_STATS_BH(LINUX_MIB_TCPLOSS); |
2529 | } | 2558 | } |
2530 | 2559 | ||
@@ -2586,6 +2615,8 @@ static void tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag) | |||
2586 | case TCP_CA_Loss: | 2615 | case TCP_CA_Loss: |
2587 | if (flag & FLAG_DATA_ACKED) | 2616 | if (flag & FLAG_DATA_ACKED) |
2588 | icsk->icsk_retransmits = 0; | 2617 | icsk->icsk_retransmits = 0; |
2618 | if (tcp_is_reno(tp) && flag & FLAG_SND_UNA_ADVANCED) | ||
2619 | tcp_reset_reno_sack(tp); | ||
2589 | if (!tcp_try_undo_loss(sk)) { | 2620 | if (!tcp_try_undo_loss(sk)) { |
2590 | tcp_moderate_cwnd(tp); | 2621 | tcp_moderate_cwnd(tp); |
2591 | tcp_xmit_retransmit_queue(sk); | 2622 | tcp_xmit_retransmit_queue(sk); |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 72b9350006fe..d29ef79c00ca 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1808,6 +1808,9 @@ void tcp_simple_retransmit(struct sock *sk) | |||
1808 | if (!lost) | 1808 | if (!lost) |
1809 | return; | 1809 | return; |
1810 | 1810 | ||
1811 | if (tcp_is_reno(tp)) | ||
1812 | tcp_limit_reno_sacked(tp); | ||
1813 | |||
1811 | tcp_verify_left_out(tp); | 1814 | tcp_verify_left_out(tp); |
1812 | 1815 | ||
1813 | /* Don't muck with the congestion window here. | 1816 | /* Don't muck with the congestion window here. |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index e0c72d04584b..c1706855460a 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -312,14 +312,12 @@ static void ieee80211_sta_wmm_params(struct net_device *dev, | |||
312 | } | 312 | } |
313 | } | 313 | } |
314 | 314 | ||
315 | 315 | static u32 ieee80211_handle_protect_preamb(struct ieee80211_sub_if_data *sdata, | |
316 | static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata, | 316 | bool use_protection, |
317 | u8 erp_value) | 317 | bool use_short_preamble) |
318 | { | 318 | { |
319 | struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; | 319 | struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; |
320 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; | 320 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; |
321 | bool use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0; | ||
322 | bool use_short_preamble = (erp_value & WLAN_ERP_BARKER_PREAMBLE) == 0; | ||
323 | DECLARE_MAC_BUF(mac); | 321 | DECLARE_MAC_BUF(mac); |
324 | u32 changed = 0; | 322 | u32 changed = 0; |
325 | 323 | ||
@@ -350,6 +348,32 @@ static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata, | |||
350 | return changed; | 348 | return changed; |
351 | } | 349 | } |
352 | 350 | ||
351 | static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata, | ||
352 | u8 erp_value) | ||
353 | { | ||
354 | bool use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0; | ||
355 | bool use_short_preamble = (erp_value & WLAN_ERP_BARKER_PREAMBLE) == 0; | ||
356 | |||
357 | return ieee80211_handle_protect_preamb(sdata, | ||
358 | use_protection, use_short_preamble); | ||
359 | } | ||
360 | |||
361 | static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata, | ||
362 | struct ieee80211_sta_bss *bss) | ||
363 | { | ||
364 | u32 changed = 0; | ||
365 | |||
366 | if (bss->has_erp_value) | ||
367 | changed |= ieee80211_handle_erp_ie(sdata, bss->erp_value); | ||
368 | else { | ||
369 | u16 capab = bss->capability; | ||
370 | changed |= ieee80211_handle_protect_preamb(sdata, false, | ||
371 | (capab & WLAN_CAPABILITY_SHORT_PREAMBLE) != 0); | ||
372 | } | ||
373 | |||
374 | return changed; | ||
375 | } | ||
376 | |||
353 | int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie, | 377 | int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie, |
354 | struct ieee80211_ht_info *ht_info) | 378 | struct ieee80211_ht_info *ht_info) |
355 | { | 379 | { |
@@ -468,9 +492,7 @@ static void ieee80211_set_associated(struct net_device *dev, | |||
468 | local->hw.conf.channel, | 492 | local->hw.conf.channel, |
469 | ifsta->ssid, ifsta->ssid_len); | 493 | ifsta->ssid, ifsta->ssid_len); |
470 | if (bss) { | 494 | if (bss) { |
471 | if (bss->has_erp_value) | 495 | changed |= ieee80211_handle_bss_capability(sdata, bss); |
472 | changed |= ieee80211_handle_erp_ie( | ||
473 | sdata, bss->erp_value); | ||
474 | ieee80211_rx_bss_put(dev, bss); | 496 | ieee80211_rx_bss_put(dev, bss); |
475 | } | 497 | } |
476 | 498 | ||
@@ -2116,6 +2138,11 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev, | |||
2116 | 2138 | ||
2117 | if (elems.erp_info && elems.erp_info_len >= 1) | 2139 | if (elems.erp_info && elems.erp_info_len >= 1) |
2118 | changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]); | 2140 | changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]); |
2141 | else { | ||
2142 | u16 capab = le16_to_cpu(mgmt->u.beacon.capab_info); | ||
2143 | changed |= ieee80211_handle_protect_preamb(sdata, false, | ||
2144 | (capab & WLAN_CAPABILITY_SHORT_PREAMBLE) != 0); | ||
2145 | } | ||
2119 | 2146 | ||
2120 | if (elems.ht_cap_elem && elems.ht_info_elem && | 2147 | if (elems.ht_cap_elem && elems.ht_info_elem && |
2121 | elems.wmm_param && local->ops->conf_ht && | 2148 | elems.wmm_param && local->ops->conf_ht && |
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index dc29007c52cd..40d344b21453 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
@@ -466,38 +466,25 @@ static inline void rateinfo_recalc(struct dsthash_ent *dh, unsigned long now) | |||
466 | 466 | ||
467 | static inline __be32 maskl(__be32 a, unsigned int l) | 467 | static inline __be32 maskl(__be32 a, unsigned int l) |
468 | { | 468 | { |
469 | return htonl(ntohl(a) & ~(~(u_int32_t)0 >> l)); | 469 | return l ? htonl(ntohl(a) & ~0 << (32 - l)) : 0; |
470 | } | 470 | } |
471 | 471 | ||
472 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 472 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) |
473 | static void hashlimit_ipv6_mask(__be32 *i, unsigned int p) | 473 | static void hashlimit_ipv6_mask(__be32 *i, unsigned int p) |
474 | { | 474 | { |
475 | switch (p) { | 475 | switch (p) { |
476 | case 0: | 476 | case 0 ... 31: |
477 | i[0] = i[1] = 0; | ||
478 | i[2] = i[3] = 0; | ||
479 | break; | ||
480 | case 1 ... 31: | ||
481 | i[0] = maskl(i[0], p); | 477 | i[0] = maskl(i[0], p); |
482 | i[1] = i[2] = i[3] = 0; | 478 | i[1] = i[2] = i[3] = 0; |
483 | break; | 479 | break; |
484 | case 32: | 480 | case 32 ... 63: |
485 | i[1] = i[2] = i[3] = 0; | ||
486 | break; | ||
487 | case 33 ... 63: | ||
488 | i[1] = maskl(i[1], p - 32); | 481 | i[1] = maskl(i[1], p - 32); |
489 | i[2] = i[3] = 0; | 482 | i[2] = i[3] = 0; |
490 | break; | 483 | break; |
491 | case 64: | 484 | case 64 ... 95: |
492 | i[2] = i[3] = 0; | ||
493 | break; | ||
494 | case 65 ... 95: | ||
495 | i[2] = maskl(i[2], p - 64); | 485 | i[2] = maskl(i[2], p - 64); |
496 | i[3] = 0; | 486 | i[3] = 0; |
497 | case 96: | 487 | case 96 ... 127: |
498 | i[3] = 0; | ||
499 | break; | ||
500 | case 97 ... 127: | ||
501 | i[3] = maskl(i[3], p - 96); | 488 | i[3] = maskl(i[3], p - 96); |
502 | break; | 489 | break; |
503 | case 128: | 490 | case 128: |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index e3a214f63f91..f68a5c8f2147 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -945,7 +945,7 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info) | |||
945 | nla_len(info->attrs[NL80211_ATTR_STA_SUPPORTED_RATES]); | 945 | nla_len(info->attrs[NL80211_ATTR_STA_SUPPORTED_RATES]); |
946 | params.listen_interval = | 946 | params.listen_interval = |
947 | nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]); | 947 | nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]); |
948 | params.listen_interval = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]); | 948 | params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]); |
949 | 949 | ||
950 | if (parse_station_flags(info->attrs[NL80211_ATTR_STA_FLAGS], | 950 | if (parse_station_flags(info->attrs[NL80211_ATTR_STA_FLAGS], |
951 | ¶ms.station_flags)) | 951 | ¶ms.station_flags)) |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 5d96f2728dc6..019d21de19b3 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -288,7 +288,7 @@ static void copy_from_user_state(struct xfrm_state *x, struct xfrm_usersa_info * | |||
288 | memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); | 288 | memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); |
289 | x->props.flags = p->flags; | 289 | x->props.flags = p->flags; |
290 | 290 | ||
291 | if (x->props.mode == XFRM_MODE_TRANSPORT) | 291 | if (!x->sel.family) |
292 | x->sel.family = p->family; | 292 | x->sel.family = p->family; |
293 | 293 | ||
294 | } | 294 | } |