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

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