diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath9k/core.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/xmit.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_usb.c | 1 | ||||
-rw-r--r-- | drivers/serial/atmel_serial.c | 32 |
6 files changed, 33 insertions, 23 deletions
diff --git a/drivers/net/wireless/ath9k/core.c b/drivers/net/wireless/ath9k/core.c index f6c45288d0e7..c04959357bda 100644 --- a/drivers/net/wireless/ath9k/core.c +++ b/drivers/net/wireless/ath9k/core.c | |||
@@ -294,8 +294,6 @@ static int ath_stop(struct ath_softc *sc) | |||
294 | * hardware is gone (invalid). | 294 | * hardware is gone (invalid). |
295 | */ | 295 | */ |
296 | 296 | ||
297 | if (!sc->sc_invalid) | ||
298 | ath9k_hw_set_interrupts(ah, 0); | ||
299 | ath_draintxq(sc, false); | 297 | ath_draintxq(sc, false); |
300 | if (!sc->sc_invalid) { | 298 | if (!sc->sc_invalid) { |
301 | ath_stoprecv(sc); | 299 | ath_stoprecv(sc); |
@@ -1336,6 +1334,8 @@ void ath_deinit(struct ath_softc *sc) | |||
1336 | 1334 | ||
1337 | DPRINTF(sc, ATH_DBG_CONFIG, "%s\n", __func__); | 1335 | DPRINTF(sc, ATH_DBG_CONFIG, "%s\n", __func__); |
1338 | 1336 | ||
1337 | tasklet_kill(&sc->intr_tq); | ||
1338 | tasklet_kill(&sc->bcon_tasklet); | ||
1339 | ath_stop(sc); | 1339 | ath_stop(sc); |
1340 | if (!sc->sc_invalid) | 1340 | if (!sc->sc_invalid) |
1341 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE); | 1341 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE); |
diff --git a/drivers/net/wireless/ath9k/core.h b/drivers/net/wireless/ath9k/core.h index 4ee695b76b88..2f84093331ee 100644 --- a/drivers/net/wireless/ath9k/core.h +++ b/drivers/net/wireless/ath9k/core.h | |||
@@ -974,7 +974,6 @@ struct ath_softc { | |||
974 | u32 sc_keymax; /* size of key cache */ | 974 | u32 sc_keymax; /* size of key cache */ |
975 | DECLARE_BITMAP(sc_keymap, ATH_KEYMAX); /* key use bit map */ | 975 | DECLARE_BITMAP(sc_keymap, ATH_KEYMAX); /* key use bit map */ |
976 | u8 sc_splitmic; /* split TKIP MIC keys */ | 976 | u8 sc_splitmic; /* split TKIP MIC keys */ |
977 | int sc_keytype; | ||
978 | 977 | ||
979 | /* RX */ | 978 | /* RX */ |
980 | struct list_head sc_rxbuf; | 979 | struct list_head sc_rxbuf; |
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 99badf1404c3..acebdf1d20a8 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -206,8 +206,6 @@ static int ath_key_config(struct ath_softc *sc, | |||
206 | if (!ret) | 206 | if (!ret) |
207 | return -EIO; | 207 | return -EIO; |
208 | 208 | ||
209 | if (mac) | ||
210 | sc->sc_keytype = hk.kv_type; | ||
211 | return 0; | 209 | return 0; |
212 | } | 210 | } |
213 | 211 | ||
@@ -778,7 +776,6 @@ static int ath9k_set_key(struct ieee80211_hw *hw, | |||
778 | case DISABLE_KEY: | 776 | case DISABLE_KEY: |
779 | ath_key_delete(sc, key); | 777 | ath_key_delete(sc, key); |
780 | clear_bit(key->keyidx, sc->sc_keymap); | 778 | clear_bit(key->keyidx, sc->sc_keymap); |
781 | sc->sc_keytype = ATH9K_CIPHER_CLR; | ||
782 | break; | 779 | break; |
783 | default: | 780 | default: |
784 | ret = -EINVAL; | 781 | ret = -EINVAL; |
@@ -1414,10 +1411,17 @@ static void ath_pci_remove(struct pci_dev *pdev) | |||
1414 | { | 1411 | { |
1415 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); | 1412 | struct ieee80211_hw *hw = pci_get_drvdata(pdev); |
1416 | struct ath_softc *sc = hw->priv; | 1413 | struct ath_softc *sc = hw->priv; |
1414 | enum ath9k_int status; | ||
1417 | 1415 | ||
1418 | if (pdev->irq) | 1416 | if (pdev->irq) { |
1417 | ath9k_hw_set_interrupts(sc->sc_ah, 0); | ||
1418 | /* clear the ISR */ | ||
1419 | ath9k_hw_getisr(sc->sc_ah, &status); | ||
1420 | sc->sc_invalid = 1; | ||
1419 | free_irq(pdev->irq, sc); | 1421 | free_irq(pdev->irq, sc); |
1422 | } | ||
1420 | ath_detach(sc); | 1423 | ath_detach(sc); |
1424 | |||
1421 | pci_iounmap(pdev, sc->mem); | 1425 | pci_iounmap(pdev, sc->mem); |
1422 | pci_release_region(pdev, 0); | 1426 | pci_release_region(pdev, 0); |
1423 | pci_disable_device(pdev); | 1427 | pci_disable_device(pdev); |
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c index 550129f717e2..8b332e11a656 100644 --- a/drivers/net/wireless/ath9k/xmit.c +++ b/drivers/net/wireless/ath9k/xmit.c | |||
@@ -315,11 +315,11 @@ static int ath_tx_prepare(struct ath_softc *sc, | |||
315 | txctl->keyix = tx_info->control.hw_key->hw_key_idx; | 315 | txctl->keyix = tx_info->control.hw_key->hw_key_idx; |
316 | txctl->frmlen += tx_info->control.icv_len; | 316 | txctl->frmlen += tx_info->control.icv_len; |
317 | 317 | ||
318 | if (sc->sc_keytype == ATH9K_CIPHER_WEP) | 318 | if (tx_info->control.hw_key->alg == ALG_WEP) |
319 | txctl->keytype = ATH9K_KEY_TYPE_WEP; | 319 | txctl->keytype = ATH9K_KEY_TYPE_WEP; |
320 | else if (sc->sc_keytype == ATH9K_CIPHER_TKIP) | 320 | else if (tx_info->control.hw_key->alg == ALG_TKIP) |
321 | txctl->keytype = ATH9K_KEY_TYPE_TKIP; | 321 | txctl->keytype = ATH9K_KEY_TYPE_TKIP; |
322 | else if (sc->sc_keytype == ATH9K_CIPHER_AES_CCM) | 322 | else if (tx_info->control.hw_key->alg == ALG_CCMP) |
323 | txctl->keytype = ATH9K_KEY_TYPE_AES; | 323 | txctl->keytype = ATH9K_KEY_TYPE_AES; |
324 | } | 324 | } |
325 | 325 | ||
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index da8b7433e3a6..a60ae86bd5c9 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -58,6 +58,7 @@ static struct usb_device_id usb_ids[] = { | |||
58 | { USB_DEVICE(0x0586, 0x3407), .driver_info = DEVICE_ZD1211 }, | 58 | { USB_DEVICE(0x0586, 0x3407), .driver_info = DEVICE_ZD1211 }, |
59 | { USB_DEVICE(0x129b, 0x1666), .driver_info = DEVICE_ZD1211 }, | 59 | { USB_DEVICE(0x129b, 0x1666), .driver_info = DEVICE_ZD1211 }, |
60 | { USB_DEVICE(0x157e, 0x300a), .driver_info = DEVICE_ZD1211 }, | 60 | { USB_DEVICE(0x157e, 0x300a), .driver_info = DEVICE_ZD1211 }, |
61 | { USB_DEVICE(0x0105, 0x145f), .driver_info = DEVICE_ZD1211 }, | ||
61 | /* ZD1211B */ | 62 | /* ZD1211B */ |
62 | { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B }, | 63 | { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B }, |
63 | { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B }, | 64 | { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B }, |
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index 3a6da80b081c..61fb8b6d19af 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
@@ -131,7 +131,8 @@ struct atmel_uart_char { | |||
131 | struct atmel_uart_port { | 131 | struct atmel_uart_port { |
132 | struct uart_port uart; /* uart */ | 132 | struct uart_port uart; /* uart */ |
133 | struct clk *clk; /* uart clock */ | 133 | struct clk *clk; /* uart clock */ |
134 | unsigned short suspended; /* is port suspended? */ | 134 | int may_wakeup; /* cached value of device_may_wakeup for times we need to disable it */ |
135 | u32 backup_imr; /* IMR saved during suspend */ | ||
135 | int break_active; /* break being received */ | 136 | int break_active; /* break being received */ |
136 | 137 | ||
137 | short use_dma_rx; /* enable PDC receiver */ | 138 | short use_dma_rx; /* enable PDC receiver */ |
@@ -984,8 +985,15 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state, | |||
984 | * This is called on uart_open() or a resume event. | 985 | * This is called on uart_open() or a resume event. |
985 | */ | 986 | */ |
986 | clk_enable(atmel_port->clk); | 987 | clk_enable(atmel_port->clk); |
988 | |||
989 | /* re-enable interrupts if we disabled some on suspend */ | ||
990 | UART_PUT_IER(port, atmel_port->backup_imr); | ||
987 | break; | 991 | break; |
988 | case 3: | 992 | case 3: |
993 | /* Back up the interrupt mask and disable all interrupts */ | ||
994 | atmel_port->backup_imr = UART_GET_IMR(port); | ||
995 | UART_PUT_IDR(port, -1); | ||
996 | |||
989 | /* | 997 | /* |
990 | * Disable the peripheral clock for this serial port. | 998 | * Disable the peripheral clock for this serial port. |
991 | * This is called on uart_close() or a suspend event. | 999 | * This is called on uart_close() or a suspend event. |
@@ -1475,13 +1483,12 @@ static int atmel_serial_suspend(struct platform_device *pdev, | |||
1475 | cpu_relax(); | 1483 | cpu_relax(); |
1476 | } | 1484 | } |
1477 | 1485 | ||
1478 | if (device_may_wakeup(&pdev->dev) | 1486 | /* we can not wake up if we're running on slow clock */ |
1479 | && !atmel_serial_clk_will_stop()) | 1487 | atmel_port->may_wakeup = device_may_wakeup(&pdev->dev); |
1480 | enable_irq_wake(port->irq); | 1488 | if (atmel_serial_clk_will_stop()) |
1481 | else { | 1489 | device_set_wakeup_enable(&pdev->dev, 0); |
1482 | uart_suspend_port(&atmel_uart, port); | 1490 | |
1483 | atmel_port->suspended = 1; | 1491 | uart_suspend_port(&atmel_uart, port); |
1484 | } | ||
1485 | 1492 | ||
1486 | return 0; | 1493 | return 0; |
1487 | } | 1494 | } |
@@ -1491,11 +1498,8 @@ static int atmel_serial_resume(struct platform_device *pdev) | |||
1491 | struct uart_port *port = platform_get_drvdata(pdev); | 1498 | struct uart_port *port = platform_get_drvdata(pdev); |
1492 | struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); | 1499 | struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); |
1493 | 1500 | ||
1494 | if (atmel_port->suspended) { | 1501 | uart_resume_port(&atmel_uart, port); |
1495 | uart_resume_port(&atmel_uart, port); | 1502 | device_set_wakeup_enable(&pdev->dev, atmel_port->may_wakeup); |
1496 | atmel_port->suspended = 0; | ||
1497 | } else | ||
1498 | disable_irq_wake(port->irq); | ||
1499 | 1503 | ||
1500 | return 0; | 1504 | return 0; |
1501 | } | 1505 | } |
@@ -1513,6 +1517,8 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev) | |||
1513 | BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE)); | 1517 | BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE)); |
1514 | 1518 | ||
1515 | port = &atmel_ports[pdev->id]; | 1519 | port = &atmel_ports[pdev->id]; |
1520 | port->backup_imr = 0; | ||
1521 | |||
1516 | atmel_init_port(port, pdev); | 1522 | atmel_init_port(port, pdev); |
1517 | 1523 | ||
1518 | if (!atmel_use_dma_rx(&port->uart)) { | 1524 | if (!atmel_use_dma_rx(&port->uart)) { |