diff options
33 files changed, 197 insertions, 63 deletions
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index c44950d3eb7b..b7ae0a0dd5b6 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
| @@ -2400,6 +2400,7 @@ allocerr: | |||
| 2400 | error: | 2400 | error: |
| 2401 | freeurbs(cs); | 2401 | freeurbs(cs); |
| 2402 | usb_set_intfdata(interface, NULL); | 2402 | usb_set_intfdata(interface, NULL); |
| 2403 | usb_put_dev(udev); | ||
| 2403 | gigaset_freecs(cs); | 2404 | gigaset_freecs(cs); |
| 2404 | return rc; | 2405 | return rc; |
| 2405 | } | 2406 | } |
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c index 824108cd9fd5..12430be6448a 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c | |||
| @@ -287,7 +287,8 @@ static int c_can_plat_probe(struct platform_device *pdev) | |||
| 287 | break; | 287 | break; |
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | priv->raminit_ctrlreg = devm_ioremap_resource(&pdev->dev, res); | 290 | priv->raminit_ctrlreg = devm_ioremap(&pdev->dev, res->start, |
| 291 | resource_size(res)); | ||
| 291 | if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0) | 292 | if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0) |
| 292 | dev_info(&pdev->dev, "control memory is not used for raminit\n"); | 293 | dev_info(&pdev->dev, "control memory is not used for raminit\n"); |
| 293 | else | 294 | else |
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c index c83584a26713..5a1891faba8a 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c | |||
| @@ -339,7 +339,8 @@ static int xgbe_probe(struct platform_device *pdev) | |||
| 339 | /* Calculate the number of Tx and Rx rings to be created */ | 339 | /* Calculate the number of Tx and Rx rings to be created */ |
| 340 | pdata->tx_ring_count = min_t(unsigned int, num_online_cpus(), | 340 | pdata->tx_ring_count = min_t(unsigned int, num_online_cpus(), |
| 341 | pdata->hw_feat.tx_ch_cnt); | 341 | pdata->hw_feat.tx_ch_cnt); |
| 342 | if (netif_set_real_num_tx_queues(netdev, pdata->tx_ring_count)) { | 342 | ret = netif_set_real_num_tx_queues(netdev, pdata->tx_ring_count); |
| 343 | if (ret) { | ||
| 343 | dev_err(dev, "error setting real tx queue count\n"); | 344 | dev_err(dev, "error setting real tx queue count\n"); |
| 344 | goto err_io; | 345 | goto err_io; |
| 345 | } | 346 | } |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index 4cab09d3f807..8206a293e6b4 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |||
| @@ -346,6 +346,7 @@ struct sw_tx_bd { | |||
| 346 | u8 flags; | 346 | u8 flags; |
| 347 | /* Set on the first BD descriptor when there is a split BD */ | 347 | /* Set on the first BD descriptor when there is a split BD */ |
| 348 | #define BNX2X_TSO_SPLIT_BD (1<<0) | 348 | #define BNX2X_TSO_SPLIT_BD (1<<0) |
| 349 | #define BNX2X_HAS_SECOND_PBD (1<<1) | ||
| 349 | }; | 350 | }; |
| 350 | 351 | ||
| 351 | struct sw_rx_page { | 352 | struct sw_rx_page { |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 4b875da1c7ed..c43e7238de21 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
| @@ -227,6 +227,12 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata, | |||
| 227 | --nbd; | 227 | --nbd; |
| 228 | bd_idx = TX_BD(NEXT_TX_IDX(bd_idx)); | 228 | bd_idx = TX_BD(NEXT_TX_IDX(bd_idx)); |
| 229 | 229 | ||
| 230 | if (tx_buf->flags & BNX2X_HAS_SECOND_PBD) { | ||
| 231 | /* Skip second parse bd... */ | ||
| 232 | --nbd; | ||
| 233 | bd_idx = TX_BD(NEXT_TX_IDX(bd_idx)); | ||
| 234 | } | ||
| 235 | |||
| 230 | /* TSO headers+data bds share a common mapping. See bnx2x_tx_split() */ | 236 | /* TSO headers+data bds share a common mapping. See bnx2x_tx_split() */ |
| 231 | if (tx_buf->flags & BNX2X_TSO_SPLIT_BD) { | 237 | if (tx_buf->flags & BNX2X_TSO_SPLIT_BD) { |
| 232 | tx_data_bd = &txdata->tx_desc_ring[bd_idx].reg_bd; | 238 | tx_data_bd = &txdata->tx_desc_ring[bd_idx].reg_bd; |
| @@ -3889,6 +3895,9 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 3889 | /* set encapsulation flag in start BD */ | 3895 | /* set encapsulation flag in start BD */ |
| 3890 | SET_FLAG(tx_start_bd->general_data, | 3896 | SET_FLAG(tx_start_bd->general_data, |
| 3891 | ETH_TX_START_BD_TUNNEL_EXIST, 1); | 3897 | ETH_TX_START_BD_TUNNEL_EXIST, 1); |
| 3898 | |||
| 3899 | tx_buf->flags |= BNX2X_HAS_SECOND_PBD; | ||
| 3900 | |||
| 3892 | nbd++; | 3901 | nbd++; |
| 3893 | } else if (xmit_type & XMIT_CSUM) { | 3902 | } else if (xmit_type & XMIT_CSUM) { |
| 3894 | /* Set PBD in checksum offload case w/o encapsulation */ | 3903 | /* Set PBD in checksum offload case w/o encapsulation */ |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index bd0600cf7266..25eddd90f482 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | |||
| @@ -379,6 +379,7 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
| 379 | break; | 379 | break; |
| 380 | case PORT_FIBRE: | 380 | case PORT_FIBRE: |
| 381 | case PORT_DA: | 381 | case PORT_DA: |
| 382 | case PORT_NONE: | ||
| 382 | if (!(bp->port.supported[0] & SUPPORTED_FIBRE || | 383 | if (!(bp->port.supported[0] & SUPPORTED_FIBRE || |
| 383 | bp->port.supported[1] & SUPPORTED_FIBRE)) { | 384 | bp->port.supported[1] & SUPPORTED_FIBRE)) { |
| 384 | DP(BNX2X_MSG_ETHTOOL, | 385 | DP(BNX2X_MSG_ETHTOOL, |
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 16281ad2da12..4e615debe472 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c | |||
| @@ -1149,6 +1149,11 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 1149 | goto out; | 1149 | goto out; |
| 1150 | } | 1150 | } |
| 1151 | 1151 | ||
| 1152 | if (skb_padto(skb, ETH_ZLEN)) { | ||
| 1153 | ret = NETDEV_TX_OK; | ||
| 1154 | goto out; | ||
| 1155 | } | ||
| 1156 | |||
| 1152 | /* set the SKB transmit checksum */ | 1157 | /* set the SKB transmit checksum */ |
| 1153 | if (priv->desc_64b_en) { | 1158 | if (priv->desc_64b_en) { |
| 1154 | ret = bcmgenet_put_tx_csum(dev, skb); | 1159 | ret = bcmgenet_put_tx_csum(dev, skb); |
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index fd411d6e19a2..d813bfb1a847 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c | |||
| @@ -610,6 +610,13 @@ static int __vnet_tx_trigger(struct vnet_port *port) | |||
| 610 | return err; | 610 | return err; |
| 611 | } | 611 | } |
| 612 | 612 | ||
| 613 | static inline bool port_is_up(struct vnet_port *vnet) | ||
| 614 | { | ||
| 615 | struct vio_driver_state *vio = &vnet->vio; | ||
| 616 | |||
| 617 | return !!(vio->hs_state & VIO_HS_COMPLETE); | ||
| 618 | } | ||
| 619 | |||
| 613 | struct vnet_port *__tx_port_find(struct vnet *vp, struct sk_buff *skb) | 620 | struct vnet_port *__tx_port_find(struct vnet *vp, struct sk_buff *skb) |
| 614 | { | 621 | { |
| 615 | unsigned int hash = vnet_hashfn(skb->data); | 622 | unsigned int hash = vnet_hashfn(skb->data); |
| @@ -617,14 +624,19 @@ struct vnet_port *__tx_port_find(struct vnet *vp, struct sk_buff *skb) | |||
| 617 | struct vnet_port *port; | 624 | struct vnet_port *port; |
| 618 | 625 | ||
| 619 | hlist_for_each_entry(port, hp, hash) { | 626 | hlist_for_each_entry(port, hp, hash) { |
| 627 | if (!port_is_up(port)) | ||
| 628 | continue; | ||
| 620 | if (ether_addr_equal(port->raddr, skb->data)) | 629 | if (ether_addr_equal(port->raddr, skb->data)) |
| 621 | return port; | 630 | return port; |
| 622 | } | 631 | } |
| 623 | port = NULL; | 632 | list_for_each_entry(port, &vp->port_list, list) { |
| 624 | if (!list_empty(&vp->port_list)) | 633 | if (!port->switch_port) |
| 625 | port = list_entry(vp->port_list.next, struct vnet_port, list); | 634 | continue; |
| 626 | 635 | if (!port_is_up(port)) | |
| 627 | return port; | 636 | continue; |
| 637 | return port; | ||
| 638 | } | ||
| 639 | return NULL; | ||
| 628 | } | 640 | } |
| 629 | 641 | ||
| 630 | struct vnet_port *tx_port_find(struct vnet *vp, struct sk_buff *skb) | 642 | struct vnet_port *tx_port_find(struct vnet *vp, struct sk_buff *skb) |
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 4ed38eaecea8..d97d5f39a04e 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c | |||
| @@ -378,8 +378,10 @@ static int netvsc_init_buf(struct hv_device *device) | |||
| 378 | 378 | ||
| 379 | net_device->send_section_map = | 379 | net_device->send_section_map = |
| 380 | kzalloc(net_device->map_words * sizeof(ulong), GFP_KERNEL); | 380 | kzalloc(net_device->map_words * sizeof(ulong), GFP_KERNEL); |
| 381 | if (net_device->send_section_map == NULL) | 381 | if (net_device->send_section_map == NULL) { |
| 382 | ret = -ENOMEM; | ||
| 382 | goto cleanup; | 383 | goto cleanup; |
| 384 | } | ||
| 383 | 385 | ||
| 384 | goto exit; | 386 | goto exit; |
| 385 | 387 | ||
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 4eaadcfcb0fe..203651ebccb0 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c | |||
| @@ -255,6 +255,7 @@ int mdiobus_register(struct mii_bus *bus) | |||
| 255 | 255 | ||
| 256 | bus->dev.parent = bus->parent; | 256 | bus->dev.parent = bus->parent; |
| 257 | bus->dev.class = &mdio_bus_class; | 257 | bus->dev.class = &mdio_bus_class; |
| 258 | bus->dev.driver = bus->parent->driver; | ||
| 258 | bus->dev.groups = NULL; | 259 | bus->dev.groups = NULL; |
| 259 | dev_set_name(&bus->dev, "%s", bus->id); | 260 | dev_set_name(&bus->dev, "%s", bus->id); |
| 260 | 261 | ||
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 35d753d22f78..22c57be4dfa0 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
| @@ -355,7 +355,7 @@ int phy_device_register(struct phy_device *phydev) | |||
| 355 | phydev->bus->phy_map[phydev->addr] = phydev; | 355 | phydev->bus->phy_map[phydev->addr] = phydev; |
| 356 | 356 | ||
| 357 | /* Run all of the fixups for this PHY */ | 357 | /* Run all of the fixups for this PHY */ |
| 358 | err = phy_init_hw(phydev); | 358 | err = phy_scan_fixups(phydev); |
| 359 | if (err) { | 359 | if (err) { |
| 360 | pr_err("PHY %d failed to initialize\n", phydev->addr); | 360 | pr_err("PHY %d failed to initialize\n", phydev->addr); |
| 361 | goto out; | 361 | goto out; |
| @@ -575,6 +575,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | |||
| 575 | u32 flags, phy_interface_t interface) | 575 | u32 flags, phy_interface_t interface) |
| 576 | { | 576 | { |
| 577 | struct device *d = &phydev->dev; | 577 | struct device *d = &phydev->dev; |
| 578 | struct module *bus_module; | ||
| 578 | int err; | 579 | int err; |
| 579 | 580 | ||
| 580 | /* Assume that if there is no driver, that it doesn't | 581 | /* Assume that if there is no driver, that it doesn't |
| @@ -599,6 +600,14 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | |||
| 599 | return -EBUSY; | 600 | return -EBUSY; |
| 600 | } | 601 | } |
| 601 | 602 | ||
| 603 | /* Increment the bus module reference count */ | ||
| 604 | bus_module = phydev->bus->dev.driver ? | ||
| 605 | phydev->bus->dev.driver->owner : NULL; | ||
| 606 | if (!try_module_get(bus_module)) { | ||
| 607 | dev_err(&dev->dev, "failed to get the bus module\n"); | ||
| 608 | return -EIO; | ||
| 609 | } | ||
| 610 | |||
| 602 | phydev->attached_dev = dev; | 611 | phydev->attached_dev = dev; |
| 603 | dev->phydev = phydev; | 612 | dev->phydev = phydev; |
| 604 | 613 | ||
| @@ -664,6 +673,10 @@ EXPORT_SYMBOL(phy_attach); | |||
| 664 | void phy_detach(struct phy_device *phydev) | 673 | void phy_detach(struct phy_device *phydev) |
| 665 | { | 674 | { |
| 666 | int i; | 675 | int i; |
| 676 | |||
| 677 | if (phydev->bus->dev.driver) | ||
| 678 | module_put(phydev->bus->dev.driver->owner); | ||
| 679 | |||
| 667 | phydev->attached_dev->phydev = NULL; | 680 | phydev->attached_dev->phydev = NULL; |
| 668 | phydev->attached_dev = NULL; | 681 | phydev->attached_dev = NULL; |
| 669 | phy_suspend(phydev); | 682 | phy_suspend(phydev); |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 9ea4bfe5d318..2a32d9167d3b 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
| @@ -341,6 +341,22 @@ next_desc: | |||
| 341 | usb_driver_release_interface(driver, info->data); | 341 | usb_driver_release_interface(driver, info->data); |
| 342 | return -ENODEV; | 342 | return -ENODEV; |
| 343 | } | 343 | } |
| 344 | |||
| 345 | /* Some devices don't initialise properly. In particular | ||
| 346 | * the packet filter is not reset. There are devices that | ||
| 347 | * don't do reset all the way. So the packet filter should | ||
| 348 | * be set to a sane initial value. | ||
| 349 | */ | ||
| 350 | usb_control_msg(dev->udev, | ||
| 351 | usb_sndctrlpipe(dev->udev, 0), | ||
| 352 | USB_CDC_SET_ETHERNET_PACKET_FILTER, | ||
| 353 | USB_TYPE_CLASS | USB_RECIP_INTERFACE, | ||
| 354 | USB_CDC_PACKET_TYPE_ALL_MULTICAST | USB_CDC_PACKET_TYPE_DIRECTED | USB_CDC_PACKET_TYPE_BROADCAST, | ||
| 355 | intf->cur_altsetting->desc.bInterfaceNumber, | ||
| 356 | NULL, | ||
| 357 | 0, | ||
| 358 | USB_CTRL_SET_TIMEOUT | ||
| 359 | ); | ||
| 344 | return 0; | 360 | return 0; |
| 345 | 361 | ||
| 346 | bad_desc: | 362 | bad_desc: |
diff --git a/drivers/net/usb/cdc_subset.c b/drivers/net/usb/cdc_subset.c index 91f0919fe278..3ef411efd86e 100644 --- a/drivers/net/usb/cdc_subset.c +++ b/drivers/net/usb/cdc_subset.c | |||
| @@ -85,9 +85,34 @@ static int always_connected (struct usbnet *dev) | |||
| 85 | * | 85 | * |
| 86 | *-------------------------------------------------------------------------*/ | 86 | *-------------------------------------------------------------------------*/ |
| 87 | 87 | ||
| 88 | static void m5632_recover(struct usbnet *dev) | ||
| 89 | { | ||
| 90 | struct usb_device *udev = dev->udev; | ||
| 91 | struct usb_interface *intf = dev->intf; | ||
| 92 | int r; | ||
| 93 | |||
| 94 | r = usb_lock_device_for_reset(udev, intf); | ||
| 95 | if (r < 0) | ||
| 96 | return; | ||
| 97 | |||
| 98 | usb_reset_device(udev); | ||
| 99 | usb_unlock_device(udev); | ||
| 100 | } | ||
| 101 | |||
| 102 | static int dummy_prereset(struct usb_interface *intf) | ||
| 103 | { | ||
| 104 | return 0; | ||
| 105 | } | ||
| 106 | |||
| 107 | static int dummy_postreset(struct usb_interface *intf) | ||
| 108 | { | ||
| 109 | return 0; | ||
| 110 | } | ||
| 111 | |||
| 88 | static const struct driver_info ali_m5632_info = { | 112 | static const struct driver_info ali_m5632_info = { |
| 89 | .description = "ALi M5632", | 113 | .description = "ALi M5632", |
| 90 | .flags = FLAG_POINTTOPOINT, | 114 | .flags = FLAG_POINTTOPOINT, |
| 115 | .recover = m5632_recover, | ||
| 91 | }; | 116 | }; |
| 92 | 117 | ||
| 93 | #endif | 118 | #endif |
| @@ -332,6 +357,8 @@ static struct usb_driver cdc_subset_driver = { | |||
| 332 | .probe = usbnet_probe, | 357 | .probe = usbnet_probe, |
| 333 | .suspend = usbnet_suspend, | 358 | .suspend = usbnet_suspend, |
| 334 | .resume = usbnet_resume, | 359 | .resume = usbnet_resume, |
| 360 | .pre_reset = dummy_prereset, | ||
| 361 | .post_reset = dummy_postreset, | ||
| 335 | .disconnect = usbnet_disconnect, | 362 | .disconnect = usbnet_disconnect, |
| 336 | .id_table = products, | 363 | .id_table = products, |
| 337 | .disable_hub_initiated_lpm = 1, | 364 | .disable_hub_initiated_lpm = 1, |
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 7bad2d316637..3eab74c7c554 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c | |||
| @@ -282,7 +282,7 @@ | |||
| 282 | /* USB_DEV_STAT */ | 282 | /* USB_DEV_STAT */ |
| 283 | #define STAT_SPEED_MASK 0x0006 | 283 | #define STAT_SPEED_MASK 0x0006 |
| 284 | #define STAT_SPEED_HIGH 0x0000 | 284 | #define STAT_SPEED_HIGH 0x0000 |
| 285 | #define STAT_SPEED_FULL 0x0001 | 285 | #define STAT_SPEED_FULL 0x0002 |
| 286 | 286 | ||
| 287 | /* USB_TX_AGG */ | 287 | /* USB_TX_AGG */ |
| 288 | #define TX_AGG_MAX_THRESHOLD 0x03 | 288 | #define TX_AGG_MAX_THRESHOLD 0x03 |
| @@ -2292,9 +2292,8 @@ static void r8152b_exit_oob(struct r8152 *tp) | |||
| 2292 | /* rx share fifo credit full threshold */ | 2292 | /* rx share fifo credit full threshold */ |
| 2293 | ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL0, RXFIFO_THR1_NORMAL); | 2293 | ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL0, RXFIFO_THR1_NORMAL); |
| 2294 | 2294 | ||
| 2295 | ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_DEV_STAT); | 2295 | if (tp->udev->speed == USB_SPEED_FULL || |
| 2296 | ocp_data &= STAT_SPEED_MASK; | 2296 | tp->udev->speed == USB_SPEED_LOW) { |
| 2297 | if (ocp_data == STAT_SPEED_FULL) { | ||
| 2298 | /* rx share fifo credit near full threshold */ | 2297 | /* rx share fifo credit near full threshold */ |
| 2299 | ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL1, | 2298 | ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL1, |
| 2300 | RXFIFO_THR2_FULL); | 2299 | RXFIFO_THR2_FULL); |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index f9e96c427558..5173821a9575 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
| @@ -1218,8 +1218,12 @@ void usbnet_tx_timeout (struct net_device *net) | |||
| 1218 | 1218 | ||
| 1219 | unlink_urbs (dev, &dev->txq); | 1219 | unlink_urbs (dev, &dev->txq); |
| 1220 | tasklet_schedule (&dev->bh); | 1220 | tasklet_schedule (&dev->bh); |
| 1221 | 1221 | /* this needs to be handled individually because the generic layer | |
| 1222 | // FIXME: device recovery -- reset? | 1222 | * doesn't know what is sufficient and could not restore private |
| 1223 | * information if a remedy of an unconditional reset were used. | ||
| 1224 | */ | ||
| 1225 | if (dev->driver_info->recover) | ||
| 1226 | (dev->driver_info->recover)(dev); | ||
| 1223 | } | 1227 | } |
| 1224 | EXPORT_SYMBOL_GPL(usbnet_tx_timeout); | 1228 | EXPORT_SYMBOL_GPL(usbnet_tx_timeout); |
| 1225 | 1229 | ||
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index ade33ef82823..9f79192c9aa0 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
| @@ -339,7 +339,7 @@ static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan, | |||
| 339 | ndm->ndm_state = fdb->state; | 339 | ndm->ndm_state = fdb->state; |
| 340 | ndm->ndm_ifindex = vxlan->dev->ifindex; | 340 | ndm->ndm_ifindex = vxlan->dev->ifindex; |
| 341 | ndm->ndm_flags = fdb->flags; | 341 | ndm->ndm_flags = fdb->flags; |
| 342 | ndm->ndm_type = NDA_DST; | 342 | ndm->ndm_type = RTN_UNICAST; |
| 343 | 343 | ||
| 344 | if (send_eth && nla_put(skb, NDA_LLADDR, ETH_ALEN, &fdb->eth_addr)) | 344 | if (send_eth && nla_put(skb, NDA_LLADDR, ETH_ALEN, &fdb->eth_addr)) |
| 345 | goto nla_put_failure; | 345 | goto nla_put_failure; |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 66acb2cbd9df..7c28cb55610b 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
| @@ -887,6 +887,15 @@ ath_tx_get_tid_subframe(struct ath_softc *sc, struct ath_txq *txq, | |||
| 887 | 887 | ||
| 888 | tx_info = IEEE80211_SKB_CB(skb); | 888 | tx_info = IEEE80211_SKB_CB(skb); |
| 889 | tx_info->flags &= ~IEEE80211_TX_CTL_CLEAR_PS_FILT; | 889 | tx_info->flags &= ~IEEE80211_TX_CTL_CLEAR_PS_FILT; |
| 890 | |||
| 891 | /* | ||
| 892 | * No aggregation session is running, but there may be frames | ||
| 893 | * from a previous session or a failed attempt in the queue. | ||
| 894 | * Send them out as normal data frames | ||
| 895 | */ | ||
| 896 | if (!tid->active) | ||
| 897 | tx_info->flags &= ~IEEE80211_TX_CTL_AMPDU; | ||
| 898 | |||
| 890 | if (!(tx_info->flags & IEEE80211_TX_CTL_AMPDU)) { | 899 | if (!(tx_info->flags & IEEE80211_TX_CTL_AMPDU)) { |
| 891 | bf->bf_state.bf_type = 0; | 900 | bf->bf_state.bf_type = 0; |
| 892 | return bf; | 901 | return bf; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c index 725ba49576bf..8b79081d4885 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | |||
| @@ -1072,8 +1072,12 @@ static int iwl_mvm_mac_ctxt_cmd_ap(struct iwl_mvm *mvm, | |||
| 1072 | /* Fill the common data for all mac context types */ | 1072 | /* Fill the common data for all mac context types */ |
| 1073 | iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action); | 1073 | iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action); |
| 1074 | 1074 | ||
| 1075 | /* Also enable probe requests to pass */ | 1075 | /* |
| 1076 | cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_PROBE_REQUEST); | 1076 | * pass probe requests and beacons from other APs (needed |
| 1077 | * for ht protection) | ||
| 1078 | */ | ||
| 1079 | cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_PROBE_REQUEST | | ||
| 1080 | MAC_FILTER_IN_BEACON); | ||
| 1077 | 1081 | ||
| 1078 | /* Fill the data specific for ap mode */ | 1082 | /* Fill the data specific for ap mode */ |
| 1079 | iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd.ap, | 1083 | iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd.ap, |
| @@ -1094,6 +1098,13 @@ static int iwl_mvm_mac_ctxt_cmd_go(struct iwl_mvm *mvm, | |||
| 1094 | /* Fill the common data for all mac context types */ | 1098 | /* Fill the common data for all mac context types */ |
| 1095 | iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action); | 1099 | iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, action); |
| 1096 | 1100 | ||
| 1101 | /* | ||
| 1102 | * pass probe requests and beacons from other APs (needed | ||
| 1103 | * for ht protection) | ||
| 1104 | */ | ||
| 1105 | cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_PROBE_REQUEST | | ||
| 1106 | MAC_FILTER_IN_BEACON); | ||
| 1107 | |||
| 1097 | /* Fill the data specific for GO mode */ | 1108 | /* Fill the data specific for GO mode */ |
| 1098 | iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd.go.ap, | 1109 | iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd.go.ap, |
| 1099 | action == FW_CTXT_ACTION_ADD); | 1110 | action == FW_CTXT_ACTION_ADD); |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 9bfb90680cdc..98556d03c1ed 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
| @@ -303,13 +303,6 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) | |||
| 303 | hw->uapsd_max_sp_len = IWL_UAPSD_MAX_SP; | 303 | hw->uapsd_max_sp_len = IWL_UAPSD_MAX_SP; |
| 304 | } | 304 | } |
| 305 | 305 | ||
| 306 | if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT && | ||
| 307 | !iwlwifi_mod_params.uapsd_disable) { | ||
| 308 | hw->flags |= IEEE80211_HW_SUPPORTS_UAPSD; | ||
| 309 | hw->uapsd_queues = IWL_UAPSD_AC_INFO; | ||
| 310 | hw->uapsd_max_sp_len = IWL_UAPSD_MAX_SP; | ||
| 311 | } | ||
| 312 | |||
| 313 | hw->sta_data_size = sizeof(struct iwl_mvm_sta); | 306 | hw->sta_data_size = sizeof(struct iwl_mvm_sta); |
| 314 | hw->vif_data_size = sizeof(struct iwl_mvm_vif); | 307 | hw->vif_data_size = sizeof(struct iwl_mvm_vif); |
| 315 | hw->chanctx_data_size = sizeof(u16); | 308 | hw->chanctx_data_size = sizeof(u16); |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 0662e98fef72..26088feb6608 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
| @@ -148,6 +148,9 @@ struct driver_info { | |||
| 148 | struct sk_buff *(*tx_fixup)(struct usbnet *dev, | 148 | struct sk_buff *(*tx_fixup)(struct usbnet *dev, |
| 149 | struct sk_buff *skb, gfp_t flags); | 149 | struct sk_buff *skb, gfp_t flags); |
| 150 | 150 | ||
| 151 | /* recover from timeout */ | ||
| 152 | void (*recover)(struct usbnet *dev); | ||
| 153 | |||
| 151 | /* early initialization code, can sleep. This is for minidrivers | 154 | /* early initialization code, can sleep. This is for minidrivers |
| 152 | * having 'subminidrivers' that need to do extra initialization | 155 | * having 'subminidrivers' that need to do extra initialization |
| 153 | * right after minidriver have initialized hardware. */ | 156 | * right after minidriver have initialized hardware. */ |
diff --git a/include/net/ip.h b/include/net/ip.h index 0e795df05ec9..7596eb22e1ce 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
| @@ -309,16 +309,7 @@ static inline unsigned int ip_skb_dst_mtu(const struct sk_buff *skb) | |||
| 309 | } | 309 | } |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | #define IP_IDENTS_SZ 2048u | 312 | u32 ip_idents_reserve(u32 hash, int segs); |
| 313 | extern atomic_t *ip_idents; | ||
| 314 | |||
| 315 | static inline u32 ip_idents_reserve(u32 hash, int segs) | ||
| 316 | { | ||
| 317 | atomic_t *id_ptr = ip_idents + hash % IP_IDENTS_SZ; | ||
| 318 | |||
| 319 | return atomic_add_return(segs, id_ptr) - segs; | ||
| 320 | } | ||
| 321 | |||
| 322 | void __ip_select_ident(struct iphdr *iph, int segs); | 313 | void __ip_select_ident(struct iphdr *iph, int segs); |
| 323 | 314 | ||
| 324 | static inline void ip_select_ident_segs(struct sk_buff *skb, struct sock *sk, int segs) | 315 | static inline void ip_select_ident_segs(struct sk_buff *skb, struct sock *sk, int segs) |
diff --git a/net/compat.c b/net/compat.c index 9a76eaf63184..bc8aeefddf3f 100644 --- a/net/compat.c +++ b/net/compat.c | |||
| @@ -85,7 +85,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, | |||
| 85 | { | 85 | { |
| 86 | int tot_len; | 86 | int tot_len; |
| 87 | 87 | ||
| 88 | if (kern_msg->msg_namelen) { | 88 | if (kern_msg->msg_name && kern_msg->msg_namelen) { |
| 89 | if (mode == VERIFY_READ) { | 89 | if (mode == VERIFY_READ) { |
| 90 | int err = move_addr_to_kernel(kern_msg->msg_name, | 90 | int err = move_addr_to_kernel(kern_msg->msg_name, |
| 91 | kern_msg->msg_namelen, | 91 | kern_msg->msg_namelen, |
| @@ -93,10 +93,11 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, | |||
| 93 | if (err < 0) | 93 | if (err < 0) |
| 94 | return err; | 94 | return err; |
| 95 | } | 95 | } |
| 96 | if (kern_msg->msg_name) | 96 | kern_msg->msg_name = kern_address; |
| 97 | kern_msg->msg_name = kern_address; | 97 | } else { |
| 98 | } else | ||
| 99 | kern_msg->msg_name = NULL; | 98 | kern_msg->msg_name = NULL; |
| 99 | kern_msg->msg_namelen = 0; | ||
| 100 | } | ||
| 100 | 101 | ||
| 101 | tot_len = iov_from_user_compat_to_kern(kern_iov, | 102 | tot_len = iov_from_user_compat_to_kern(kern_iov, |
| 102 | (struct compat_iovec __user *)kern_msg->msg_iov, | 103 | (struct compat_iovec __user *)kern_msg->msg_iov, |
diff --git a/net/core/iovec.c b/net/core/iovec.c index 827dd6beb49c..e1ec45ab1e63 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c | |||
| @@ -39,7 +39,7 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *a | |||
| 39 | { | 39 | { |
| 40 | int size, ct, err; | 40 | int size, ct, err; |
| 41 | 41 | ||
| 42 | if (m->msg_namelen) { | 42 | if (m->msg_name && m->msg_namelen) { |
| 43 | if (mode == VERIFY_READ) { | 43 | if (mode == VERIFY_READ) { |
| 44 | void __user *namep; | 44 | void __user *namep; |
| 45 | namep = (void __user __force *) m->msg_name; | 45 | namep = (void __user __force *) m->msg_name; |
| @@ -48,10 +48,10 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *a | |||
| 48 | if (err < 0) | 48 | if (err < 0) |
| 49 | return err; | 49 | return err; |
| 50 | } | 50 | } |
| 51 | if (m->msg_name) | 51 | m->msg_name = address; |
| 52 | m->msg_name = address; | ||
| 53 | } else { | 52 | } else { |
| 54 | m->msg_name = NULL; | 53 | m->msg_name = NULL; |
| 54 | m->msg_namelen = 0; | ||
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | size = m->msg_iovlen * sizeof(struct iovec); | 57 | size = m->msg_iovlen * sizeof(struct iovec); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 559890b0f0a2..ef31fef25e5a 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
| @@ -2249,7 +2249,7 @@ static int pneigh_fill_info(struct sk_buff *skb, struct pneigh_entry *pn, | |||
| 2249 | ndm->ndm_pad1 = 0; | 2249 | ndm->ndm_pad1 = 0; |
| 2250 | ndm->ndm_pad2 = 0; | 2250 | ndm->ndm_pad2 = 0; |
| 2251 | ndm->ndm_flags = pn->flags | NTF_PROXY; | 2251 | ndm->ndm_flags = pn->flags | NTF_PROXY; |
| 2252 | ndm->ndm_type = NDA_DST; | 2252 | ndm->ndm_type = RTN_UNICAST; |
| 2253 | ndm->ndm_ifindex = pn->dev->ifindex; | 2253 | ndm->ndm_ifindex = pn->dev->ifindex; |
| 2254 | ndm->ndm_state = NUD_NONE; | 2254 | ndm->ndm_state = NUD_NONE; |
| 2255 | 2255 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 3162ea923ded..190199851c9a 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
| @@ -457,8 +457,31 @@ static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst, | |||
| 457 | return neigh_create(&arp_tbl, pkey, dev); | 457 | return neigh_create(&arp_tbl, pkey, dev); |
| 458 | } | 458 | } |
| 459 | 459 | ||
| 460 | atomic_t *ip_idents __read_mostly; | 460 | #define IP_IDENTS_SZ 2048u |
| 461 | EXPORT_SYMBOL(ip_idents); | 461 | struct ip_ident_bucket { |
| 462 | atomic_t id; | ||
| 463 | u32 stamp32; | ||
| 464 | }; | ||
| 465 | |||
| 466 | static struct ip_ident_bucket *ip_idents __read_mostly; | ||
| 467 | |||
| 468 | /* In order to protect privacy, we add a perturbation to identifiers | ||
| 469 | * if one generator is seldom used. This makes hard for an attacker | ||
| 470 | * to infer how many packets were sent between two points in time. | ||
| 471 | */ | ||
| 472 | u32 ip_idents_reserve(u32 hash, int segs) | ||
| 473 | { | ||
| 474 | struct ip_ident_bucket *bucket = ip_idents + hash % IP_IDENTS_SZ; | ||
| 475 | u32 old = ACCESS_ONCE(bucket->stamp32); | ||
| 476 | u32 now = (u32)jiffies; | ||
| 477 | u32 delta = 0; | ||
| 478 | |||
| 479 | if (old != now && cmpxchg(&bucket->stamp32, old, now) == old) | ||
| 480 | delta = prandom_u32_max(now - old); | ||
| 481 | |||
| 482 | return atomic_add_return(segs + delta, &bucket->id) - segs; | ||
| 483 | } | ||
| 484 | EXPORT_SYMBOL(ip_idents_reserve); | ||
| 462 | 485 | ||
| 463 | void __ip_select_ident(struct iphdr *iph, int segs) | 486 | void __ip_select_ident(struct iphdr *iph, int segs) |
| 464 | { | 487 | { |
| @@ -467,7 +490,10 @@ void __ip_select_ident(struct iphdr *iph, int segs) | |||
| 467 | 490 | ||
| 468 | net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd)); | 491 | net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd)); |
| 469 | 492 | ||
| 470 | hash = jhash_1word((__force u32)iph->daddr, ip_idents_hashrnd); | 493 | hash = jhash_3words((__force u32)iph->daddr, |
| 494 | (__force u32)iph->saddr, | ||
| 495 | iph->protocol, | ||
| 496 | ip_idents_hashrnd); | ||
| 471 | id = ip_idents_reserve(hash, segs); | 497 | id = ip_idents_reserve(hash, segs); |
| 472 | iph->id = htons(id); | 498 | iph->id = htons(id); |
| 473 | } | 499 | } |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index cb9df0eb4023..45702b8cd141 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
| @@ -545,6 +545,8 @@ static void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt) | |||
| 545 | net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd)); | 545 | net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd)); |
| 546 | 546 | ||
| 547 | hash = __ipv6_addr_jhash(&rt->rt6i_dst.addr, ip6_idents_hashrnd); | 547 | hash = __ipv6_addr_jhash(&rt->rt6i_dst.addr, ip6_idents_hashrnd); |
| 548 | hash = __ipv6_addr_jhash(&rt->rt6i_src.addr, hash); | ||
| 549 | |||
| 548 | id = ip_idents_reserve(hash, 1); | 550 | id = ip_idents_reserve(hash, 1); |
| 549 | fhdr->identification = htonl(id); | 551 | fhdr->identification = htonl(id); |
| 550 | } | 552 | } |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index d7513a503be1..592f4b152ba8 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
| @@ -472,12 +472,15 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo) | |||
| 472 | { | 472 | { |
| 473 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 473 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
| 474 | struct ieee80211_local *local = sdata->local; | 474 | struct ieee80211_local *local = sdata->local; |
| 475 | struct rate_control_ref *ref = local->rate_ctrl; | 475 | struct rate_control_ref *ref = NULL; |
| 476 | struct timespec uptime; | 476 | struct timespec uptime; |
| 477 | u64 packets = 0; | 477 | u64 packets = 0; |
| 478 | u32 thr = 0; | 478 | u32 thr = 0; |
| 479 | int i, ac; | 479 | int i, ac; |
| 480 | 480 | ||
| 481 | if (test_sta_flag(sta, WLAN_STA_RATE_CONTROL)) | ||
| 482 | ref = local->rate_ctrl; | ||
| 483 | |||
| 481 | sinfo->generation = sdata->local->sta_generation; | 484 | sinfo->generation = sdata->local->sta_generation; |
| 482 | 485 | ||
| 483 | sinfo->filled = STATION_INFO_INACTIVE_TIME | | 486 | sinfo->filled = STATION_INFO_INACTIVE_TIME | |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 5214686d9fd1..1a252c606ad0 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
| @@ -414,6 +414,9 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx) | |||
| 414 | if (ieee80211_has_order(hdr->frame_control)) | 414 | if (ieee80211_has_order(hdr->frame_control)) |
| 415 | return TX_CONTINUE; | 415 | return TX_CONTINUE; |
| 416 | 416 | ||
| 417 | if (ieee80211_is_probe_req(hdr->frame_control)) | ||
| 418 | return TX_CONTINUE; | ||
| 419 | |||
| 417 | if (tx->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL) | 420 | if (tx->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL) |
| 418 | info->hw_queue = tx->sdata->vif.cab_queue; | 421 | info->hw_queue = tx->sdata->vif.cab_queue; |
| 419 | 422 | ||
| @@ -463,6 +466,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
| 463 | { | 466 | { |
| 464 | struct sta_info *sta = tx->sta; | 467 | struct sta_info *sta = tx->sta; |
| 465 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); | 468 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); |
| 469 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; | ||
| 466 | struct ieee80211_local *local = tx->local; | 470 | struct ieee80211_local *local = tx->local; |
| 467 | 471 | ||
| 468 | if (unlikely(!sta)) | 472 | if (unlikely(!sta)) |
| @@ -473,6 +477,12 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
| 473 | !(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER))) { | 477 | !(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER))) { |
| 474 | int ac = skb_get_queue_mapping(tx->skb); | 478 | int ac = skb_get_queue_mapping(tx->skb); |
| 475 | 479 | ||
| 480 | if (ieee80211_is_mgmt(hdr->frame_control) && | ||
| 481 | !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) { | ||
| 482 | info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER; | ||
| 483 | return TX_CONTINUE; | ||
| 484 | } | ||
| 485 | |||
| 476 | ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n", | 486 | ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n", |
| 477 | sta->sta.addr, sta->sta.aid, ac); | 487 | sta->sta.addr, sta->sta.aid, ac); |
| 478 | if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) | 488 | if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) |
| @@ -531,19 +541,9 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
| 531 | static ieee80211_tx_result debug_noinline | 541 | static ieee80211_tx_result debug_noinline |
| 532 | ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx) | 542 | ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx) |
| 533 | { | 543 | { |
| 534 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); | ||
| 535 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; | ||
| 536 | |||
| 537 | if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED)) | 544 | if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED)) |
| 538 | return TX_CONTINUE; | 545 | return TX_CONTINUE; |
| 539 | 546 | ||
| 540 | if (ieee80211_is_mgmt(hdr->frame_control) && | ||
| 541 | !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) { | ||
| 542 | if (tx->flags & IEEE80211_TX_UNICAST) | ||
| 543 | info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER; | ||
| 544 | return TX_CONTINUE; | ||
| 545 | } | ||
| 546 | |||
| 547 | if (tx->flags & IEEE80211_TX_UNICAST) | 547 | if (tx->flags & IEEE80211_TX_UNICAST) |
| 548 | return ieee80211_tx_h_unicast_ps_buf(tx); | 548 | return ieee80211_tx_h_unicast_ps_buf(tx); |
| 549 | else | 549 | else |
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index a8eb0a89326a..610e19c0e13f 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c | |||
| @@ -797,7 +797,6 @@ static void ip_vs_conn_expire(unsigned long data) | |||
| 797 | ip_vs_control_del(cp); | 797 | ip_vs_control_del(cp); |
| 798 | 798 | ||
| 799 | if (cp->flags & IP_VS_CONN_F_NFCT) { | 799 | if (cp->flags & IP_VS_CONN_F_NFCT) { |
| 800 | ip_vs_conn_drop_conntrack(cp); | ||
| 801 | /* Do not access conntracks during subsys cleanup | 800 | /* Do not access conntracks during subsys cleanup |
| 802 | * because nf_conntrack_find_get can not be used after | 801 | * because nf_conntrack_find_get can not be used after |
| 803 | * conntrack cleanup for the net. | 802 | * conntrack cleanup for the net. |
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 9de23a222d3f..06a9ee6b2d3a 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
| @@ -1097,6 +1097,7 @@ void sctp_assoc_update(struct sctp_association *asoc, | |||
| 1097 | asoc->c = new->c; | 1097 | asoc->c = new->c; |
| 1098 | asoc->peer.rwnd = new->peer.rwnd; | 1098 | asoc->peer.rwnd = new->peer.rwnd; |
| 1099 | asoc->peer.sack_needed = new->peer.sack_needed; | 1099 | asoc->peer.sack_needed = new->peer.sack_needed; |
| 1100 | asoc->peer.auth_capable = new->peer.auth_capable; | ||
| 1100 | asoc->peer.i = new->peer.i; | 1101 | asoc->peer.i = new->peer.i; |
| 1101 | sctp_tsnmap_init(&asoc->peer.tsn_map, SCTP_TSN_MAP_INITIAL, | 1102 | sctp_tsnmap_init(&asoc->peer.tsn_map, SCTP_TSN_MAP_INITIAL, |
| 1102 | asoc->peer.i.initial_tsn, GFP_ATOMIC); | 1103 | asoc->peer.i.initial_tsn, GFP_ATOMIC); |
diff --git a/net/wireless/trace.h b/net/wireless/trace.h index 560ed77084e9..7cc887f9da11 100644 --- a/net/wireless/trace.h +++ b/net/wireless/trace.h | |||
| @@ -2094,7 +2094,8 @@ TRACE_EVENT(cfg80211_michael_mic_failure, | |||
| 2094 | MAC_ASSIGN(addr, addr); | 2094 | MAC_ASSIGN(addr, addr); |
| 2095 | __entry->key_type = key_type; | 2095 | __entry->key_type = key_type; |
| 2096 | __entry->key_id = key_id; | 2096 | __entry->key_id = key_id; |
| 2097 | memcpy(__entry->tsc, tsc, 6); | 2097 | if (tsc) |
| 2098 | memcpy(__entry->tsc, tsc, 6); | ||
| 2098 | ), | 2099 | ), |
| 2099 | TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm", | 2100 | TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm", |
| 2100 | NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type, | 2101 | NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type, |
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index a8ef5108e0d8..0525d78ba328 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
| @@ -2097,6 +2097,8 @@ struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig, | |||
| 2097 | goto no_transform; | 2097 | goto no_transform; |
| 2098 | } | 2098 | } |
| 2099 | 2099 | ||
| 2100 | dst_hold(&xdst->u.dst); | ||
| 2101 | xdst->u.dst.flags |= DST_NOCACHE; | ||
| 2100 | route = xdst->route; | 2102 | route = xdst->route; |
| 2101 | } | 2103 | } |
| 2102 | } | 2104 | } |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 412d9dc3a873..d4db6ebb089d 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
| @@ -177,9 +177,7 @@ static int verify_newsa_info(struct xfrm_usersa_info *p, | |||
| 177 | attrs[XFRMA_ALG_AEAD] || | 177 | attrs[XFRMA_ALG_AEAD] || |
| 178 | attrs[XFRMA_ALG_CRYPT] || | 178 | attrs[XFRMA_ALG_CRYPT] || |
| 179 | attrs[XFRMA_ALG_COMP] || | 179 | attrs[XFRMA_ALG_COMP] || |
| 180 | attrs[XFRMA_TFCPAD] || | 180 | attrs[XFRMA_TFCPAD]) |
| 181 | (ntohl(p->id.spi) >= 0x10000)) | ||
| 182 | |||
| 183 | goto out; | 181 | goto out; |
| 184 | break; | 182 | break; |
| 185 | 183 | ||
| @@ -207,7 +205,8 @@ static int verify_newsa_info(struct xfrm_usersa_info *p, | |||
| 207 | attrs[XFRMA_ALG_AUTH] || | 205 | attrs[XFRMA_ALG_AUTH] || |
| 208 | attrs[XFRMA_ALG_AUTH_TRUNC] || | 206 | attrs[XFRMA_ALG_AUTH_TRUNC] || |
| 209 | attrs[XFRMA_ALG_CRYPT] || | 207 | attrs[XFRMA_ALG_CRYPT] || |
| 210 | attrs[XFRMA_TFCPAD]) | 208 | attrs[XFRMA_TFCPAD] || |
| 209 | (ntohl(p->id.spi) >= 0x10000)) | ||
| 211 | goto out; | 210 | goto out; |
| 212 | break; | 211 | break; |
| 213 | 212 | ||
