Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: (42 commits)
ipv4: dont create routes on down devices
epic100: hamachi: yellowfin: Fix skb allocation size
sundance: Fix oopses with corrupted skb_shared_info
Revert "ipv4: Allow configuring subnets as local addresses"
USB: mcs7830: return negative if auto negotiate fails
irda: prevent integer underflow in IRLMP_ENUMDEVICES
tcp: fix listening_get_next()
atl1c: Do not use legacy PCI power management
mac80211: fix mesh forwarding
MAINTAINERS: email address change
net: Fix range checks in tcf_valid_offset().
net_sched: sch_sfq: fix allot handling
hostap: remove netif_stop_queue from init
mac80211/rt2x00: add ieee80211_tx_status_ni()
typhoon: memory corruption in typhoon_get_drvinfo()
net: Add USB PID for new MOSCHIP USB ethernet controller MCS7832 variant
net_sched: always clone skbs
ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed.
netlink: fix gcc -Wconversion compilation warning
asix: add USB ID for Logitec LAN-GTJ U2A
...

+413 -190
+1 -1
MAINTAINERS
··· 4590 4590 F: include/pcmcia/ 4591 4591 4592 4592 PCNET32 NETWORK DRIVER 4593 - M: Don Fry <pcnet32@verizon.net> 4593 + M: Don Fry <pcnet32@frontier.com> 4594 4594 L: netdev@vger.kernel.org 4595 4595 S: Maintained 4596 4596 F: drivers/net/pcnet32.c
+4 -2
drivers/bluetooth/hci_ldisc.c
··· 311 311 312 312 if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) { 313 313 hu->proto->close(hu); 314 - hci_unregister_dev(hdev); 315 - hci_free_dev(hdev); 314 + if (hdev) { 315 + hci_unregister_dev(hdev); 316 + hci_free_dev(hdev); 317 + } 316 318 } 317 319 } 318 320 }
+15 -24
drivers/net/atl1c/atl1c_main.c
··· 702 702 703 703 704 704 adapter->wol = 0; 705 + device_set_wakeup_enable(&pdev->dev, false); 705 706 adapter->link_speed = SPEED_0; 706 707 adapter->link_duplex = FULL_DUPLEX; 707 708 adapter->num_rx_queues = AT_DEF_RECEIVE_QUEUE; ··· 2445 2444 return 0; 2446 2445 } 2447 2446 2448 - static int atl1c_suspend(struct pci_dev *pdev, pm_message_t state) 2447 + static int atl1c_suspend(struct device *dev) 2449 2448 { 2449 + struct pci_dev *pdev = to_pci_dev(dev); 2450 2450 struct net_device *netdev = pci_get_drvdata(pdev); 2451 2451 struct atl1c_adapter *adapter = netdev_priv(netdev); 2452 2452 struct atl1c_hw *hw = &adapter->hw; ··· 2456 2454 u32 wol_ctrl_data = 0; 2457 2455 u16 mii_intr_status_data = 0; 2458 2456 u32 wufc = adapter->wol; 2459 - int retval = 0; 2460 2457 2461 2458 atl1c_disable_l0s_l1(hw); 2462 2459 if (netif_running(netdev)) { ··· 2463 2462 atl1c_down(adapter); 2464 2463 } 2465 2464 netif_device_detach(netdev); 2466 - retval = pci_save_state(pdev); 2467 - if (retval) 2468 - return retval; 2469 2465 2470 2466 if (wufc) 2471 2467 if (atl1c_phy_power_saving(hw) != 0) ··· 2523 2525 AT_WRITE_REG(hw, REG_WOL_CTRL, wol_ctrl_data); 2524 2526 AT_WRITE_REG(hw, REG_MAC_CTRL, mac_ctrl_data); 2525 2527 2526 - /* pcie patch */ 2527 - device_set_wakeup_enable(&pdev->dev, 1); 2528 - 2529 2528 AT_WRITE_REG(hw, REG_GPHY_CTRL, GPHY_CTRL_DEFAULT | 2530 2529 GPHY_CTRL_EXT_RESET); 2531 - pci_prepare_to_sleep(pdev); 2532 2530 } else { 2533 2531 AT_WRITE_REG(hw, REG_GPHY_CTRL, GPHY_CTRL_POWER_SAVING); 2534 2532 master_ctrl_data |= MASTER_CTRL_CLK_SEL_DIS; ··· 2534 2540 AT_WRITE_REG(hw, REG_MAC_CTRL, mac_ctrl_data); 2535 2541 AT_WRITE_REG(hw, REG_WOL_CTRL, 0); 2536 2542 hw->phy_configured = false; /* re-init PHY when resume */ 2537 - pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); 2538 2543 } 2539 - 2540 - pci_disable_device(pdev); 2541 - pci_set_power_state(pdev, pci_choose_state(pdev, state)); 2542 2544 2543 2545 return 0; 2544 2546 } 2545 2547 2546 - static int atl1c_resume(struct pci_dev *pdev) 2548 + static int atl1c_resume(struct device *dev) 2547 2549 { 2550 + struct pci_dev *pdev = to_pci_dev(dev); 2548 2551 struct net_device *netdev = pci_get_drvdata(pdev); 2549 2552 struct atl1c_adapter *adapter = netdev_priv(netdev); 2550 - 2551 - pci_set_power_state(pdev, PCI_D0); 2552 - pci_restore_state(pdev); 2553 - pci_enable_wake(pdev, PCI_D3hot, 0); 2554 - pci_enable_wake(pdev, PCI_D3cold, 0); 2555 2553 2556 2554 AT_WRITE_REG(&adapter->hw, REG_WOL_CTRL, 0); 2557 2555 atl1c_reset_pcie(&adapter->hw, ATL1C_PCIE_L0S_L1_DISABLE | ··· 2568 2582 2569 2583 static void atl1c_shutdown(struct pci_dev *pdev) 2570 2584 { 2571 - atl1c_suspend(pdev, PMSG_SUSPEND); 2585 + struct net_device *netdev = pci_get_drvdata(pdev); 2586 + struct atl1c_adapter *adapter = netdev_priv(netdev); 2587 + 2588 + atl1c_suspend(&pdev->dev); 2589 + pci_wake_from_d3(pdev, adapter->wol); 2590 + pci_set_power_state(pdev, PCI_D3hot); 2572 2591 } 2573 2592 2574 2593 static const struct net_device_ops atl1c_netdev_ops = { ··· 2877 2886 .resume = atl1c_io_resume, 2878 2887 }; 2879 2888 2889 + static SIMPLE_DEV_PM_OPS(atl1c_pm_ops, atl1c_suspend, atl1c_resume); 2890 + 2880 2891 static struct pci_driver atl1c_driver = { 2881 2892 .name = atl1c_driver_name, 2882 2893 .id_table = atl1c_pci_tbl, 2883 2894 .probe = atl1c_probe, 2884 2895 .remove = __devexit_p(atl1c_remove), 2885 - /* Power Managment Hooks */ 2886 - .suspend = atl1c_suspend, 2887 - .resume = atl1c_resume, 2888 2896 .shutdown = atl1c_shutdown, 2889 - .err_handler = &atl1c_err_handler 2897 + .err_handler = &atl1c_err_handler, 2898 + .driver.pm = &atl1c_pm_ops, 2890 2899 }; 2891 2900 2892 2901 /*
+1 -1
drivers/net/benet/be.h
··· 234 234 u8 __iomem *db; /* Door Bell */ 235 235 u8 __iomem *pcicfg; /* PCI config space */ 236 236 237 - spinlock_t mbox_lock; /* For serializing mbox cmds to BE card */ 237 + struct mutex mbox_lock; /* For serializing mbox cmds to BE card */ 238 238 struct be_dma_mem mbox_mem; 239 239 /* Mbox mem is adjusted to align to 16 bytes. The allocated addr 240 240 * is stored for freeing purpose */
+45 -30
drivers/net/benet/be_cmds.c
··· 462 462 u8 *wrb; 463 463 int status; 464 464 465 - spin_lock(&adapter->mbox_lock); 465 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 466 + return -1; 466 467 467 468 wrb = (u8 *)wrb_from_mbox(adapter); 468 469 *wrb++ = 0xFF; ··· 477 476 478 477 status = be_mbox_notify_wait(adapter); 479 478 480 - spin_unlock(&adapter->mbox_lock); 479 + mutex_unlock(&adapter->mbox_lock); 481 480 return status; 482 481 } 483 482 ··· 492 491 if (adapter->eeh_err) 493 492 return -EIO; 494 493 495 - spin_lock(&adapter->mbox_lock); 494 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 495 + return -1; 496 496 497 497 wrb = (u8 *)wrb_from_mbox(adapter); 498 498 *wrb++ = 0xFF; ··· 507 505 508 506 status = be_mbox_notify_wait(adapter); 509 507 510 - spin_unlock(&adapter->mbox_lock); 508 + mutex_unlock(&adapter->mbox_lock); 511 509 return status; 512 510 } 513 511 int be_cmd_eq_create(struct be_adapter *adapter, ··· 518 516 struct be_dma_mem *q_mem = &eq->dma_mem; 519 517 int status; 520 518 521 - spin_lock(&adapter->mbox_lock); 519 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 520 + return -1; 522 521 523 522 wrb = wrb_from_mbox(adapter); 524 523 req = embedded_payload(wrb); ··· 549 546 eq->created = true; 550 547 } 551 548 552 - spin_unlock(&adapter->mbox_lock); 549 + mutex_unlock(&adapter->mbox_lock); 553 550 return status; 554 551 } 555 552 ··· 561 558 struct be_cmd_req_mac_query *req; 562 559 int status; 563 560 564 - spin_lock(&adapter->mbox_lock); 561 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 562 + return -1; 565 563 566 564 wrb = wrb_from_mbox(adapter); 567 565 req = embedded_payload(wrb); ··· 587 583 memcpy(mac_addr, resp->mac.addr, ETH_ALEN); 588 584 } 589 585 590 - spin_unlock(&adapter->mbox_lock); 586 + mutex_unlock(&adapter->mbox_lock); 591 587 return status; 592 588 } 593 589 ··· 671 667 void *ctxt; 672 668 int status; 673 669 674 - spin_lock(&adapter->mbox_lock); 670 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 671 + return -1; 675 672 676 673 wrb = wrb_from_mbox(adapter); 677 674 req = embedded_payload(wrb); ··· 706 701 cq->created = true; 707 702 } 708 703 709 - spin_unlock(&adapter->mbox_lock); 704 + mutex_unlock(&adapter->mbox_lock); 710 705 711 706 return status; 712 707 } ··· 729 724 void *ctxt; 730 725 int status; 731 726 732 - spin_lock(&adapter->mbox_lock); 727 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 728 + return -1; 733 729 734 730 wrb = wrb_from_mbox(adapter); 735 731 req = embedded_payload(wrb); ··· 760 754 mccq->id = le16_to_cpu(resp->id); 761 755 mccq->created = true; 762 756 } 763 - spin_unlock(&adapter->mbox_lock); 757 + mutex_unlock(&adapter->mbox_lock); 764 758 765 759 return status; 766 760 } ··· 775 769 void *ctxt; 776 770 int status; 777 771 778 - spin_lock(&adapter->mbox_lock); 772 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 773 + return -1; 779 774 780 775 wrb = wrb_from_mbox(adapter); 781 776 req = embedded_payload(wrb); ··· 808 801 txq->created = true; 809 802 } 810 803 811 - spin_unlock(&adapter->mbox_lock); 804 + mutex_unlock(&adapter->mbox_lock); 812 805 813 806 return status; 814 807 } ··· 823 816 struct be_dma_mem *q_mem = &rxq->dma_mem; 824 817 int status; 825 818 826 - spin_lock(&adapter->mbox_lock); 819 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 820 + return -1; 827 821 828 822 wrb = wrb_from_mbox(adapter); 829 823 req = embedded_payload(wrb); ··· 851 843 *rss_id = resp->rss_id; 852 844 } 853 845 854 - spin_unlock(&adapter->mbox_lock); 846 + mutex_unlock(&adapter->mbox_lock); 855 847 856 848 return status; 857 849 } ··· 870 862 if (adapter->eeh_err) 871 863 return -EIO; 872 864 873 - spin_lock(&adapter->mbox_lock); 865 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 866 + return -1; 874 867 875 868 wrb = wrb_from_mbox(adapter); 876 869 req = embedded_payload(wrb); ··· 908 899 909 900 status = be_mbox_notify_wait(adapter); 910 901 911 - spin_unlock(&adapter->mbox_lock); 902 + mutex_unlock(&adapter->mbox_lock); 912 903 913 904 return status; 914 905 } ··· 924 915 struct be_cmd_req_if_create *req; 925 916 int status; 926 917 927 - spin_lock(&adapter->mbox_lock); 918 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 919 + return -1; 928 920 929 921 wrb = wrb_from_mbox(adapter); 930 922 req = embedded_payload(wrb); ··· 951 941 *pmac_id = le32_to_cpu(resp->pmac_id); 952 942 } 953 943 954 - spin_unlock(&adapter->mbox_lock); 944 + mutex_unlock(&adapter->mbox_lock); 955 945 return status; 956 946 } 957 947 ··· 965 955 if (adapter->eeh_err) 966 956 return -EIO; 967 957 968 - spin_lock(&adapter->mbox_lock); 958 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 959 + return -1; 969 960 970 961 wrb = wrb_from_mbox(adapter); 971 962 req = embedded_payload(wrb); ··· 981 970 982 971 status = be_mbox_notify_wait(adapter); 983 972 984 - spin_unlock(&adapter->mbox_lock); 973 + mutex_unlock(&adapter->mbox_lock); 985 974 986 975 return status; 987 976 } ··· 1071 1060 struct be_cmd_req_get_fw_version *req; 1072 1061 int status; 1073 1062 1074 - spin_lock(&adapter->mbox_lock); 1063 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 1064 + return -1; 1075 1065 1076 1066 wrb = wrb_from_mbox(adapter); 1077 1067 req = embedded_payload(wrb); ··· 1089 1077 strncpy(fw_ver, resp->firmware_version_string, FW_VER_LEN); 1090 1078 } 1091 1079 1092 - spin_unlock(&adapter->mbox_lock); 1080 + mutex_unlock(&adapter->mbox_lock); 1093 1081 return status; 1094 1082 } 1095 1083 ··· 1334 1322 struct be_cmd_req_query_fw_cfg *req; 1335 1323 int status; 1336 1324 1337 - spin_lock(&adapter->mbox_lock); 1325 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 1326 + return -1; 1338 1327 1339 1328 wrb = wrb_from_mbox(adapter); 1340 1329 req = embedded_payload(wrb); ··· 1354 1341 *caps = le32_to_cpu(resp->function_caps); 1355 1342 } 1356 1343 1357 - spin_unlock(&adapter->mbox_lock); 1344 + mutex_unlock(&adapter->mbox_lock); 1358 1345 return status; 1359 1346 } 1360 1347 ··· 1365 1352 struct be_cmd_req_hdr *req; 1366 1353 int status; 1367 1354 1368 - spin_lock(&adapter->mbox_lock); 1355 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 1356 + return -1; 1369 1357 1370 1358 wrb = wrb_from_mbox(adapter); 1371 1359 req = embedded_payload(wrb); ··· 1379 1365 1380 1366 status = be_mbox_notify_wait(adapter); 1381 1367 1382 - spin_unlock(&adapter->mbox_lock); 1368 + mutex_unlock(&adapter->mbox_lock); 1383 1369 return status; 1384 1370 } 1385 1371 ··· 1390 1376 u32 myhash[10]; 1391 1377 int status; 1392 1378 1393 - spin_lock(&adapter->mbox_lock); 1379 + if (mutex_lock_interruptible(&adapter->mbox_lock)) 1380 + return -1; 1394 1381 1395 1382 wrb = wrb_from_mbox(adapter); 1396 1383 req = embedded_payload(wrb); ··· 1411 1396 1412 1397 status = be_mbox_notify_wait(adapter); 1413 1398 1414 - spin_unlock(&adapter->mbox_lock); 1399 + mutex_unlock(&adapter->mbox_lock); 1415 1400 return status; 1416 1401 } 1417 1402
+1 -1
drivers/net/benet/be_main.c
··· 2677 2677 } 2678 2678 memset(mc_cmd_mem->va, 0, mc_cmd_mem->size); 2679 2679 2680 - spin_lock_init(&adapter->mbox_lock); 2680 + mutex_init(&adapter->mbox_lock); 2681 2681 spin_lock_init(&adapter->mcc_lock); 2682 2682 spin_lock_init(&adapter->mcc_cq_lock); 2683 2683
+6 -1
drivers/net/bonding/bond_ipv6.c
··· 88 88 } 89 89 90 90 if (vlan_id) { 91 - skb = vlan_put_tag(skb, vlan_id); 91 + /* The Ethernet header is not present yet, so it is 92 + * too early to insert a VLAN tag. Force use of an 93 + * out-of-line tag here and let dev_hard_start_xmit() 94 + * insert it if the slave hardware can't. 95 + */ 96 + skb = __vlan_hwaccel_put_tag(skb, vlan_id); 92 97 if (!skb) { 93 98 pr_err("failed to insert VLAN tag\n"); 94 99 return;
+10 -32
drivers/net/bonding/bond_main.c
··· 418 418 * @bond: bond device that got this skb for tx. 419 419 * @skb: hw accel VLAN tagged skb to transmit 420 420 * @slave_dev: slave that is supposed to xmit this skbuff 421 - * 422 - * When the bond gets an skb to transmit that is 423 - * already hardware accelerated VLAN tagged, and it 424 - * needs to relay this skb to a slave that is not 425 - * hw accel capable, the skb needs to be "unaccelerated", 426 - * i.e. strip the hwaccel tag and re-insert it as part 427 - * of the payload. 428 421 */ 429 422 int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, 430 423 struct net_device *slave_dev) 431 424 { 432 - unsigned short uninitialized_var(vlan_id); 433 - 434 - /* Test vlan_list not vlgrp to catch and handle 802.1p tags */ 435 - if (!list_empty(&bond->vlan_list) && 436 - !(slave_dev->features & NETIF_F_HW_VLAN_TX) && 437 - vlan_get_tag(skb, &vlan_id) == 0) { 438 - skb->dev = slave_dev; 439 - skb = vlan_put_tag(skb, vlan_id); 440 - if (!skb) { 441 - /* vlan_put_tag() frees the skb in case of error, 442 - * so return success here so the calling functions 443 - * won't attempt to free is again. 444 - */ 445 - return 0; 446 - } 447 - } else { 448 - skb->dev = slave_dev; 449 - } 450 - 425 + skb->dev = slave_dev; 451 426 skb->priority = 1; 452 427 #ifdef CONFIG_NET_POLL_CONTROLLER 453 428 if (unlikely(bond->dev->priv_flags & IFF_IN_NETPOLL)) { ··· 1178 1203 bond_do_fail_over_mac(bond, new_active, 1179 1204 old_active); 1180 1205 1181 - bond->send_grat_arp = bond->params.num_grat_arp; 1182 - bond_send_gratuitous_arp(bond); 1206 + if (netif_running(bond->dev)) { 1207 + bond->send_grat_arp = bond->params.num_grat_arp; 1208 + bond_send_gratuitous_arp(bond); 1183 1209 1184 - bond->send_unsol_na = bond->params.num_unsol_na; 1185 - bond_send_unsolicited_na(bond); 1210 + bond->send_unsol_na = bond->params.num_unsol_na; 1211 + bond_send_unsolicited_na(bond); 1212 + } 1186 1213 1187 1214 write_unlock_bh(&bond->curr_slave_lock); 1188 1215 read_unlock(&bond->lock); ··· 1198 1221 1199 1222 /* resend IGMP joins since active slave has changed or 1200 1223 * all were sent on curr_active_slave */ 1201 - if ((USES_PRIMARY(bond->params.mode) && new_active) || 1202 - bond->params.mode == BOND_MODE_ROUNDROBIN) { 1224 + if (((USES_PRIMARY(bond->params.mode) && new_active) || 1225 + bond->params.mode == BOND_MODE_ROUNDROBIN) && 1226 + netif_running(bond->dev)) { 1203 1227 bond->igmp_retrans = bond->params.resend_igmp; 1204 1228 queue_delayed_work(bond->wq, &bond->mcast_work, 0); 1205 1229 }
+2 -2
drivers/net/bonding/bonding.h
··· 269 269 270 270 bond_for_each_slave(bond, slave, i) { 271 271 if (slave->dev == slave_dev) { 272 - break; 272 + return slave; 273 273 } 274 274 } 275 275 276 - return slave; 276 + return 0; 277 277 } 278 278 279 279 static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
+2 -2
drivers/net/epic100.c
··· 935 935 936 936 /* Fill in the Rx buffers. Handle allocation failure gracefully. */ 937 937 for (i = 0; i < RX_RING_SIZE; i++) { 938 - struct sk_buff *skb = dev_alloc_skb(ep->rx_buf_sz); 938 + struct sk_buff *skb = dev_alloc_skb(ep->rx_buf_sz + 2); 939 939 ep->rx_skbuff[i] = skb; 940 940 if (skb == NULL) 941 941 break; ··· 1233 1233 entry = ep->dirty_rx % RX_RING_SIZE; 1234 1234 if (ep->rx_skbuff[entry] == NULL) { 1235 1235 struct sk_buff *skb; 1236 - skb = ep->rx_skbuff[entry] = dev_alloc_skb(ep->rx_buf_sz); 1236 + skb = ep->rx_skbuff[entry] = dev_alloc_skb(ep->rx_buf_sz + 2); 1237 1237 if (skb == NULL) 1238 1238 break; 1239 1239 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
+2 -2
drivers/net/hamachi.c
··· 1202 1202 } 1203 1203 /* Fill in the Rx buffers. Handle allocation failure gracefully. */ 1204 1204 for (i = 0; i < RX_RING_SIZE; i++) { 1205 - struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz); 1205 + struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz + 2); 1206 1206 hmp->rx_skbuff[i] = skb; 1207 1207 if (skb == NULL) 1208 1208 break; ··· 1669 1669 entry = hmp->dirty_rx % RX_RING_SIZE; 1670 1670 desc = &(hmp->rx_ring[entry]); 1671 1671 if (hmp->rx_skbuff[entry] == NULL) { 1672 - struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz); 1672 + struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz + 2); 1673 1673 1674 1674 hmp->rx_skbuff[entry] = skb; 1675 1675 if (skb == NULL)
+1
drivers/net/pcmcia/axnet_cs.c
··· 690 690 static struct pcmcia_device_id axnet_ids[] = { 691 691 PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x016c, 0x0081), 692 692 PCMCIA_DEVICE_MANF_CARD(0x018a, 0x0301), 693 + PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x2328), 693 694 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0301), 694 695 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0303), 695 696 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0309),
-1
drivers/net/pcmcia/pcnet_cs.c
··· 1493 1493 PCMCIA_DEVICE_MANF_CARD(0x0149, 0x4530), 1494 1494 PCMCIA_DEVICE_MANF_CARD(0x0149, 0xc1ab), 1495 1495 PCMCIA_DEVICE_MANF_CARD(0x0186, 0x0110), 1496 - PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x2328), 1497 1496 PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x8041), 1498 1497 PCMCIA_DEVICE_MANF_CARD(0x0213, 0x2452), 1499 1498 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0300),
+2 -2
drivers/net/sundance.c
··· 1016 1016 1017 1017 /* Fill in the Rx buffers. Handle allocation failure gracefully. */ 1018 1018 for (i = 0; i < RX_RING_SIZE; i++) { 1019 - struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz); 1019 + struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz + 2); 1020 1020 np->rx_skbuff[i] = skb; 1021 1021 if (skb == NULL) 1022 1022 break; ··· 1407 1407 struct sk_buff *skb; 1408 1408 entry = np->dirty_rx % RX_RING_SIZE; 1409 1409 if (np->rx_skbuff[entry] == NULL) { 1410 - skb = dev_alloc_skb(np->rx_buf_sz); 1410 + skb = dev_alloc_skb(np->rx_buf_sz + 2); 1411 1411 np->rx_skbuff[entry] = skb; 1412 1412 if (skb == NULL) 1413 1413 break; /* Better luck next round. */
+2 -2
drivers/net/tehuti.c
··· 324 324 ENTER; 325 325 master = READ_REG(priv, regINIT_SEMAPHORE); 326 326 if (!READ_REG(priv, regINIT_STATUS) && master) { 327 - rc = request_firmware(&fw, "tehuti/firmware.bin", &priv->pdev->dev); 327 + rc = request_firmware(&fw, "tehuti/bdx.bin", &priv->pdev->dev); 328 328 if (rc) 329 329 goto out; 330 330 bdx_tx_push_desc_safe(priv, (char *)fw->data, fw->size); ··· 2510 2510 MODULE_LICENSE("GPL"); 2511 2511 MODULE_AUTHOR(DRIVER_AUTHOR); 2512 2512 MODULE_DESCRIPTION(BDX_DRV_DESC); 2513 - MODULE_FIRMWARE("tehuti/firmware.bin"); 2513 + MODULE_FIRMWARE("tehuti/bdx.bin");
-1
drivers/net/typhoon.c
··· 1004 1004 } 1005 1005 1006 1006 strcpy(info->driver, KBUILD_MODNAME); 1007 - strcpy(info->version, UTS_RELEASE); 1008 1007 strcpy(info->bus_info, pci_name(pci_dev)); 1009 1008 } 1010 1009
+4
drivers/net/usb/asix.c
··· 1508 1508 USB_DEVICE (0x0b95, 0x1780), 1509 1509 .driver_info = (unsigned long) &ax88178_info, 1510 1510 }, { 1511 + // Logitec LAN-GTJ/U2A 1512 + USB_DEVICE (0x0789, 0x0160), 1513 + .driver_info = (unsigned long) &ax88178_info, 1514 + }, { 1511 1515 // Linksys USB200M Rev 2 1512 1516 USB_DEVICE (0x13b1, 0x0018), 1513 1517 .driver_info = (unsigned long) &ax88772_info,
+11 -3
drivers/net/usb/mcs7830.c
··· 1 1 /* 2 - * MOSCHIP MCS7830 based USB 2.0 Ethernet Devices 2 + * MOSCHIP MCS7830 based (7730/7830/7832) USB 2.0 Ethernet Devices 3 3 * 4 4 * based on usbnet.c, asix.c and the vendor provided mcs7830 driver 5 5 * ··· 10 10 * Copyright (c) 2002-2003 TiVo Inc. 11 11 * 12 12 * Definitions gathered from MOSCHIP, Data Sheet_7830DA.pdf (thanks!). 13 + * 14 + * 2010-12-19: add 7832 USB PID ("functionality same as MCS7830"), 15 + * per active notification by manufacturer 13 16 * 14 17 * TODO: 15 18 * - support HIF_REG_CONFIG_SLEEPMODE/HIF_REG_CONFIG_TXENABLE (via autopm?) ··· 63 60 #define MCS7830_MAX_MCAST 64 64 61 65 62 #define MCS7830_VENDOR_ID 0x9710 63 + #define MCS7832_PRODUCT_ID 0x7832 66 64 #define MCS7830_PRODUCT_ID 0x7830 67 65 #define MCS7730_PRODUCT_ID 0x7730 68 66 ··· 355 351 if (!ret) 356 352 ret = mcs7830_write_phy(dev, MII_BMCR, 357 353 BMCR_ANENABLE | BMCR_ANRESTART ); 358 - return ret < 0 ? : 0; 354 + return ret; 359 355 } 360 356 361 357 ··· 630 626 } 631 627 632 628 static const struct driver_info moschip_info = { 633 - .description = "MOSCHIP 7830/7730 usb-NET adapter", 629 + .description = "MOSCHIP 7830/7832/7730 usb-NET adapter", 634 630 .bind = mcs7830_bind, 635 631 .rx_fixup = mcs7830_rx_fixup, 636 632 .flags = FLAG_ETHER, ··· 648 644 }; 649 645 650 646 static const struct usb_device_id products[] = { 647 + { 648 + USB_DEVICE(MCS7830_VENDOR_ID, MCS7832_PRODUCT_ID), 649 + .driver_info = (unsigned long) &moschip_info, 650 + }, 651 651 { 652 652 USB_DEVICE(MCS7830_VENDOR_ID, MCS7830_PRODUCT_ID), 653 653 .driver_info = (unsigned long) &moschip_info,
+3 -1
drivers/net/veth.c
··· 166 166 if (!(rcv->flags & IFF_UP)) 167 167 goto tx_drop; 168 168 169 - if (dev->features & NETIF_F_NO_CSUM) 169 + /* don't change ip_summed == CHECKSUM_PARTIAL, as that 170 + will cause bad checksum on forwarded packets */ 171 + if (skb->ip_summed == CHECKSUM_NONE) 170 172 skb->ip_summed = rcv_priv->ip_summed; 171 173 172 174 length = skb->len + ETH_HLEN;
-1
drivers/net/wireless/hostap/hostap_main.c
··· 891 891 892 892 SET_ETHTOOL_OPS(dev, &prism2_ethtool_ops); 893 893 894 - netif_stop_queue(dev); 895 894 } 896 895 897 896 static int hostap_enable_hostapd(local_info_t *local, int rtnl_locked)
+2
drivers/net/wireless/iwlwifi/iwl-1000.c
··· 315 315 .mod_params = &iwlagn_mod_params, 316 316 .base_params = &iwl1000_base_params, 317 317 .ht_params = &iwl1000_ht_params, 318 + .use_new_eeprom_reading = true, 318 319 }; 319 320 320 321 struct iwl_cfg iwl100_bg_cfg = { ··· 331 330 .ops = &iwl1000_ops, 332 331 .mod_params = &iwlagn_mod_params, 333 332 .base_params = &iwl1000_base_params, 333 + .use_new_eeprom_reading = true, 334 334 }; 335 335 336 336 MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
+12
drivers/net/wireless/iwlwifi/iwl-6000.c
··· 561 561 .ht_params = &iwl6000_ht_params, 562 562 .need_dc_calib = true, 563 563 .need_temp_offset_calib = true, 564 + .use_new_eeprom_reading = true, 564 565 }; 565 566 566 567 struct iwl_cfg iwl6000g2a_2abg_cfg = { ··· 579 578 .base_params = &iwl6000_base_params, 580 579 .need_dc_calib = true, 581 580 .need_temp_offset_calib = true, 581 + .use_new_eeprom_reading = true, 582 582 }; 583 583 584 584 struct iwl_cfg iwl6000g2a_2bg_cfg = { ··· 597 595 .base_params = &iwl6000_base_params, 598 596 .need_dc_calib = true, 599 597 .need_temp_offset_calib = true, 598 + .use_new_eeprom_reading = true, 600 599 }; 601 600 602 601 struct iwl_cfg iwl6000g2b_2agn_cfg = { ··· 619 616 .need_temp_offset_calib = true, 620 617 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 621 618 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 619 + .use_new_eeprom_reading = true, 622 620 }; 623 621 624 622 struct iwl_cfg iwl6000g2b_2abg_cfg = { ··· 640 636 .need_temp_offset_calib = true, 641 637 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 642 638 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 639 + .use_new_eeprom_reading = true, 643 640 }; 644 641 645 642 struct iwl_cfg iwl6000g2b_2bgn_cfg = { ··· 662 657 .need_temp_offset_calib = true, 663 658 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 664 659 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 660 + .use_new_eeprom_reading = true, 665 661 }; 666 662 667 663 struct iwl_cfg iwl6000g2b_2bg_cfg = { ··· 683 677 .need_temp_offset_calib = true, 684 678 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 685 679 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 680 + .use_new_eeprom_reading = true, 686 681 }; 687 682 688 683 struct iwl_cfg iwl6000g2b_bgn_cfg = { ··· 705 698 .need_temp_offset_calib = true, 706 699 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 707 700 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 701 + .use_new_eeprom_reading = true, 708 702 }; 709 703 710 704 struct iwl_cfg iwl6000g2b_bg_cfg = { ··· 726 718 .need_temp_offset_calib = true, 727 719 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 728 720 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 721 + .use_new_eeprom_reading = true, 729 722 }; 730 723 731 724 /* ··· 813 804 .base_params = &iwl6050_base_params, 814 805 .ht_params = &iwl6000_ht_params, 815 806 .need_dc_calib = true, 807 + .use_new_eeprom_reading = true, 816 808 }; 817 809 818 810 struct iwl_cfg iwl6050_2abg_cfg = { ··· 867 857 .need_dc_calib = true, 868 858 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 869 859 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 860 + .use_new_eeprom_reading = true, 870 861 }; 871 862 872 863 struct iwl_cfg iwl130_bg_cfg = { ··· 887 876 .need_dc_calib = true, 888 877 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 889 878 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 879 + .use_new_eeprom_reading = true, 890 880 }; 891 881 892 882 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
+86 -2
drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
··· 392 392 /** 393 393 * iwlcore_eeprom_enhanced_txpower: process enhanced tx power info 394 394 */ 395 - void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv) 395 + static void iwlcore_eeprom_enhanced_txpower_old(struct iwl_priv *priv) 396 396 { 397 397 int eeprom_section_count = 0; 398 398 int section, element; ··· 419 419 * always check for valid entry before process 420 420 * the information 421 421 */ 422 - if (!enhanced_txpower->common || enhanced_txpower->reserved) 422 + if (!(enhanced_txpower->flags || enhanced_txpower->channel) || 423 + enhanced_txpower->delta_20_in_40) 423 424 continue; 424 425 425 426 for (element = 0; element < eeprom_section_count; element++) { ··· 452 451 max_txpower_in_half_dbm; 453 452 } 454 453 } 454 + } 455 + 456 + static void 457 + iwlcore_eeprom_enh_txp_read_element(struct iwl_priv *priv, 458 + struct iwl_eeprom_enhanced_txpwr *txp, 459 + s8 max_txpower_avg) 460 + { 461 + int ch_idx; 462 + bool is_ht40 = txp->flags & IWL_EEPROM_ENH_TXP_FL_40MHZ; 463 + enum ieee80211_band band; 464 + 465 + band = txp->flags & IWL_EEPROM_ENH_TXP_FL_BAND_52G ? 466 + IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ; 467 + 468 + for (ch_idx = 0; ch_idx < priv->channel_count; ch_idx++) { 469 + struct iwl_channel_info *ch_info = &priv->channel_info[ch_idx]; 470 + 471 + /* update matching channel or from common data only */ 472 + if (txp->channel != 0 && ch_info->channel != txp->channel) 473 + continue; 474 + 475 + /* update matching band only */ 476 + if (band != ch_info->band) 477 + continue; 478 + 479 + if (ch_info->max_power_avg < max_txpower_avg && !is_ht40) { 480 + ch_info->max_power_avg = max_txpower_avg; 481 + ch_info->curr_txpow = max_txpower_avg; 482 + ch_info->scan_power = max_txpower_avg; 483 + } 484 + 485 + if (is_ht40 && ch_info->ht40_max_power_avg < max_txpower_avg) 486 + ch_info->ht40_max_power_avg = max_txpower_avg; 487 + } 488 + } 489 + 490 + #define EEPROM_TXP_OFFS (0x00 | INDIRECT_ADDRESS | INDIRECT_TXP_LIMIT) 491 + #define EEPROM_TXP_ENTRY_LEN sizeof(struct iwl_eeprom_enhanced_txpwr) 492 + #define EEPROM_TXP_SZ_OFFS (0x00 | INDIRECT_ADDRESS | INDIRECT_TXP_LIMIT_SIZE) 493 + 494 + static void iwlcore_eeprom_enhanced_txpower_new(struct iwl_priv *priv) 495 + { 496 + struct iwl_eeprom_enhanced_txpwr *txp_array, *txp; 497 + int idx, entries; 498 + __le16 *txp_len; 499 + s8 max_txp_avg, max_txp_avg_halfdbm; 500 + 501 + BUILD_BUG_ON(sizeof(struct iwl_eeprom_enhanced_txpwr) != 8); 502 + 503 + /* the length is in 16-bit words, but we want entries */ 504 + txp_len = (__le16 *) iwlagn_eeprom_query_addr(priv, EEPROM_TXP_SZ_OFFS); 505 + entries = le16_to_cpup(txp_len) * 2 / EEPROM_TXP_ENTRY_LEN; 506 + 507 + txp_array = (void *) iwlagn_eeprom_query_addr(priv, EEPROM_TXP_OFFS); 508 + for (idx = 0; idx < entries; idx++) { 509 + txp = &txp_array[idx]; 510 + 511 + /* skip invalid entries */ 512 + if (!(txp->flags & IWL_EEPROM_ENH_TXP_FL_VALID)) 513 + continue; 514 + 515 + max_txp_avg = iwl_get_max_txpower_avg(priv, txp_array, idx, 516 + &max_txp_avg_halfdbm); 517 + 518 + /* 519 + * Update the user limit values values to the highest 520 + * power supported by any channel 521 + */ 522 + if (max_txp_avg > priv->tx_power_user_lmt) 523 + priv->tx_power_user_lmt = max_txp_avg; 524 + if (max_txp_avg_halfdbm > priv->tx_power_lmt_in_half_dbm) 525 + priv->tx_power_lmt_in_half_dbm = max_txp_avg_halfdbm; 526 + 527 + iwlcore_eeprom_enh_txp_read_element(priv, txp, max_txp_avg); 528 + } 529 + } 530 + 531 + void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv) 532 + { 533 + if (priv->cfg->use_new_eeprom_reading) 534 + iwlcore_eeprom_enhanced_txpower_new(priv); 535 + else 536 + iwlcore_eeprom_enhanced_txpower_old(priv); 455 537 }
+6
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
··· 569 569 case INDIRECT_REGULATORY: 570 570 offset = iwl_eeprom_query16(priv, EEPROM_LINK_REGULATORY); 571 571 break; 572 + case INDIRECT_TXP_LIMIT: 573 + offset = iwl_eeprom_query16(priv, EEPROM_LINK_TXP_LIMIT); 574 + break; 575 + case INDIRECT_TXP_LIMIT_SIZE: 576 + offset = iwl_eeprom_query16(priv, EEPROM_LINK_TXP_LIMIT_SIZE); 577 + break; 572 578 case INDIRECT_CALIBRATION: 573 579 offset = iwl_eeprom_query16(priv, EEPROM_LINK_CALIBRATION); 574 580 break;
+1
drivers/net/wireless/iwlwifi/iwl-core.h
··· 390 390 const bool need_temp_offset_calib; /* if used set to true */ 391 391 u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; 392 392 u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; 393 + const bool use_new_eeprom_reading; /* temporary, remove later */ 393 394 }; 394 395 395 396 /***************************
+21 -4
drivers/net/wireless/iwlwifi/iwl-eeprom.h
··· 120 120 s8 max_power_avg; /* max power (dBm) on this chnl, limit 31 */ 121 121 } __packed; 122 122 123 + enum iwl_eeprom_enhanced_txpwr_flags { 124 + IWL_EEPROM_ENH_TXP_FL_VALID = BIT(0), 125 + IWL_EEPROM_ENH_TXP_FL_BAND_52G = BIT(1), 126 + IWL_EEPROM_ENH_TXP_FL_OFDM = BIT(2), 127 + IWL_EEPROM_ENH_TXP_FL_40MHZ = BIT(3), 128 + IWL_EEPROM_ENH_TXP_FL_HT_AP = BIT(4), 129 + IWL_EEPROM_ENH_TXP_FL_RES1 = BIT(5), 130 + IWL_EEPROM_ENH_TXP_FL_RES2 = BIT(6), 131 + IWL_EEPROM_ENH_TXP_FL_COMMON_TYPE = BIT(7), 132 + }; 133 + 123 134 /** 124 135 * iwl_eeprom_enhanced_txpwr structure 125 136 * This structure presents the enhanced regulatory tx power limit layout ··· 138 127 * Enhanced regulatory tx power portion of eeprom image can be broken down 139 128 * into individual structures; each one is 8 bytes in size and contain the 140 129 * following information 141 - * @common: (desc + channel) not used by driver, should _NOT_ be "zero" 130 + * @flags: entry flags 131 + * @channel: channel number 142 132 * @chain_a_max_pwr: chain a max power in 1/2 dBm 143 133 * @chain_b_max_pwr: chain b max power in 1/2 dBm 144 134 * @chain_c_max_pwr: chain c max power in 1/2 dBm 145 - * @reserved: not used, should be "zero" 135 + * @delta_20_in_40: 20-in-40 deltas (hi/lo) 146 136 * @mimo2_max_pwr: mimo2 max power in 1/2 dBm 147 137 * @mimo3_max_pwr: mimo3 max power in 1/2 dBm 148 138 * 149 139 */ 150 140 struct iwl_eeprom_enhanced_txpwr { 151 - __le16 common; 141 + u8 flags; 142 + u8 channel; 152 143 s8 chain_a_max; 153 144 s8 chain_b_max; 154 145 s8 chain_c_max; 155 - s8 reserved; 146 + u8 delta_20_in_40; 156 147 s8 mimo2_max; 157 148 s8 mimo3_max; 158 149 } __packed; ··· 199 186 #define EEPROM_LINK_CALIBRATION (2*0x67) 200 187 #define EEPROM_LINK_PROCESS_ADJST (2*0x68) 201 188 #define EEPROM_LINK_OTHERS (2*0x69) 189 + #define EEPROM_LINK_TXP_LIMIT (2*0x6a) 190 + #define EEPROM_LINK_TXP_LIMIT_SIZE (2*0x6b) 202 191 203 192 /* agn regulatory - indirect access */ 204 193 #define EEPROM_REG_BAND_1_CHANNELS ((0x08)\ ··· 404 389 #define INDIRECT_CALIBRATION 0x00040000 405 390 #define INDIRECT_PROCESS_ADJST 0x00050000 406 391 #define INDIRECT_OTHERS 0x00060000 392 + #define INDIRECT_TXP_LIMIT 0x00070000 393 + #define INDIRECT_TXP_LIMIT_SIZE 0x00080000 407 394 #define INDIRECT_ADDRESS 0x00100000 408 395 409 396 /* General */
+1 -1
drivers/net/wireless/libertas/cfg.c
··· 619 619 print_ssid(ssid_buf, ssid, ssid_len), 620 620 LBS_SCAN_RSSI_TO_MBM(rssi)/100); 621 621 622 - if (channel || 622 + if (channel && 623 623 !(channel->flags & IEEE80211_CHAN_DISABLED)) 624 624 cfg80211_inform_bss(wiphy, channel, 625 625 bssid, le64_to_cpu(*(__le64 *)tsfdesc),
+6
drivers/net/wireless/p54/p54usb.c
··· 43 43 44 44 static struct usb_device_id p54u_table[] __devinitdata = { 45 45 /* Version 1 devices (pci chip + net2280) */ 46 + {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */ 46 47 {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */ 47 48 {USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */ 48 49 {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */ ··· 57 56 {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */ 58 57 {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */ 59 58 {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */ 59 + {USB_DEVICE(0x0db0, 0x6826)}, /* MSI UB54G (MS-6826) */ 60 60 {USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */ 61 61 {USB_DEVICE(0x124a, 0x4023)}, /* Shuttle PN15, Airvast WM168g, IOGear GWU513 */ 62 + {USB_DEVICE(0x1435, 0x0210)}, /* Inventel UR054G */ 63 + {USB_DEVICE(0x15a9, 0x0002)}, /* Gemtek WUBI-100GW 802.11g */ 62 64 {USB_DEVICE(0x1630, 0x0005)}, /* 2Wire 802.11g USB (v1) / Z-Com */ 65 + {USB_DEVICE(0x182d, 0x096b)}, /* Sitecom WL-107 */ 63 66 {USB_DEVICE(0x1915, 0x2234)}, /* Linksys WUSB54G OEM */ 64 67 {USB_DEVICE(0x1915, 0x2235)}, /* Linksys WUSB54G Portable OEM */ 65 68 {USB_DEVICE(0x2001, 0x3701)}, /* DLink DWL-G120 Spinnaker */ ··· 99 94 {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ 100 95 {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */ 101 96 {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */ 97 + {USB_DEVICE(0x2001, 0x3705)}, /* D-Link DWL-G120 rev C1 */ 102 98 {USB_DEVICE(0x413c, 0x5513)}, /* Dell WLA3310 USB Wireless Adapter */ 103 99 {USB_DEVICE(0x413c, 0x8102)}, /* Spinnaker DUT */ 104 100 {USB_DEVICE(0x413c, 0x8104)}, /* Cohiba Proto board */
+1
drivers/net/wireless/rt2x00/rt2800pci.c
··· 912 912 __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags); 913 913 __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); 914 914 __set_bit(DRIVER_REQUIRE_TXSTATUS_FIFO, &rt2x00dev->flags); 915 + __set_bit(DRIVER_REQUIRE_TASKLET_CONTEXT, &rt2x00dev->flags); 915 916 if (!modparam_nohwcrypt) 916 917 __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); 917 918 __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags);
+1
drivers/net/wireless/rt2x00/rt2x00.h
··· 664 664 DRIVER_REQUIRE_COPY_IV, 665 665 DRIVER_REQUIRE_L2PAD, 666 666 DRIVER_REQUIRE_TXSTATUS_FIFO, 667 + DRIVER_REQUIRE_TASKLET_CONTEXT, 667 668 668 669 /* 669 670 * Driver features
+6 -3
drivers/net/wireless/rt2x00/rt2x00dev.c
··· 390 390 * through a mac80211 library call (RTS/CTS) then we should not 391 391 * send the status report back. 392 392 */ 393 - if (!(skbdesc_flags & SKBDESC_NOT_MAC80211)) 394 - ieee80211_tx_status(rt2x00dev->hw, entry->skb); 395 - else 393 + if (!(skbdesc_flags & SKBDESC_NOT_MAC80211)) { 394 + if (test_bit(DRIVER_REQUIRE_TASKLET_CONTEXT, &rt2x00dev->flags)) 395 + ieee80211_tx_status(rt2x00dev->hw, entry->skb); 396 + else 397 + ieee80211_tx_status_ni(rt2x00dev->hw, entry->skb); 398 + } else 396 399 dev_kfree_skb_any(entry->skb); 397 400 398 401 /*
+2 -2
drivers/net/yellowfin.c
··· 744 744 } 745 745 746 746 for (i = 0; i < RX_RING_SIZE; i++) { 747 - struct sk_buff *skb = dev_alloc_skb(yp->rx_buf_sz); 747 + struct sk_buff *skb = dev_alloc_skb(yp->rx_buf_sz + 2); 748 748 yp->rx_skbuff[i] = skb; 749 749 if (skb == NULL) 750 750 break; ··· 1157 1157 for (; yp->cur_rx - yp->dirty_rx > 0; yp->dirty_rx++) { 1158 1158 entry = yp->dirty_rx % RX_RING_SIZE; 1159 1159 if (yp->rx_skbuff[entry] == NULL) { 1160 - struct sk_buff *skb = dev_alloc_skb(yp->rx_buf_sz); 1160 + struct sk_buff *skb = dev_alloc_skb(yp->rx_buf_sz + 2); 1161 1161 if (skb == NULL) 1162 1162 break; /* Better luck next round. */ 1163 1163 yp->rx_skbuff[entry] = skb;
+1 -1
include/linux/netlink.h
··· 70 70 Check NLM_F_EXCL 71 71 */ 72 72 73 - #define NLMSG_ALIGNTO 4 73 + #define NLMSG_ALIGNTO 4U 74 74 #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) 75 75 #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) 76 76 #define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN))
-1
include/net/flow.h
··· 49 49 __u8 proto; 50 50 __u8 flags; 51 51 #define FLOWI_FLAG_ANYSRC 0x01 52 - #define FLOWI_FLAG_MATCH_ANY_IIF 0x02 53 52 union { 54 53 struct { 55 54 __be16 sport;
+10
include/net/ip6_route.h
··· 164 164 return rt->rt6i_flags & RTF_LOCAL; 165 165 } 166 166 167 + int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); 168 + 169 + static inline int ip6_skb_dst_mtu(struct sk_buff *skb) 170 + { 171 + struct ipv6_pinfo *np = skb->sk ? inet6_sk(skb->sk) : NULL; 172 + 173 + return (np && np->pmtudisc == IPV6_PMTUDISC_PROBE) ? 174 + skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb)); 175 + } 176 + 167 177 #endif 168 178 #endif
+24 -4
include/net/mac80211.h
··· 2024 2024 * 2025 2025 * This function may not be called in IRQ context. Calls to this function 2026 2026 * for a single hardware must be synchronized against each other. Calls 2027 - * to this function and ieee80211_tx_status_irqsafe() may not be mixed 2028 - * for a single hardware. 2027 + * to this function, ieee80211_tx_status_ni() and ieee80211_tx_status_irqsafe() 2028 + * may not be mixed for a single hardware. 2029 2029 * 2030 2030 * @hw: the hardware the frame was transmitted by 2031 2031 * @skb: the frame that was transmitted, owned by mac80211 after this call ··· 2034 2034 struct sk_buff *skb); 2035 2035 2036 2036 /** 2037 + * ieee80211_tx_status_ni - transmit status callback (in process context) 2038 + * 2039 + * Like ieee80211_tx_status() but can be called in process context. 2040 + * 2041 + * Calls to this function, ieee80211_tx_status() and 2042 + * ieee80211_tx_status_irqsafe() may not be mixed 2043 + * for a single hardware. 2044 + * 2045 + * @hw: the hardware the frame was transmitted by 2046 + * @skb: the frame that was transmitted, owned by mac80211 after this call 2047 + */ 2048 + static inline void ieee80211_tx_status_ni(struct ieee80211_hw *hw, 2049 + struct sk_buff *skb) 2050 + { 2051 + local_bh_disable(); 2052 + ieee80211_tx_status(hw, skb); 2053 + local_bh_enable(); 2054 + } 2055 + 2056 + /** 2037 2057 * ieee80211_tx_status_irqsafe - IRQ-safe transmit status callback 2038 2058 * 2039 2059 * Like ieee80211_tx_status() but can be called in IRQ context 2040 2060 * (internally defers to a tasklet.) 2041 2061 * 2042 - * Calls to this function and ieee80211_tx_status() may not be mixed for a 2043 - * single hardware. 2062 + * Calls to this function, ieee80211_tx_status() and 2063 + * ieee80211_tx_status_ni() may not be mixed for a single hardware. 2044 2064 * 2045 2065 * @hw: the hardware the frame was transmitted by 2046 2066 * @skb: the frame that was transmitted, owned by mac80211 after this call
+3 -1
include/net/pkt_cls.h
··· 323 323 static inline int tcf_valid_offset(const struct sk_buff *skb, 324 324 const unsigned char *ptr, const int len) 325 325 { 326 - return unlikely((ptr + len) < skb_tail_pointer(skb) && ptr > skb->head); 326 + return likely((ptr + len) <= skb_tail_pointer(skb) && 327 + ptr >= skb->head && 328 + (ptr <= (ptr + len))); 327 329 } 328 330 329 331 #ifdef CONFIG_NET_CLS_IND
+1 -5
include/net/sch_generic.h
··· 610 610 { 611 611 struct sk_buff *n; 612 612 613 - if ((action == TC_ACT_STOLEN || action == TC_ACT_QUEUED) && 614 - !skb_shared(skb)) 615 - n = skb_get(skb); 616 - else 617 - n = skb_clone(skb, gfp_mask); 613 + n = skb_clone(skb, gfp_mask); 618 614 619 615 if (n) { 620 616 n->tc_verd = SET_TC_VERD(n->tc_verd, 0);
+3
include/net/sock.h
··· 754 754 void (*unhash)(struct sock *sk); 755 755 void (*rehash)(struct sock *sk); 756 756 int (*get_port)(struct sock *sk, unsigned short snum); 757 + void (*clear_sk)(struct sock *sk, int size); 757 758 758 759 /* Keeping track of sockets in use */ 759 760 #ifdef CONFIG_PROC_FS ··· 852 851 sk->sk_prot->unhash(sk); 853 852 sk->sk_prot->hash(sk); 854 853 } 854 + 855 + void sk_prot_clear_portaddr_nulls(struct sock *sk, int size); 855 856 856 857 /* About 10 seconds */ 857 858 #define SOCK_DESTROY_TIME (10*HZ)
+1
net/bluetooth/rfcomm/core.c
··· 311 311 d->state = BT_OPEN; 312 312 d->flags = 0; 313 313 d->mscex = 0; 314 + d->sec_level = BT_SECURITY_LOW; 314 315 d->mtu = RFCOMM_DEFAULT_MTU; 315 316 d->v24_sig = RFCOMM_V24_RTC | RFCOMM_V24_RTR | RFCOMM_V24_DV; 316 317
+1 -1
net/bridge/br_multicast.c
··· 437 437 ip6h = ipv6_hdr(skb); 438 438 439 439 *(__force __be32 *)ip6h = htonl(0x60000000); 440 - ip6h->payload_len = 8 + sizeof(*mldq); 440 + ip6h->payload_len = htons(8 + sizeof(*mldq)); 441 441 ip6h->nexthdr = IPPROTO_HOPOPTS; 442 442 ip6h->hop_limit = 1; 443 443 ipv6_addr_set(&ip6h->saddr, 0, 0, 0, 0);
+1 -2
net/core/fib_rules.c
··· 181 181 { 182 182 int ret = 0; 183 183 184 - if (rule->iifindex && (rule->iifindex != fl->iif) && 185 - !(fl->flags & FLOWI_FLAG_MATCH_ANY_IIF)) 184 + if (rule->iifindex && (rule->iifindex != fl->iif)) 186 185 goto out; 187 186 188 187 if (rule->oifindex && (rule->oifindex != fl->oif))
+35 -12
net/core/sock.c
··· 1009 1009 #endif 1010 1010 } 1011 1011 1012 + /* 1013 + * caches using SLAB_DESTROY_BY_RCU should let .next pointer from nulls nodes 1014 + * un-modified. Special care is taken when initializing object to zero. 1015 + */ 1016 + static inline void sk_prot_clear_nulls(struct sock *sk, int size) 1017 + { 1018 + if (offsetof(struct sock, sk_node.next) != 0) 1019 + memset(sk, 0, offsetof(struct sock, sk_node.next)); 1020 + memset(&sk->sk_node.pprev, 0, 1021 + size - offsetof(struct sock, sk_node.pprev)); 1022 + } 1023 + 1024 + void sk_prot_clear_portaddr_nulls(struct sock *sk, int size) 1025 + { 1026 + unsigned long nulls1, nulls2; 1027 + 1028 + nulls1 = offsetof(struct sock, __sk_common.skc_node.next); 1029 + nulls2 = offsetof(struct sock, __sk_common.skc_portaddr_node.next); 1030 + if (nulls1 > nulls2) 1031 + swap(nulls1, nulls2); 1032 + 1033 + if (nulls1 != 0) 1034 + memset((char *)sk, 0, nulls1); 1035 + memset((char *)sk + nulls1 + sizeof(void *), 0, 1036 + nulls2 - nulls1 - sizeof(void *)); 1037 + memset((char *)sk + nulls2 + sizeof(void *), 0, 1038 + size - nulls2 - sizeof(void *)); 1039 + } 1040 + EXPORT_SYMBOL(sk_prot_clear_portaddr_nulls); 1041 + 1012 1042 static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority, 1013 1043 int family) 1014 1044 { ··· 1051 1021 if (!sk) 1052 1022 return sk; 1053 1023 if (priority & __GFP_ZERO) { 1054 - /* 1055 - * caches using SLAB_DESTROY_BY_RCU should let 1056 - * sk_node.next un-modified. Special care is taken 1057 - * when initializing object to zero. 1058 - */ 1059 - if (offsetof(struct sock, sk_node.next) != 0) 1060 - memset(sk, 0, offsetof(struct sock, sk_node.next)); 1061 - memset(&sk->sk_node.pprev, 0, 1062 - prot->obj_size - offsetof(struct sock, 1063 - sk_node.pprev)); 1024 + if (prot->clear_sk) 1025 + prot->clear_sk(sk, prot->obj_size); 1026 + else 1027 + sk_prot_clear_nulls(sk, prot->obj_size); 1064 1028 } 1065 - } 1066 - else 1029 + } else 1067 1030 sk = kmalloc(prot->obj_size, priority); 1068 1031 1069 1032 if (sk != NULL) {
+8 -2
net/ipv4/fib_frontend.c
··· 163 163 .daddr = addr 164 164 } 165 165 }, 166 - .flags = FLOWI_FLAG_MATCH_ANY_IIF 167 166 }; 168 167 struct fib_result res = { 0 }; 169 168 struct net_device *dev = NULL; 169 + struct fib_table *local_table; 170 + 171 + #ifdef CONFIG_IP_MULTIPLE_TABLES 172 + res.r = NULL; 173 + #endif 170 174 171 175 rcu_read_lock(); 172 - if (fib_lookup(net, &fl, &res)) { 176 + local_table = fib_get_table(net, RT_TABLE_LOCAL); 177 + if (!local_table || 178 + fib_table_lookup(local_table, &fl, &res, FIB_LOOKUP_NOREF)) { 173 179 rcu_read_unlock(); 174 180 return NULL; 175 181 }
+4 -3
net/ipv4/route.c
··· 2585 2585 goto out; 2586 2586 2587 2587 /* RACE: Check return value of inet_select_addr instead. */ 2588 - if (rcu_dereference(dev_out->ip_ptr) == NULL) 2589 - goto out; /* Wrong error code */ 2590 - 2588 + if (!(dev_out->flags & IFF_UP) || !__in_dev_get_rcu(dev_out)) { 2589 + err = -ENETUNREACH; 2590 + goto out; 2591 + } 2591 2592 if (ipv4_is_local_multicast(oldflp->fl4_dst) || 2592 2593 ipv4_is_lbcast(oldflp->fl4_dst)) { 2593 2594 if (!fl.fl4_src)
+2 -2
net/ipv4/tcp_ipv4.c
··· 2030 2030 get_req: 2031 2031 req = icsk->icsk_accept_queue.listen_opt->syn_table[st->sbucket]; 2032 2032 } 2033 - sk = sk_next(st->syn_wait_sk); 2033 + sk = sk_nulls_next(st->syn_wait_sk); 2034 2034 st->state = TCP_SEQ_STATE_LISTENING; 2035 2035 read_unlock_bh(&icsk->icsk_accept_queue.syn_wait_lock); 2036 2036 } else { ··· 2039 2039 if (reqsk_queue_len(&icsk->icsk_accept_queue)) 2040 2040 goto start_req; 2041 2041 read_unlock_bh(&icsk->icsk_accept_queue.syn_wait_lock); 2042 - sk = sk_next(sk); 2042 + sk = sk_nulls_next(sk); 2043 2043 } 2044 2044 get_sk: 2045 2045 sk_nulls_for_each_from(sk, node) {
+1
net/ipv4/udp.c
··· 1899 1899 .compat_setsockopt = compat_udp_setsockopt, 1900 1900 .compat_getsockopt = compat_udp_getsockopt, 1901 1901 #endif 1902 + .clear_sk = sk_prot_clear_portaddr_nulls, 1902 1903 }; 1903 1904 EXPORT_SYMBOL(udp_prot); 1904 1905
+1
net/ipv4/udplite.c
··· 57 57 .compat_setsockopt = compat_udp_setsockopt, 58 58 .compat_getsockopt = compat_udp_getsockopt, 59 59 #endif 60 + .clear_sk = sk_prot_clear_portaddr_nulls, 60 61 }; 61 62 EXPORT_SYMBOL(udplite_prot); 62 63
+3 -1
net/ipv6/addrconf.c
··· 2669 2669 2670 2670 ASSERT_RTNL(); 2671 2671 2672 - rt6_ifdown(net, dev); 2672 + /* Flush routes if device is being removed or it is not loopback */ 2673 + if (how || !(dev->flags & IFF_LOOPBACK)) 2674 + rt6_ifdown(net, dev); 2673 2675 neigh_ifdown(&nd_tbl, dev); 2674 2676 2675 2677 idev = __in6_dev_get(dev);
+2 -10
net/ipv6/ip6_output.c
··· 56 56 #include <net/checksum.h> 57 57 #include <linux/mroute6.h> 58 58 59 - static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); 59 + int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); 60 60 61 61 int __ip6_local_out(struct sk_buff *skb) 62 62 { ··· 143 143 ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES); 144 144 kfree_skb(skb); 145 145 return -EINVAL; 146 - } 147 - 148 - static inline int ip6_skb_dst_mtu(struct sk_buff *skb) 149 - { 150 - struct ipv6_pinfo *np = skb->sk ? inet6_sk(skb->sk) : NULL; 151 - 152 - return (np && np->pmtudisc == IPV6_PMTUDISC_PROBE) ? 153 - skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb)); 154 146 } 155 147 156 148 static int ip6_finish_output(struct sk_buff *skb) ··· 593 601 return offset; 594 602 } 595 603 596 - static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) 604 + int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) 597 605 { 598 606 struct sk_buff *frag; 599 607 struct rt6_info *rt = (struct rt6_info*)skb_dst(skb);
+6 -1
net/ipv6/route.c
··· 1565 1565 { 1566 1566 struct rt6_info *rt, *nrt; 1567 1567 int allfrag = 0; 1568 - 1568 + again: 1569 1569 rt = rt6_lookup(net, daddr, saddr, ifindex, 0); 1570 1570 if (rt == NULL) 1571 1571 return; 1572 + 1573 + if (rt6_check_expired(rt)) { 1574 + ip6_del_rt(rt); 1575 + goto again; 1576 + } 1572 1577 1573 1578 if (pmtu >= dst_mtu(&rt->dst)) 1574 1579 goto out;
+1
net/ipv6/udp.c
··· 1477 1477 .compat_setsockopt = compat_udpv6_setsockopt, 1478 1478 .compat_getsockopt = compat_udpv6_getsockopt, 1479 1479 #endif 1480 + .clear_sk = sk_prot_clear_portaddr_nulls, 1480 1481 }; 1481 1482 1482 1483 static struct inet_protosw udpv6_protosw = {
+1
net/ipv6/udplite.c
··· 55 55 .compat_setsockopt = compat_udpv6_setsockopt, 56 56 .compat_getsockopt = compat_udpv6_getsockopt, 57 57 #endif 58 + .clear_sk = sk_prot_clear_portaddr_nulls, 58 59 }; 59 60 60 61 static struct inet_protosw udplite6_protosw = {
+15 -1
net/ipv6/xfrm6_output.c
··· 17 17 #include <linux/netfilter_ipv6.h> 18 18 #include <net/dst.h> 19 19 #include <net/ipv6.h> 20 + #include <net/ip6_route.h> 20 21 #include <net/xfrm.h> 21 22 22 23 int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, ··· 89 88 return xfrm_output(skb); 90 89 } 91 90 91 + static int __xfrm6_output(struct sk_buff *skb) 92 + { 93 + struct dst_entry *dst = skb_dst(skb); 94 + struct xfrm_state *x = dst->xfrm; 95 + 96 + if ((x && x->props.mode == XFRM_MODE_TUNNEL) && 97 + ((skb->len > ip6_skb_dst_mtu(skb) && !skb_is_gso(skb)) || 98 + dst_allfrag(skb_dst(skb)))) { 99 + return ip6_fragment(skb, xfrm6_output_finish); 100 + } 101 + return xfrm6_output_finish(skb); 102 + } 103 + 92 104 int xfrm6_output(struct sk_buff *skb) 93 105 { 94 106 return NF_HOOK(NFPROTO_IPV6, NF_INET_POST_ROUTING, skb, NULL, 95 - skb_dst(skb)->dev, xfrm6_output_finish); 107 + skb_dst(skb)->dev, __xfrm6_output); 96 108 }
+11 -7
net/irda/af_irda.c
··· 2280 2280 2281 2281 switch (optname) { 2282 2282 case IRLMP_ENUMDEVICES: 2283 + 2284 + /* Offset to first device entry */ 2285 + offset = sizeof(struct irda_device_list) - 2286 + sizeof(struct irda_device_info); 2287 + 2288 + if (len < offset) { 2289 + err = -EINVAL; 2290 + goto out; 2291 + } 2292 + 2283 2293 /* Ask lmp for the current discovery log */ 2284 2294 discoveries = irlmp_get_discoveries(&list.len, self->mask.word, 2285 2295 self->nslots); ··· 2300 2290 } 2301 2291 2302 2292 /* Write total list length back to client */ 2303 - if (copy_to_user(optval, &list, 2304 - sizeof(struct irda_device_list) - 2305 - sizeof(struct irda_device_info))) 2293 + if (copy_to_user(optval, &list, offset)) 2306 2294 err = -EFAULT; 2307 - 2308 - /* Offset to first device entry */ 2309 - offset = sizeof(struct irda_device_list) - 2310 - sizeof(struct irda_device_info); 2311 2295 2312 2296 /* Copy the list itself - watch for overflow */ 2313 2297 if (list.len > 2048) {
+4
net/mac80211/ibss.c
··· 780 780 781 781 mutex_lock(&sdata->u.ibss.mtx); 782 782 783 + if (!sdata->u.ibss.ssid_len) 784 + goto mgmt_out; /* not ready to merge yet */ 785 + 783 786 switch (fc & IEEE80211_FCTL_STYPE) { 784 787 case IEEE80211_STYPE_PROBE_REQ: 785 788 ieee80211_rx_mgmt_probe_req(sdata, mgmt, skb->len); ··· 800 797 break; 801 798 } 802 799 800 + mgmt_out: 803 801 mutex_unlock(&sdata->u.ibss.mtx); 804 802 } 805 803
+4 -1
net/mac80211/rx.c
··· 1788 1788 1789 1789 fwd_skb = skb_copy(skb, GFP_ATOMIC); 1790 1790 1791 - if (!fwd_skb && net_ratelimit()) 1791 + if (!fwd_skb && net_ratelimit()) { 1792 1792 printk(KERN_DEBUG "%s: failed to clone mesh frame\n", 1793 1793 sdata->name); 1794 + goto out; 1795 + } 1794 1796 1795 1797 fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data; 1796 1798 memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN); ··· 1830 1828 } 1831 1829 } 1832 1830 1831 + out: 1833 1832 if (is_multicast_ether_addr(hdr->addr1) || 1834 1833 sdata->dev->flags & IFF_PROMISC) 1835 1834 return RX_CONTINUE;
+4 -1
net/mac80211/work.c
··· 1051 1051 { 1052 1052 struct ieee80211_local *local = sdata->local; 1053 1053 struct ieee80211_work *wk; 1054 + bool cleanup = false; 1054 1055 1055 1056 mutex_lock(&local->mtx); 1056 1057 list_for_each_entry(wk, &local->work_list, list) { 1057 1058 if (wk->sdata != sdata) 1058 1059 continue; 1060 + cleanup = true; 1059 1061 wk->type = IEEE80211_WORK_ABORT; 1060 1062 wk->started = true; 1061 1063 wk->timeout = jiffies; ··· 1065 1063 mutex_unlock(&local->mtx); 1066 1064 1067 1065 /* run cleanups etc. */ 1068 - ieee80211_work_work(&local->work_work); 1066 + if (cleanup) 1067 + ieee80211_work_work(&local->work_work); 1069 1068 1070 1069 mutex_lock(&local->mtx); 1071 1070 list_for_each_entry(wk, &local->work_list, list) {
+8 -12
net/sched/sch_sfq.c
··· 270 270 /* It is difficult to believe, but ALL THE SLOTS HAVE LENGTH 1. */ 271 271 d = q->next[q->tail]; 272 272 q->next[q->tail] = q->next[d]; 273 - q->allot[q->next[d]] += q->quantum; 274 273 skb = q->qs[d].prev; 275 274 len = qdisc_pkt_len(skb); 276 275 __skb_unlink(skb, &q->qs[d]); ··· 320 321 sfq_inc(q, x); 321 322 if (q->qs[x].qlen == 1) { /* The flow is new */ 322 323 if (q->tail == SFQ_DEPTH) { /* It is the first flow */ 323 - q->tail = x; 324 324 q->next[x] = x; 325 - q->allot[x] = q->quantum; 326 325 } else { 327 326 q->next[x] = q->next[q->tail]; 328 327 q->next[q->tail] = x; 329 - q->tail = x; 330 328 } 329 + q->tail = x; 330 + q->allot[x] = q->quantum; 331 331 } 332 332 if (++sch->q.qlen <= q->limit) { 333 333 sch->bstats.bytes += qdisc_pkt_len(skb); ··· 357 359 { 358 360 struct sfq_sched_data *q = qdisc_priv(sch); 359 361 struct sk_buff *skb; 360 - sfq_index a, old_a; 362 + sfq_index a, next_a; 361 363 362 364 /* No active slots */ 363 365 if (q->tail == SFQ_DEPTH) 364 366 return NULL; 365 367 366 - a = old_a = q->next[q->tail]; 368 + a = q->next[q->tail]; 367 369 368 370 /* Grab packet */ 369 371 skb = __skb_dequeue(&q->qs[a]); ··· 374 376 /* Is the slot empty? */ 375 377 if (q->qs[a].qlen == 0) { 376 378 q->ht[q->hash[a]] = SFQ_DEPTH; 377 - a = q->next[a]; 378 - if (a == old_a) { 379 + next_a = q->next[a]; 380 + if (a == next_a) { 379 381 q->tail = SFQ_DEPTH; 380 382 return skb; 381 383 } 382 - q->next[q->tail] = a; 383 - q->allot[a] += q->quantum; 384 + q->next[q->tail] = next_a; 384 385 } else if ((q->allot[a] -= qdisc_pkt_len(skb)) <= 0) { 385 - q->tail = a; 386 - a = q->next[a]; 387 386 q->allot[a] += q->quantum; 387 + q->tail = a; 388 388 } 389 389 return skb; 390 390 }
+1 -1
net/sctp/socket.c
··· 5053 5053 if (copy_to_user(optval, &val, len)) 5054 5054 return -EFAULT; 5055 5055 5056 - return -ENOTSUPP; 5056 + return 0; 5057 5057 } 5058 5058 5059 5059 /*