diff options
42 files changed, 162 insertions, 93 deletions
diff --git a/drivers/net/arcnet/Kconfig b/drivers/net/arcnet/Kconfig index a73d9dc80ff6..84fb6349a59a 100644 --- a/drivers/net/arcnet/Kconfig +++ b/drivers/net/arcnet/Kconfig | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | menuconfig ARCNET | 5 | menuconfig ARCNET |
6 | depends on NETDEVICES && (ISA || PCI || PCMCIA) | 6 | depends on NETDEVICES && (ISA || PCI || PCMCIA) |
7 | bool "ARCnet support" | 7 | tristate "ARCnet support" |
8 | ---help--- | 8 | ---help--- |
9 | If you have a network card of this type, say Y and check out the | 9 | If you have a network card of this type, say Y and check out the |
10 | (arguably) beautiful poetry in | 10 | (arguably) beautiful poetry in |
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c index 905bce0b3a43..2c7f5036f570 100644 --- a/drivers/net/can/sja1000/peak_pci.c +++ b/drivers/net/can/sja1000/peak_pci.c | |||
@@ -20,7 +20,6 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/version.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
26 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c index 4cf835dbc122..3fb66d09ece5 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c | |||
@@ -608,7 +608,7 @@ static void b44_tx(struct b44 *bp) | |||
608 | skb->len, | 608 | skb->len, |
609 | DMA_TO_DEVICE); | 609 | DMA_TO_DEVICE); |
610 | rp->skb = NULL; | 610 | rp->skb = NULL; |
611 | dev_kfree_skb(skb); | 611 | dev_kfree_skb_irq(skb); |
612 | } | 612 | } |
613 | 613 | ||
614 | bp->tx_cons = cons; | 614 | bp->tx_cons = cons; |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index bce203fa4b9e..882f48f0a03c 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
@@ -10327,6 +10327,43 @@ static int bnx2x_54618se_config_init(struct bnx2x_phy *phy, | |||
10327 | return 0; | 10327 | return 0; |
10328 | } | 10328 | } |
10329 | 10329 | ||
10330 | |||
10331 | static void bnx2x_5461x_set_link_led(struct bnx2x_phy *phy, | ||
10332 | struct link_params *params, u8 mode) | ||
10333 | { | ||
10334 | struct bnx2x *bp = params->bp; | ||
10335 | u16 temp; | ||
10336 | |||
10337 | bnx2x_cl22_write(bp, phy, | ||
10338 | MDIO_REG_GPHY_SHADOW, | ||
10339 | MDIO_REG_GPHY_SHADOW_LED_SEL1); | ||
10340 | bnx2x_cl22_read(bp, phy, | ||
10341 | MDIO_REG_GPHY_SHADOW, | ||
10342 | &temp); | ||
10343 | temp &= 0xff00; | ||
10344 | |||
10345 | DP(NETIF_MSG_LINK, "54618x set link led (mode=%x)\n", mode); | ||
10346 | switch (mode) { | ||
10347 | case LED_MODE_FRONT_PANEL_OFF: | ||
10348 | case LED_MODE_OFF: | ||
10349 | temp |= 0x00ee; | ||
10350 | break; | ||
10351 | case LED_MODE_OPER: | ||
10352 | temp |= 0x0001; | ||
10353 | break; | ||
10354 | case LED_MODE_ON: | ||
10355 | temp |= 0x00ff; | ||
10356 | break; | ||
10357 | default: | ||
10358 | break; | ||
10359 | } | ||
10360 | bnx2x_cl22_write(bp, phy, | ||
10361 | MDIO_REG_GPHY_SHADOW, | ||
10362 | MDIO_REG_GPHY_SHADOW_WR_ENA | temp); | ||
10363 | return; | ||
10364 | } | ||
10365 | |||
10366 | |||
10330 | static void bnx2x_54618se_link_reset(struct bnx2x_phy *phy, | 10367 | static void bnx2x_54618se_link_reset(struct bnx2x_phy *phy, |
10331 | struct link_params *params) | 10368 | struct link_params *params) |
10332 | { | 10369 | { |
@@ -11103,7 +11140,7 @@ static struct bnx2x_phy phy_54618se = { | |||
11103 | .config_loopback = (config_loopback_t)bnx2x_54618se_config_loopback, | 11140 | .config_loopback = (config_loopback_t)bnx2x_54618se_config_loopback, |
11104 | .format_fw_ver = (format_fw_ver_t)NULL, | 11141 | .format_fw_ver = (format_fw_ver_t)NULL, |
11105 | .hw_reset = (hw_reset_t)NULL, | 11142 | .hw_reset = (hw_reset_t)NULL, |
11106 | .set_link_led = (set_link_led_t)NULL, | 11143 | .set_link_led = (set_link_led_t)bnx2x_5461x_set_link_led, |
11107 | .phy_specific_func = (phy_specific_func_t)NULL | 11144 | .phy_specific_func = (phy_specific_func_t)NULL |
11108 | }; | 11145 | }; |
11109 | /*****************************************************************/ | 11146 | /*****************************************************************/ |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h index fc7bd0f23c0b..e58073ef33b4 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h | |||
@@ -6990,6 +6990,7 @@ Theotherbitsarereservedandshouldbezero*/ | |||
6990 | #define MDIO_REG_INTR_MASK 0x1b | 6990 | #define MDIO_REG_INTR_MASK 0x1b |
6991 | #define MDIO_REG_INTR_MASK_LINK_STATUS (0x1 << 1) | 6991 | #define MDIO_REG_INTR_MASK_LINK_STATUS (0x1 << 1) |
6992 | #define MDIO_REG_GPHY_SHADOW 0x1c | 6992 | #define MDIO_REG_GPHY_SHADOW 0x1c |
6993 | #define MDIO_REG_GPHY_SHADOW_LED_SEL1 (0x0d << 10) | ||
6993 | #define MDIO_REG_GPHY_SHADOW_LED_SEL2 (0x0e << 10) | 6994 | #define MDIO_REG_GPHY_SHADOW_LED_SEL2 (0x0e << 10) |
6994 | #define MDIO_REG_GPHY_SHADOW_WR_ENA (0x1 << 15) | 6995 | #define MDIO_REG_GPHY_SHADOW_WR_ENA (0x1 << 15) |
6995 | #define MDIO_REG_GPHY_SHADOW_AUTO_DET_MED (0x1e << 10) | 6996 | #define MDIO_REG_GPHY_SHADOW_AUTO_DET_MED (0x1e << 10) |
diff --git a/drivers/net/ethernet/ibm/ehea/ehea.h b/drivers/net/ethernet/ibm/ehea/ehea.h index 410d6a1984ed..6650068c996c 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea.h +++ b/drivers/net/ethernet/ibm/ehea/ehea.h | |||
@@ -61,9 +61,9 @@ | |||
61 | #ifdef EHEA_SMALL_QUEUES | 61 | #ifdef EHEA_SMALL_QUEUES |
62 | #define EHEA_MAX_CQE_COUNT 1023 | 62 | #define EHEA_MAX_CQE_COUNT 1023 |
63 | #define EHEA_DEF_ENTRIES_SQ 1023 | 63 | #define EHEA_DEF_ENTRIES_SQ 1023 |
64 | #define EHEA_DEF_ENTRIES_RQ1 4095 | 64 | #define EHEA_DEF_ENTRIES_RQ1 1023 |
65 | #define EHEA_DEF_ENTRIES_RQ2 1023 | 65 | #define EHEA_DEF_ENTRIES_RQ2 1023 |
66 | #define EHEA_DEF_ENTRIES_RQ3 1023 | 66 | #define EHEA_DEF_ENTRIES_RQ3 511 |
67 | #else | 67 | #else |
68 | #define EHEA_MAX_CQE_COUNT 4080 | 68 | #define EHEA_MAX_CQE_COUNT 4080 |
69 | #define EHEA_DEF_ENTRIES_SQ 4080 | 69 | #define EHEA_DEF_ENTRIES_SQ 4080 |
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index 37b70f7052b6..bfeccbfde236 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c | |||
@@ -371,7 +371,8 @@ static void ehea_update_stats(struct work_struct *work) | |||
371 | out_herr: | 371 | out_herr: |
372 | free_page((unsigned long)cb2); | 372 | free_page((unsigned long)cb2); |
373 | resched: | 373 | resched: |
374 | schedule_delayed_work(&port->stats_work, msecs_to_jiffies(1000)); | 374 | schedule_delayed_work(&port->stats_work, |
375 | round_jiffies_relative(msecs_to_jiffies(1000))); | ||
375 | } | 376 | } |
376 | 377 | ||
377 | static void ehea_refill_rq1(struct ehea_port_res *pr, int index, int nr_of_wqes) | 378 | static void ehea_refill_rq1(struct ehea_port_res *pr, int index, int nr_of_wqes) |
@@ -2434,7 +2435,8 @@ static int ehea_open(struct net_device *dev) | |||
2434 | } | 2435 | } |
2435 | 2436 | ||
2436 | mutex_unlock(&port->port_lock); | 2437 | mutex_unlock(&port->port_lock); |
2437 | schedule_delayed_work(&port->stats_work, msecs_to_jiffies(1000)); | 2438 | schedule_delayed_work(&port->stats_work, |
2439 | round_jiffies_relative(msecs_to_jiffies(1000))); | ||
2438 | 2440 | ||
2439 | return ret; | 2441 | return ret; |
2440 | } | 2442 | } |
diff --git a/drivers/net/ethernet/ibm/iseries_veth.c b/drivers/net/ethernet/ibm/iseries_veth.c index 4326681df382..acc31af6594a 100644 --- a/drivers/net/ethernet/ibm/iseries_veth.c +++ b/drivers/net/ethernet/ibm/iseries_veth.c | |||
@@ -1421,7 +1421,7 @@ static void veth_receive(struct veth_lpar_connection *cnx, | |||
1421 | 1421 | ||
1422 | /* FIXME: do we need this? */ | 1422 | /* FIXME: do we need this? */ |
1423 | memset(local_list, 0, sizeof(local_list)); | 1423 | memset(local_list, 0, sizeof(local_list)); |
1424 | memset(remote_list, 0, sizeof(VETH_MAX_FRAMES_PER_MSG)); | 1424 | memset(remote_list, 0, sizeof(remote_list)); |
1425 | 1425 | ||
1426 | /* a 0 address marks the end of the valid entries */ | 1426 | /* a 0 address marks the end of the valid entries */ |
1427 | if (senddata->addr[startchunk] == 0) | 1427 | if (senddata->addr[startchunk] == 0) |
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge.h b/drivers/net/ethernet/qlogic/qlge/qlge.h index 8731f79c9efc..b8478aab050e 100644 --- a/drivers/net/ethernet/qlogic/qlge/qlge.h +++ b/drivers/net/ethernet/qlogic/qlge/qlge.h | |||
@@ -58,10 +58,8 @@ | |||
58 | 58 | ||
59 | 59 | ||
60 | #define TX_DESC_PER_IOCB 8 | 60 | #define TX_DESC_PER_IOCB 8 |
61 | /* The maximum number of frags we handle is based | 61 | |
62 | * on PAGE_SIZE... | 62 | #if ((MAX_SKB_FRAGS - TX_DESC_PER_IOCB) + 2) > 0 |
63 | */ | ||
64 | #if (PAGE_SHIFT == 12) || (PAGE_SHIFT == 13) /* 4k & 8k pages */ | ||
65 | #define TX_DESC_PER_OAL ((MAX_SKB_FRAGS - TX_DESC_PER_IOCB) + 2) | 63 | #define TX_DESC_PER_OAL ((MAX_SKB_FRAGS - TX_DESC_PER_IOCB) + 2) |
66 | #else /* all other page sizes */ | 64 | #else /* all other page sizes */ |
67 | #define TX_DESC_PER_OAL 0 | 65 | #define TX_DESC_PER_OAL 0 |
@@ -1353,7 +1351,7 @@ struct tx_ring_desc { | |||
1353 | struct ob_mac_iocb_req *queue_entry; | 1351 | struct ob_mac_iocb_req *queue_entry; |
1354 | u32 index; | 1352 | u32 index; |
1355 | struct oal oal; | 1353 | struct oal oal; |
1356 | struct map_list map[MAX_SKB_FRAGS + 1]; | 1354 | struct map_list map[MAX_SKB_FRAGS + 2]; |
1357 | int map_cnt; | 1355 | int map_cnt; |
1358 | struct tx_ring_desc *next; | 1356 | struct tx_ring_desc *next; |
1359 | }; | 1357 | }; |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index de71859bb295..20e8267e8e40 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -781,10 +781,15 @@ static void stmmac_mmc_setup(struct stmmac_priv *priv) | |||
781 | unsigned int mode = MMC_CNTRL_RESET_ON_READ | MMC_CNTRL_COUNTER_RESET | | 781 | unsigned int mode = MMC_CNTRL_RESET_ON_READ | MMC_CNTRL_COUNTER_RESET | |
782 | MMC_CNTRL_PRESET | MMC_CNTRL_FULL_HALF_PRESET; | 782 | MMC_CNTRL_PRESET | MMC_CNTRL_FULL_HALF_PRESET; |
783 | 783 | ||
784 | /* Do not manage MMC IRQ (FIXME) */ | 784 | /* Mask MMC irq, counters are managed in SW and registers |
785 | * are cleared on each READ eventually. */ | ||
785 | dwmac_mmc_intr_all_mask(priv->ioaddr); | 786 | dwmac_mmc_intr_all_mask(priv->ioaddr); |
786 | dwmac_mmc_ctrl(priv->ioaddr, mode); | 787 | |
787 | memset(&priv->mmc, 0, sizeof(struct stmmac_counters)); | 788 | if (priv->dma_cap.rmon) { |
789 | dwmac_mmc_ctrl(priv->ioaddr, mode); | ||
790 | memset(&priv->mmc, 0, sizeof(struct stmmac_counters)); | ||
791 | } else | ||
792 | pr_info(" No MAC Management Counters available"); | ||
788 | } | 793 | } |
789 | 794 | ||
790 | static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv) | 795 | static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv) |
@@ -1012,8 +1017,7 @@ static int stmmac_open(struct net_device *dev) | |||
1012 | memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats)); | 1017 | memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats)); |
1013 | priv->xstats.threshold = tc; | 1018 | priv->xstats.threshold = tc; |
1014 | 1019 | ||
1015 | if (priv->dma_cap.rmon) | 1020 | stmmac_mmc_setup(priv); |
1016 | stmmac_mmc_setup(priv); | ||
1017 | 1021 | ||
1018 | /* Start the ball rolling... */ | 1022 | /* Start the ball rolling... */ |
1019 | DBG(probe, DEBUG, "%s: DMA RX/TX processes started...\n", dev->name); | 1023 | DBG(probe, DEBUG, "%s: DMA RX/TX processes started...\n", dev->name); |
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index bb88e12101c7..a70244306c94 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | menuconfig PHYLIB | 5 | menuconfig PHYLIB |
6 | bool "PHY Device support and infrastructure" | 6 | tristate "PHY Device support and infrastructure" |
7 | depends on !S390 | 7 | depends on !S390 |
8 | depends on NETDEVICES | 8 | depends on NETDEVICES |
9 | help | 9 | help |
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c index f18df82eeb92..78d0d6988553 100644 --- a/drivers/net/wireless/p54/p54spi.c +++ b/drivers/net/wireless/p54/p54spi.c | |||
@@ -588,8 +588,6 @@ static void p54spi_op_stop(struct ieee80211_hw *dev) | |||
588 | 588 | ||
589 | WARN_ON(priv->fw_state != FW_STATE_READY); | 589 | WARN_ON(priv->fw_state != FW_STATE_READY); |
590 | 590 | ||
591 | cancel_work_sync(&priv->work); | ||
592 | |||
593 | p54spi_power_off(priv); | 591 | p54spi_power_off(priv); |
594 | spin_lock_irqsave(&priv->tx_lock, flags); | 592 | spin_lock_irqsave(&priv->tx_lock, flags); |
595 | INIT_LIST_HEAD(&priv->tx_pending); | 593 | INIT_LIST_HEAD(&priv->tx_pending); |
@@ -597,6 +595,8 @@ static void p54spi_op_stop(struct ieee80211_hw *dev) | |||
597 | 595 | ||
598 | priv->fw_state = FW_STATE_OFF; | 596 | priv->fw_state = FW_STATE_OFF; |
599 | mutex_unlock(&priv->mutex); | 597 | mutex_unlock(&priv->mutex); |
598 | |||
599 | cancel_work_sync(&priv->work); | ||
600 | } | 600 | } |
601 | 601 | ||
602 | static int __devinit p54spi_probe(struct spi_device *spi) | 602 | static int __devinit p54spi_probe(struct spi_device *spi) |
@@ -656,6 +656,7 @@ static int __devinit p54spi_probe(struct spi_device *spi) | |||
656 | init_completion(&priv->fw_comp); | 656 | init_completion(&priv->fw_comp); |
657 | INIT_LIST_HEAD(&priv->tx_pending); | 657 | INIT_LIST_HEAD(&priv->tx_pending); |
658 | mutex_init(&priv->mutex); | 658 | mutex_init(&priv->mutex); |
659 | spin_lock_init(&priv->tx_lock); | ||
659 | SET_IEEE80211_DEV(hw, &spi->dev); | 660 | SET_IEEE80211_DEV(hw, &spi->dev); |
660 | priv->common.open = p54spi_op_start; | 661 | priv->common.open = p54spi_op_start; |
661 | priv->common.stop = p54spi_op_stop; | 662 | priv->common.stop = p54spi_op_stop; |
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index d97a2caf582b..bc2ba80c47bb 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -778,7 +778,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info, | |||
778 | dwrq->flags = 0; | 778 | dwrq->flags = 0; |
779 | dwrq->length = 0; | 779 | dwrq->length = 0; |
780 | } | 780 | } |
781 | essid->octets[essid->length] = '\0'; | 781 | essid->octets[dwrq->length] = '\0'; |
782 | memcpy(extra, essid->octets, dwrq->length); | 782 | memcpy(extra, essid->octets, dwrq->length); |
783 | kfree(essid); | 783 | kfree(essid); |
784 | 784 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 3f183a15186e..1ba079dffb11 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -3771,7 +3771,7 @@ static void rt2800_efuse_read(struct rt2x00_dev *rt2x00dev, unsigned int i) | |||
3771 | /* Apparently the data is read from end to start */ | 3771 | /* Apparently the data is read from end to start */ |
3772 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3, ®); | 3772 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3, ®); |
3773 | /* The returned value is in CPU order, but eeprom is le */ | 3773 | /* The returned value is in CPU order, but eeprom is le */ |
3774 | rt2x00dev->eeprom[i] = cpu_to_le32(reg); | 3774 | *(u32 *)&rt2x00dev->eeprom[i] = cpu_to_le32(reg); |
3775 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA2, ®); | 3775 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA2, ®); |
3776 | *(u32 *)&rt2x00dev->eeprom[i + 2] = cpu_to_le32(reg); | 3776 | *(u32 *)&rt2x00dev->eeprom[i + 2] = cpu_to_le32(reg); |
3777 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA1, ®); | 3777 | rt2800_register_read_lock(rt2x00dev, EFUSE_DATA1, ®); |
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index 0cb594c86090..1ae270eed51a 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c | |||
@@ -1021,7 +1021,7 @@ static int xen_netbk_tx_check_gop(struct xen_netbk *netbk, | |||
1021 | pending_idx = *((u16 *)skb->data); | 1021 | pending_idx = *((u16 *)skb->data); |
1022 | xen_netbk_idx_release(netbk, pending_idx); | 1022 | xen_netbk_idx_release(netbk, pending_idx); |
1023 | for (j = start; j < i; j++) { | 1023 | for (j = start; j < i; j++) { |
1024 | pending_idx = frag_get_pending_idx(&shinfo->frags[i]); | 1024 | pending_idx = frag_get_pending_idx(&shinfo->frags[j]); |
1025 | xen_netbk_idx_release(netbk, pending_idx); | 1025 | xen_netbk_idx_release(netbk, pending_idx); |
1026 | } | 1026 | } |
1027 | 1027 | ||
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index c5336705921f..7281d5acf2f9 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -30,7 +30,7 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | struct tc_stats { | 32 | struct tc_stats { |
33 | __u64 bytes; /* NUmber of enqueues bytes */ | 33 | __u64 bytes; /* Number of enqueued bytes */ |
34 | __u32 packets; /* Number of enqueued packets */ | 34 | __u32 packets; /* Number of enqueued packets */ |
35 | __u32 drops; /* Packets dropped because of lack of resources */ | 35 | __u32 drops; /* Packets dropped because of lack of resources */ |
36 | __u32 overlimits; /* Number of throttle events when this | 36 | __u32 overlimits; /* Number of throttle events when this |
@@ -297,7 +297,7 @@ struct tc_htb_glob { | |||
297 | __u32 debug; /* debug flags */ | 297 | __u32 debug; /* debug flags */ |
298 | 298 | ||
299 | /* stats */ | 299 | /* stats */ |
300 | __u32 direct_pkts; /* count of non shapped packets */ | 300 | __u32 direct_pkts; /* count of non shaped packets */ |
301 | }; | 301 | }; |
302 | enum { | 302 | enum { |
303 | TCA_HTB_UNSPEC, | 303 | TCA_HTB_UNSPEC, |
@@ -503,7 +503,7 @@ enum { | |||
503 | }; | 503 | }; |
504 | #define NETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1) | 504 | #define NETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1) |
505 | 505 | ||
506 | /* State transition probablities for 4 state model */ | 506 | /* State transition probabilities for 4 state model */ |
507 | struct tc_netem_gimodel { | 507 | struct tc_netem_gimodel { |
508 | __u32 p13; | 508 | __u32 p13; |
509 | __u32 p31; | 509 | __u32 p31; |
diff --git a/include/net/dst.h b/include/net/dst.h index 4fb6c4381791..6faec1a60216 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -205,12 +205,7 @@ dst_feature(const struct dst_entry *dst, u32 feature) | |||
205 | 205 | ||
206 | static inline u32 dst_mtu(const struct dst_entry *dst) | 206 | static inline u32 dst_mtu(const struct dst_entry *dst) |
207 | { | 207 | { |
208 | u32 mtu = dst_metric_raw(dst, RTAX_MTU); | 208 | return dst->ops->mtu(dst); |
209 | |||
210 | if (!mtu) | ||
211 | mtu = dst->ops->default_mtu(dst); | ||
212 | |||
213 | return mtu; | ||
214 | } | 209 | } |
215 | 210 | ||
216 | /* RTT metrics are stored in milliseconds for user ABI, but used as jiffies */ | 211 | /* RTT metrics are stored in milliseconds for user ABI, but used as jiffies */ |
diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h index 9adb99845a56..e1c2ee0eef47 100644 --- a/include/net/dst_ops.h +++ b/include/net/dst_ops.h | |||
@@ -17,7 +17,7 @@ struct dst_ops { | |||
17 | int (*gc)(struct dst_ops *ops); | 17 | int (*gc)(struct dst_ops *ops); |
18 | struct dst_entry * (*check)(struct dst_entry *, __u32 cookie); | 18 | struct dst_entry * (*check)(struct dst_entry *, __u32 cookie); |
19 | unsigned int (*default_advmss)(const struct dst_entry *); | 19 | unsigned int (*default_advmss)(const struct dst_entry *); |
20 | unsigned int (*default_mtu)(const struct dst_entry *); | 20 | unsigned int (*mtu)(const struct dst_entry *); |
21 | u32 * (*cow_metrics)(struct dst_entry *, unsigned long); | 21 | u32 * (*cow_metrics)(struct dst_entry *, unsigned long); |
22 | void (*destroy)(struct dst_entry *); | 22 | void (*destroy)(struct dst_entry *); |
23 | void (*ifdown)(struct dst_entry *, | 23 | void (*ifdown)(struct dst_entry *, |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index b897d6e6d0a5..f941964a9931 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -31,6 +31,7 @@ | |||
31 | /** struct ip_options - IP Options | 31 | /** struct ip_options - IP Options |
32 | * | 32 | * |
33 | * @faddr - Saved first hop address | 33 | * @faddr - Saved first hop address |
34 | * @nexthop - Saved nexthop address in LSRR and SSRR | ||
34 | * @is_data - Options in __data, rather than skb | 35 | * @is_data - Options in __data, rather than skb |
35 | * @is_strictroute - Strict source route | 36 | * @is_strictroute - Strict source route |
36 | * @srr_is_hit - Packet destination addr was our one | 37 | * @srr_is_hit - Packet destination addr was our one |
@@ -41,6 +42,7 @@ | |||
41 | */ | 42 | */ |
42 | struct ip_options { | 43 | struct ip_options { |
43 | __be32 faddr; | 44 | __be32 faddr; |
45 | __be32 nexthop; | ||
44 | unsigned char optlen; | 46 | unsigned char optlen; |
45 | unsigned char srr; | 47 | unsigned char srr; |
46 | unsigned char rr; | 48 | unsigned char rr; |
diff --git a/include/net/route.h b/include/net/route.h index db7b3432f07c..91855d185b53 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -71,12 +71,12 @@ struct rtable { | |||
71 | struct fib_info *fi; /* for client ref to shared metrics */ | 71 | struct fib_info *fi; /* for client ref to shared metrics */ |
72 | }; | 72 | }; |
73 | 73 | ||
74 | static inline bool rt_is_input_route(struct rtable *rt) | 74 | static inline bool rt_is_input_route(const struct rtable *rt) |
75 | { | 75 | { |
76 | return rt->rt_route_iif != 0; | 76 | return rt->rt_route_iif != 0; |
77 | } | 77 | } |
78 | 78 | ||
79 | static inline bool rt_is_output_route(struct rtable *rt) | 79 | static inline bool rt_is_output_route(const struct rtable *rt) |
80 | { | 80 | { |
81 | return rt->rt_route_iif == 0; | 81 | return rt->rt_route_iif == 0; |
82 | } | 82 | } |
diff --git a/net/caif/cffrml.c b/net/caif/cffrml.c index f39921171d0d..d3ca87bf23b7 100644 --- a/net/caif/cffrml.c +++ b/net/caif/cffrml.c | |||
@@ -136,20 +136,21 @@ static int cffrml_receive(struct cflayer *layr, struct cfpkt *pkt) | |||
136 | 136 | ||
137 | static int cffrml_transmit(struct cflayer *layr, struct cfpkt *pkt) | 137 | static int cffrml_transmit(struct cflayer *layr, struct cfpkt *pkt) |
138 | { | 138 | { |
139 | int tmp; | ||
140 | u16 chks; | 139 | u16 chks; |
141 | u16 len; | 140 | u16 len; |
141 | __le16 data; | ||
142 | |||
142 | struct cffrml *this = container_obj(layr); | 143 | struct cffrml *this = container_obj(layr); |
143 | if (this->dofcs) { | 144 | if (this->dofcs) { |
144 | chks = cfpkt_iterate(pkt, cffrml_checksum, 0xffff); | 145 | chks = cfpkt_iterate(pkt, cffrml_checksum, 0xffff); |
145 | tmp = cpu_to_le16(chks); | 146 | data = cpu_to_le16(chks); |
146 | cfpkt_add_trail(pkt, &tmp, 2); | 147 | cfpkt_add_trail(pkt, &data, 2); |
147 | } else { | 148 | } else { |
148 | cfpkt_pad_trail(pkt, 2); | 149 | cfpkt_pad_trail(pkt, 2); |
149 | } | 150 | } |
150 | len = cfpkt_getlen(pkt); | 151 | len = cfpkt_getlen(pkt); |
151 | tmp = cpu_to_le16(len); | 152 | data = cpu_to_le16(len); |
152 | cfpkt_add_head(pkt, &tmp, 2); | 153 | cfpkt_add_head(pkt, &data, 2); |
153 | cfpkt_info(pkt)->hdr_len += 2; | 154 | cfpkt_info(pkt)->hdr_len += 2; |
154 | if (cfpkt_erroneous(pkt)) { | 155 | if (cfpkt_erroneous(pkt)) { |
155 | pr_err("Packet is erroneous!\n"); | 156 | pr_err("Packet is erroneous!\n"); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 2684794458ca..27d3fefeaa13 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -2414,7 +2414,10 @@ static struct pneigh_entry *pneigh_get_next(struct seq_file *seq, | |||
2414 | struct net *net = seq_file_net(seq); | 2414 | struct net *net = seq_file_net(seq); |
2415 | struct neigh_table *tbl = state->tbl; | 2415 | struct neigh_table *tbl = state->tbl; |
2416 | 2416 | ||
2417 | pn = pn->next; | 2417 | do { |
2418 | pn = pn->next; | ||
2419 | } while (pn && !net_eq(pneigh_net(pn), net)); | ||
2420 | |||
2418 | while (!pn) { | 2421 | while (!pn) { |
2419 | if (++state->bucket > PNEIGH_HASHMASK) | 2422 | if (++state->bucket > PNEIGH_HASHMASK) |
2420 | break; | 2423 | break; |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 7dc05ecf040a..678ae4e783aa 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2279,7 +2279,7 @@ static int skb_prepare_for_shift(struct sk_buff *skb) | |||
2279 | * @shiftlen: shift up to this many bytes | 2279 | * @shiftlen: shift up to this many bytes |
2280 | * | 2280 | * |
2281 | * Attempts to shift up to shiftlen worth of bytes, which may be less than | 2281 | * Attempts to shift up to shiftlen worth of bytes, which may be less than |
2282 | * the length of the skb, from tgt to skb. Returns number bytes shifted. | 2282 | * the length of the skb, from skb to tgt. Returns number bytes shifted. |
2283 | * It's up to caller to free skb if everything was shifted. | 2283 | * It's up to caller to free skb if everything was shifted. |
2284 | * | 2284 | * |
2285 | * If @tgt runs out of frags, the whole operation is aborted. | 2285 | * If @tgt runs out of frags, the whole operation is aborted. |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 90a919afbed7..3f4e5414c8e5 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -111,6 +111,7 @@ int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
111 | rt = ip_route_newports(fl4, rt, orig_sport, orig_dport, | 111 | rt = ip_route_newports(fl4, rt, orig_sport, orig_dport, |
112 | inet->inet_sport, inet->inet_dport, sk); | 112 | inet->inet_sport, inet->inet_dport, sk); |
113 | if (IS_ERR(rt)) { | 113 | if (IS_ERR(rt)) { |
114 | err = PTR_ERR(rt); | ||
114 | rt = NULL; | 115 | rt = NULL; |
115 | goto failure; | 116 | goto failure; |
116 | } | 117 | } |
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index a77d16158eb6..94f4ec036669 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -112,7 +112,7 @@ static unsigned long dn_rt_deadline; | |||
112 | static int dn_dst_gc(struct dst_ops *ops); | 112 | static int dn_dst_gc(struct dst_ops *ops); |
113 | static struct dst_entry *dn_dst_check(struct dst_entry *, __u32); | 113 | static struct dst_entry *dn_dst_check(struct dst_entry *, __u32); |
114 | static unsigned int dn_dst_default_advmss(const struct dst_entry *dst); | 114 | static unsigned int dn_dst_default_advmss(const struct dst_entry *dst); |
115 | static unsigned int dn_dst_default_mtu(const struct dst_entry *dst); | 115 | static unsigned int dn_dst_mtu(const struct dst_entry *dst); |
116 | static void dn_dst_destroy(struct dst_entry *); | 116 | static void dn_dst_destroy(struct dst_entry *); |
117 | static struct dst_entry *dn_dst_negative_advice(struct dst_entry *); | 117 | static struct dst_entry *dn_dst_negative_advice(struct dst_entry *); |
118 | static void dn_dst_link_failure(struct sk_buff *); | 118 | static void dn_dst_link_failure(struct sk_buff *); |
@@ -135,7 +135,7 @@ static struct dst_ops dn_dst_ops = { | |||
135 | .gc = dn_dst_gc, | 135 | .gc = dn_dst_gc, |
136 | .check = dn_dst_check, | 136 | .check = dn_dst_check, |
137 | .default_advmss = dn_dst_default_advmss, | 137 | .default_advmss = dn_dst_default_advmss, |
138 | .default_mtu = dn_dst_default_mtu, | 138 | .mtu = dn_dst_mtu, |
139 | .cow_metrics = dst_cow_metrics_generic, | 139 | .cow_metrics = dst_cow_metrics_generic, |
140 | .destroy = dn_dst_destroy, | 140 | .destroy = dn_dst_destroy, |
141 | .negative_advice = dn_dst_negative_advice, | 141 | .negative_advice = dn_dst_negative_advice, |
@@ -825,9 +825,11 @@ static unsigned int dn_dst_default_advmss(const struct dst_entry *dst) | |||
825 | return dn_mss_from_pmtu(dst->dev, dst_mtu(dst)); | 825 | return dn_mss_from_pmtu(dst->dev, dst_mtu(dst)); |
826 | } | 826 | } |
827 | 827 | ||
828 | static unsigned int dn_dst_default_mtu(const struct dst_entry *dst) | 828 | static unsigned int dn_dst_mtu(const struct dst_entry *dst) |
829 | { | 829 | { |
830 | return dst->dev->mtu; | 830 | unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); |
831 | |||
832 | return mtu ? : dst->dev->mtu; | ||
831 | } | 833 | } |
832 | 834 | ||
833 | static struct neighbour *dn_dst_neigh_lookup(const struct dst_entry *dst, const void *daddr) | 835 | static struct neighbour *dn_dst_neigh_lookup(const struct dst_entry *dst, const void *daddr) |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index fbc53767bf35..313ad93d2f7b 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -1721,7 +1721,8 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, | |||
1721 | if (err) { | 1721 | if (err) { |
1722 | int j; | 1722 | int j; |
1723 | 1723 | ||
1724 | pmc->sfcount[sfmode]--; | 1724 | if (!delta) |
1725 | pmc->sfcount[sfmode]--; | ||
1725 | for (j=0; j<i; j++) | 1726 | for (j=0; j<i; j++) |
1726 | (void) ip_mc_del1_src(pmc, sfmode, &psfsrc[j]); | 1727 | (void) ip_mc_del1_src(pmc, sfmode, &psfsrc[j]); |
1727 | } else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE] != 0)) { | 1728 | } else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE] != 0)) { |
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index bbebdecd7234..0a46c541b477 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -108,9 +108,6 @@ static int inet_csk_diag_fill(struct sock *sk, | |||
108 | icsk->icsk_ca_ops->name); | 108 | icsk->icsk_ca_ops->name); |
109 | } | 109 | } |
110 | 110 | ||
111 | if ((ext & (1 << (INET_DIAG_TOS - 1))) && (sk->sk_family != AF_INET6)) | ||
112 | RTA_PUT_U8(skb, INET_DIAG_TOS, inet->tos); | ||
113 | |||
114 | r->idiag_family = sk->sk_family; | 111 | r->idiag_family = sk->sk_family; |
115 | r->idiag_state = sk->sk_state; | 112 | r->idiag_state = sk->sk_state; |
116 | r->idiag_timer = 0; | 113 | r->idiag_timer = 0; |
@@ -125,6 +122,12 @@ static int inet_csk_diag_fill(struct sock *sk, | |||
125 | r->id.idiag_src[0] = inet->inet_rcv_saddr; | 122 | r->id.idiag_src[0] = inet->inet_rcv_saddr; |
126 | r->id.idiag_dst[0] = inet->inet_daddr; | 123 | r->id.idiag_dst[0] = inet->inet_daddr; |
127 | 124 | ||
125 | /* IPv6 dual-stack sockets use inet->tos for IPv4 connections, | ||
126 | * hence this needs to be included regardless of socket family. | ||
127 | */ | ||
128 | if (ext & (1 << (INET_DIAG_TOS - 1))) | ||
129 | RTA_PUT_U8(skb, INET_DIAG_TOS, inet->tos); | ||
130 | |||
128 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 131 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) |
129 | if (r->idiag_family == AF_INET6) { | 132 | if (r->idiag_family == AF_INET6) { |
130 | const struct ipv6_pinfo *np = inet6_sk(sk); | 133 | const struct ipv6_pinfo *np = inet6_sk(sk); |
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c index 3b34d1c86270..29a07b6c7168 100644 --- a/net/ipv4/ip_forward.c +++ b/net/ipv4/ip_forward.c | |||
@@ -84,7 +84,7 @@ int ip_forward(struct sk_buff *skb) | |||
84 | 84 | ||
85 | rt = skb_rtable(skb); | 85 | rt = skb_rtable(skb); |
86 | 86 | ||
87 | if (opt->is_strictroute && ip_hdr(skb)->daddr != rt->rt_gateway) | 87 | if (opt->is_strictroute && opt->nexthop != rt->rt_gateway) |
88 | goto sr_failed; | 88 | goto sr_failed; |
89 | 89 | ||
90 | if (unlikely(skb->len > dst_mtu(&rt->dst) && !skb_is_gso(skb) && | 90 | if (unlikely(skb->len > dst_mtu(&rt->dst) && !skb_is_gso(skb) && |
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index 05d20cca9d66..1e60f7679075 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c | |||
@@ -568,12 +568,13 @@ void ip_forward_options(struct sk_buff *skb) | |||
568 | ) { | 568 | ) { |
569 | if (srrptr + 3 > srrspace) | 569 | if (srrptr + 3 > srrspace) |
570 | break; | 570 | break; |
571 | if (memcmp(&ip_hdr(skb)->daddr, &optptr[srrptr-1], 4) == 0) | 571 | if (memcmp(&opt->nexthop, &optptr[srrptr-1], 4) == 0) |
572 | break; | 572 | break; |
573 | } | 573 | } |
574 | if (srrptr + 3 <= srrspace) { | 574 | if (srrptr + 3 <= srrspace) { |
575 | opt->is_changed = 1; | 575 | opt->is_changed = 1; |
576 | ip_rt_get_source(&optptr[srrptr-1], skb, rt); | 576 | ip_rt_get_source(&optptr[srrptr-1], skb, rt); |
577 | ip_hdr(skb)->daddr = opt->nexthop; | ||
577 | optptr[2] = srrptr+4; | 578 | optptr[2] = srrptr+4; |
578 | } else if (net_ratelimit()) | 579 | } else if (net_ratelimit()) |
579 | printk(KERN_CRIT "ip_forward(): Argh! Destination lost!\n"); | 580 | printk(KERN_CRIT "ip_forward(): Argh! Destination lost!\n"); |
@@ -640,7 +641,7 @@ int ip_options_rcv_srr(struct sk_buff *skb) | |||
640 | } | 641 | } |
641 | if (srrptr <= srrspace) { | 642 | if (srrptr <= srrspace) { |
642 | opt->srr_is_hit = 1; | 643 | opt->srr_is_hit = 1; |
643 | iph->daddr = nexthop; | 644 | opt->nexthop = nexthop; |
644 | opt->is_changed = 1; | 645 | opt->is_changed = 1; |
645 | } | 646 | } |
646 | return 0; | 647 | return 0; |
diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig index 1dfc18a03fd4..f19f2182894c 100644 --- a/net/ipv4/netfilter/Kconfig +++ b/net/ipv4/netfilter/Kconfig | |||
@@ -325,7 +325,6 @@ config IP_NF_TARGET_TTL | |||
325 | # raw + specific targets | 325 | # raw + specific targets |
326 | config IP_NF_RAW | 326 | config IP_NF_RAW |
327 | tristate 'raw table support (required for NOTRACK/TRACE)' | 327 | tristate 'raw table support (required for NOTRACK/TRACE)' |
328 | depends on NETFILTER_ADVANCED | ||
329 | help | 328 | help |
330 | This option adds a `raw' table to iptables. This table is the very | 329 | This option adds a `raw' table to iptables. This table is the very |
331 | first in the netfilter framework and hooks in at the PREROUTING | 330 | first in the netfilter framework and hooks in at the PREROUTING |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 0c74da8a0473..fb47c8f0cd86 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -138,7 +138,7 @@ static int rt_chain_length_max __read_mostly = 20; | |||
138 | 138 | ||
139 | static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie); | 139 | static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie); |
140 | static unsigned int ipv4_default_advmss(const struct dst_entry *dst); | 140 | static unsigned int ipv4_default_advmss(const struct dst_entry *dst); |
141 | static unsigned int ipv4_default_mtu(const struct dst_entry *dst); | 141 | static unsigned int ipv4_mtu(const struct dst_entry *dst); |
142 | static void ipv4_dst_destroy(struct dst_entry *dst); | 142 | static void ipv4_dst_destroy(struct dst_entry *dst); |
143 | static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst); | 143 | static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst); |
144 | static void ipv4_link_failure(struct sk_buff *skb); | 144 | static void ipv4_link_failure(struct sk_buff *skb); |
@@ -193,7 +193,7 @@ static struct dst_ops ipv4_dst_ops = { | |||
193 | .gc = rt_garbage_collect, | 193 | .gc = rt_garbage_collect, |
194 | .check = ipv4_dst_check, | 194 | .check = ipv4_dst_check, |
195 | .default_advmss = ipv4_default_advmss, | 195 | .default_advmss = ipv4_default_advmss, |
196 | .default_mtu = ipv4_default_mtu, | 196 | .mtu = ipv4_mtu, |
197 | .cow_metrics = ipv4_cow_metrics, | 197 | .cow_metrics = ipv4_cow_metrics, |
198 | .destroy = ipv4_dst_destroy, | 198 | .destroy = ipv4_dst_destroy, |
199 | .ifdown = ipv4_dst_ifdown, | 199 | .ifdown = ipv4_dst_ifdown, |
@@ -1814,12 +1814,17 @@ static unsigned int ipv4_default_advmss(const struct dst_entry *dst) | |||
1814 | return advmss; | 1814 | return advmss; |
1815 | } | 1815 | } |
1816 | 1816 | ||
1817 | static unsigned int ipv4_default_mtu(const struct dst_entry *dst) | 1817 | static unsigned int ipv4_mtu(const struct dst_entry *dst) |
1818 | { | 1818 | { |
1819 | unsigned int mtu = dst->dev->mtu; | 1819 | const struct rtable *rt = (const struct rtable *) dst; |
1820 | unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); | ||
1821 | |||
1822 | if (mtu && rt_is_output_route(rt)) | ||
1823 | return mtu; | ||
1824 | |||
1825 | mtu = dst->dev->mtu; | ||
1820 | 1826 | ||
1821 | if (unlikely(dst_metric_locked(dst, RTAX_MTU))) { | 1827 | if (unlikely(dst_metric_locked(dst, RTAX_MTU))) { |
1822 | const struct rtable *rt = (const struct rtable *) dst; | ||
1823 | 1828 | ||
1824 | if (rt->rt_gateway != rt->rt_dst && mtu > 576) | 1829 | if (rt->rt_gateway != rt->rt_dst && mtu > 576) |
1825 | mtu = 576; | 1830 | mtu = 576; |
@@ -2755,9 +2760,11 @@ static struct dst_entry *ipv4_blackhole_dst_check(struct dst_entry *dst, u32 coo | |||
2755 | return NULL; | 2760 | return NULL; |
2756 | } | 2761 | } |
2757 | 2762 | ||
2758 | static unsigned int ipv4_blackhole_default_mtu(const struct dst_entry *dst) | 2763 | static unsigned int ipv4_blackhole_mtu(const struct dst_entry *dst) |
2759 | { | 2764 | { |
2760 | return 0; | 2765 | unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); |
2766 | |||
2767 | return mtu ? : dst->dev->mtu; | ||
2761 | } | 2768 | } |
2762 | 2769 | ||
2763 | static void ipv4_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) | 2770 | static void ipv4_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) |
@@ -2775,7 +2782,7 @@ static struct dst_ops ipv4_dst_blackhole_ops = { | |||
2775 | .protocol = cpu_to_be16(ETH_P_IP), | 2782 | .protocol = cpu_to_be16(ETH_P_IP), |
2776 | .destroy = ipv4_dst_destroy, | 2783 | .destroy = ipv4_dst_destroy, |
2777 | .check = ipv4_blackhole_dst_check, | 2784 | .check = ipv4_blackhole_dst_check, |
2778 | .default_mtu = ipv4_blackhole_default_mtu, | 2785 | .mtu = ipv4_blackhole_mtu, |
2779 | .default_advmss = ipv4_default_advmss, | 2786 | .default_advmss = ipv4_default_advmss, |
2780 | .update_pmtu = ipv4_rt_blackhole_update_pmtu, | 2787 | .update_pmtu = ipv4_rt_blackhole_update_pmtu, |
2781 | .cow_metrics = ipv4_rt_blackhole_cow_metrics, | 2788 | .cow_metrics = ipv4_rt_blackhole_cow_metrics, |
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index 4d7bfb321c75..02dd203d9eac 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c | |||
@@ -85,7 +85,7 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk, | |||
85 | * request_sock (formerly open request) hash tables. | 85 | * request_sock (formerly open request) hash tables. |
86 | */ | 86 | */ |
87 | static u32 inet6_synq_hash(const struct in6_addr *raddr, const __be16 rport, | 87 | static u32 inet6_synq_hash(const struct in6_addr *raddr, const __be16 rport, |
88 | const u32 rnd, const u16 synq_hsize) | 88 | const u32 rnd, const u32 synq_hsize) |
89 | { | 89 | { |
90 | u32 c; | 90 | u32 c; |
91 | 91 | ||
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index a4769881c5b5..2854705b15ea 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1574,7 +1574,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1574 | } | 1574 | } |
1575 | if (!rt->rt6i_peer) | 1575 | if (!rt->rt6i_peer) |
1576 | rt6_bind_peer(rt, 1); | 1576 | rt6_bind_peer(rt, 1); |
1577 | if (inet_peer_xrlim_allow(rt->rt6i_peer, 1*HZ)) | 1577 | if (!inet_peer_xrlim_allow(rt->rt6i_peer, 1*HZ)) |
1578 | goto release; | 1578 | goto release; |
1579 | 1579 | ||
1580 | if (dev->addr_len) { | 1580 | if (dev->addr_len) { |
diff --git a/net/ipv6/netfilter/Kconfig b/net/ipv6/netfilter/Kconfig index 448464844a25..f792b34cbe9c 100644 --- a/net/ipv6/netfilter/Kconfig +++ b/net/ipv6/netfilter/Kconfig | |||
@@ -186,7 +186,6 @@ config IP6_NF_MANGLE | |||
186 | 186 | ||
187 | config IP6_NF_RAW | 187 | config IP6_NF_RAW |
188 | tristate 'raw table support (required for TRACE)' | 188 | tristate 'raw table support (required for TRACE)' |
189 | depends on NETFILTER_ADVANCED | ||
190 | help | 189 | help |
191 | This option adds a `raw' table to ip6tables. This table is the very | 190 | This option adds a `raw' table to ip6tables. This table is the very |
192 | first in the netfilter framework and hooks in at the PREROUTING | 191 | first in the netfilter framework and hooks in at the PREROUTING |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 2897403fdaff..0e381bb94683 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -77,7 +77,7 @@ static struct rt6_info *ip6_rt_copy(const struct rt6_info *ort, | |||
77 | const struct in6_addr *dest); | 77 | const struct in6_addr *dest); |
78 | static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie); | 78 | static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie); |
79 | static unsigned int ip6_default_advmss(const struct dst_entry *dst); | 79 | static unsigned int ip6_default_advmss(const struct dst_entry *dst); |
80 | static unsigned int ip6_default_mtu(const struct dst_entry *dst); | 80 | static unsigned int ip6_mtu(const struct dst_entry *dst); |
81 | static struct dst_entry *ip6_negative_advice(struct dst_entry *); | 81 | static struct dst_entry *ip6_negative_advice(struct dst_entry *); |
82 | static void ip6_dst_destroy(struct dst_entry *); | 82 | static void ip6_dst_destroy(struct dst_entry *); |
83 | static void ip6_dst_ifdown(struct dst_entry *, | 83 | static void ip6_dst_ifdown(struct dst_entry *, |
@@ -144,7 +144,7 @@ static struct dst_ops ip6_dst_ops_template = { | |||
144 | .gc_thresh = 1024, | 144 | .gc_thresh = 1024, |
145 | .check = ip6_dst_check, | 145 | .check = ip6_dst_check, |
146 | .default_advmss = ip6_default_advmss, | 146 | .default_advmss = ip6_default_advmss, |
147 | .default_mtu = ip6_default_mtu, | 147 | .mtu = ip6_mtu, |
148 | .cow_metrics = ipv6_cow_metrics, | 148 | .cow_metrics = ipv6_cow_metrics, |
149 | .destroy = ip6_dst_destroy, | 149 | .destroy = ip6_dst_destroy, |
150 | .ifdown = ip6_dst_ifdown, | 150 | .ifdown = ip6_dst_ifdown, |
@@ -155,9 +155,11 @@ static struct dst_ops ip6_dst_ops_template = { | |||
155 | .neigh_lookup = ip6_neigh_lookup, | 155 | .neigh_lookup = ip6_neigh_lookup, |
156 | }; | 156 | }; |
157 | 157 | ||
158 | static unsigned int ip6_blackhole_default_mtu(const struct dst_entry *dst) | 158 | static unsigned int ip6_blackhole_mtu(const struct dst_entry *dst) |
159 | { | 159 | { |
160 | return 0; | 160 | unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); |
161 | |||
162 | return mtu ? : dst->dev->mtu; | ||
161 | } | 163 | } |
162 | 164 | ||
163 | static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) | 165 | static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) |
@@ -175,7 +177,7 @@ static struct dst_ops ip6_dst_blackhole_ops = { | |||
175 | .protocol = cpu_to_be16(ETH_P_IPV6), | 177 | .protocol = cpu_to_be16(ETH_P_IPV6), |
176 | .destroy = ip6_dst_destroy, | 178 | .destroy = ip6_dst_destroy, |
177 | .check = ip6_dst_check, | 179 | .check = ip6_dst_check, |
178 | .default_mtu = ip6_blackhole_default_mtu, | 180 | .mtu = ip6_blackhole_mtu, |
179 | .default_advmss = ip6_default_advmss, | 181 | .default_advmss = ip6_default_advmss, |
180 | .update_pmtu = ip6_rt_blackhole_update_pmtu, | 182 | .update_pmtu = ip6_rt_blackhole_update_pmtu, |
181 | .cow_metrics = ip6_rt_blackhole_cow_metrics, | 183 | .cow_metrics = ip6_rt_blackhole_cow_metrics, |
@@ -1041,10 +1043,15 @@ static unsigned int ip6_default_advmss(const struct dst_entry *dst) | |||
1041 | return mtu; | 1043 | return mtu; |
1042 | } | 1044 | } |
1043 | 1045 | ||
1044 | static unsigned int ip6_default_mtu(const struct dst_entry *dst) | 1046 | static unsigned int ip6_mtu(const struct dst_entry *dst) |
1045 | { | 1047 | { |
1046 | unsigned int mtu = IPV6_MIN_MTU; | ||
1047 | struct inet6_dev *idev; | 1048 | struct inet6_dev *idev; |
1049 | unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); | ||
1050 | |||
1051 | if (mtu) | ||
1052 | return mtu; | ||
1053 | |||
1054 | mtu = IPV6_MIN_MTU; | ||
1048 | 1055 | ||
1049 | rcu_read_lock(); | 1056 | rcu_read_lock(); |
1050 | idev = __in6_dev_get(dst->dev); | 1057 | idev = __in6_dev_get(dst->dev); |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index fd98dd010fcb..9d74eee334d6 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1253,6 +1253,13 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1253 | if (!want_cookie || tmp_opt.tstamp_ok) | 1253 | if (!want_cookie || tmp_opt.tstamp_ok) |
1254 | TCP_ECN_create_request(req, tcp_hdr(skb)); | 1254 | TCP_ECN_create_request(req, tcp_hdr(skb)); |
1255 | 1255 | ||
1256 | treq->iif = sk->sk_bound_dev_if; | ||
1257 | |||
1258 | /* So that link locals have meaning */ | ||
1259 | if (!sk->sk_bound_dev_if && | ||
1260 | ipv6_addr_type(&treq->rmt_addr) & IPV6_ADDR_LINKLOCAL) | ||
1261 | treq->iif = inet6_iif(skb); | ||
1262 | |||
1256 | if (!isn) { | 1263 | if (!isn) { |
1257 | struct inet_peer *peer = NULL; | 1264 | struct inet_peer *peer = NULL; |
1258 | 1265 | ||
@@ -1262,12 +1269,6 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1262 | atomic_inc(&skb->users); | 1269 | atomic_inc(&skb->users); |
1263 | treq->pktopts = skb; | 1270 | treq->pktopts = skb; |
1264 | } | 1271 | } |
1265 | treq->iif = sk->sk_bound_dev_if; | ||
1266 | |||
1267 | /* So that link locals have meaning */ | ||
1268 | if (!sk->sk_bound_dev_if && | ||
1269 | ipv6_addr_type(&treq->rmt_addr) & IPV6_ADDR_LINKLOCAL) | ||
1270 | treq->iif = inet6_iif(skb); | ||
1271 | 1272 | ||
1272 | if (want_cookie) { | 1273 | if (want_cookie) { |
1273 | isn = cookie_v6_init_sequence(sk, skb, &req->mss); | 1274 | isn = cookie_v6_init_sequence(sk, skb, &req->mss); |
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index c5f341798c16..3110cbdc501b 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -274,9 +274,9 @@ static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf, | |||
274 | 274 | ||
275 | PRINT_HT_CAP((htc->cap & BIT(10)), "HT Delayed Block Ack"); | 275 | PRINT_HT_CAP((htc->cap & BIT(10)), "HT Delayed Block Ack"); |
276 | 276 | ||
277 | PRINT_HT_CAP((htc->cap & BIT(11)), "Max AMSDU length: " | ||
278 | "3839 bytes"); | ||
279 | PRINT_HT_CAP(!(htc->cap & BIT(11)), "Max AMSDU length: " | 277 | PRINT_HT_CAP(!(htc->cap & BIT(11)), "Max AMSDU length: " |
278 | "3839 bytes"); | ||
279 | PRINT_HT_CAP((htc->cap & BIT(11)), "Max AMSDU length: " | ||
280 | "7935 bytes"); | 280 | "7935 bytes"); |
281 | 281 | ||
282 | /* | 282 | /* |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index a9da6ee69803..46222ce0e5b1 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -260,7 +260,7 @@ static void ieee80211_add_tx_radiotap_header(struct ieee80211_supported_band | |||
260 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 260 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; |
261 | struct ieee80211_radiotap_header *rthdr; | 261 | struct ieee80211_radiotap_header *rthdr; |
262 | unsigned char *pos; | 262 | unsigned char *pos; |
263 | __le16 txflags; | 263 | u16 txflags; |
264 | 264 | ||
265 | rthdr = (struct ieee80211_radiotap_header *) skb_push(skb, rtap_len); | 265 | rthdr = (struct ieee80211_radiotap_header *) skb_push(skb, rtap_len); |
266 | 266 | ||
@@ -290,13 +290,13 @@ static void ieee80211_add_tx_radiotap_header(struct ieee80211_supported_band | |||
290 | txflags = 0; | 290 | txflags = 0; |
291 | if (!(info->flags & IEEE80211_TX_STAT_ACK) && | 291 | if (!(info->flags & IEEE80211_TX_STAT_ACK) && |
292 | !is_multicast_ether_addr(hdr->addr1)) | 292 | !is_multicast_ether_addr(hdr->addr1)) |
293 | txflags |= cpu_to_le16(IEEE80211_RADIOTAP_F_TX_FAIL); | 293 | txflags |= IEEE80211_RADIOTAP_F_TX_FAIL; |
294 | 294 | ||
295 | if ((info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) || | 295 | if ((info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) || |
296 | (info->status.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)) | 296 | (info->status.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)) |
297 | txflags |= cpu_to_le16(IEEE80211_RADIOTAP_F_TX_CTS); | 297 | txflags |= IEEE80211_RADIOTAP_F_TX_CTS; |
298 | else if (info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) | 298 | else if (info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) |
299 | txflags |= cpu_to_le16(IEEE80211_RADIOTAP_F_TX_RTS); | 299 | txflags |= IEEE80211_RADIOTAP_F_TX_RTS; |
300 | 300 | ||
301 | put_unaligned_le16(txflags, pos); | 301 | put_unaligned_le16(txflags, pos); |
302 | pos += 2; | 302 | pos += 2; |
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index 8260b13d93c9..e8f379692294 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig | |||
@@ -542,7 +542,6 @@ config NETFILTER_XT_TARGET_NOTRACK | |||
542 | tristate '"NOTRACK" target support' | 542 | tristate '"NOTRACK" target support' |
543 | depends on IP_NF_RAW || IP6_NF_RAW | 543 | depends on IP_NF_RAW || IP6_NF_RAW |
544 | depends on NF_CONNTRACK | 544 | depends on NF_CONNTRACK |
545 | depends on NETFILTER_ADVANCED | ||
546 | help | 545 | help |
547 | The NOTRACK target allows a select rule to specify | 546 | The NOTRACK target allows a select rule to specify |
548 | which packets *not* to enter the conntrack/NAT | 547 | which packets *not* to enter the conntrack/NAT |
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c index 8ed67dccf11d..3735297c524d 100644 --- a/net/netlabel/netlabel_kapi.c +++ b/net/netlabel/netlabel_kapi.c | |||
@@ -162,8 +162,8 @@ int netlbl_cfg_unlbl_map_add(const char *domain, | |||
162 | map6->list.addr.s6_addr32[3] &= mask6->s6_addr32[3]; | 162 | map6->list.addr.s6_addr32[3] &= mask6->s6_addr32[3]; |
163 | map6->list.mask = *mask6; | 163 | map6->list.mask = *mask6; |
164 | map6->list.valid = 1; | 164 | map6->list.valid = 1; |
165 | ret_val = netlbl_af4list_add(&map4->list, | 165 | ret_val = netlbl_af6list_add(&map6->list, |
166 | &addrmap->list4); | 166 | &addrmap->list6); |
167 | if (ret_val != 0) | 167 | if (ret_val != 0) |
168 | goto cfg_unlbl_map_add_failure; | 168 | goto cfg_unlbl_map_add_failure; |
169 | break; | 169 | break; |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index e71f5a66574e..77e926738014 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -2037,6 +2037,10 @@ static int __set_regdom(const struct ieee80211_regdomain *rd) | |||
2037 | } | 2037 | } |
2038 | 2038 | ||
2039 | request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx); | 2039 | request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx); |
2040 | if (!request_wiphy) { | ||
2041 | reg_set_request_processed(); | ||
2042 | return -ENODEV; | ||
2043 | } | ||
2040 | 2044 | ||
2041 | if (!last_request->intersect) { | 2045 | if (!last_request->intersect) { |
2042 | int r; | 2046 | int r; |
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 593c8a1f1440..4fce1cec193e 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -2382,9 +2382,11 @@ static unsigned int xfrm_default_advmss(const struct dst_entry *dst) | |||
2382 | return dst_metric_advmss(dst->path); | 2382 | return dst_metric_advmss(dst->path); |
2383 | } | 2383 | } |
2384 | 2384 | ||
2385 | static unsigned int xfrm_default_mtu(const struct dst_entry *dst) | 2385 | static unsigned int xfrm_mtu(const struct dst_entry *dst) |
2386 | { | 2386 | { |
2387 | return dst_mtu(dst->path); | 2387 | unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); |
2388 | |||
2389 | return mtu ? : dst_mtu(dst->path); | ||
2388 | } | 2390 | } |
2389 | 2391 | ||
2390 | static struct neighbour *xfrm_neigh_lookup(const struct dst_entry *dst, const void *daddr) | 2392 | static struct neighbour *xfrm_neigh_lookup(const struct dst_entry *dst, const void *daddr) |
@@ -2411,8 +2413,8 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo) | |||
2411 | dst_ops->check = xfrm_dst_check; | 2413 | dst_ops->check = xfrm_dst_check; |
2412 | if (likely(dst_ops->default_advmss == NULL)) | 2414 | if (likely(dst_ops->default_advmss == NULL)) |
2413 | dst_ops->default_advmss = xfrm_default_advmss; | 2415 | dst_ops->default_advmss = xfrm_default_advmss; |
2414 | if (likely(dst_ops->default_mtu == NULL)) | 2416 | if (likely(dst_ops->mtu == NULL)) |
2415 | dst_ops->default_mtu = xfrm_default_mtu; | 2417 | dst_ops->mtu = xfrm_mtu; |
2416 | if (likely(dst_ops->negative_advice == NULL)) | 2418 | if (likely(dst_ops->negative_advice == NULL)) |
2417 | dst_ops->negative_advice = xfrm_negative_advice; | 2419 | dst_ops->negative_advice = xfrm_negative_advice; |
2418 | if (likely(dst_ops->link_failure == NULL)) | 2420 | if (likely(dst_ops->link_failure == NULL)) |