diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 13 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_def.c | 12 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 7 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/htc.h | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_init.c | 6 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 4 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/mac.c | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 26 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 9 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 22 | ||||
| -rw-r--r-- | drivers/net/wireless/orinoco/main.c | 6 | ||||
| -rw-r--r-- | drivers/net/wireless/orinoco/orinoco_cs.c | 14 | ||||
| -rw-r--r-- | drivers/net/wireless/orinoco/spectrum_cs.c | 14 | ||||
| -rw-r--r-- | drivers/net/wireless/orinoco/wext.c | 4 |
15 files changed, 82 insertions, 63 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 8251946842e..42ed923cdb1 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
| @@ -1917,7 +1917,8 @@ ath5k_beacon_send(struct ath5k_softc *sc) | |||
| 1917 | sc->bmisscount = 0; | 1917 | sc->bmisscount = 0; |
| 1918 | } | 1918 | } |
| 1919 | 1919 | ||
| 1920 | if (sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) { | 1920 | if ((sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) || |
| 1921 | sc->opmode == NL80211_IFTYPE_MESH_POINT) { | ||
| 1921 | u64 tsf = ath5k_hw_get_tsf64(ah); | 1922 | u64 tsf = ath5k_hw_get_tsf64(ah); |
| 1922 | u32 tsftu = TSF_TO_TU(tsf); | 1923 | u32 tsftu = TSF_TO_TU(tsf); |
| 1923 | int slot = ((tsftu % sc->bintval) * ATH_BCBUF) / sc->bintval; | 1924 | int slot = ((tsftu % sc->bintval) * ATH_BCBUF) / sc->bintval; |
| @@ -1949,8 +1950,9 @@ ath5k_beacon_send(struct ath5k_softc *sc) | |||
| 1949 | /* NB: hw still stops DMA, so proceed */ | 1950 | /* NB: hw still stops DMA, so proceed */ |
| 1950 | } | 1951 | } |
| 1951 | 1952 | ||
| 1952 | /* refresh the beacon for AP mode */ | 1953 | /* refresh the beacon for AP or MESH mode */ |
| 1953 | if (sc->opmode == NL80211_IFTYPE_AP) | 1954 | if (sc->opmode == NL80211_IFTYPE_AP || |
| 1955 | sc->opmode == NL80211_IFTYPE_MESH_POINT) | ||
| 1954 | ath5k_beacon_update(sc->hw, vif); | 1956 | ath5k_beacon_update(sc->hw, vif); |
| 1955 | 1957 | ||
| 1956 | ath5k_hw_set_txdp(ah, sc->bhalq, bf->daddr); | 1958 | ath5k_hw_set_txdp(ah, sc->bhalq, bf->daddr); |
| @@ -2851,7 +2853,8 @@ static int ath5k_add_interface(struct ieee80211_hw *hw, | |||
| 2851 | 2853 | ||
| 2852 | /* Assign the vap/adhoc to a beacon xmit slot. */ | 2854 | /* Assign the vap/adhoc to a beacon xmit slot. */ |
| 2853 | if ((avf->opmode == NL80211_IFTYPE_AP) || | 2855 | if ((avf->opmode == NL80211_IFTYPE_AP) || |
| 2854 | (avf->opmode == NL80211_IFTYPE_ADHOC)) { | 2856 | (avf->opmode == NL80211_IFTYPE_ADHOC) || |
| 2857 | (avf->opmode == NL80211_IFTYPE_MESH_POINT)) { | ||
| 2855 | int slot; | 2858 | int slot; |
| 2856 | 2859 | ||
| 2857 | WARN_ON(list_empty(&sc->bcbuf)); | 2860 | WARN_ON(list_empty(&sc->bcbuf)); |
| @@ -2870,7 +2873,7 @@ static int ath5k_add_interface(struct ieee80211_hw *hw, | |||
| 2870 | sc->bslot[avf->bslot] = vif; | 2873 | sc->bslot[avf->bslot] = vif; |
| 2871 | if (avf->opmode == NL80211_IFTYPE_AP) | 2874 | if (avf->opmode == NL80211_IFTYPE_AP) |
| 2872 | sc->num_ap_vifs++; | 2875 | sc->num_ap_vifs++; |
| 2873 | else | 2876 | else if (avf->opmode == NL80211_IFTYPE_ADHOC) |
| 2874 | sc->num_adhoc_vifs++; | 2877 | sc->num_adhoc_vifs++; |
| 2875 | } | 2878 | } |
| 2876 | 2879 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 0d0bec3628e..0963071e8f9 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
| @@ -329,7 +329,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp); | |||
| 329 | struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype); | 329 | struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype); |
| 330 | void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq); | 330 | void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq); |
| 331 | int ath_tx_setup(struct ath_softc *sc, int haltype); | 331 | int ath_tx_setup(struct ath_softc *sc, int haltype); |
| 332 | void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx); | 332 | bool ath_drain_all_txq(struct ath_softc *sc, bool retry_tx); |
| 333 | void ath_draintxq(struct ath_softc *sc, | 333 | void ath_draintxq(struct ath_softc *sc, |
| 334 | struct ath_txq *txq, bool retry_tx); | 334 | struct ath_txq *txq, bool retry_tx); |
| 335 | void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an); | 335 | void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an); |
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c index 526d7c933f7..a3ccb1b9638 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c | |||
| @@ -1063,15 +1063,19 @@ static void ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah, | |||
| 1063 | case 1: | 1063 | case 1: |
| 1064 | break; | 1064 | break; |
| 1065 | case 2: | 1065 | case 2: |
| 1066 | scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; | 1066 | if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN) |
| 1067 | scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; | ||
| 1068 | else | ||
| 1069 | scaledPower = 0; | ||
| 1067 | break; | 1070 | break; |
| 1068 | case 3: | 1071 | case 3: |
| 1069 | scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; | 1072 | if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN) |
| 1073 | scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN; | ||
| 1074 | else | ||
| 1075 | scaledPower = 0; | ||
| 1070 | break; | 1076 | break; |
| 1071 | } | 1077 | } |
| 1072 | 1078 | ||
| 1073 | scaledPower = max((u16)0, scaledPower); | ||
| 1074 | |||
| 1075 | if (IS_CHAN_2GHZ(chan)) { | 1079 | if (IS_CHAN_2GHZ(chan)) { |
| 1076 | numCtlModes = ARRAY_SIZE(ctlModesFor11g) - | 1080 | numCtlModes = ARRAY_SIZE(ctlModesFor11g) - |
| 1077 | SUB_NUM_CTL_MODES_AT_2G_40; | 1081 | SUB_NUM_CTL_MODES_AT_2G_40; |
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index dfb6560dab9..0de3c3d3c24 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
| @@ -1024,6 +1024,13 @@ static int ath9k_hif_usb_suspend(struct usb_interface *interface, | |||
| 1024 | struct hif_device_usb *hif_dev = | 1024 | struct hif_device_usb *hif_dev = |
| 1025 | (struct hif_device_usb *) usb_get_intfdata(interface); | 1025 | (struct hif_device_usb *) usb_get_intfdata(interface); |
| 1026 | 1026 | ||
| 1027 | /* | ||
| 1028 | * The device has to be set to FULLSLEEP mode in case no | ||
| 1029 | * interface is up. | ||
| 1030 | */ | ||
| 1031 | if (!(hif_dev->flags & HIF_USB_START)) | ||
| 1032 | ath9k_htc_suspend(hif_dev->htc_handle); | ||
| 1033 | |||
| 1027 | ath9k_hif_usb_dealloc_urbs(hif_dev); | 1034 | ath9k_hif_usb_dealloc_urbs(hif_dev); |
| 1028 | 1035 | ||
| 1029 | return 0; | 1036 | return 0; |
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 75ecf6a30d2..c3b561daa6c 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
| @@ -455,6 +455,8 @@ u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv); | |||
| 455 | void ath9k_htc_ps_wakeup(struct ath9k_htc_priv *priv); | 455 | void ath9k_htc_ps_wakeup(struct ath9k_htc_priv *priv); |
| 456 | void ath9k_htc_ps_restore(struct ath9k_htc_priv *priv); | 456 | void ath9k_htc_ps_restore(struct ath9k_htc_priv *priv); |
| 457 | void ath9k_ps_work(struct work_struct *work); | 457 | void ath9k_ps_work(struct work_struct *work); |
| 458 | bool ath9k_htc_setpower(struct ath9k_htc_priv *priv, | ||
| 459 | enum ath9k_power_mode mode); | ||
| 458 | 460 | ||
| 459 | void ath9k_start_rfkill_poll(struct ath9k_htc_priv *priv); | 461 | void ath9k_start_rfkill_poll(struct ath9k_htc_priv *priv); |
| 460 | void ath9k_init_leds(struct ath9k_htc_priv *priv); | 462 | void ath9k_init_leds(struct ath9k_htc_priv *priv); |
| @@ -464,6 +466,7 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev, | |||
| 464 | u16 devid, char *product); | 466 | u16 devid, char *product); |
| 465 | void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug); | 467 | void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug); |
| 466 | #ifdef CONFIG_PM | 468 | #ifdef CONFIG_PM |
| 469 | void ath9k_htc_suspend(struct htc_target *htc_handle); | ||
| 467 | int ath9k_htc_resume(struct htc_target *htc_handle); | 470 | int ath9k_htc_resume(struct htc_target *htc_handle); |
| 468 | #endif | 471 | #endif |
| 469 | #ifdef CONFIG_ATH9K_HTC_DEBUGFS | 472 | #ifdef CONFIG_ATH9K_HTC_DEBUGFS |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 7c8a38d0456..8776f49ffd4 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
| @@ -891,6 +891,12 @@ void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug) | |||
| 891 | } | 891 | } |
| 892 | 892 | ||
| 893 | #ifdef CONFIG_PM | 893 | #ifdef CONFIG_PM |
| 894 | |||
| 895 | void ath9k_htc_suspend(struct htc_target *htc_handle) | ||
| 896 | { | ||
| 897 | ath9k_htc_setpower(htc_handle->drv_priv, ATH9K_PM_FULL_SLEEP); | ||
| 898 | } | ||
| 899 | |||
| 894 | int ath9k_htc_resume(struct htc_target *htc_handle) | 900 | int ath9k_htc_resume(struct htc_target *htc_handle) |
| 895 | { | 901 | { |
| 896 | int ret; | 902 | int ret; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 9a3be8da755..51977caca47 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
| @@ -63,8 +63,8 @@ static enum htc_phymode ath9k_htc_get_curmode(struct ath9k_htc_priv *priv, | |||
| 63 | return mode; | 63 | return mode; |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | static bool ath9k_htc_setpower(struct ath9k_htc_priv *priv, | 66 | bool ath9k_htc_setpower(struct ath9k_htc_priv *priv, |
| 67 | enum ath9k_power_mode mode) | 67 | enum ath9k_power_mode mode) |
| 68 | { | 68 | { |
| 69 | bool ret; | 69 | bool ret; |
| 70 | 70 | ||
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index 8c13479b17c..c996963ab33 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c | |||
| @@ -703,8 +703,7 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds, | |||
| 703 | rs->rs_phyerr = phyerr; | 703 | rs->rs_phyerr = phyerr; |
| 704 | } else if (ads.ds_rxstatus8 & AR_DecryptCRCErr) | 704 | } else if (ads.ds_rxstatus8 & AR_DecryptCRCErr) |
| 705 | rs->rs_status |= ATH9K_RXERR_DECRYPT; | 705 | rs->rs_status |= ATH9K_RXERR_DECRYPT; |
| 706 | else if ((ads.ds_rxstatus8 & AR_MichaelErr) && | 706 | else if (ads.ds_rxstatus8 & AR_MichaelErr) |
| 707 | rs->rs_keyix != ATH9K_RXKEYIX_INVALID) | ||
| 708 | rs->rs_status |= ATH9K_RXERR_MIC; | 707 | rs->rs_status |= ATH9K_RXERR_MIC; |
| 709 | else if (ads.ds_rxstatus8 & AR_KeyMiss) | 708 | else if (ads.ds_rxstatus8 & AR_KeyMiss) |
| 710 | rs->rs_status |= ATH9K_RXERR_DECRYPT; | 709 | rs->rs_status |= ATH9K_RXERR_DECRYPT; |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index dace215b693..c0c3464d3a8 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
| @@ -244,11 +244,12 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, | |||
| 244 | * the relevant bits of the h/w. | 244 | * the relevant bits of the h/w. |
| 245 | */ | 245 | */ |
| 246 | ath9k_hw_set_interrupts(ah, 0); | 246 | ath9k_hw_set_interrupts(ah, 0); |
| 247 | ath_drain_all_txq(sc, false); | 247 | stopped = ath_drain_all_txq(sc, false); |
| 248 | 248 | ||
| 249 | spin_lock_bh(&sc->rx.pcu_lock); | 249 | spin_lock_bh(&sc->rx.pcu_lock); |
| 250 | 250 | ||
| 251 | stopped = ath_stoprecv(sc); | 251 | if (!ath_stoprecv(sc)) |
| 252 | stopped = false; | ||
| 252 | 253 | ||
| 253 | /* XXX: do not flush receive queue here. We don't want | 254 | /* XXX: do not flush receive queue here. We don't want |
| 254 | * to flush data frames already in queue because of | 255 | * to flush data frames already in queue because of |
| @@ -1519,8 +1520,6 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
| 1519 | struct ath_softc *sc = aphy->sc; | 1520 | struct ath_softc *sc = aphy->sc; |
| 1520 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 1521 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
| 1521 | struct ath_vif *avp = (void *)vif->drv_priv; | 1522 | struct ath_vif *avp = (void *)vif->drv_priv; |
| 1522 | bool bs_valid = false; | ||
| 1523 | int i; | ||
| 1524 | 1523 | ||
| 1525 | ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n"); | 1524 | ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n"); |
| 1526 | 1525 | ||
| @@ -1534,26 +1533,21 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
| 1534 | if ((sc->sc_ah->opmode == NL80211_IFTYPE_AP) || | 1533 | if ((sc->sc_ah->opmode == NL80211_IFTYPE_AP) || |
| 1535 | (sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC) || | 1534 | (sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC) || |
| 1536 | (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) { | 1535 | (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) { |
| 1536 | /* Disable SWBA interrupt */ | ||
| 1537 | sc->sc_ah->imask &= ~ATH9K_INT_SWBA; | ||
| 1537 | ath9k_ps_wakeup(sc); | 1538 | ath9k_ps_wakeup(sc); |
| 1539 | ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_ah->imask); | ||
| 1538 | ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); | 1540 | ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); |
| 1539 | ath9k_ps_restore(sc); | 1541 | ath9k_ps_restore(sc); |
| 1542 | tasklet_kill(&sc->bcon_tasklet); | ||
| 1540 | } | 1543 | } |
| 1541 | 1544 | ||
| 1542 | ath_beacon_return(sc, avp); | 1545 | ath_beacon_return(sc, avp); |
| 1543 | sc->sc_flags &= ~SC_OP_BEACONS; | 1546 | sc->sc_flags &= ~SC_OP_BEACONS; |
| 1544 | 1547 | ||
| 1545 | for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) { | 1548 | if (sc->nbcnvifs) { |
| 1546 | if (sc->beacon.bslot[i] == vif) { | 1549 | /* Re-enable SWBA interrupt */ |
| 1547 | printk(KERN_DEBUG "%s: vif had allocated beacon " | 1550 | sc->sc_ah->imask |= ATH9K_INT_SWBA; |
| 1548 | "slot\n", __func__); | ||
| 1549 | sc->beacon.bslot[i] = NULL; | ||
| 1550 | sc->beacon.bslot_aphy[i] = NULL; | ||
| 1551 | } else if (sc->beacon.bslot[i]) | ||
| 1552 | bs_valid = true; | ||
| 1553 | } | ||
| 1554 | if (!bs_valid && (sc->sc_ah->imask & ATH9K_INT_SWBA)) { | ||
| 1555 | /* Disable SWBA interrupt */ | ||
| 1556 | sc->sc_ah->imask &= ~ATH9K_INT_SWBA; | ||
| 1557 | ath9k_ps_wakeup(sc); | 1551 | ath9k_ps_wakeup(sc); |
| 1558 | ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_ah->imask); | 1552 | ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_ah->imask); |
| 1559 | ath9k_ps_restore(sc); | 1553 | ath9k_ps_restore(sc); |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 1a62e351ec7..fdc2ec52b42 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
| @@ -838,6 +838,10 @@ static bool ath9k_rx_accept(struct ath_common *common, | |||
| 838 | struct ath_rx_status *rx_stats, | 838 | struct ath_rx_status *rx_stats, |
| 839 | bool *decrypt_error) | 839 | bool *decrypt_error) |
| 840 | { | 840 | { |
| 841 | #define is_mc_or_valid_tkip_keyix ((is_mc || \ | ||
| 842 | (rx_stats->rs_keyix != ATH9K_RXKEYIX_INVALID && \ | ||
| 843 | test_bit(rx_stats->rs_keyix, common->tkip_keymap)))) | ||
| 844 | |||
| 841 | struct ath_hw *ah = common->ah; | 845 | struct ath_hw *ah = common->ah; |
| 842 | __le16 fc; | 846 | __le16 fc; |
| 843 | u8 rx_status_len = ah->caps.rx_status_len; | 847 | u8 rx_status_len = ah->caps.rx_status_len; |
| @@ -879,15 +883,18 @@ static bool ath9k_rx_accept(struct ath_common *common, | |||
| 879 | if (rx_stats->rs_status & ATH9K_RXERR_DECRYPT) { | 883 | if (rx_stats->rs_status & ATH9K_RXERR_DECRYPT) { |
| 880 | *decrypt_error = true; | 884 | *decrypt_error = true; |
| 881 | } else if (rx_stats->rs_status & ATH9K_RXERR_MIC) { | 885 | } else if (rx_stats->rs_status & ATH9K_RXERR_MIC) { |
| 886 | bool is_mc; | ||
| 882 | /* | 887 | /* |
| 883 | * The MIC error bit is only valid if the frame | 888 | * The MIC error bit is only valid if the frame |
| 884 | * is not a control frame or fragment, and it was | 889 | * is not a control frame or fragment, and it was |
| 885 | * decrypted using a valid TKIP key. | 890 | * decrypted using a valid TKIP key. |
| 886 | */ | 891 | */ |
| 892 | is_mc = !!is_multicast_ether_addr(hdr->addr1); | ||
| 893 | |||
| 887 | if (!ieee80211_is_ctl(fc) && | 894 | if (!ieee80211_is_ctl(fc) && |
| 888 | !ieee80211_has_morefrags(fc) && | 895 | !ieee80211_has_morefrags(fc) && |
| 889 | !(le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) && | 896 | !(le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) && |
| 890 | test_bit(rx_stats->rs_keyix, common->tkip_keymap)) | 897 | is_mc_or_valid_tkip_keyix) |
| 891 | rxs->flag |= RX_FLAG_MMIC_ERROR; | 898 | rxs->flag |= RX_FLAG_MMIC_ERROR; |
| 892 | else | 899 | else |
| 893 | rx_stats->rs_status &= ~ATH9K_RXERR_MIC; | 900 | rx_stats->rs_status &= ~ATH9K_RXERR_MIC; |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index f2ade2402ce..aff04789f79 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
| @@ -1120,7 +1120,7 @@ void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, bool retry_tx) | |||
| 1120 | } | 1120 | } |
| 1121 | } | 1121 | } |
| 1122 | 1122 | ||
| 1123 | void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx) | 1123 | bool ath_drain_all_txq(struct ath_softc *sc, bool retry_tx) |
| 1124 | { | 1124 | { |
| 1125 | struct ath_hw *ah = sc->sc_ah; | 1125 | struct ath_hw *ah = sc->sc_ah; |
| 1126 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 1126 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
| @@ -1128,7 +1128,7 @@ void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx) | |||
| 1128 | int i, npend = 0; | 1128 | int i, npend = 0; |
| 1129 | 1129 | ||
| 1130 | if (sc->sc_flags & SC_OP_INVALID) | 1130 | if (sc->sc_flags & SC_OP_INVALID) |
| 1131 | return; | 1131 | return true; |
| 1132 | 1132 | ||
| 1133 | /* Stop beacon queue */ | 1133 | /* Stop beacon queue */ |
| 1134 | ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); | 1134 | ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); |
| @@ -1142,25 +1142,15 @@ void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx) | |||
| 1142 | } | 1142 | } |
| 1143 | } | 1143 | } |
| 1144 | 1144 | ||
| 1145 | if (npend) { | 1145 | if (npend) |
| 1146 | int r; | 1146 | ath_print(common, ATH_DBG_FATAL, "Failed to stop TX DMA!\n"); |
| 1147 | |||
| 1148 | ath_print(common, ATH_DBG_FATAL, | ||
| 1149 | "Failed to stop TX DMA. Resetting hardware!\n"); | ||
| 1150 | |||
| 1151 | spin_lock_bh(&sc->sc_resetlock); | ||
| 1152 | r = ath9k_hw_reset(ah, sc->sc_ah->curchan, ah->caldata, false); | ||
| 1153 | if (r) | ||
| 1154 | ath_print(common, ATH_DBG_FATAL, | ||
| 1155 | "Unable to reset hardware; reset status %d\n", | ||
| 1156 | r); | ||
| 1157 | spin_unlock_bh(&sc->sc_resetlock); | ||
| 1158 | } | ||
| 1159 | 1147 | ||
| 1160 | for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { | 1148 | for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { |
| 1161 | if (ATH_TXQ_SETUP(sc, i)) | 1149 | if (ATH_TXQ_SETUP(sc, i)) |
| 1162 | ath_draintxq(sc, &sc->tx.txq[i], retry_tx); | 1150 | ath_draintxq(sc, &sc->tx.txq[i], retry_tx); |
| 1163 | } | 1151 | } |
| 1152 | |||
| 1153 | return !npend; | ||
| 1164 | } | 1154 | } |
| 1165 | 1155 | ||
| 1166 | void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq) | 1156 | void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq) |
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index fa0cf744958..f3d396e7544 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
| @@ -1811,6 +1811,12 @@ static int __orinoco_commit(struct orinoco_private *priv) | |||
| 1811 | struct net_device *dev = priv->ndev; | 1811 | struct net_device *dev = priv->ndev; |
| 1812 | int err = 0; | 1812 | int err = 0; |
| 1813 | 1813 | ||
| 1814 | /* If we've called commit, we are reconfiguring or bringing the | ||
| 1815 | * interface up. Maintaining countermeasures across this would | ||
| 1816 | * be confusing, so note that we've disabled them. The port will | ||
| 1817 | * be enabled later in orinoco_commit or __orinoco_up. */ | ||
| 1818 | priv->tkip_cm_active = 0; | ||
| 1819 | |||
| 1814 | err = orinoco_hw_program_rids(priv); | 1820 | err = orinoco_hw_program_rids(priv); |
| 1815 | 1821 | ||
| 1816 | /* FIXME: what about netif_tx_lock */ | 1822 | /* FIXME: what about netif_tx_lock */ |
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c index 71b3d68b940..32954c4b243 100644 --- a/drivers/net/wireless/orinoco/orinoco_cs.c +++ b/drivers/net/wireless/orinoco/orinoco_cs.c | |||
| @@ -151,20 +151,20 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
| 151 | goto failed; | 151 | goto failed; |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 155 | if (ret) | ||
| 156 | goto failed; | ||
| 157 | |||
| 158 | /* We initialize the hermes structure before completing PCMCIA | ||
| 159 | * configuration just in case the interrupt handler gets | ||
| 160 | * called. */ | ||
| 161 | mem = ioport_map(link->resource[0]->start, | 154 | mem = ioport_map(link->resource[0]->start, |
| 162 | resource_size(link->resource[0])); | 155 | resource_size(link->resource[0])); |
| 163 | if (!mem) | 156 | if (!mem) |
| 164 | goto failed; | 157 | goto failed; |
| 165 | 158 | ||
| 159 | /* We initialize the hermes structure before completing PCMCIA | ||
| 160 | * configuration just in case the interrupt handler gets | ||
| 161 | * called. */ | ||
| 166 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); | 162 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); |
| 167 | 163 | ||
| 164 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 165 | if (ret) | ||
| 166 | goto failed; | ||
| 167 | |||
| 168 | ret = pcmcia_enable_device(link); | 168 | ret = pcmcia_enable_device(link); |
| 169 | if (ret) | 169 | if (ret) |
| 170 | goto failed; | 170 | goto failed; |
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c index fb859a5ad2e..db34c282e59 100644 --- a/drivers/net/wireless/orinoco/spectrum_cs.c +++ b/drivers/net/wireless/orinoco/spectrum_cs.c | |||
| @@ -214,21 +214,21 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
| 214 | goto failed; | 214 | goto failed; |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 218 | if (ret) | ||
| 219 | goto failed; | ||
| 220 | |||
| 221 | /* We initialize the hermes structure before completing PCMCIA | ||
| 222 | * configuration just in case the interrupt handler gets | ||
| 223 | * called. */ | ||
| 224 | mem = ioport_map(link->resource[0]->start, | 217 | mem = ioport_map(link->resource[0]->start, |
| 225 | resource_size(link->resource[0])); | 218 | resource_size(link->resource[0])); |
| 226 | if (!mem) | 219 | if (!mem) |
| 227 | goto failed; | 220 | goto failed; |
| 228 | 221 | ||
| 222 | /* We initialize the hermes structure before completing PCMCIA | ||
| 223 | * configuration just in case the interrupt handler gets | ||
| 224 | * called. */ | ||
| 229 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); | 225 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); |
| 230 | hw->eeprom_pda = true; | 226 | hw->eeprom_pda = true; |
| 231 | 227 | ||
| 228 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 229 | if (ret) | ||
| 230 | goto failed; | ||
| 231 | |||
| 232 | ret = pcmcia_enable_device(link); | 232 | ret = pcmcia_enable_device(link); |
| 233 | if (ret) | 233 | if (ret) |
| 234 | goto failed; | 234 | goto failed; |
diff --git a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c index 93505f93bf9..e5afabee60d 100644 --- a/drivers/net/wireless/orinoco/wext.c +++ b/drivers/net/wireless/orinoco/wext.c | |||
| @@ -911,10 +911,10 @@ static int orinoco_ioctl_set_auth(struct net_device *dev, | |||
| 911 | */ | 911 | */ |
| 912 | if (param->value) { | 912 | if (param->value) { |
| 913 | priv->tkip_cm_active = 1; | 913 | priv->tkip_cm_active = 1; |
| 914 | ret = hermes_enable_port(hw, 0); | 914 | ret = hermes_disable_port(hw, 0); |
| 915 | } else { | 915 | } else { |
| 916 | priv->tkip_cm_active = 0; | 916 | priv->tkip_cm_active = 0; |
| 917 | ret = hermes_disable_port(hw, 0); | 917 | ret = hermes_enable_port(hw, 0); |
| 918 | } | 918 | } |
| 919 | break; | 919 | break; |
| 920 | 920 | ||
