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

Configure Feed

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

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

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (40 commits)
tg3: Fix tg3_skb_error_unmap()
net: tracepoint of net_dev_xmit sees freed skb and causes panic
drivers/net/can/flexcan.c: add missing clk_put
net: dm9000: Get the chip in a known good state before enabling interrupts
drivers/net/davinci_emac.c: add missing clk_put
af-packet: Add flag to distinguish VID 0 from no-vlan.
caif: Fix race when conditionally taking rtnl lock
usbnet/cdc_ncm: add missing .reset_resume hook
vlan: fix typo in vlan_dev_hard_start_xmit()
net/ipv4: Check for mistakenly passed in non-IPv4 address
iwl4965: correctly validate temperature value
bluetooth l2cap: fix locking in l2cap_global_chan_by_psm
ath9k: fix two more bugs in tx power
cfg80211: don't drop p2p probe responses
Revert "net: fix section mismatches"
drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
sctp: stop pending timers and purge queues when peer restart asoc
drivers/net: ks8842 Fix crash on received packet when in PIO mode.
ip_options_compile: properly handle unaligned pointer
iwlagn: fix incorrect PCI subsystem id for 6150 devices
...

+381 -220
+7 -7
drivers/net/3c509.c
··· 185 185 static int nopnp; 186 186 #endif 187 187 188 - static int el3_common_init(struct net_device *dev); 188 + static int __devinit el3_common_init(struct net_device *dev); 189 189 static void el3_common_remove(struct net_device *dev); 190 190 static ushort id_read_eeprom(int index); 191 191 static ushort read_eeprom(int ioaddr, int index); ··· 395 395 static int isa_registered; 396 396 397 397 #ifdef CONFIG_PNP 398 - static const struct pnp_device_id el3_pnp_ids[] __devinitconst = { 398 + static struct pnp_device_id el3_pnp_ids[] = { 399 399 { .id = "TCM5090" }, /* 3Com Etherlink III (TP) */ 400 400 { .id = "TCM5091" }, /* 3Com Etherlink III */ 401 401 { .id = "TCM5094" }, /* 3Com Etherlink III (combo) */ ··· 478 478 #endif /* CONFIG_PNP */ 479 479 480 480 #ifdef CONFIG_EISA 481 - static const struct eisa_device_id el3_eisa_ids[] __devinitconst = { 481 + static struct eisa_device_id el3_eisa_ids[] = { 482 482 { "TCM5090" }, 483 483 { "TCM5091" }, 484 484 { "TCM5092" }, ··· 508 508 #ifdef CONFIG_MCA 509 509 static int el3_mca_probe(struct device *dev); 510 510 511 - static const short el3_mca_adapter_ids[] __devinitconst = { 511 + static short el3_mca_adapter_ids[] __initdata = { 512 512 0x627c, 513 513 0x627d, 514 514 0x62db, ··· 517 517 0x0000 518 518 }; 519 519 520 - static const char *const el3_mca_adapter_names[] __devinitconst = { 520 + static char *el3_mca_adapter_names[] __initdata = { 521 521 "3Com 3c529 EtherLink III (10base2)", 522 522 "3Com 3c529 EtherLink III (10baseT)", 523 523 "3Com 3c529 EtherLink III (test mode)", ··· 601 601 } 602 602 603 603 #ifdef CONFIG_MCA 604 - static int __devinit el3_mca_probe(struct device *device) 604 + static int __init el3_mca_probe(struct device *device) 605 605 { 606 606 /* Based on Erik Nygren's (nygren@mit.edu) 3c529 patch, 607 607 * heavily modified by Chris Beauregard ··· 671 671 #endif /* CONFIG_MCA */ 672 672 673 673 #ifdef CONFIG_EISA 674 - static int __devinit el3_eisa_probe (struct device *device) 674 + static int __init el3_eisa_probe (struct device *device) 675 675 { 676 676 short i; 677 677 int ioaddr, irq, if_port;
+2 -2
drivers/net/3c59x.c
··· 901 901 #endif /* !CONFIG_PM */ 902 902 903 903 #ifdef CONFIG_EISA 904 - static const struct eisa_device_id vortex_eisa_ids[] __devinitconst = { 904 + static struct eisa_device_id vortex_eisa_ids[] = { 905 905 { "TCM5920", CH_3C592 }, 906 906 { "TCM5970", CH_3C597 }, 907 907 { "" } 908 908 }; 909 909 MODULE_DEVICE_TABLE(eisa, vortex_eisa_ids); 910 910 911 - static int __devinit vortex_eisa_probe(struct device *device) 911 + static int __init vortex_eisa_probe(struct device *device) 912 912 { 913 913 void __iomem *ioaddr; 914 914 struct eisa_device *edev;
+2 -3
drivers/net/can/flexcan.c
··· 923 923 mem_size = resource_size(mem); 924 924 if (!request_mem_region(mem->start, mem_size, pdev->name)) { 925 925 err = -EBUSY; 926 - goto failed_req; 926 + goto failed_get; 927 927 } 928 928 929 929 base = ioremap(mem->start, mem_size); ··· 977 977 iounmap(base); 978 978 failed_map: 979 979 release_mem_region(mem->start, mem_size); 980 - failed_req: 981 - clk_put(clk); 982 980 failed_get: 981 + clk_put(clk); 983 982 failed_clock: 984 983 return err; 985 984 }
+6 -4
drivers/net/davinci_emac.c
··· 1781 1781 ndev = alloc_etherdev(sizeof(struct emac_priv)); 1782 1782 if (!ndev) { 1783 1783 dev_err(&pdev->dev, "error allocating net_device\n"); 1784 - clk_put(emac_clk); 1785 - return -ENOMEM; 1784 + rc = -ENOMEM; 1785 + goto free_clk; 1786 1786 } 1787 1787 1788 1788 platform_set_drvdata(pdev, ndev); ··· 1796 1796 pdata = pdev->dev.platform_data; 1797 1797 if (!pdata) { 1798 1798 dev_err(&pdev->dev, "no platform data\n"); 1799 - return -ENODEV; 1799 + rc = -ENODEV; 1800 + goto probe_quit; 1800 1801 } 1801 1802 1802 1803 /* MAC addr and PHY mask , RMII enable info from platform_data */ ··· 1930 1929 iounmap(priv->remap_addr); 1931 1930 1932 1931 probe_quit: 1933 - clk_put(emac_clk); 1934 1932 free_netdev(ndev); 1933 + free_clk: 1934 + clk_put(emac_clk); 1935 1935 return rc; 1936 1936 } 1937 1937
+17 -18
drivers/net/depca.c
··· 331 331 "DE422",\ 332 332 ""} 333 333 334 - static const char* const depca_signature[] __devinitconst = DEPCA_SIGNATURE; 334 + static char* __initdata depca_signature[] = DEPCA_SIGNATURE; 335 335 336 336 enum depca_type { 337 337 DEPCA, de100, de101, de200, de201, de202, de210, de212, de422, unknown 338 338 }; 339 339 340 - static const char depca_string[] = "depca"; 340 + static char depca_string[] = "depca"; 341 341 342 342 static int depca_device_remove (struct device *device); 343 343 344 344 #ifdef CONFIG_EISA 345 - static const struct eisa_device_id depca_eisa_ids[] __devinitconst = { 345 + static struct eisa_device_id depca_eisa_ids[] = { 346 346 { "DEC4220", de422 }, 347 347 { "" } 348 348 }; ··· 367 367 #define DE210_ID 0x628d 368 368 #define DE212_ID 0x6def 369 369 370 - static const short depca_mca_adapter_ids[] __devinitconst = { 370 + static short depca_mca_adapter_ids[] = { 371 371 DE210_ID, 372 372 DE212_ID, 373 373 0x0000 374 374 }; 375 375 376 - static const char *depca_mca_adapter_name[] = { 376 + static char *depca_mca_adapter_name[] = { 377 377 "DEC EtherWORKS MC Adapter (DE210)", 378 378 "DEC EtherWORKS MC Adapter (DE212)", 379 379 NULL 380 380 }; 381 381 382 - static const enum depca_type depca_mca_adapter_type[] = { 382 + static enum depca_type depca_mca_adapter_type[] = { 383 383 de210, 384 384 de212, 385 385 0 ··· 541 541 static int load_packet(struct net_device *dev, struct sk_buff *skb); 542 542 static void depca_dbg_open(struct net_device *dev); 543 543 544 - static const u_char de1xx_irq[] __devinitconst = { 2, 3, 4, 5, 7, 9, 0 }; 545 - static const u_char de2xx_irq[] __devinitconst = { 5, 9, 10, 11, 15, 0 }; 546 - static const u_char de422_irq[] __devinitconst = { 5, 9, 10, 11, 0 }; 544 + static u_char de1xx_irq[] __initdata = { 2, 3, 4, 5, 7, 9, 0 }; 545 + static u_char de2xx_irq[] __initdata = { 5, 9, 10, 11, 15, 0 }; 546 + static u_char de422_irq[] __initdata = { 5, 9, 10, 11, 0 }; 547 + static u_char *depca_irq; 547 548 548 549 static int irq; 549 550 static int io; ··· 580 579 .ndo_validate_addr = eth_validate_addr, 581 580 }; 582 581 583 - static int __devinit depca_hw_init (struct net_device *dev, struct device *device) 582 + static int __init depca_hw_init (struct net_device *dev, struct device *device) 584 583 { 585 584 struct depca_private *lp; 586 585 int i, j, offset, netRAM, mem_len, status = 0; ··· 748 747 if (dev->irq < 2) { 749 748 unsigned char irqnum; 750 749 unsigned long irq_mask, delay; 751 - const u_char *depca_irq; 752 750 753 751 irq_mask = probe_irq_on(); 754 752 ··· 770 770 break; 771 771 772 772 default: 773 - depca_irq = NULL; 774 773 break; /* Not reached */ 775 774 } 776 775 ··· 1302 1303 } 1303 1304 } 1304 1305 1305 - static int __devinit depca_common_init (u_long ioaddr, struct net_device **devp) 1306 + static int __init depca_common_init (u_long ioaddr, struct net_device **devp) 1306 1307 { 1307 1308 int status = 0; 1308 1309 ··· 1333 1334 /* 1334 1335 ** Microchannel bus I/O device probe 1335 1336 */ 1336 - static int __devinit depca_mca_probe(struct device *device) 1337 + static int __init depca_mca_probe(struct device *device) 1337 1338 { 1338 1339 unsigned char pos[2]; 1339 1340 unsigned char where; ··· 1457 1458 ** ISA bus I/O device probe 1458 1459 */ 1459 1460 1460 - static void __devinit depca_platform_probe (void) 1461 + static void __init depca_platform_probe (void) 1461 1462 { 1462 1463 int i; 1463 1464 struct platform_device *pldev; ··· 1497 1498 } 1498 1499 } 1499 1500 1500 - static enum depca_type __devinit depca_shmem_probe (ulong *mem_start) 1501 + static enum depca_type __init depca_shmem_probe (ulong *mem_start) 1501 1502 { 1502 1503 u_long mem_base[] = DEPCA_RAM_BASE_ADDRESSES; 1503 1504 enum depca_type adapter = unknown; ··· 1558 1559 */ 1559 1560 1560 1561 #ifdef CONFIG_EISA 1561 - static int __devinit depca_eisa_probe (struct device *device) 1562 + static int __init depca_eisa_probe (struct device *device) 1562 1563 { 1563 1564 enum depca_type adapter = unknown; 1564 1565 struct eisa_device *edev; ··· 1629 1630 ** and Boot (readb) ROM. This will also give us a clue to the network RAM 1630 1631 ** base address. 1631 1632 */ 1632 - static int __devinit DepcaSignature(char *name, u_long base_addr) 1633 + static int __init DepcaSignature(char *name, u_long base_addr) 1633 1634 { 1634 1635 u_int i, j, k; 1635 1636 void __iomem *ptr;
+3 -3
drivers/net/dm9000.c
··· 1157 1157 1158 1158 irqflags |= IRQF_SHARED; 1159 1159 1160 - if (request_irq(dev->irq, dm9000_interrupt, irqflags, dev->name, dev)) 1161 - return -EAGAIN; 1162 - 1163 1160 /* GPIO0 on pre-activate PHY, Reg 1F is not set by reset */ 1164 1161 iow(db, DM9000_GPR, 0); /* REG_1F bit0 activate phyxcer */ 1165 1162 mdelay(1); /* delay needs by DM9000B */ ··· 1164 1167 /* Initialize DM9000 board */ 1165 1168 dm9000_reset(db); 1166 1169 dm9000_init_dm9000(dev); 1170 + 1171 + if (request_irq(dev->irq, dm9000_interrupt, irqflags, dev->name, dev)) 1172 + return -EAGAIN; 1167 1173 1168 1174 /* Init driver variable */ 1169 1175 db->dbug_cnt = 0;
+6 -6
drivers/net/hp100.c
··· 188 188 * variables 189 189 */ 190 190 #ifdef CONFIG_ISA 191 - static const char *const hp100_isa_tbl[] __devinitconst = { 191 + static const char *hp100_isa_tbl[] = { 192 192 "HWPF150", /* HP J2573 rev A */ 193 193 "HWP1950", /* HP J2573 */ 194 194 }; 195 195 #endif 196 196 197 197 #ifdef CONFIG_EISA 198 - static const struct eisa_device_id hp100_eisa_tbl[] __devinitconst = { 198 + static struct eisa_device_id hp100_eisa_tbl[] = { 199 199 { "HWPF180" }, /* HP J2577 rev A */ 200 200 { "HWP1920" }, /* HP 27248B */ 201 201 { "HWP1940" }, /* HP J2577 */ ··· 336 336 } 337 337 338 338 #ifdef CONFIG_ISA 339 - static __devinit int hp100_isa_probe1(struct net_device *dev, int ioaddr) 339 + static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr) 340 340 { 341 341 const char *sig; 342 342 int i; ··· 372 372 * EISA and PCI are handled by device infrastructure. 373 373 */ 374 374 375 - static int __devinit hp100_isa_probe(struct net_device *dev, int addr) 375 + static int __init hp100_isa_probe(struct net_device *dev, int addr) 376 376 { 377 377 int err = -ENODEV; 378 378 ··· 396 396 #endif /* CONFIG_ISA */ 397 397 398 398 #if !defined(MODULE) && defined(CONFIG_ISA) 399 - struct net_device * __devinit hp100_probe(int unit) 399 + struct net_device * __init hp100_probe(int unit) 400 400 { 401 401 struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private)); 402 402 int err; ··· 2843 2843 } 2844 2844 2845 2845 #ifdef CONFIG_EISA 2846 - static int __devinit hp100_eisa_probe (struct device *gendev) 2846 + static int __init hp100_eisa_probe (struct device *gendev) 2847 2847 { 2848 2848 struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private)); 2849 2849 struct eisa_device *edev = to_eisa_device(gendev);
+2 -2
drivers/net/ibmlana.c
··· 895 895 static int ibmlana_io; 896 896 static int startslot; /* counts through slots when probing multiple devices */ 897 897 898 - static const short ibmlana_adapter_ids[] __devinitconst = { 898 + static short ibmlana_adapter_ids[] __initdata = { 899 899 IBM_LANA_ID, 900 900 0x0000 901 901 }; 902 902 903 - static const char *const ibmlana_adapter_names[] __devinitconst = { 903 + static char *ibmlana_adapter_names[] __devinitdata = { 904 904 "IBM LAN Adapter/A", 905 905 NULL 906 906 };
+22 -22
drivers/net/irda/smsc-ircc2.c
··· 222 222 static void smsc_ircc_sir_wait_hw_transmitter_finish(struct smsc_ircc_cb *self); 223 223 224 224 /* Probing */ 225 - static int smsc_ircc_look_for_chips(void); 226 - static const struct smsc_chip * smsc_ircc_probe(unsigned short cfg_base, u8 reg, const struct smsc_chip *chip, char *type); 227 - static int smsc_superio_flat(const struct smsc_chip *chips, unsigned short cfg_base, char *type); 228 - static int smsc_superio_paged(const struct smsc_chip *chips, unsigned short cfg_base, char *type); 229 - static int smsc_superio_fdc(unsigned short cfg_base); 230 - static int smsc_superio_lpc(unsigned short cfg_base); 225 + static int __init smsc_ircc_look_for_chips(void); 226 + static const struct smsc_chip * __init smsc_ircc_probe(unsigned short cfg_base, u8 reg, const struct smsc_chip *chip, char *type); 227 + static int __init smsc_superio_flat(const struct smsc_chip *chips, unsigned short cfg_base, char *type); 228 + static int __init smsc_superio_paged(const struct smsc_chip *chips, unsigned short cfg_base, char *type); 229 + static int __init smsc_superio_fdc(unsigned short cfg_base); 230 + static int __init smsc_superio_lpc(unsigned short cfg_base); 231 231 #ifdef CONFIG_PCI 232 - static int preconfigure_smsc_chip(struct smsc_ircc_subsystem_configuration *conf); 233 - static int preconfigure_through_82801(struct pci_dev *dev, struct smsc_ircc_subsystem_configuration *conf); 234 - static void preconfigure_ali_port(struct pci_dev *dev, 232 + static int __init preconfigure_smsc_chip(struct smsc_ircc_subsystem_configuration *conf); 233 + static int __init preconfigure_through_82801(struct pci_dev *dev, struct smsc_ircc_subsystem_configuration *conf); 234 + static void __init preconfigure_ali_port(struct pci_dev *dev, 235 235 unsigned short port); 236 - static int preconfigure_through_ali(struct pci_dev *dev, struct smsc_ircc_subsystem_configuration *conf); 237 - static int smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg, 236 + static int __init preconfigure_through_ali(struct pci_dev *dev, struct smsc_ircc_subsystem_configuration *conf); 237 + static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg, 238 238 unsigned short ircc_fir, 239 239 unsigned short ircc_sir, 240 240 unsigned char ircc_dma, ··· 366 366 } 367 367 368 368 /* PNP hotplug support */ 369 - static const struct pnp_device_id smsc_ircc_pnp_table[] __devinitconst = { 369 + static const struct pnp_device_id smsc_ircc_pnp_table[] = { 370 370 { .id = "SMCf010", .driver_data = 0 }, 371 371 /* and presumably others */ 372 372 { } ··· 515 515 * Try to open driver instance 516 516 * 517 517 */ 518 - static int __devinit smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u8 dma, u8 irq) 518 + static int __init smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u8 dma, u8 irq) 519 519 { 520 520 struct smsc_ircc_cb *self; 521 521 struct net_device *dev; ··· 2273 2273 } 2274 2274 2275 2275 2276 - static int __devinit smsc_access(unsigned short cfg_base, unsigned char reg) 2276 + static int __init smsc_access(unsigned short cfg_base, unsigned char reg) 2277 2277 { 2278 2278 IRDA_DEBUG(1, "%s\n", __func__); 2279 2279 ··· 2281 2281 return inb(cfg_base) != reg ? -1 : 0; 2282 2282 } 2283 2283 2284 - static const struct smsc_chip * __devinit smsc_ircc_probe(unsigned short cfg_base, u8 reg, const struct smsc_chip *chip, char *type) 2284 + static const struct smsc_chip * __init smsc_ircc_probe(unsigned short cfg_base, u8 reg, const struct smsc_chip *chip, char *type) 2285 2285 { 2286 2286 u8 devid, xdevid, rev; 2287 2287 ··· 2406 2406 #ifdef CONFIG_PCI 2407 2407 #define PCIID_VENDOR_INTEL 0x8086 2408 2408 #define PCIID_VENDOR_ALI 0x10b9 2409 - static const struct smsc_ircc_subsystem_configuration subsystem_configurations[] __devinitconst = { 2409 + static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __initdata = { 2410 2410 /* 2411 2411 * Subsystems needing entries: 2412 2412 * 0x10b9:0x1533 0x103c:0x0850 HP nx9010 family ··· 2532 2532 * (FIR port, SIR port, FIR DMA, FIR IRQ) 2533 2533 * through the chip configuration port. 2534 2534 */ 2535 - static int __devinit preconfigure_smsc_chip(struct 2535 + static int __init preconfigure_smsc_chip(struct 2536 2536 smsc_ircc_subsystem_configuration 2537 2537 *conf) 2538 2538 { ··· 2633 2633 * or Intel 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge. 2634 2634 * They all work the same way! 2635 2635 */ 2636 - static int __devinit preconfigure_through_82801(struct pci_dev *dev, 2636 + static int __init preconfigure_through_82801(struct pci_dev *dev, 2637 2637 struct 2638 2638 smsc_ircc_subsystem_configuration 2639 2639 *conf) ··· 2786 2786 * This is based on reverse-engineering since ALi does not 2787 2787 * provide any data sheet for the 1533 chip. 2788 2788 */ 2789 - static void __devinit preconfigure_ali_port(struct pci_dev *dev, 2789 + static void __init preconfigure_ali_port(struct pci_dev *dev, 2790 2790 unsigned short port) 2791 2791 { 2792 2792 unsigned char reg; ··· 2824 2824 IRDA_MESSAGE("Activated ALi 1533 ISA bridge port 0x%04x.\n", port); 2825 2825 } 2826 2826 2827 - static int __devinit preconfigure_through_ali(struct pci_dev *dev, 2827 + static int __init preconfigure_through_ali(struct pci_dev *dev, 2828 2828 struct 2829 2829 smsc_ircc_subsystem_configuration 2830 2830 *conf) ··· 2837 2837 return preconfigure_smsc_chip(conf); 2838 2838 } 2839 2839 2840 - static int __devinit smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg, 2840 + static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg, 2841 2841 unsigned short ircc_fir, 2842 2842 unsigned short ircc_sir, 2843 2843 unsigned char ircc_dma, ··· 2849 2849 int ret = 0; 2850 2850 2851 2851 for_each_pci_dev(dev) { 2852 - const struct smsc_ircc_subsystem_configuration *conf; 2852 + struct smsc_ircc_subsystem_configuration *conf; 2853 2853 2854 2854 /* 2855 2855 * Cache the subsystem vendor/device:
+1 -1
drivers/net/ks8842.c
··· 661 661 662 662 /* check the status */ 663 663 if ((status & RXSR_VALID) && !(status & RXSR_ERROR)) { 664 - struct sk_buff *skb = netdev_alloc_skb_ip_align(netdev, len); 664 + struct sk_buff *skb = netdev_alloc_skb_ip_align(netdev, len + 3); 665 665 666 666 if (skb) { 667 667
+6 -9
drivers/net/ne3210.c
··· 80 80 81 81 #define NE3210_DEBUG 0x0 82 82 83 - static const unsigned char irq_map[] __devinitconst = 84 - { 15, 12, 11, 10, 9, 7, 5, 3 }; 85 - static const unsigned int shmem_map[] __devinitconst = 86 - { 0xff0, 0xfe0, 0xfff0, 0xd8, 0xffe0, 0xffc0, 0xd0, 0x0 }; 87 - static const char *const ifmap[] __devinitconst = 88 - { "UTP", "?", "BNC", "AUI" }; 89 - static const int ifmap_val[] __devinitconst = { 83 + static unsigned char irq_map[] __initdata = {15, 12, 11, 10, 9, 7, 5, 3}; 84 + static unsigned int shmem_map[] __initdata = {0xff0, 0xfe0, 0xfff0, 0xd8, 0xffe0, 0xffc0, 0xd0, 0x0}; 85 + static const char *ifmap[] __initdata = {"UTP", "?", "BNC", "AUI"}; 86 + static int ifmap_val[] __initdata = { 90 87 IF_PORT_10BASET, 91 88 IF_PORT_UNKNOWN, 92 89 IF_PORT_10BASE2, 93 90 IF_PORT_AUI, 94 91 }; 95 92 96 - static int __devinit ne3210_eisa_probe (struct device *device) 93 + static int __init ne3210_eisa_probe (struct device *device) 97 94 { 98 95 unsigned long ioaddr, phys_mem; 99 96 int i, retval, port_index; ··· 313 316 memcpy_toio(shmem, buf, count); 314 317 } 315 318 316 - static const struct eisa_device_id ne3210_ids[] __devinitconst = { 319 + static struct eisa_device_id ne3210_ids[] = { 317 320 { "EGL0101" }, 318 321 { "NVL1801" }, 319 322 { "" },
+3 -3
drivers/net/smc-mca.c
··· 156 156 { 14, 15 } 157 157 }; 158 158 159 - static const short smc_mca_adapter_ids[] __devinitconst = { 159 + static short smc_mca_adapter_ids[] __initdata = { 160 160 0x61c8, 161 161 0x61c9, 162 162 0x6fc0, ··· 168 168 0x0000 169 169 }; 170 170 171 - static const char *const smc_mca_adapter_names[] __devinitconst = { 171 + static char *smc_mca_adapter_names[] __initdata = { 172 172 "SMC Ethercard PLUS Elite/A BNC/AUI (WD8013EP/A)", 173 173 "SMC Ethercard PLUS Elite/A UTP/AUI (WD8013WP/A)", 174 174 "WD Ethercard PLUS/A (WD8003E/A or WD8003ET/A)", ··· 199 199 #endif 200 200 }; 201 201 202 - static int __devinit ultramca_probe(struct device *gen_dev) 202 + static int __init ultramca_probe(struct device *gen_dev) 203 203 { 204 204 unsigned short ioaddr; 205 205 struct net_device *dev;
+1 -1
drivers/net/tg3.c
··· 5774 5774 dma_unmap_addr(txb, mapping), 5775 5775 skb_headlen(skb), 5776 5776 PCI_DMA_TODEVICE); 5777 - for (i = 0; i <= last; i++) { 5777 + for (i = 0; i < last; i++) { 5778 5778 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; 5779 5779 5780 5780 entry = NEXT_TX(entry);
+1 -1
drivers/net/tokenring/madgemc.c
··· 727 727 return 0; 728 728 } 729 729 730 - static const short madgemc_adapter_ids[] __devinitconst = { 730 + static short madgemc_adapter_ids[] __initdata = { 731 731 0x002d, 732 732 0x0000 733 733 };
+2 -2
drivers/net/tulip/de4x5.c
··· 1995 1995 1996 1996 static u_char de4x5_irq[] = EISA_ALLOWED_IRQ_LIST; 1997 1997 1998 - static int __devinit de4x5_eisa_probe (struct device *gendev) 1998 + static int __init de4x5_eisa_probe (struct device *gendev) 1999 1999 { 2000 2000 struct eisa_device *edev; 2001 2001 u_long iobase; ··· 2097 2097 return 0; 2098 2098 } 2099 2099 2100 - static const struct eisa_device_id de4x5_eisa_ids[] __devinitconst = { 2100 + static struct eisa_device_id de4x5_eisa_ids[] = { 2101 2101 { "DEC4250", 0 }, /* 0 is the board name index... */ 2102 2102 { "" } 2103 2103 };
+1 -1
drivers/net/usb/catc.c
··· 495 495 if (!q->dir && q->buf && q->len) 496 496 memcpy(catc->ctrl_buf, q->buf, q->len); 497 497 498 - if ((status = usb_submit_urb(catc->ctrl_urb, GFP_KERNEL))) 498 + if ((status = usb_submit_urb(catc->ctrl_urb, GFP_ATOMIC))) 499 499 err("submit(ctrl_urb) status %d", status); 500 500 } 501 501
+2 -1
drivers/net/usb/cdc_ncm.c
··· 54 54 #include <linux/usb/usbnet.h> 55 55 #include <linux/usb/cdc.h> 56 56 57 - #define DRIVER_VERSION "24-May-2011" 57 + #define DRIVER_VERSION "01-June-2011" 58 58 59 59 /* CDC NCM subclass 3.2.1 */ 60 60 #define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10 ··· 1234 1234 .disconnect = cdc_ncm_disconnect, 1235 1235 .suspend = usbnet_suspend, 1236 1236 .resume = usbnet_resume, 1237 + .reset_resume = usbnet_resume, 1237 1238 .supports_autosuspend = 1, 1238 1239 }; 1239 1240
-1
drivers/net/wireless/ath/ath9k/Kconfig
··· 26 26 config ATH9K_PCI 27 27 bool "Atheros ath9k PCI/PCIe bus support" 28 28 depends on ATH9K && PCI 29 - default PCI 30 29 ---help--- 31 30 This option enables the PCI bus support in ath9k. 32 31
+1 -1
drivers/net/wireless/ath/ath9k/ar9002_calib.c
··· 829 829 if (AR_SREV_9271(ah)) { 830 830 if (!ar9285_hw_cl_cal(ah, chan)) 831 831 return false; 832 - } else if (AR_SREV_9285_12_OR_LATER(ah)) { 832 + } else if (AR_SREV_9285(ah) && AR_SREV_9285_12_OR_LATER(ah)) { 833 833 if (!ar9285_hw_clc(ah, chan)) 834 834 return false; 835 835 } else {
+8 -2
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
··· 4645 4645 case 1: 4646 4646 break; 4647 4647 case 2: 4648 - scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; 4648 + if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN) 4649 + scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; 4650 + else 4651 + scaledPower = 0; 4649 4652 break; 4650 4653 case 3: 4651 - scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; 4654 + if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN) 4655 + scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; 4656 + else 4657 + scaledPower = 0; 4652 4658 break; 4653 4659 } 4654 4660
+22
drivers/net/wireless/ath/ath9k/ar9003_phy.c
··· 1381 1381 "==== BB update: done ====\n\n"); 1382 1382 } 1383 1383 EXPORT_SYMBOL(ar9003_hw_bb_watchdog_dbg_info); 1384 + 1385 + void ar9003_hw_disable_phy_restart(struct ath_hw *ah) 1386 + { 1387 + u32 val; 1388 + 1389 + /* While receiving unsupported rate frame rx state machine 1390 + * gets into a state 0xb and if phy_restart happens in that 1391 + * state, BB would go hang. If RXSM is in 0xb state after 1392 + * first bb panic, ensure to disable the phy_restart. 1393 + */ 1394 + if (!((MS(ah->bb_watchdog_last_status, 1395 + AR_PHY_WATCHDOG_RX_OFDM_SM) == 0xb) || 1396 + ah->bb_hang_rx_ofdm)) 1397 + return; 1398 + 1399 + ah->bb_hang_rx_ofdm = true; 1400 + val = REG_READ(ah, AR_PHY_RESTART); 1401 + val &= ~AR_PHY_RESTART_ENA; 1402 + 1403 + REG_WRITE(ah, AR_PHY_RESTART, val); 1404 + } 1405 + EXPORT_SYMBOL(ar9003_hw_disable_phy_restart);
+8 -2
drivers/net/wireless/ath/ath9k/eeprom_9287.c
··· 524 524 case 1: 525 525 break; 526 526 case 2: 527 - scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; 527 + if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN) 528 + scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; 529 + else 530 + scaledPower = 0; 528 531 break; 529 532 case 3: 530 - scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; 533 + if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN) 534 + scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; 535 + else 536 + scaledPower = 0; 531 537 break; 532 538 } 533 539 scaledPower = max((u16)0, scaledPower);
+4 -1
drivers/net/wireless/ath/ath9k/hw.c
··· 1555 1555 if (ah->btcoex_hw.enabled) 1556 1556 ath9k_hw_btcoex_enable(ah); 1557 1557 1558 - if (AR_SREV_9300_20_OR_LATER(ah)) 1558 + if (AR_SREV_9300_20_OR_LATER(ah)) { 1559 1559 ar9003_hw_bb_watchdog_config(ah); 1560 + 1561 + ar9003_hw_disable_phy_restart(ah); 1562 + } 1560 1563 1561 1564 ath9k_hw_apply_gpio_override(ah); 1562 1565
+2
drivers/net/wireless/ath/ath9k/hw.h
··· 842 842 843 843 u32 bb_watchdog_last_status; 844 844 u32 bb_watchdog_timeout_ms; /* in ms, 0 to disable */ 845 + u8 bb_hang_rx_ofdm; /* true if bb hang due to rx_ofdm */ 845 846 846 847 unsigned int paprd_target_power; 847 848 unsigned int paprd_training_power; ··· 991 990 void ar9003_hw_bb_watchdog_config(struct ath_hw *ah); 992 991 void ar9003_hw_bb_watchdog_read(struct ath_hw *ah); 993 992 void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah); 993 + void ar9003_hw_disable_phy_restart(struct ath_hw *ah); 994 994 void ar9003_paprd_enable(struct ath_hw *ah, bool val); 995 995 void ar9003_paprd_populate_single_table(struct ath_hw *ah, 996 996 struct ath9k_hw_cal_data *caldata,
+3 -1
drivers/net/wireless/ath/ath9k/main.c
··· 670 670 u32 status = sc->intrstatus; 671 671 u32 rxmask; 672 672 673 - if (status & ATH9K_INT_FATAL) { 673 + if ((status & ATH9K_INT_FATAL) || 674 + (status & ATH9K_INT_BB_WATCHDOG)) { 674 675 ath_reset(sc, true); 675 676 return; 676 677 } ··· 738 737 { 739 738 #define SCHED_INTR ( \ 740 739 ATH9K_INT_FATAL | \ 740 + ATH9K_INT_BB_WATCHDOG | \ 741 741 ATH9K_INT_RXORN | \ 742 742 ATH9K_INT_RXEOL | \ 743 743 ATH9K_INT_RX | \
+2 -1
drivers/net/wireless/ath/ath9k/rc.c
··· 689 689 690 690 if (WLAN_RC_PHY_HT(rate_table->info[rix].phy)) { 691 691 rate->flags |= IEEE80211_TX_RC_MCS; 692 - if (WLAN_RC_PHY_40(rate_table->info[rix].phy)) 692 + if (WLAN_RC_PHY_40(rate_table->info[rix].phy) && 693 + conf_is_ht40(&txrc->hw->conf)) 693 694 rate->flags |= IEEE80211_TX_RC_40_MHZ_WIDTH; 694 695 if (WLAN_RC_PHY_SGI(rate_table->info[rix].phy)) 695 696 rate->flags |= IEEE80211_TX_RC_SHORT_GI;
+1 -1
drivers/net/wireless/b43/phy_n.c
··· 3093 3093 int freq; 3094 3094 bool avoid = false; 3095 3095 u8 length; 3096 - u16 tmp, core, type, count, max, numb, last, cmd; 3096 + u16 tmp, core, type, count, max, numb, last = 0, cmd; 3097 3097 const u16 *table; 3098 3098 bool phy6or5x; 3099 3099
+2 -2
drivers/net/wireless/iwlegacy/iwl-4965-lib.c
··· 628 628 629 629 /* rx_status carries information about the packet to mac80211 */ 630 630 rx_status.mactime = le64_to_cpu(phy_res->timestamp); 631 + rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? 632 + IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 631 633 rx_status.freq = 632 634 ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel), 633 635 rx_status.band); 634 - rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? 635 - IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 636 636 rx_status.rate_idx = 637 637 iwl4965_hwrate_to_mac80211_idx(rate_n_flags, rx_status.band); 638 638 rx_status.flag = 0;
+1 -1
drivers/net/wireless/iwlegacy/iwl-4965.c
··· 1543 1543 s32 temp; 1544 1544 1545 1545 temp = iwl4965_hw_get_temperature(priv); 1546 - if (temp < 0) 1546 + if (IWL_TX_POWER_TEMPERATURE_OUT_OF_RANGE(temp)) 1547 1547 return; 1548 1548 1549 1549 if (priv->temperature != temp) {
+18 -10
drivers/net/wireless/iwlwifi/iwl-6000.c
··· 603 603 IWL_DEVICE_6050, 604 604 }; 605 605 606 + #define IWL_DEVICE_6150 \ 607 + .fw_name_pre = IWL6050_FW_PRE, \ 608 + .ucode_api_max = IWL6050_UCODE_API_MAX, \ 609 + .ucode_api_min = IWL6050_UCODE_API_MIN, \ 610 + .ops = &iwl6150_ops, \ 611 + .eeprom_ver = EEPROM_6150_EEPROM_VERSION, \ 612 + .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \ 613 + .base_params = &iwl6050_base_params, \ 614 + .need_dc_calib = true, \ 615 + .led_mode = IWL_LED_BLINK, \ 616 + .internal_wimax_coex = true 617 + 606 618 struct iwl_cfg iwl6150_bgn_cfg = { 607 619 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN", 608 - .fw_name_pre = IWL6050_FW_PRE, 609 - .ucode_api_max = IWL6050_UCODE_API_MAX, 610 - .ucode_api_min = IWL6050_UCODE_API_MIN, 611 - .eeprom_ver = EEPROM_6150_EEPROM_VERSION, 612 - .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, 613 - .ops = &iwl6150_ops, 614 - .base_params = &iwl6050_base_params, 620 + IWL_DEVICE_6150, 615 621 .ht_params = &iwl6000_ht_params, 616 - .need_dc_calib = true, 617 - .led_mode = IWL_LED_RF_STATE, 618 - .internal_wimax_coex = true, 622 + }; 623 + 624 + struct iwl_cfg iwl6150_bg_cfg = { 625 + .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG", 626 + IWL_DEVICE_6150, 619 627 }; 620 628 621 629 struct iwl_cfg iwl6000_3agn_cfg = {
+3 -3
drivers/net/wireless/iwlwifi/iwl-agn.c
··· 3831 3831 3832 3832 /* 6150 WiFi/WiMax Series */ 3833 3833 {IWL_PCI_DEVICE(0x0885, 0x1305, iwl6150_bgn_cfg)}, 3834 - {IWL_PCI_DEVICE(0x0885, 0x1306, iwl6150_bgn_cfg)}, 3834 + {IWL_PCI_DEVICE(0x0885, 0x1307, iwl6150_bg_cfg)}, 3835 3835 {IWL_PCI_DEVICE(0x0885, 0x1325, iwl6150_bgn_cfg)}, 3836 - {IWL_PCI_DEVICE(0x0885, 0x1326, iwl6150_bgn_cfg)}, 3836 + {IWL_PCI_DEVICE(0x0885, 0x1327, iwl6150_bg_cfg)}, 3837 3837 {IWL_PCI_DEVICE(0x0886, 0x1315, iwl6150_bgn_cfg)}, 3838 - {IWL_PCI_DEVICE(0x0886, 0x1316, iwl6150_bgn_cfg)}, 3838 + {IWL_PCI_DEVICE(0x0886, 0x1317, iwl6150_bg_cfg)}, 3839 3839 3840 3840 /* 1000 Series WiFi */ 3841 3841 {IWL_PCI_DEVICE(0x0083, 0x1205, iwl1000_bgn_cfg)},
+1
drivers/net/wireless/iwlwifi/iwl-agn.h
··· 89 89 extern struct iwl_cfg iwl6050_2agn_cfg; 90 90 extern struct iwl_cfg iwl6050_2abg_cfg; 91 91 extern struct iwl_cfg iwl6150_bgn_cfg; 92 + extern struct iwl_cfg iwl6150_bg_cfg; 92 93 extern struct iwl_cfg iwl1000_bgn_cfg; 93 94 extern struct iwl_cfg iwl1000_bg_cfg; 94 95 extern struct iwl_cfg iwl100_bgn_cfg;
+3 -3
drivers/net/wireless/libertas/cmd.c
··· 994 994 cmd = cmdnode->cmdbuf; 995 995 996 996 spin_lock_irqsave(&priv->driver_lock, flags); 997 + priv->seqnum++; 998 + cmd->seqnum = cpu_to_le16(priv->seqnum); 997 999 priv->cur_cmd = cmdnode; 998 1000 spin_unlock_irqrestore(&priv->driver_lock, flags); 999 1001 ··· 1623 1621 /* Copy the incoming command to the buffer */ 1624 1622 memcpy(cmdnode->cmdbuf, in_cmd, in_cmd_size); 1625 1623 1626 - /* Set sequence number, clean result, move to buffer */ 1627 - priv->seqnum++; 1624 + /* Set command, clean result, move to buffer */ 1628 1625 cmdnode->cmdbuf->command = cpu_to_le16(command); 1629 1626 cmdnode->cmdbuf->size = cpu_to_le16(in_cmd_size); 1630 - cmdnode->cmdbuf->seqnum = cpu_to_le16(priv->seqnum); 1631 1627 cmdnode->cmdbuf->result = 0; 1632 1628 1633 1629 lbs_deb_host("PREP_CMD: command 0x%04x\n", command);
+2 -2
drivers/net/wireless/mwifiex/sdio.h
··· 167 167 /* Rx unit register */ 168 168 #define CARD_RX_UNIT_REG 0x63 169 169 170 - /* Event header Len*/ 171 - #define MWIFIEX_EVENT_HEADER_LEN 8 170 + /* Event header len w/o 4 bytes of interface header */ 171 + #define MWIFIEX_EVENT_HEADER_LEN 4 172 172 173 173 /* Max retry number of CMD53 write */ 174 174 #define MAX_WRITE_IOMEM_RETRY 2
-1
drivers/net/wireless/rt2x00/Kconfig
··· 166 166 config RT2800USB_RT53XX 167 167 bool "rt2800usb - Include support for rt53xx devices (EXPERIMENTAL)" 168 168 depends on EXPERIMENTAL 169 - default y 170 169 ---help--- 171 170 This adds support for rt53xx wireless chipset family to the 172 171 rt2800pci driver.
+22 -13
drivers/net/wireless/rtlwifi/pci.c
··· 669 669 &rx_status, 670 670 (u8 *) pdesc, skb); 671 671 672 - pci_unmap_single(rtlpci->pdev, 673 - *((dma_addr_t *) skb->cb), 674 - rtlpci->rxbuffersize, 675 - PCI_DMA_FROMDEVICE); 676 - 677 672 skb_put(skb, rtlpriv->cfg->ops->get_desc((u8 *) pdesc, 678 673 false, 679 674 HW_DESC_RXPKT_LEN)); ··· 684 689 685 690 hdr = rtl_get_hdr(skb); 686 691 fc = rtl_get_fc(skb); 692 + 693 + /* try for new buffer - if allocation fails, drop 694 + * frame and reuse old buffer 695 + */ 696 + new_skb = dev_alloc_skb(rtlpci->rxbuffersize); 697 + if (unlikely(!new_skb)) { 698 + RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV), 699 + DBG_DMESG, 700 + ("can't alloc skb for rx\n")); 701 + goto done; 702 + } 703 + pci_unmap_single(rtlpci->pdev, 704 + *((dma_addr_t *) skb->cb), 705 + rtlpci->rxbuffersize, 706 + PCI_DMA_FROMDEVICE); 687 707 688 708 if (!stats.crc || !stats.hwerror) { 689 709 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, ··· 768 758 rtl_lps_leave(hw); 769 759 } 770 760 771 - new_skb = dev_alloc_skb(rtlpci->rxbuffersize); 772 - if (unlikely(!new_skb)) { 773 - RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV), 774 - DBG_DMESG, 775 - ("can't alloc skb for rx\n")); 776 - goto done; 777 - } 778 761 skb = new_skb; 779 - /*skb->dev = dev; */ 780 762 781 763 rtlpci->rx_ring[rx_queue_idx].rx_buf[rtlpci-> 782 764 rx_ring ··· 1114 1112 rtlpci->rxringcount); 1115 1113 1116 1114 rtlpci->rx_ring[rx_queue_idx].idx = 0; 1115 + 1116 + /* If amsdu_8k is disabled, set buffersize to 4096. This 1117 + * change will reduce memory fragmentation. 1118 + */ 1119 + if (rtlpci->rxbuffersize > 4096 && 1120 + rtlpriv->rtlhal.disable_amsdu_8k) 1121 + rtlpci->rxbuffersize = 4096; 1117 1122 1118 1123 for (i = 0; i < rtlpci->rxringcount; i++) { 1119 1124 struct sk_buff *skb =
+3
drivers/net/wireless/wl12xx/conf.h
··· 1157 1157 /* time to wait on the channel for passive scans (in TUs) */ 1158 1158 u32 dwell_time_passive; 1159 1159 1160 + /* time to wait on the channel for DFS scans (in TUs) */ 1161 + u32 dwell_time_dfs; 1162 + 1160 1163 /* number of probe requests to send on each channel in active scans */ 1161 1164 u8 num_probe_reqs; 1162 1165
+1
drivers/net/wireless/wl12xx/main.c
··· 311 311 .min_dwell_time_active = 8, 312 312 .max_dwell_time_active = 30, 313 313 .dwell_time_passive = 100, 314 + .dwell_time_dfs = 150, 314 315 .num_probe_reqs = 2, 315 316 .rssi_threshold = -90, 316 317 .snr_threshold = 0,
+34 -17
drivers/net/wireless/wl12xx/scan.c
··· 331 331 struct conf_sched_scan_settings *c = &wl->conf.sched_scan; 332 332 int i, j; 333 333 u32 flags; 334 + bool force_passive = !req->n_ssids; 334 335 335 336 for (i = 0, j = start; 336 337 i < req->n_channels && j < MAX_CHANNELS_ALL_BANDS; 337 338 i++) { 338 339 flags = req->channels[i]->flags; 339 340 340 - if (!(flags & IEEE80211_CHAN_DISABLED) && 341 - ((flags & IEEE80211_CHAN_PASSIVE_SCAN) == passive) && 342 - ((flags & IEEE80211_CHAN_RADAR) == radar) && 343 - (req->channels[i]->band == band)) { 341 + if (force_passive) 342 + flags |= IEEE80211_CHAN_PASSIVE_SCAN; 343 + 344 + if ((req->channels[i]->band == band) && 345 + !(flags & IEEE80211_CHAN_DISABLED) && 346 + (!!(flags & IEEE80211_CHAN_RADAR) == radar) && 347 + /* if radar is set, we ignore the passive flag */ 348 + (radar || 349 + !!(flags & IEEE80211_CHAN_PASSIVE_SCAN) == passive)) { 344 350 wl1271_debug(DEBUG_SCAN, "band %d, center_freq %d ", 345 351 req->channels[i]->band, 346 352 req->channels[i]->center_freq); ··· 356 350 wl1271_debug(DEBUG_SCAN, "max_power %d", 357 351 req->channels[i]->max_power); 358 352 359 - if (flags & IEEE80211_CHAN_PASSIVE_SCAN) { 353 + if (flags & IEEE80211_CHAN_RADAR) { 354 + channels[j].flags |= SCAN_CHANNEL_FLAGS_DFS; 355 + channels[j].passive_duration = 356 + cpu_to_le16(c->dwell_time_dfs); 357 + } 358 + else if (flags & IEEE80211_CHAN_PASSIVE_SCAN) { 360 359 channels[j].passive_duration = 361 360 cpu_to_le16(c->dwell_time_passive); 362 361 } else { ··· 370 359 channels[j].max_duration = 371 360 cpu_to_le16(c->max_dwell_time_active); 372 361 } 373 - channels[j].tx_power_att = req->channels[j]->max_power; 362 + channels[j].tx_power_att = req->channels[i]->max_power; 374 363 channels[j].channel = req->channels[i]->hw_value; 375 364 376 365 j++; ··· 397 386 wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, 398 387 IEEE80211_BAND_2GHZ, 399 388 false, false, idx); 400 - idx += cfg->active[0]; 389 + /* 390 + * 5GHz channels always start at position 14, not immediately 391 + * after the last 2.4GHz channel 392 + */ 393 + idx = 14; 401 394 402 395 cfg->passive[1] = 403 396 wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, ··· 409 394 false, true, idx); 410 395 idx += cfg->passive[1]; 411 396 412 - cfg->active[1] = 413 - wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, 414 - IEEE80211_BAND_5GHZ, 415 - false, false, 14); 416 - idx += cfg->active[1]; 417 - 418 397 cfg->dfs = 419 398 wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, 420 399 IEEE80211_BAND_5GHZ, 421 - true, false, idx); 400 + true, true, idx); 422 401 idx += cfg->dfs; 402 + 403 + cfg->active[1] = 404 + wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels, 405 + IEEE80211_BAND_5GHZ, 406 + false, false, idx); 407 + idx += cfg->active[1]; 423 408 424 409 wl1271_debug(DEBUG_SCAN, " 2.4GHz: active %d passive %d", 425 410 cfg->active[0], cfg->passive[0]); 426 411 wl1271_debug(DEBUG_SCAN, " 5GHz: active %d passive %d", 427 412 cfg->active[1], cfg->passive[1]); 413 + wl1271_debug(DEBUG_SCAN, " DFS: %d", cfg->dfs); 428 414 429 415 return idx; 430 416 } ··· 437 421 struct wl1271_cmd_sched_scan_config *cfg = NULL; 438 422 struct conf_sched_scan_settings *c = &wl->conf.sched_scan; 439 423 int i, total_channels, ret; 424 + bool force_passive = !req->n_ssids; 440 425 441 426 wl1271_debug(DEBUG_CMD, "cmd sched_scan scan config"); 442 427 ··· 461 444 for (i = 0; i < SCAN_MAX_CYCLE_INTERVALS; i++) 462 445 cfg->intervals[i] = cpu_to_le32(req->interval); 463 446 464 - if (req->ssids[0].ssid_len && req->ssids[0].ssid) { 447 + if (!force_passive && req->ssids[0].ssid_len && req->ssids[0].ssid) { 465 448 cfg->filter_type = SCAN_SSID_FILTER_SPECIFIC; 466 449 cfg->ssid_len = req->ssids[0].ssid_len; 467 450 memcpy(cfg->ssid, req->ssids[0].ssid, ··· 478 461 goto out; 479 462 } 480 463 481 - if (cfg->active[0]) { 464 + if (!force_passive && cfg->active[0]) { 482 465 ret = wl1271_cmd_build_probe_req(wl, req->ssids[0].ssid, 483 466 req->ssids[0].ssid_len, 484 467 ies->ie[IEEE80211_BAND_2GHZ], ··· 490 473 } 491 474 } 492 475 493 - if (cfg->active[1]) { 476 + if (!force_passive && cfg->active[1]) { 494 477 ret = wl1271_cmd_build_probe_req(wl, req->ssids[0].ssid, 495 478 req->ssids[0].ssid_len, 496 479 ies->ie[IEEE80211_BAND_5GHZ],
+3
drivers/net/wireless/wl12xx/scan.h
··· 137 137 SCAN_BSS_TYPE_ANY, 138 138 }; 139 139 140 + #define SCAN_CHANNEL_FLAGS_DFS BIT(0) 141 + #define SCAN_CHANNEL_FLAGS_DFS_ENABLED BIT(1) 142 + 140 143 struct conn_scan_ch_params { 141 144 __le16 min_duration; 142 145 __le16 max_duration;
+42 -11
drivers/net/wireless/zd1211rw/zd_usb.c
··· 1533 1533 module_init(usb_init); 1534 1534 module_exit(usb_exit); 1535 1535 1536 + static int zd_ep_regs_out_msg(struct usb_device *udev, void *data, int len, 1537 + int *actual_length, int timeout) 1538 + { 1539 + /* In USB 2.0 mode EP_REGS_OUT endpoint is interrupt type. However in 1540 + * USB 1.1 mode endpoint is bulk. Select correct type URB by endpoint 1541 + * descriptor. 1542 + */ 1543 + struct usb_host_endpoint *ep; 1544 + unsigned int pipe; 1545 + 1546 + pipe = usb_sndintpipe(udev, EP_REGS_OUT); 1547 + ep = usb_pipe_endpoint(udev, pipe); 1548 + if (!ep) 1549 + return -EINVAL; 1550 + 1551 + if (usb_endpoint_xfer_int(&ep->desc)) { 1552 + return usb_interrupt_msg(udev, pipe, data, len, 1553 + actual_length, timeout); 1554 + } else { 1555 + pipe = usb_sndbulkpipe(udev, EP_REGS_OUT); 1556 + return usb_bulk_msg(udev, pipe, data, len, actual_length, 1557 + timeout); 1558 + } 1559 + } 1560 + 1536 1561 static int usb_int_regs_length(unsigned int count) 1537 1562 { 1538 1563 return sizeof(struct usb_int_regs) + count * sizeof(struct reg_data); ··· 1673 1648 1674 1649 udev = zd_usb_to_usbdev(usb); 1675 1650 prepare_read_regs_int(usb); 1676 - r = usb_interrupt_msg(udev, usb_sndintpipe(udev, EP_REGS_OUT), 1677 - req, req_len, &actual_req_len, 50 /* ms */); 1651 + r = zd_ep_regs_out_msg(udev, req, req_len, &actual_req_len, 50 /*ms*/); 1678 1652 if (r) { 1679 1653 dev_dbg_f(zd_usb_dev(usb), 1680 - "error in usb_interrupt_msg(). Error number %d\n", r); 1654 + "error in zd_ep_regs_out_msg(). Error number %d\n", r); 1681 1655 goto error; 1682 1656 } 1683 1657 if (req_len != actual_req_len) { 1684 - dev_dbg_f(zd_usb_dev(usb), "error in usb_interrupt_msg()\n" 1658 + dev_dbg_f(zd_usb_dev(usb), "error in zd_ep_regs_out_msg()\n" 1685 1659 " req_len %d != actual_req_len %d\n", 1686 1660 req_len, actual_req_len); 1687 1661 r = -EIO; ··· 1842 1818 rw->value = cpu_to_le16(ioreqs[i].value); 1843 1819 } 1844 1820 1845 - usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), 1846 - req, req_len, iowrite16v_urb_complete, usb, 1847 - ep->desc.bInterval); 1821 + /* In USB 2.0 mode endpoint is interrupt type. However in USB 1.1 mode 1822 + * endpoint is bulk. Select correct type URB by endpoint descriptor. 1823 + */ 1824 + if (usb_endpoint_xfer_int(&ep->desc)) 1825 + usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), 1826 + req, req_len, iowrite16v_urb_complete, usb, 1827 + ep->desc.bInterval); 1828 + else 1829 + usb_fill_bulk_urb(urb, udev, usb_sndbulkpipe(udev, EP_REGS_OUT), 1830 + req, req_len, iowrite16v_urb_complete, usb); 1831 + 1848 1832 urb->transfer_flags |= URB_FREE_BUFFER; 1849 1833 1850 1834 /* Submit previous URB */ ··· 1956 1924 } 1957 1925 1958 1926 udev = zd_usb_to_usbdev(usb); 1959 - r = usb_interrupt_msg(udev, usb_sndintpipe(udev, EP_REGS_OUT), 1960 - req, req_len, &actual_req_len, 50 /* ms */); 1927 + r = zd_ep_regs_out_msg(udev, req, req_len, &actual_req_len, 50 /*ms*/); 1961 1928 if (r) { 1962 1929 dev_dbg_f(zd_usb_dev(usb), 1963 - "error in usb_interrupt_msg(). Error number %d\n", r); 1930 + "error in zd_ep_regs_out_msg(). Error number %d\n", r); 1964 1931 goto out; 1965 1932 } 1966 1933 if (req_len != actual_req_len) { 1967 - dev_dbg_f(zd_usb_dev(usb), "error in usb_interrupt_msg()" 1934 + dev_dbg_f(zd_usb_dev(usb), "error in zd_ep_regs_out_msg()" 1968 1935 " req_len %d != actual_req_len %d\n", 1969 1936 req_len, actual_req_len); 1970 1937 r = -EIO;
+6 -2
include/linux/ieee80211.h
··· 1003 1003 #define WLAN_CAPABILITY_ESS (1<<0) 1004 1004 #define WLAN_CAPABILITY_IBSS (1<<1) 1005 1005 1006 - /* A mesh STA sets the ESS and IBSS capability bits to zero */ 1007 - #define WLAN_CAPABILITY_IS_MBSS(cap) \ 1006 + /* 1007 + * A mesh STA sets the ESS and IBSS capability bits to zero. 1008 + * however, this holds true for p2p probe responses (in the p2p_find 1009 + * phase) as well. 1010 + */ 1011 + #define WLAN_CAPABILITY_IS_STA_BSS(cap) \ 1008 1012 (!((cap) & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS))) 1009 1013 1010 1014 #define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
+1
include/linux/if_packet.h
··· 70 70 #define TP_STATUS_COPY 0x2 71 71 #define TP_STATUS_LOSING 0x4 72 72 #define TP_STATUS_CSUMNOTREADY 0x8 73 + #define TP_STATUS_VLAN_VALID 0x10 /* auxdata has valid tp_vlan_tci */ 73 74 74 75 /* Tx ring - header status */ 75 76 #define TP_STATUS_AVAILABLE 0x0
+1
include/net/sctp/command.h
··· 107 107 SCTP_CMD_UPDATE_INITTAG, /* Update peer inittag */ 108 108 SCTP_CMD_SEND_MSG, /* Send the whole use message */ 109 109 SCTP_CMD_SEND_NEXT_ASCONF, /* Send the next ASCONF after ACK */ 110 + SCTP_CMD_PURGE_ASCONF_QUEUE, /* Purge all asconf queues.*/ 110 111 SCTP_CMD_LAST 111 112 } sctp_verb_t; 112 113
+1 -1
include/net/sctp/structs.h
··· 1993 1993 struct sctp_chunk *sctp_assoc_lookup_asconf_ack( 1994 1994 const struct sctp_association *asoc, 1995 1995 __be32 serial); 1996 - 1996 + void sctp_asconf_queue_teardown(struct sctp_association *asoc); 1997 1997 1998 1998 int sctp_cmp_addr_exact(const union sctp_addr *ss1, 1999 1999 const union sctp_addr *ss2);
+7 -5
include/trace/events/net.h
··· 12 12 TRACE_EVENT(net_dev_xmit, 13 13 14 14 TP_PROTO(struct sk_buff *skb, 15 - int rc), 15 + int rc, 16 + struct net_device *dev, 17 + unsigned int skb_len), 16 18 17 - TP_ARGS(skb, rc), 19 + TP_ARGS(skb, rc, dev, skb_len), 18 20 19 21 TP_STRUCT__entry( 20 22 __field( void *, skbaddr ) 21 23 __field( unsigned int, len ) 22 24 __field( int, rc ) 23 - __string( name, skb->dev->name ) 25 + __string( name, dev->name ) 24 26 ), 25 27 26 28 TP_fast_assign( 27 29 __entry->skbaddr = skb; 28 - __entry->len = skb->len; 30 + __entry->len = skb_len; 29 31 __entry->rc = rc; 30 - __assign_str(name, skb->dev->name); 32 + __assign_str(name, dev->name); 31 33 ), 32 34 33 35 TP_printk("dev=%s skbaddr=%p len=%u rc=%d",
+1 -1
net/8021q/vlan_dev.c
··· 165 165 u64_stats_update_begin(&stats->syncp); 166 166 stats->tx_packets++; 167 167 stats->tx_bytes += len; 168 - u64_stats_update_begin(&stats->syncp); 168 + u64_stats_update_end(&stats->syncp); 169 169 } else { 170 170 this_cpu_inc(vlan_dev_info(dev)->vlan_pcpu_stats->tx_dropped); 171 171 }
+1 -1
net/bluetooth/l2cap_core.c
··· 906 906 if (c->psm == psm) { 907 907 /* Exact match. */ 908 908 if (!bacmp(&bt_sk(sk)->src, src)) { 909 - read_unlock_bh(&chan_list_lock); 909 + read_unlock(&chan_list_lock); 910 910 return c; 911 911 } 912 912
+3 -6
net/caif/chnl_net.c
··· 139 139 struct chnl_net *dev = NULL; 140 140 struct list_head *list_node; 141 141 struct list_head *_tmp; 142 - /* May be called with or without RTNL lock held */ 143 - int islocked = rtnl_is_locked(); 144 - if (!islocked) 145 - rtnl_lock(); 142 + 143 + rtnl_lock(); 146 144 list_for_each_safe(list_node, _tmp, &chnl_net_list) { 147 145 dev = list_entry(list_node, struct chnl_net, list_field); 148 146 if (dev->state == CAIF_SHUTDOWN) 149 147 dev_close(dev->netdev); 150 148 } 151 - if (!islocked) 152 - rtnl_unlock(); 149 + rtnl_unlock(); 153 150 } 154 151 static DECLARE_WORK(close_worker, close_work); 155 152
+5 -2
net/core/dev.c
··· 2096 2096 { 2097 2097 const struct net_device_ops *ops = dev->netdev_ops; 2098 2098 int rc = NETDEV_TX_OK; 2099 + unsigned int skb_len; 2099 2100 2100 2101 if (likely(!skb->next)) { 2101 2102 u32 features; ··· 2147 2146 } 2148 2147 } 2149 2148 2149 + skb_len = skb->len; 2150 2150 rc = ops->ndo_start_xmit(skb, dev); 2151 - trace_net_dev_xmit(skb, rc); 2151 + trace_net_dev_xmit(skb, rc, dev, skb_len); 2152 2152 if (rc == NETDEV_TX_OK) 2153 2153 txq_trans_update(txq); 2154 2154 return rc; ··· 2169 2167 if (dev->priv_flags & IFF_XMIT_DST_RELEASE) 2170 2168 skb_dst_drop(nskb); 2171 2169 2170 + skb_len = nskb->len; 2172 2171 rc = ops->ndo_start_xmit(nskb, dev); 2173 - trace_net_dev_xmit(nskb, rc); 2172 + trace_net_dev_xmit(nskb, rc, dev, skb_len); 2174 2173 if (unlikely(rc != NETDEV_TX_OK)) { 2175 2174 if (rc & ~NETDEV_TX_MASK) 2176 2175 goto out_kfree_gso_skb;
+3
net/ipv4/af_inet.c
··· 465 465 if (addr_len < sizeof(struct sockaddr_in)) 466 466 goto out; 467 467 468 + if (addr->sin_family != AF_INET) 469 + goto out; 470 + 468 471 chk_addr_ret = inet_addr_type(sock_net(sk), addr->sin_addr.s_addr); 469 472 470 473 /* Not specified by any standard per-se, however it breaks too
+8 -7
net/ipv4/ip_options.c
··· 14 14 #include <linux/slab.h> 15 15 #include <linux/types.h> 16 16 #include <asm/uaccess.h> 17 + #include <asm/unaligned.h> 17 18 #include <linux/skbuff.h> 18 19 #include <linux/ip.h> 19 20 #include <linux/icmp.h> ··· 351 350 goto error; 352 351 } 353 352 if (optptr[2] <= optlen) { 354 - __be32 *timeptr = NULL; 353 + unsigned char *timeptr = NULL; 355 354 if (optptr[2]+3 > optptr[1]) { 356 355 pp_ptr = optptr + 2; 357 356 goto error; ··· 360 359 case IPOPT_TS_TSONLY: 361 360 opt->ts = optptr - iph; 362 361 if (skb) 363 - timeptr = (__be32*)&optptr[optptr[2]-1]; 362 + timeptr = &optptr[optptr[2]-1]; 364 363 opt->ts_needtime = 1; 365 364 optptr[2] += 4; 366 365 break; ··· 372 371 opt->ts = optptr - iph; 373 372 if (rt) { 374 373 memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4); 375 - timeptr = (__be32*)&optptr[optptr[2]+3]; 374 + timeptr = &optptr[optptr[2]+3]; 376 375 } 377 376 opt->ts_needaddr = 1; 378 377 opt->ts_needtime = 1; ··· 390 389 if (inet_addr_type(net, addr) == RTN_UNICAST) 391 390 break; 392 391 if (skb) 393 - timeptr = (__be32*)&optptr[optptr[2]+3]; 392 + timeptr = &optptr[optptr[2]+3]; 394 393 } 395 394 opt->ts_needtime = 1; 396 395 optptr[2] += 8; ··· 404 403 } 405 404 if (timeptr) { 406 405 struct timespec tv; 407 - __be32 midtime; 406 + u32 midtime; 408 407 getnstimeofday(&tv); 409 - midtime = htonl((tv.tv_sec % 86400) * MSEC_PER_SEC + tv.tv_nsec / NSEC_PER_MSEC); 410 - memcpy(timeptr, &midtime, sizeof(__be32)); 408 + midtime = (tv.tv_sec % 86400) * MSEC_PER_SEC + tv.tv_nsec / NSEC_PER_MSEC; 409 + put_unaligned_be32(midtime, timeptr); 411 410 opt->is_changed = 1; 412 411 } 413 412 } else {
+7
net/mac80211/mlme.c
··· 232 232 WARN_ON(!ieee80211_set_channel_type(local, sdata, channel_type)); 233 233 } 234 234 235 + ieee80211_stop_queues_by_reason(&sdata->local->hw, 236 + IEEE80211_QUEUE_STOP_REASON_CSA); 237 + 235 238 /* channel_type change automatically detected */ 236 239 ieee80211_hw_config(local, 0); 237 240 ··· 247 244 channel_type); 248 245 rcu_read_unlock(); 249 246 } 247 + 248 + ieee80211_wake_queues_by_reason(&sdata->local->hw, 249 + IEEE80211_QUEUE_STOP_REASON_CSA); 250 250 251 251 ht_opmode = le16_to_cpu(hti->operation_mode); 252 252 ··· 1095 1089 local->hw.conf.flags &= ~IEEE80211_CONF_PS; 1096 1090 config_changed |= IEEE80211_CONF_CHANGE_PS; 1097 1091 } 1092 + local->ps_sdata = NULL; 1098 1093 1099 1094 ieee80211_hw_config(local, config_changed); 1100 1095
-1
net/mac80211/scan.c
··· 15 15 #include <linux/if_arp.h> 16 16 #include <linux/rtnetlink.h> 17 17 #include <linux/pm_qos_params.h> 18 - #include <linux/slab.h> 19 18 #include <net/sch_generic.h> 20 19 #include <linux/slab.h> 21 20 #include <net/mac80211.h>
+12 -3
net/packet/af_packet.c
··· 798 798 getnstimeofday(&ts); 799 799 h.h2->tp_sec = ts.tv_sec; 800 800 h.h2->tp_nsec = ts.tv_nsec; 801 - h.h2->tp_vlan_tci = vlan_tx_tag_get(skb); 801 + if (vlan_tx_tag_present(skb)) { 802 + h.h2->tp_vlan_tci = vlan_tx_tag_get(skb); 803 + status |= TP_STATUS_VLAN_VALID; 804 + } else { 805 + h.h2->tp_vlan_tci = 0; 806 + } 802 807 hdrlen = sizeof(*h.h2); 803 808 break; 804 809 default: ··· 1730 1725 aux.tp_snaplen = skb->len; 1731 1726 aux.tp_mac = 0; 1732 1727 aux.tp_net = skb_network_offset(skb); 1733 - aux.tp_vlan_tci = vlan_tx_tag_get(skb); 1734 - 1728 + if (vlan_tx_tag_present(skb)) { 1729 + aux.tp_vlan_tci = vlan_tx_tag_get(skb); 1730 + aux.tp_status |= TP_STATUS_VLAN_VALID; 1731 + } else { 1732 + aux.tp_vlan_tci = 0; 1733 + } 1735 1734 put_cmsg(msg, SOL_PACKET, PACKET_AUXDATA, sizeof(aux), &aux); 1736 1735 } 1737 1736
+14 -9
net/sctp/associola.c
··· 444 444 445 445 asoc->peer.transport_count = 0; 446 446 447 - /* Free any cached ASCONF_ACK chunk. */ 448 - sctp_assoc_free_asconf_acks(asoc); 449 - 450 - /* Free the ASCONF queue. */ 451 - sctp_assoc_free_asconf_queue(asoc); 452 - 453 - /* Free any cached ASCONF chunk. */ 454 - if (asoc->addip_last_asconf) 455 - sctp_chunk_free(asoc->addip_last_asconf); 447 + sctp_asconf_queue_teardown(asoc); 456 448 457 449 /* AUTH - Free the endpoint shared keys */ 458 450 sctp_auth_destroy_keys(&asoc->endpoint_shared_keys); ··· 1637 1645 } 1638 1646 1639 1647 return NULL; 1648 + } 1649 + 1650 + void sctp_asconf_queue_teardown(struct sctp_association *asoc) 1651 + { 1652 + /* Free any cached ASCONF_ACK chunk. */ 1653 + sctp_assoc_free_asconf_acks(asoc); 1654 + 1655 + /* Free the ASCONF queue. */ 1656 + sctp_assoc_free_asconf_queue(asoc); 1657 + 1658 + /* Free any cached ASCONF chunk. */ 1659 + if (asoc->addip_last_asconf) 1660 + sctp_chunk_free(asoc->addip_last_asconf); 1640 1661 }
+3
net/sctp/sm_sideeffect.c
··· 1670 1670 case SCTP_CMD_SEND_NEXT_ASCONF: 1671 1671 sctp_cmd_send_asconf(asoc); 1672 1672 break; 1673 + case SCTP_CMD_PURGE_ASCONF_QUEUE: 1674 + sctp_asconf_queue_teardown(asoc); 1675 + break; 1673 1676 default: 1674 1677 pr_warn("Impossible command: %u, %p\n", 1675 1678 cmd->verb, cmd->obj.ptr);
+12 -2
net/sctp/sm_statefuns.c
··· 1718 1718 return SCTP_DISPOSITION_CONSUME; 1719 1719 } 1720 1720 1721 - /* For now, fail any unsent/unacked data. Consider the optional 1722 - * choice of resending of this data. 1721 + /* For now, stop pending T3-rtx and SACK timers, fail any unsent/unacked 1722 + * data. Consider the optional choice of resending of this data. 1723 1723 */ 1724 + sctp_add_cmd_sf(commands, SCTP_CMD_T3_RTX_TIMERS_STOP, SCTP_NULL()); 1725 + sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP, 1726 + SCTP_TO(SCTP_EVENT_TIMEOUT_SACK)); 1724 1727 sctp_add_cmd_sf(commands, SCTP_CMD_PURGE_OUTQUEUE, SCTP_NULL()); 1728 + 1729 + /* Stop pending T4-rto timer, teardown ASCONF queue, ASCONF-ACK queue 1730 + * and ASCONF-ACK cache. 1731 + */ 1732 + sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP, 1733 + SCTP_TO(SCTP_EVENT_TIMEOUT_T4_RTO)); 1734 + sctp_add_cmd_sf(commands, SCTP_CMD_PURGE_ASCONF_QUEUE, SCTP_NULL()); 1725 1735 1726 1736 repl = sctp_make_cookie_ack(new_asoc, chunk); 1727 1737 if (!repl)
+2 -2
net/wireless/nl80211.c
··· 3406 3406 i = 0; 3407 3407 if (info->attrs[NL80211_ATTR_SCAN_SSIDS]) { 3408 3408 nla_for_each_nested(attr, info->attrs[NL80211_ATTR_SCAN_SSIDS], tmp) { 3409 + request->ssids[i].ssid_len = nla_len(attr); 3409 3410 if (request->ssids[i].ssid_len > IEEE80211_MAX_SSID_LEN) { 3410 3411 err = -EINVAL; 3411 3412 goto out_free; 3412 3413 } 3413 3414 memcpy(request->ssids[i].ssid, nla_data(attr), nla_len(attr)); 3414 - request->ssids[i].ssid_len = nla_len(attr); 3415 3415 i++; 3416 3416 } 3417 3417 } ··· 3572 3572 if (info->attrs[NL80211_ATTR_SCAN_SSIDS]) { 3573 3573 nla_for_each_nested(attr, info->attrs[NL80211_ATTR_SCAN_SSIDS], 3574 3574 tmp) { 3575 + request->ssids[i].ssid_len = nla_len(attr); 3575 3576 if (request->ssids[i].ssid_len > 3576 3577 IEEE80211_MAX_SSID_LEN) { 3577 3578 err = -EINVAL; ··· 3580 3579 } 3581 3580 memcpy(request->ssids[i].ssid, nla_data(attr), 3582 3581 nla_len(attr)); 3583 - request->ssids[i].ssid_len = nla_len(attr); 3584 3582 i++; 3585 3583 } 3586 3584 }
+24 -19
net/wireless/scan.c
··· 267 267 return memcmp(ssidie + 2, ssid, ssid_len) == 0; 268 268 } 269 269 270 + static bool is_mesh_bss(struct cfg80211_bss *a) 271 + { 272 + const u8 *ie; 273 + 274 + if (!WLAN_CAPABILITY_IS_STA_BSS(a->capability)) 275 + return false; 276 + 277 + ie = cfg80211_find_ie(WLAN_EID_MESH_ID, 278 + a->information_elements, 279 + a->len_information_elements); 280 + if (!ie) 281 + return false; 282 + 283 + ie = cfg80211_find_ie(WLAN_EID_MESH_CONFIG, 284 + a->information_elements, 285 + a->len_information_elements); 286 + if (!ie) 287 + return false; 288 + 289 + return true; 290 + } 291 + 270 292 static bool is_mesh(struct cfg80211_bss *a, 271 293 const u8 *meshid, size_t meshidlen, 272 294 const u8 *meshcfg) 273 295 { 274 296 const u8 *ie; 275 297 276 - if (!WLAN_CAPABILITY_IS_MBSS(a->capability)) 298 + if (!WLAN_CAPABILITY_IS_STA_BSS(a->capability)) 277 299 return false; 278 300 279 301 ie = cfg80211_find_ie(WLAN_EID_MESH_ID, ··· 333 311 if (a->channel != b->channel) 334 312 return b->channel->center_freq - a->channel->center_freq; 335 313 336 - if (WLAN_CAPABILITY_IS_MBSS(a->capability | b->capability)) { 314 + if (is_mesh_bss(a) && is_mesh_bss(b)) { 337 315 r = cmp_ies(WLAN_EID_MESH_ID, 338 316 a->information_elements, 339 317 a->len_information_elements, ··· 479 457 struct cfg80211_internal_bss *res) 480 458 { 481 459 struct cfg80211_internal_bss *found = NULL; 482 - const u8 *meshid, *meshcfg; 483 460 484 461 /* 485 462 * The reference to "res" is donated to this function. ··· 490 469 } 491 470 492 471 res->ts = jiffies; 493 - 494 - if (WLAN_CAPABILITY_IS_MBSS(res->pub.capability)) { 495 - /* must be mesh, verify */ 496 - meshid = cfg80211_find_ie(WLAN_EID_MESH_ID, 497 - res->pub.information_elements, 498 - res->pub.len_information_elements); 499 - meshcfg = cfg80211_find_ie(WLAN_EID_MESH_CONFIG, 500 - res->pub.information_elements, 501 - res->pub.len_information_elements); 502 - if (!meshid || !meshcfg || 503 - meshcfg[1] != sizeof(struct ieee80211_meshconf_ie)) { 504 - /* bogus mesh */ 505 - kref_put(&res->ref, bss_release); 506 - return NULL; 507 - } 508 - } 509 472 510 473 spin_lock_bh(&dev->bss_lock); 511 474