diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-01-07 06:51:28 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-01-07 06:51:28 -0500 |
commit | 40ba95fdf158713377d47736b1b3a9d75f4f2515 (patch) | |
tree | 17a3216542d1107f777fd82577c91aebbce597d6 /drivers/net | |
parent | 70d84a6431d732cbc4e68e72b6890cdd3865d43d (diff) | |
parent | 0575fb754dbfc32a01f297e778533340a533ec68 (diff) |
Merge branch 'depends/rmk/restart' into next/cleanup
Conflicts:
arch/arm/mach-at91/at91cap9.c
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9261.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-at91/at91sam9rl.c
arch/arm/mach-exynos/cpu.c
arch/arm/mach-shmobile/board-kota2.c
This resolves a bunch of conflicts between the arm-soc tree
and changes from the arm tree that have gone upstream.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/freescale/fec.c | 11 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/fsl_pq_mdio.c | 53 | ||||
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 14 | ||||
-rw-r--r-- | drivers/net/ethernet/ti/davinci_cpdma.c | 2 | ||||
-rw-r--r-- | drivers/net/ppp/pptp.c | 4 | ||||
-rw-r--r-- | drivers/net/usb/asix.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/cmdevt.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/phy.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 2 |
17 files changed, 53 insertions, 77 deletions
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c index 1124ce0a1594..c136230d50bb 100644 --- a/drivers/net/ethernet/freescale/fec.c +++ b/drivers/net/ethernet/freescale/fec.c | |||
@@ -232,6 +232,7 @@ struct fec_enet_private { | |||
232 | struct platform_device *pdev; | 232 | struct platform_device *pdev; |
233 | 233 | ||
234 | int opened; | 234 | int opened; |
235 | int dev_id; | ||
235 | 236 | ||
236 | /* Phylib and MDIO interface */ | 237 | /* Phylib and MDIO interface */ |
237 | struct mii_bus *mii_bus; | 238 | struct mii_bus *mii_bus; |
@@ -837,7 +838,7 @@ static void __inline__ fec_get_mac(struct net_device *ndev) | |||
837 | 838 | ||
838 | /* Adjust MAC if using macaddr */ | 839 | /* Adjust MAC if using macaddr */ |
839 | if (iap == macaddr) | 840 | if (iap == macaddr) |
840 | ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->pdev->id; | 841 | ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->dev_id; |
841 | } | 842 | } |
842 | 843 | ||
843 | /* ------------------------------------------------------------------------- */ | 844 | /* ------------------------------------------------------------------------- */ |
@@ -953,7 +954,7 @@ static int fec_enet_mii_probe(struct net_device *ndev) | |||
953 | char mdio_bus_id[MII_BUS_ID_SIZE]; | 954 | char mdio_bus_id[MII_BUS_ID_SIZE]; |
954 | char phy_name[MII_BUS_ID_SIZE + 3]; | 955 | char phy_name[MII_BUS_ID_SIZE + 3]; |
955 | int phy_id; | 956 | int phy_id; |
956 | int dev_id = fep->pdev->id; | 957 | int dev_id = fep->dev_id; |
957 | 958 | ||
958 | fep->phy_dev = NULL; | 959 | fep->phy_dev = NULL; |
959 | 960 | ||
@@ -1031,7 +1032,7 @@ static int fec_enet_mii_init(struct platform_device *pdev) | |||
1031 | * mdio interface in board design, and need to be configured by | 1032 | * mdio interface in board design, and need to be configured by |
1032 | * fec0 mii_bus. | 1033 | * fec0 mii_bus. |
1033 | */ | 1034 | */ |
1034 | if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && pdev->id > 0) { | 1035 | if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && fep->dev_id > 0) { |
1035 | /* fec1 uses fec0 mii_bus */ | 1036 | /* fec1 uses fec0 mii_bus */ |
1036 | fep->mii_bus = fec0_mii_bus; | 1037 | fep->mii_bus = fec0_mii_bus; |
1037 | return 0; | 1038 | return 0; |
@@ -1063,7 +1064,7 @@ static int fec_enet_mii_init(struct platform_device *pdev) | |||
1063 | fep->mii_bus->read = fec_enet_mdio_read; | 1064 | fep->mii_bus->read = fec_enet_mdio_read; |
1064 | fep->mii_bus->write = fec_enet_mdio_write; | 1065 | fep->mii_bus->write = fec_enet_mdio_write; |
1065 | fep->mii_bus->reset = fec_enet_mdio_reset; | 1066 | fep->mii_bus->reset = fec_enet_mdio_reset; |
1066 | snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id + 1); | 1067 | snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", fep->dev_id + 1); |
1067 | fep->mii_bus->priv = fep; | 1068 | fep->mii_bus->priv = fep; |
1068 | fep->mii_bus->parent = &pdev->dev; | 1069 | fep->mii_bus->parent = &pdev->dev; |
1069 | 1070 | ||
@@ -1521,6 +1522,7 @@ fec_probe(struct platform_device *pdev) | |||
1521 | int i, irq, ret = 0; | 1522 | int i, irq, ret = 0; |
1522 | struct resource *r; | 1523 | struct resource *r; |
1523 | const struct of_device_id *of_id; | 1524 | const struct of_device_id *of_id; |
1525 | static int dev_id; | ||
1524 | 1526 | ||
1525 | of_id = of_match_device(fec_dt_ids, &pdev->dev); | 1527 | of_id = of_match_device(fec_dt_ids, &pdev->dev); |
1526 | if (of_id) | 1528 | if (of_id) |
@@ -1548,6 +1550,7 @@ fec_probe(struct platform_device *pdev) | |||
1548 | 1550 | ||
1549 | fep->hwp = ioremap(r->start, resource_size(r)); | 1551 | fep->hwp = ioremap(r->start, resource_size(r)); |
1550 | fep->pdev = pdev; | 1552 | fep->pdev = pdev; |
1553 | fep->dev_id = dev_id++; | ||
1551 | 1554 | ||
1552 | if (!fep->hwp) { | 1555 | if (!fep->hwp) { |
1553 | ret = -ENOMEM; | 1556 | ret = -ENOMEM; |
diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c index 52f4e8ad48e7..4d9f84b8ab97 100644 --- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c +++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c | |||
@@ -183,28 +183,10 @@ void fsl_pq_mdio_bus_name(char *name, struct device_node *np) | |||
183 | } | 183 | } |
184 | EXPORT_SYMBOL_GPL(fsl_pq_mdio_bus_name); | 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 | |||
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 | 186 | ||
205 | #if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE) | ||
206 | static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs, struct device_node *np) | 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 | struct gfar __iomem *enet_regs; | 190 | struct gfar __iomem *enet_regs; |
209 | 191 | ||
210 | /* | 192 | /* |
@@ -220,15 +202,15 @@ static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs, struct devi | |||
220 | } else if (of_device_is_compatible(np, "fsl,etsec2-mdio") || | 202 | } else if (of_device_is_compatible(np, "fsl,etsec2-mdio") || |
221 | of_device_is_compatible(np, "fsl,etsec2-tbi")) { | 203 | of_device_is_compatible(np, "fsl,etsec2-tbi")) { |
222 | return of_iomap(np, 1); | 204 | return of_iomap(np, 1); |
223 | } else | 205 | } |
224 | return NULL; | ||
225 | } | ||
226 | #endif | 206 | #endif |
207 | return NULL; | ||
208 | } | ||
227 | 209 | ||
228 | 210 | ||
229 | #if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE) | ||
230 | static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id) | 211 | static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id) |
231 | { | 212 | { |
213 | #if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE) | ||
232 | struct device_node *np = NULL; | 214 | struct device_node *np = NULL; |
233 | int err = 0; | 215 | int err = 0; |
234 | 216 | ||
@@ -261,9 +243,10 @@ static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id) | |||
261 | return err; | 243 | return err; |
262 | else | 244 | else |
263 | return -EINVAL; | 245 | return -EINVAL; |
264 | } | 246 | #else |
247 | return -ENODEV; | ||
265 | #endif | 248 | #endif |
266 | 249 | } | |
267 | 250 | ||
268 | static int fsl_pq_mdio_probe(struct platform_device *ofdev) | 251 | static int fsl_pq_mdio_probe(struct platform_device *ofdev) |
269 | { | 252 | { |
@@ -339,19 +322,13 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev) | |||
339 | of_device_is_compatible(np, "fsl,etsec2-mdio") || | 322 | of_device_is_compatible(np, "fsl,etsec2-mdio") || |
340 | of_device_is_compatible(np, "fsl,etsec2-tbi") || | 323 | of_device_is_compatible(np, "fsl,etsec2-tbi") || |
341 | of_device_is_compatible(np, "gianfar")) { | 324 | of_device_is_compatible(np, "gianfar")) { |
342 | #if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE) | ||
343 | tbipa = get_gfar_tbipa(regs, np); | 325 | tbipa = get_gfar_tbipa(regs, np); |
344 | if (!tbipa) { | 326 | if (!tbipa) { |
345 | err = -EINVAL; | 327 | err = -EINVAL; |
346 | goto err_free_irqs; | 328 | goto err_free_irqs; |
347 | } | 329 | } |
348 | #else | ||
349 | err = -ENODEV; | ||
350 | goto err_free_irqs; | ||
351 | #endif | ||
352 | } else if (of_device_is_compatible(np, "fsl,ucc-mdio") || | 330 | } else if (of_device_is_compatible(np, "fsl,ucc-mdio") || |
353 | of_device_is_compatible(np, "ucc_geth_phy")) { | 331 | of_device_is_compatible(np, "ucc_geth_phy")) { |
354 | #if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE) | ||
355 | u32 id; | 332 | u32 id; |
356 | static u32 mii_mng_master; | 333 | static u32 mii_mng_master; |
357 | 334 | ||
@@ -364,10 +341,6 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev) | |||
364 | mii_mng_master = id; | 341 | mii_mng_master = id; |
365 | ucc_set_qe_mux_mii_mng(id - 1); | 342 | ucc_set_qe_mux_mii_mng(id - 1); |
366 | } | 343 | } |
367 | #else | ||
368 | err = -ENODEV; | ||
369 | goto err_free_irqs; | ||
370 | #endif | ||
371 | } else { | 344 | } else { |
372 | err = -ENODEV; | 345 | err = -ENODEV; |
373 | goto err_free_irqs; | 346 | goto err_free_irqs; |
@@ -386,16 +359,6 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev) | |||
386 | } | 359 | } |
387 | 360 | ||
388 | if (tbiaddr == -1) { | 361 | if (tbiaddr == -1) { |
389 | out_be32(tbipa, 0); | ||
390 | |||
391 | tbiaddr = fsl_pq_mdio_find_free(new_bus); | ||
392 | } | ||
393 | |||
394 | /* | ||
395 | * We define TBIPA at 0 to be illegal, opting to fail for boards that | ||
396 | * have PHYs at 1-31, rather than change tbipa and rescan. | ||
397 | */ | ||
398 | if (tbiaddr == 0) { | ||
399 | err = -EBUSY; | 362 | err = -EBUSY; |
400 | 363 | ||
401 | goto err_free_irqs; | 364 | goto err_free_irqs; |
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 67bf07819992..c8f47f17186f 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
@@ -477,7 +477,6 @@ enum rtl_register_content { | |||
477 | /* Config1 register p.24 */ | 477 | /* Config1 register p.24 */ |
478 | LEDS1 = (1 << 7), | 478 | LEDS1 = (1 << 7), |
479 | LEDS0 = (1 << 6), | 479 | LEDS0 = (1 << 6), |
480 | MSIEnable = (1 << 5), /* Enable Message Signaled Interrupt */ | ||
481 | Speed_down = (1 << 4), | 480 | Speed_down = (1 << 4), |
482 | MEMMAP = (1 << 3), | 481 | MEMMAP = (1 << 3), |
483 | IOMAP = (1 << 2), | 482 | IOMAP = (1 << 2), |
@@ -485,6 +484,7 @@ enum rtl_register_content { | |||
485 | PMEnable = (1 << 0), /* Power Management Enable */ | 484 | PMEnable = (1 << 0), /* Power Management Enable */ |
486 | 485 | ||
487 | /* Config2 register p. 25 */ | 486 | /* Config2 register p. 25 */ |
487 | MSIEnable = (1 << 5), /* 8169 only. Reserved in the 8168. */ | ||
488 | PCI_Clock_66MHz = 0x01, | 488 | PCI_Clock_66MHz = 0x01, |
489 | PCI_Clock_33MHz = 0x00, | 489 | PCI_Clock_33MHz = 0x00, |
490 | 490 | ||
@@ -3426,22 +3426,24 @@ static const struct rtl_cfg_info { | |||
3426 | }; | 3426 | }; |
3427 | 3427 | ||
3428 | /* Cfg9346_Unlock assumed. */ | 3428 | /* Cfg9346_Unlock assumed. */ |
3429 | static unsigned rtl_try_msi(struct pci_dev *pdev, void __iomem *ioaddr, | 3429 | static unsigned rtl_try_msi(struct rtl8169_private *tp, |
3430 | const struct rtl_cfg_info *cfg) | 3430 | const struct rtl_cfg_info *cfg) |
3431 | { | 3431 | { |
3432 | void __iomem *ioaddr = tp->mmio_addr; | ||
3432 | unsigned msi = 0; | 3433 | unsigned msi = 0; |
3433 | u8 cfg2; | 3434 | u8 cfg2; |
3434 | 3435 | ||
3435 | cfg2 = RTL_R8(Config2) & ~MSIEnable; | 3436 | cfg2 = RTL_R8(Config2) & ~MSIEnable; |
3436 | if (cfg->features & RTL_FEATURE_MSI) { | 3437 | if (cfg->features & RTL_FEATURE_MSI) { |
3437 | if (pci_enable_msi(pdev)) { | 3438 | if (pci_enable_msi(tp->pci_dev)) { |
3438 | dev_info(&pdev->dev, "no MSI. Back to INTx.\n"); | 3439 | netif_info(tp, hw, tp->dev, "no MSI. Back to INTx.\n"); |
3439 | } else { | 3440 | } else { |
3440 | cfg2 |= MSIEnable; | 3441 | cfg2 |= MSIEnable; |
3441 | msi = RTL_FEATURE_MSI; | 3442 | msi = RTL_FEATURE_MSI; |
3442 | } | 3443 | } |
3443 | } | 3444 | } |
3444 | RTL_W8(Config2, cfg2); | 3445 | if (tp->mac_version <= RTL_GIGA_MAC_VER_06) |
3446 | RTL_W8(Config2, cfg2); | ||
3445 | return msi; | 3447 | return msi; |
3446 | } | 3448 | } |
3447 | 3449 | ||
@@ -4077,7 +4079,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
4077 | tp->features |= RTL_FEATURE_WOL; | 4079 | tp->features |= RTL_FEATURE_WOL; |
4078 | if ((RTL_R8(Config5) & (UWF | BWF | MWF)) != 0) | 4080 | if ((RTL_R8(Config5) & (UWF | BWF | MWF)) != 0) |
4079 | tp->features |= RTL_FEATURE_WOL; | 4081 | tp->features |= RTL_FEATURE_WOL; |
4080 | tp->features |= rtl_try_msi(pdev, ioaddr, cfg); | 4082 | tp->features |= rtl_try_msi(tp, cfg); |
4081 | RTL_W8(Cfg9346, Cfg9346_Lock); | 4083 | RTL_W8(Cfg9346, Cfg9346_Lock); |
4082 | 4084 | ||
4083 | if (rtl_tbi_enabled(tp)) { | 4085 | if (rtl_tbi_enabled(tp)) { |
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index dca9d3369cdd..c97d2f590855 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c | |||
@@ -836,11 +836,13 @@ int cpdma_chan_stop(struct cpdma_chan *chan) | |||
836 | chan_write(chan, cp, CPDMA_TEARDOWN_VALUE); | 836 | chan_write(chan, cp, CPDMA_TEARDOWN_VALUE); |
837 | 837 | ||
838 | /* handle completed packets */ | 838 | /* handle completed packets */ |
839 | spin_unlock_irqrestore(&chan->lock, flags); | ||
839 | do { | 840 | do { |
840 | ret = __cpdma_chan_process(chan); | 841 | ret = __cpdma_chan_process(chan); |
841 | if (ret < 0) | 842 | if (ret < 0) |
842 | break; | 843 | break; |
843 | } while ((ret & CPDMA_DESC_TD_COMPLETE) == 0); | 844 | } while ((ret & CPDMA_DESC_TD_COMPLETE) == 0); |
845 | spin_lock_irqsave(&chan->lock, flags); | ||
844 | 846 | ||
845 | /* remaining packets haven't been tx/rx'ed, clean them up */ | 847 | /* remaining packets haven't been tx/rx'ed, clean them up */ |
846 | while (chan->head) { | 848 | while (chan->head) { |
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c index 89f829f5f725..f8a6853b692e 100644 --- a/drivers/net/ppp/pptp.c +++ b/drivers/net/ppp/pptp.c | |||
@@ -423,10 +423,8 @@ static int pptp_bind(struct socket *sock, struct sockaddr *uservaddr, | |||
423 | lock_sock(sk); | 423 | lock_sock(sk); |
424 | 424 | ||
425 | opt->src_addr = sp->sa_addr.pptp; | 425 | opt->src_addr = sp->sa_addr.pptp; |
426 | if (add_chan(po)) { | 426 | if (add_chan(po)) |
427 | release_sock(sk); | ||
428 | error = -EBUSY; | 427 | error = -EBUSY; |
429 | } | ||
430 | 428 | ||
431 | release_sock(sk); | 429 | release_sock(sk); |
432 | return error; | 430 | return error; |
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index e6fed4d4cb77..e95f0e60a9bc 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -1655,6 +1655,10 @@ static const struct usb_device_id products [] = { | |||
1655 | // ASIX 88772a | 1655 | // ASIX 88772a |
1656 | USB_DEVICE(0x0db0, 0xa877), | 1656 | USB_DEVICE(0x0db0, 0xa877), |
1657 | .driver_info = (unsigned long) &ax88772_info, | 1657 | .driver_info = (unsigned long) &ax88772_info, |
1658 | }, { | ||
1659 | // Asus USB Ethernet Adapter | ||
1660 | USB_DEVICE (0x0b95, 0x7e2b), | ||
1661 | .driver_info = (unsigned long) &ax88772_info, | ||
1658 | }, | 1662 | }, |
1659 | { }, // END | 1663 | { }, // END |
1660 | }; | 1664 | }; |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 93fbe6f40898..d2348a5a7809 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -286,7 +286,7 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start) | |||
286 | ath_start_ani(common); | 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 | struct ath_hw_antcomb_conf div_ant_conf; | 290 | struct ath_hw_antcomb_conf div_ant_conf; |
291 | u8 lna_conf; | 291 | u8 lna_conf; |
292 | 292 | ||
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 888abc2be3a5..528d5f3e868c 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -1271,7 +1271,9 @@ static void ath_rc_init(struct ath_softc *sc, | |||
1271 | 1271 | ||
1272 | ath_rc_priv->max_valid_rate = k; | 1272 | ath_rc_priv->max_valid_rate = k; |
1273 | ath_rc_sort_validrates(rate_table, ath_rc_priv); | 1273 | ath_rc_sort_validrates(rate_table, ath_rc_priv); |
1274 | ath_rc_priv->rate_max_phy = ath_rc_priv->valid_rate_index[k-4]; | 1274 | ath_rc_priv->rate_max_phy = (k > 4) ? |
1275 | ath_rc_priv->valid_rate_index[k-4] : | ||
1276 | ath_rc_priv->valid_rate_index[k-1]; | ||
1275 | ath_rc_priv->rate_table = rate_table; | 1277 | ath_rc_priv->rate_table = rate_table; |
1276 | 1278 | ||
1277 | ath_dbg(common, ATH_DBG_CONFIG, | 1279 | ath_dbg(common, ATH_DBG_CONFIG, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index a7a6def40d05..5c7c17c7166a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -606,8 +606,8 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
606 | if (ctx->ht.enabled) { | 606 | if (ctx->ht.enabled) { |
607 | /* if HT40 is used, it should not change | 607 | /* if HT40 is used, it should not change |
608 | * after associated except channel switch */ | 608 | * after associated except channel switch */ |
609 | if (iwl_is_associated_ctx(ctx) && | 609 | if (!ctx->ht.is_40mhz || |
610 | !ctx->ht.is_40mhz) | 610 | !iwl_is_associated_ctx(ctx)) |
611 | iwlagn_config_ht40(conf, ctx); | 611 | iwlagn_config_ht40(conf, ctx); |
612 | } else | 612 | } else |
613 | ctx->ht.is_40mhz = false; | 613 | ctx->ht.is_40mhz = false; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index 35a6b71f358c..df1540ca6102 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -91,7 +91,10 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv, | |||
91 | tx_cmd->tid_tspec = qc[0] & 0xf; | 91 | tx_cmd->tid_tspec = qc[0] & 0xf; |
92 | tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK; | 92 | tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK; |
93 | } else { | 93 | } else { |
94 | tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK; | 94 | if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) |
95 | tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK; | ||
96 | else | ||
97 | tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK; | ||
95 | } | 98 | } |
96 | 99 | ||
97 | iwlagn_tx_cmd_protection(priv, info, fc, &tx_flags); | 100 | iwlagn_tx_cmd_protection(priv, info, fc, &tx_flags); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index bacc06c95e7a..e0e9a3dfbc00 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2850,6 +2850,9 @@ static int iwlagn_mac_tx_sync(struct ieee80211_hw *hw, | |||
2850 | int ret; | 2850 | int ret; |
2851 | u8 sta_id; | 2851 | u8 sta_id; |
2852 | 2852 | ||
2853 | if (ctx->ctxid != IWL_RXON_CTX_PAN) | ||
2854 | return 0; | ||
2855 | |||
2853 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 2856 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2854 | mutex_lock(&priv->shrd->mutex); | 2857 | mutex_lock(&priv->shrd->mutex); |
2855 | 2858 | ||
@@ -2898,6 +2901,9 @@ static void iwlagn_mac_finish_tx_sync(struct ieee80211_hw *hw, | |||
2898 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; | 2901 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; |
2899 | struct iwl_rxon_context *ctx = vif_priv->ctx; | 2902 | struct iwl_rxon_context *ctx = vif_priv->ctx; |
2900 | 2903 | ||
2904 | if (ctx->ctxid != IWL_RXON_CTX_PAN) | ||
2905 | return; | ||
2906 | |||
2901 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 2907 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2902 | mutex_lock(&priv->shrd->mutex); | 2908 | mutex_lock(&priv->shrd->mutex); |
2903 | 2909 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index ce918980e977..5f17ab8e76ba 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | |||
@@ -1197,9 +1197,7 @@ static int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb, | |||
1197 | iwl_print_hex_dump(trans, IWL_DL_TX, (u8 *)tx_cmd->hdr, hdr_len); | 1197 | iwl_print_hex_dump(trans, IWL_DL_TX, (u8 *)tx_cmd->hdr, hdr_len); |
1198 | 1198 | ||
1199 | /* Set up entry for this TFD in Tx byte-count array */ | 1199 | /* Set up entry for this TFD in Tx byte-count array */ |
1200 | if (is_agg) | 1200 | iwl_trans_txq_update_byte_cnt_tbl(trans, txq, le16_to_cpu(tx_cmd->len)); |
1201 | iwl_trans_txq_update_byte_cnt_tbl(trans, txq, | ||
1202 | le16_to_cpu(tx_cmd->len)); | ||
1203 | 1201 | ||
1204 | dma_sync_single_for_device(bus(trans)->dev, txcmd_phys, firstlen, | 1202 | dma_sync_single_for_device(bus(trans)->dev, txcmd_phys, firstlen, |
1205 | DMA_BIDIRECTIONAL); | 1203 | DMA_BIDIRECTIONAL); |
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c index ac278156d390..6e0a3eaecf70 100644 --- a/drivers/net/wireless/mwifiex/cmdevt.c +++ b/drivers/net/wireless/mwifiex/cmdevt.c | |||
@@ -939,7 +939,6 @@ mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter) | |||
939 | { | 939 | { |
940 | struct cmd_ctrl_node *cmd_node = NULL, *tmp_node = NULL; | 940 | struct cmd_ctrl_node *cmd_node = NULL, *tmp_node = NULL; |
941 | unsigned long cmd_flags; | 941 | unsigned long cmd_flags; |
942 | unsigned long cmd_pending_q_flags; | ||
943 | unsigned long scan_pending_q_flags; | 942 | unsigned long scan_pending_q_flags; |
944 | uint16_t cancel_scan_cmd = false; | 943 | uint16_t cancel_scan_cmd = false; |
945 | 944 | ||
@@ -949,12 +948,9 @@ mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter) | |||
949 | cmd_node = adapter->curr_cmd; | 948 | cmd_node = adapter->curr_cmd; |
950 | cmd_node->wait_q_enabled = false; | 949 | cmd_node->wait_q_enabled = false; |
951 | cmd_node->cmd_flag |= CMD_F_CANCELED; | 950 | cmd_node->cmd_flag |= CMD_F_CANCELED; |
952 | spin_lock_irqsave(&adapter->cmd_pending_q_lock, | ||
953 | cmd_pending_q_flags); | ||
954 | list_del(&cmd_node->list); | ||
955 | spin_unlock_irqrestore(&adapter->cmd_pending_q_lock, | ||
956 | cmd_pending_q_flags); | ||
957 | mwifiex_insert_cmd_to_free_q(adapter, cmd_node); | 951 | mwifiex_insert_cmd_to_free_q(adapter, cmd_node); |
952 | mwifiex_complete_cmd(adapter, adapter->curr_cmd); | ||
953 | adapter->curr_cmd = NULL; | ||
958 | spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, cmd_flags); | 954 | spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, cmd_flags); |
959 | } | 955 | } |
960 | 956 | ||
@@ -981,7 +977,6 @@ mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter) | |||
981 | spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, cmd_flags); | 977 | spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, cmd_flags); |
982 | } | 978 | } |
983 | adapter->cmd_wait_q.status = -1; | 979 | adapter->cmd_wait_q.status = -1; |
984 | mwifiex_complete_cmd(adapter, adapter->curr_cmd); | ||
985 | } | 980 | } |
986 | 981 | ||
987 | /* | 982 | /* |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c index 592a10ac5929..3b585aadabfc 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | |||
@@ -569,7 +569,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw, | |||
569 | } | 569 | } |
570 | case ERFSLEEP:{ | 570 | case ERFSLEEP:{ |
571 | if (ppsc->rfpwr_state == ERFOFF) | 571 | if (ppsc->rfpwr_state == ERFOFF) |
572 | break; | 572 | return false; |
573 | for (queue_id = 0, i = 0; | 573 | for (queue_id = 0, i = 0; |
574 | queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { | 574 | queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { |
575 | ring = &pcipriv->dev.tx_ring[queue_id]; | 575 | ring = &pcipriv->dev.tx_ring[queue_id]; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c index 72852900df84..e49cf2244c75 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c | |||
@@ -548,7 +548,7 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw, | |||
548 | break; | 548 | break; |
549 | case ERFSLEEP: | 549 | case ERFSLEEP: |
550 | if (ppsc->rfpwr_state == ERFOFF) | 550 | if (ppsc->rfpwr_state == ERFOFF) |
551 | break; | 551 | return false; |
552 | for (queue_id = 0, i = 0; | 552 | for (queue_id = 0, i = 0; |
553 | queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { | 553 | queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { |
554 | ring = &pcipriv->dev.tx_ring[queue_id]; | 554 | ring = &pcipriv->dev.tx_ring[queue_id]; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c index 3ac7af1c5509..0883349e1c83 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c | |||
@@ -3374,7 +3374,7 @@ bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw, | |||
3374 | break; | 3374 | break; |
3375 | case ERFSLEEP: | 3375 | case ERFSLEEP: |
3376 | if (ppsc->rfpwr_state == ERFOFF) | 3376 | if (ppsc->rfpwr_state == ERFOFF) |
3377 | break; | 3377 | return false; |
3378 | 3378 | ||
3379 | for (queue_id = 0, i = 0; | 3379 | for (queue_id = 0, i = 0; |
3380 | queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { | 3380 | queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c index f27171af979c..f10ac1ad9087 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c | |||
@@ -602,7 +602,7 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw, | |||
602 | } | 602 | } |
603 | case ERFSLEEP: | 603 | case ERFSLEEP: |
604 | if (ppsc->rfpwr_state == ERFOFF) | 604 | if (ppsc->rfpwr_state == ERFOFF) |
605 | break; | 605 | return false; |
606 | 606 | ||
607 | for (queue_id = 0, i = 0; | 607 | for (queue_id = 0, i = 0; |
608 | queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { | 608 | queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { |