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

Configure Feed

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

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
ipv6: Check dest prefix length on original route not copied one in rt6_alloc_cow().
sch_gred: should not use GFP_KERNEL while holding a spinlock
ipip, sit: copy parms.name after register_netdevice
ipv6: Fix for adding multicast route for loopback device automatically.
ssb: fix init regression with SoCs
rtl8192{ce,cu,de,se}: avoid problems because of possible ERFOFF -> ERFSLEEP transition
mac80211: fix another race in aggregation start
fsl_pq_mdio: Clean up tbi address configuration
ppp: fix pptp double release_sock in pptp_bind()
net/fec: fix the use of pdev->id
ath9k: fix check for antenna diversity support
batman-adv: delete global entry in case of roaming
batman-adv: in case of roaming mark the client with TT_CLIENT_ROAM
Bluetooth: Correct version check in hci_setup
btusb: fix a memory leak in btusb_send_frame()
Bluetooth: bnep: Fix module reference
Bluetooth: cmtp: Fix module reference
Bluetooth: btmrvl: support Marvell Bluetooth device SD8797

+130 -129
+3 -3
drivers/bluetooth/Kconfig
··· 188 188 The core driver to support Marvell Bluetooth devices. 189 189 190 190 This driver is required if you want to support 191 - Marvell Bluetooth devices, such as 8688/8787. 191 + Marvell Bluetooth devices, such as 8688/8787/8797. 192 192 193 193 Say Y here to compile Marvell Bluetooth driver 194 194 into the kernel or say M to compile it as module. ··· 201 201 The driver for Marvell Bluetooth chipsets with SDIO interface. 202 202 203 203 This driver is required if you want to use Marvell Bluetooth 204 - devices with SDIO interface. Currently SD8688/SD8787 chipsets are 205 - supported. 204 + devices with SDIO interface. Currently SD8688/SD8787/SD8797 205 + chipsets are supported. 206 206 207 207 Say Y here to compile support for Marvell BT-over-SDIO driver 208 208 into the kernel or say M to compile it as module.
+13 -2
drivers/bluetooth/btmrvl_sdio.c
··· 65 65 .io_port_1 = 0x01, 66 66 .io_port_2 = 0x02, 67 67 }; 68 - static const struct btmrvl_sdio_card_reg btmrvl_reg_8787 = { 68 + static const struct btmrvl_sdio_card_reg btmrvl_reg_87xx = { 69 69 .cfg = 0x00, 70 70 .host_int_mask = 0x02, 71 71 .host_intstatus = 0x03, ··· 92 92 static const struct btmrvl_sdio_device btmrvl_sdio_sd8787 = { 93 93 .helper = NULL, 94 94 .firmware = "mrvl/sd8787_uapsta.bin", 95 - .reg = &btmrvl_reg_8787, 95 + .reg = &btmrvl_reg_87xx, 96 + .sd_blksz_fw_dl = 256, 97 + }; 98 + 99 + static const struct btmrvl_sdio_device btmrvl_sdio_sd8797 = { 100 + .helper = NULL, 101 + .firmware = "mrvl/sd8797_uapsta.bin", 102 + .reg = &btmrvl_reg_87xx, 96 103 .sd_blksz_fw_dl = 256, 97 104 }; 98 105 ··· 110 103 /* Marvell SD8787 Bluetooth device */ 111 104 { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x911A), 112 105 .driver_data = (unsigned long) &btmrvl_sdio_sd8787 }, 106 + /* Marvell SD8797 Bluetooth device */ 107 + { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x912A), 108 + .driver_data = (unsigned long) &btmrvl_sdio_sd8797 }, 113 109 114 110 { } /* Terminating entry */ 115 111 }; ··· 1086 1076 MODULE_FIRMWARE("sd8688_helper.bin"); 1087 1077 MODULE_FIRMWARE("sd8688.bin"); 1088 1078 MODULE_FIRMWARE("mrvl/sd8787_uapsta.bin"); 1079 + MODULE_FIRMWARE("mrvl/sd8797_uapsta.bin");
+1 -2
drivers/bluetooth/btusb.c
··· 777 777 usb_mark_last_busy(data->udev); 778 778 } 779 779 780 - usb_free_urb(urb); 781 - 782 780 done: 781 + usb_free_urb(urb); 783 782 return err; 784 783 } 785 784
+7 -4
drivers/net/ethernet/freescale/fec.c
··· 232 232 struct platform_device *pdev; 233 233 234 234 int opened; 235 + int dev_id; 235 236 236 237 /* Phylib and MDIO interface */ 237 238 struct mii_bus *mii_bus; ··· 838 837 839 838 /* Adjust MAC if using macaddr */ 840 839 if (iap == macaddr) 841 - ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->pdev->id; 840 + ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->dev_id; 842 841 } 843 842 844 843 /* ------------------------------------------------------------------------- */ ··· 954 953 char mdio_bus_id[MII_BUS_ID_SIZE]; 955 954 char phy_name[MII_BUS_ID_SIZE + 3]; 956 955 int phy_id; 957 - int dev_id = fep->pdev->id; 956 + int dev_id = fep->dev_id; 958 957 959 958 fep->phy_dev = NULL; 960 959 ··· 1032 1031 * mdio interface in board design, and need to be configured by 1033 1032 * fec0 mii_bus. 1034 1033 */ 1035 - if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && pdev->id > 0) { 1034 + if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && fep->dev_id > 0) { 1036 1035 /* fec1 uses fec0 mii_bus */ 1037 1036 fep->mii_bus = fec0_mii_bus; 1038 1037 return 0; ··· 1064 1063 fep->mii_bus->read = fec_enet_mdio_read; 1065 1064 fep->mii_bus->write = fec_enet_mdio_write; 1066 1065 fep->mii_bus->reset = fec_enet_mdio_reset; 1067 - snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id + 1); 1066 + snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", fep->dev_id + 1); 1068 1067 fep->mii_bus->priv = fep; 1069 1068 fep->mii_bus->parent = &pdev->dev; 1070 1069 ··· 1522 1521 int i, irq, ret = 0; 1523 1522 struct resource *r; 1524 1523 const struct of_device_id *of_id; 1524 + static int dev_id; 1525 1525 1526 1526 of_id = of_match_device(fec_dt_ids, &pdev->dev); 1527 1527 if (of_id) ··· 1550 1548 1551 1549 fep->hwp = ioremap(r->start, resource_size(r)); 1552 1550 fep->pdev = pdev; 1551 + fep->dev_id = dev_id++; 1553 1552 1554 1553 if (!fep->hwp) { 1555 1554 ret = -ENOMEM;
+8 -45
drivers/net/ethernet/freescale/fsl_pq_mdio.c
··· 183 183 } 184 184 EXPORT_SYMBOL_GPL(fsl_pq_mdio_bus_name); 185 185 186 - /* Scan the bus in reverse, looking for an empty spot */ 187 - static int fsl_pq_mdio_find_free(struct mii_bus *new_bus) 188 - { 189 - int i; 190 186 191 - for (i = PHY_MAX_ADDR; i > 0; i--) { 192 - u32 phy_id; 193 - 194 - if (get_phy_id(new_bus, i, &phy_id)) 195 - return -1; 196 - 197 - if (phy_id == 0xffffffff) 198 - break; 199 - } 200 - 201 - return i; 202 - } 203 - 204 - 205 - #if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE) 206 187 static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs, struct device_node *np) 207 188 { 189 + #if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE) 208 190 struct gfar __iomem *enet_regs; 209 191 210 192 /* ··· 202 220 } else if (of_device_is_compatible(np, "fsl,etsec2-mdio") || 203 221 of_device_is_compatible(np, "fsl,etsec2-tbi")) { 204 222 return of_iomap(np, 1); 205 - } else 206 - return NULL; 207 - } 223 + } 208 224 #endif 225 + return NULL; 226 + } 209 227 210 228 211 - #if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE) 212 229 static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id) 213 230 { 231 + #if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE) 214 232 struct device_node *np = NULL; 215 233 int err = 0; 216 234 ··· 243 261 return err; 244 262 else 245 263 return -EINVAL; 246 - } 264 + #else 265 + return -ENODEV; 247 266 #endif 248 - 267 + } 249 268 250 269 static int fsl_pq_mdio_probe(struct platform_device *ofdev) 251 270 { ··· 322 339 of_device_is_compatible(np, "fsl,etsec2-mdio") || 323 340 of_device_is_compatible(np, "fsl,etsec2-tbi") || 324 341 of_device_is_compatible(np, "gianfar")) { 325 - #if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE) 326 342 tbipa = get_gfar_tbipa(regs, np); 327 343 if (!tbipa) { 328 344 err = -EINVAL; 329 345 goto err_free_irqs; 330 346 } 331 - #else 332 - err = -ENODEV; 333 - goto err_free_irqs; 334 - #endif 335 347 } else if (of_device_is_compatible(np, "fsl,ucc-mdio") || 336 348 of_device_is_compatible(np, "ucc_geth_phy")) { 337 - #if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE) 338 349 u32 id; 339 350 static u32 mii_mng_master; 340 351 ··· 341 364 mii_mng_master = id; 342 365 ucc_set_qe_mux_mii_mng(id - 1); 343 366 } 344 - #else 345 - err = -ENODEV; 346 - goto err_free_irqs; 347 - #endif 348 367 } else { 349 368 err = -ENODEV; 350 369 goto err_free_irqs; ··· 359 386 } 360 387 361 388 if (tbiaddr == -1) { 362 - out_be32(tbipa, 0); 363 - 364 - tbiaddr = fsl_pq_mdio_find_free(new_bus); 365 - } 366 - 367 - /* 368 - * We define TBIPA at 0 to be illegal, opting to fail for boards that 369 - * have PHYs at 1-31, rather than change tbipa and rescan. 370 - */ 371 - if (tbiaddr == 0) { 372 389 err = -EBUSY; 373 390 374 391 goto err_free_irqs;
+1 -3
drivers/net/ppp/pptp.c
··· 423 423 lock_sock(sk); 424 424 425 425 opt->src_addr = sp->sa_addr.pptp; 426 - if (add_chan(po)) { 427 - release_sock(sk); 426 + if (add_chan(po)) 428 427 error = -EBUSY; 429 - } 430 428 431 429 release_sock(sk); 432 430 return error;
+1 -1
drivers/net/wireless/ath/ath9k/main.c
··· 286 286 ath_start_ani(common); 287 287 } 288 288 289 - if (ath9k_hw_ops(ah)->antdiv_comb_conf_get && sc->ant_rx != 3) { 289 + if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx != 3) { 290 290 struct ath_hw_antcomb_conf div_ant_conf; 291 291 u8 lna_conf; 292 292
+1 -1
drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
··· 569 569 } 570 570 case ERFSLEEP:{ 571 571 if (ppsc->rfpwr_state == ERFOFF) 572 - break; 572 + return false; 573 573 for (queue_id = 0, i = 0; 574 574 queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { 575 575 ring = &pcipriv->dev.tx_ring[queue_id];
+1 -1
drivers/net/wireless/rtlwifi/rtl8192cu/phy.c
··· 548 548 break; 549 549 case ERFSLEEP: 550 550 if (ppsc->rfpwr_state == ERFOFF) 551 - break; 551 + return false; 552 552 for (queue_id = 0, i = 0; 553 553 queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { 554 554 ring = &pcipriv->dev.tx_ring[queue_id];
+1 -1
drivers/net/wireless/rtlwifi/rtl8192de/phy.c
··· 3374 3374 break; 3375 3375 case ERFSLEEP: 3376 3376 if (ppsc->rfpwr_state == ERFOFF) 3377 - break; 3377 + return false; 3378 3378 3379 3379 for (queue_id = 0, i = 0; 3380 3380 queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
+1 -1
drivers/net/wireless/rtlwifi/rtl8192se/phy.c
··· 602 602 } 603 603 case ERFSLEEP: 604 604 if (ppsc->rfpwr_state == ERFOFF) 605 - break; 605 + return false; 606 606 607 607 for (queue_id = 0, i = 0; 608 608 queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
+6 -2
drivers/ssb/driver_pcicore.c
··· 517 517 518 518 static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc) 519 519 { 520 - ssb_pcicore_fix_sprom_core_index(pc); 520 + struct ssb_device *pdev = pc->dev; 521 + struct ssb_bus *bus = pdev->bus; 522 + 523 + if (bus->bustype == SSB_BUSTYPE_PCI) 524 + ssb_pcicore_fix_sprom_core_index(pc); 521 525 522 526 /* Disable PCI interrupts. */ 523 - ssb_write32(pc->dev, SSB_INTVEC, 0); 527 + ssb_write32(pdev, SSB_INTVEC, 0); 524 528 525 529 /* Additional PCIe always once-executed workarounds */ 526 530 if (pc->dev->id.coreid == SSB_DEV_PCIE) {
+22 -5
net/batman-adv/translation-table.c
··· 245 245 if (tt_global_entry) { 246 246 /* This node is probably going to update its tt table */ 247 247 tt_global_entry->orig_node->tt_poss_change = true; 248 - /* The global entry has to be marked as PENDING and has to be 248 + /* The global entry has to be marked as ROAMING and has to be 249 249 * kept for consistency purpose */ 250 - tt_global_entry->flags |= TT_CLIENT_PENDING; 250 + tt_global_entry->flags |= TT_CLIENT_ROAM; 251 + tt_global_entry->roam_at = jiffies; 252 + 251 253 send_roam_adv(bat_priv, tt_global_entry->addr, 252 254 tt_global_entry->orig_node); 253 255 } ··· 696 694 const char *message, bool roaming) 697 695 { 698 696 struct tt_global_entry *tt_global_entry = NULL; 697 + struct tt_local_entry *tt_local_entry = NULL; 699 698 700 699 tt_global_entry = tt_global_hash_find(bat_priv, addr); 701 700 if (!tt_global_entry) ··· 704 701 705 702 if (tt_global_entry->orig_node == orig_node) { 706 703 if (roaming) { 707 - tt_global_entry->flags |= TT_CLIENT_ROAM; 708 - tt_global_entry->roam_at = jiffies; 709 - goto out; 704 + /* if we are deleting a global entry due to a roam 705 + * event, there are two possibilities: 706 + * 1) the client roamed from node A to node B => we mark 707 + * it with TT_CLIENT_ROAM, we start a timer and we 708 + * wait for node B to claim it. In case of timeout 709 + * the entry is purged. 710 + * 2) the client roamed to us => we can directly delete 711 + * the global entry, since it is useless now. */ 712 + tt_local_entry = tt_local_hash_find(bat_priv, 713 + tt_global_entry->addr); 714 + if (!tt_local_entry) { 715 + tt_global_entry->flags |= TT_CLIENT_ROAM; 716 + tt_global_entry->roam_at = jiffies; 717 + goto out; 718 + } 710 719 } 711 720 _tt_global_del(bat_priv, tt_global_entry, message); 712 721 } 713 722 out: 714 723 if (tt_global_entry) 715 724 tt_global_entry_free_ref(tt_global_entry); 725 + if (tt_local_entry) 726 + tt_local_entry_free_ref(tt_local_entry); 716 727 } 717 728 718 729 void tt_global_del_orig(struct bat_priv *bat_priv,
+3 -5
net/bluetooth/bnep/core.c
··· 79 79 80 80 static void __bnep_link_session(struct bnep_session *s) 81 81 { 82 - /* It's safe to call __module_get() here because sessions are added 83 - by the socket layer which has to hold the reference to this module. 84 - */ 85 - __module_get(THIS_MODULE); 86 82 list_add(&s->list, &bnep_session_list); 87 83 } 88 84 89 85 static void __bnep_unlink_session(struct bnep_session *s) 90 86 { 91 87 list_del(&s->list); 92 - module_put(THIS_MODULE); 93 88 } 94 89 95 90 static int bnep_send(struct bnep_session *s, void *data, size_t len) ··· 525 530 526 531 up_write(&bnep_session_sem); 527 532 free_netdev(dev); 533 + module_put_and_exit(0); 528 534 return 0; 529 535 } 530 536 ··· 612 616 613 617 __bnep_link_session(s); 614 618 619 + __module_get(THIS_MODULE); 615 620 s->task = kthread_run(bnep_session, s, "kbnepd %s", dev->name); 616 621 if (IS_ERR(s->task)) { 617 622 /* Session thread start failed, gotta cleanup. */ 623 + module_put(THIS_MODULE); 618 624 unregister_netdev(dev); 619 625 __bnep_unlink_session(s); 620 626 err = PTR_ERR(s->task);
+3 -2
net/bluetooth/cmtp/core.c
··· 67 67 68 68 static void __cmtp_link_session(struct cmtp_session *session) 69 69 { 70 - __module_get(THIS_MODULE); 71 70 list_add(&session->list, &cmtp_session_list); 72 71 } 73 72 74 73 static void __cmtp_unlink_session(struct cmtp_session *session) 75 74 { 76 75 list_del(&session->list); 77 - module_put(THIS_MODULE); 78 76 } 79 77 80 78 static void __cmtp_copy_session(struct cmtp_session *session, struct cmtp_conninfo *ci) ··· 325 327 up_write(&cmtp_session_sem); 326 328 327 329 kfree(session); 330 + module_put_and_exit(0); 328 331 return 0; 329 332 } 330 333 ··· 375 376 376 377 __cmtp_link_session(session); 377 378 379 + __module_get(THIS_MODULE); 378 380 session->task = kthread_run(cmtp_session, session, "kcmtpd_ctr_%d", 379 381 session->num); 380 382 if (IS_ERR(session->task)) { 383 + module_put(THIS_MODULE); 381 384 err = PTR_ERR(session->task); 382 385 goto unlink; 383 386 }
+1 -1
net/bluetooth/hci_event.c
··· 545 545 { 546 546 hci_setup_event_mask(hdev); 547 547 548 - if (hdev->lmp_ver > 1) 548 + if (hdev->hci_ver > 1) 549 549 hci_send_cmd(hdev, HCI_OP_READ_LOCAL_COMMANDS, 0, NULL); 550 550 551 551 if (hdev->features[6] & LMP_SIMPLE_PAIR) {
+6 -1
net/ipv4/ipip.c
··· 285 285 if (register_netdevice(dev) < 0) 286 286 goto failed_free; 287 287 288 + strcpy(nt->parms.name, dev->name); 289 + 288 290 dev_hold(dev); 289 291 ipip_tunnel_link(ipn, nt); 290 292 return nt; ··· 761 759 struct ip_tunnel *tunnel = netdev_priv(dev); 762 760 763 761 tunnel->dev = dev; 764 - strcpy(tunnel->parms.name, dev->name); 765 762 766 763 memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4); 767 764 memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4); ··· 826 825 static int __net_init ipip_init_net(struct net *net) 827 826 { 828 827 struct ipip_net *ipn = net_generic(net, ipip_net_id); 828 + struct ip_tunnel *t; 829 829 int err; 830 830 831 831 ipn->tunnels[0] = ipn->tunnels_wc; ··· 850 848 if ((err = register_netdev(ipn->fb_tunnel_dev))) 851 849 goto err_reg_dev; 852 850 851 + t = netdev_priv(ipn->fb_tunnel_dev); 852 + 853 + strcpy(t->parms.name, ipn->fb_tunnel_dev->name); 853 854 return 0; 854 855 855 856 err_reg_dev:
+2 -1
net/ipv6/addrconf.c
··· 1805 1805 return ERR_PTR(-EACCES); 1806 1806 1807 1807 /* Add default multicast route */ 1808 - addrconf_add_mroute(dev); 1808 + if (!(dev->flags & IFF_LOOPBACK)) 1809 + addrconf_add_mroute(dev); 1809 1810 1810 1811 /* Add link local route */ 1811 1812 addrconf_add_lroute(dev);
+1 -1
net/ipv6/route.c
··· 728 728 int attempts = !in_softirq(); 729 729 730 730 if (!(rt->rt6i_flags&RTF_GATEWAY)) { 731 - if (rt->rt6i_dst.plen != 128 && 731 + if (ort->rt6i_dst.plen != 128 && 732 732 ipv6_addr_equal(&ort->rt6i_dst.addr, daddr)) 733 733 rt->rt6i_flags |= RTF_ANYCAST; 734 734 ipv6_addr_copy(&rt->rt6i_gateway, daddr);
+6 -1
net/ipv6/sit.c
··· 263 263 if (register_netdevice(dev) < 0) 264 264 goto failed_free; 265 265 266 + strcpy(nt->parms.name, dev->name); 267 + 266 268 dev_hold(dev); 267 269 268 270 ipip6_tunnel_link(sitn, nt); ··· 1146 1144 struct ip_tunnel *tunnel = netdev_priv(dev); 1147 1145 1148 1146 tunnel->dev = dev; 1149 - strcpy(tunnel->parms.name, dev->name); 1150 1147 1151 1148 memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4); 1152 1149 memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4); ··· 1208 1207 static int __net_init sit_init_net(struct net *net) 1209 1208 { 1210 1209 struct sit_net *sitn = net_generic(net, sit_net_id); 1210 + struct ip_tunnel *t; 1211 1211 int err; 1212 1212 1213 1213 sitn->tunnels[0] = sitn->tunnels_wc; ··· 1233 1231 if ((err = register_netdev(sitn->fb_tunnel_dev))) 1234 1232 goto err_reg_dev; 1235 1233 1234 + t = netdev_priv(sitn->fb_tunnel_dev); 1235 + 1236 + strcpy(t->parms.name, sitn->fb_tunnel_dev->name); 1236 1237 return 0; 1237 1238 1238 1239 err_reg_dev:
+41 -45
net/mac80211/agg-tx.c
··· 303 303 __release(agg_queue); 304 304 } 305 305 306 + /* 307 + * splice packets from the STA's pending to the local pending, 308 + * requires a call to ieee80211_agg_splice_finish later 309 + */ 310 + static void __acquires(agg_queue) 311 + ieee80211_agg_splice_packets(struct ieee80211_local *local, 312 + struct tid_ampdu_tx *tid_tx, u16 tid) 313 + { 314 + int queue = ieee80211_ac_from_tid(tid); 315 + unsigned long flags; 316 + 317 + ieee80211_stop_queue_agg(local, tid); 318 + 319 + if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates" 320 + " from the pending queue\n", tid)) 321 + return; 322 + 323 + if (!skb_queue_empty(&tid_tx->pending)) { 324 + spin_lock_irqsave(&local->queue_stop_reason_lock, flags); 325 + /* copy over remaining packets */ 326 + skb_queue_splice_tail_init(&tid_tx->pending, 327 + &local->pending[queue]); 328 + spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); 329 + } 330 + } 331 + 332 + static void __releases(agg_queue) 333 + ieee80211_agg_splice_finish(struct ieee80211_local *local, u16 tid) 334 + { 335 + ieee80211_wake_queue_agg(local, tid); 336 + } 337 + 306 338 void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) 307 339 { 308 340 struct tid_ampdu_tx *tid_tx; ··· 346 314 tid_tx = rcu_dereference_protected_tid_tx(sta, tid); 347 315 348 316 /* 349 - * While we're asking the driver about the aggregation, 350 - * stop the AC queue so that we don't have to worry 351 - * about frames that came in while we were doing that, 352 - * which would require us to put them to the AC pending 353 - * afterwards which just makes the code more complex. 317 + * Start queuing up packets for this aggregation session. 318 + * We're going to release them once the driver is OK with 319 + * that. 354 320 */ 355 - ieee80211_stop_queue_agg(local, tid); 356 - 357 321 clear_bit(HT_AGG_STATE_WANT_START, &tid_tx->state); 358 322 359 323 /* 360 - * make sure no packets are being processed to get 361 - * valid starting sequence number 324 + * Make sure no packets are being processed. This ensures that 325 + * we have a valid starting sequence number and that in-flight 326 + * packets have been flushed out and no packets for this TID 327 + * will go into the driver during the ampdu_action call. 362 328 */ 363 329 synchronize_net(); 364 330 ··· 370 340 " tid %d\n", tid); 371 341 #endif 372 342 spin_lock_bh(&sta->lock); 343 + ieee80211_agg_splice_packets(local, tid_tx, tid); 373 344 ieee80211_assign_tid_tx(sta, tid, NULL); 345 + ieee80211_agg_splice_finish(local, tid); 374 346 spin_unlock_bh(&sta->lock); 375 347 376 - ieee80211_wake_queue_agg(local, tid); 377 348 kfree_rcu(tid_tx, rcu_head); 378 349 return; 379 350 } 380 - 381 - /* we can take packets again now */ 382 - ieee80211_wake_queue_agg(local, tid); 383 351 384 352 /* activate the timer for the recipient's addBA response */ 385 353 mod_timer(&tid_tx->addba_resp_timer, jiffies + ADDBA_RESP_INTERVAL); ··· 493 465 return ret; 494 466 } 495 467 EXPORT_SYMBOL(ieee80211_start_tx_ba_session); 496 - 497 - /* 498 - * splice packets from the STA's pending to the local pending, 499 - * requires a call to ieee80211_agg_splice_finish later 500 - */ 501 - static void __acquires(agg_queue) 502 - ieee80211_agg_splice_packets(struct ieee80211_local *local, 503 - struct tid_ampdu_tx *tid_tx, u16 tid) 504 - { 505 - int queue = ieee80211_ac_from_tid(tid); 506 - unsigned long flags; 507 - 508 - ieee80211_stop_queue_agg(local, tid); 509 - 510 - if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates" 511 - " from the pending queue\n", tid)) 512 - return; 513 - 514 - if (!skb_queue_empty(&tid_tx->pending)) { 515 - spin_lock_irqsave(&local->queue_stop_reason_lock, flags); 516 - /* copy over remaining packets */ 517 - skb_queue_splice_tail_init(&tid_tx->pending, 518 - &local->pending[queue]); 519 - spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); 520 - } 521 - } 522 - 523 - static void __releases(agg_queue) 524 - ieee80211_agg_splice_finish(struct ieee80211_local *local, u16 tid) 525 - { 526 - ieee80211_wake_queue_agg(local, tid); 527 - } 528 468 529 469 static void ieee80211_agg_tx_operational(struct ieee80211_local *local, 530 470 struct sta_info *sta, u16 tid)
+1 -1
net/sched/sch_gred.c
··· 385 385 struct gred_sched_data *q; 386 386 387 387 if (table->tab[dp] == NULL) { 388 - table->tab[dp] = kzalloc(sizeof(*q), GFP_KERNEL); 388 + table->tab[dp] = kzalloc(sizeof(*q), GFP_ATOMIC); 389 389 if (table->tab[dp] == NULL) 390 390 return -ENOMEM; 391 391 }