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