diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 8a1691db166d..f90a6ca94a76 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -285,7 +285,8 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, | |||
285 | ath9k_hw_set_interrupts(ah, ah->imask); | 285 | ath9k_hw_set_interrupts(ah, ah->imask); |
286 | 286 | ||
287 | if (!(sc->sc_flags & (SC_OP_OFFCHANNEL))) { | 287 | if (!(sc->sc_flags & (SC_OP_OFFCHANNEL))) { |
288 | ath_beacon_config(sc, NULL); | 288 | if (sc->sc_flags & SC_OP_BEACONS) |
289 | ath_beacon_config(sc, NULL); | ||
289 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); | 290 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); |
290 | ath_start_ani(common); | 291 | ath_start_ani(common); |
291 | } | 292 | } |
@@ -599,7 +600,7 @@ void ath9k_tasklet(unsigned long data) | |||
599 | return; | 600 | return; |
600 | } | 601 | } |
601 | 602 | ||
602 | spin_lock_bh(&sc->sc_pcu_lock); | 603 | spin_lock(&sc->sc_pcu_lock); |
603 | 604 | ||
604 | if (!ath9k_hw_check_alive(ah)) | 605 | if (!ath9k_hw_check_alive(ah)) |
605 | ieee80211_queue_work(sc->hw, &sc->hw_check_work); | 606 | ieee80211_queue_work(sc->hw, &sc->hw_check_work); |
@@ -643,7 +644,7 @@ void ath9k_tasklet(unsigned long data) | |||
643 | /* re-enable hardware interrupt */ | 644 | /* re-enable hardware interrupt */ |
644 | ath9k_hw_enable_interrupts(ah); | 645 | ath9k_hw_enable_interrupts(ah); |
645 | 646 | ||
646 | spin_unlock_bh(&sc->sc_pcu_lock); | 647 | spin_unlock(&sc->sc_pcu_lock); |
647 | ath9k_ps_restore(sc); | 648 | ath9k_ps_restore(sc); |
648 | } | 649 | } |
649 | 650 | ||
@@ -1328,6 +1329,7 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
1328 | ath9k_ps_restore(sc); | 1329 | ath9k_ps_restore(sc); |
1329 | 1330 | ||
1330 | sc->ps_idle = true; | 1331 | sc->ps_idle = true; |
1332 | ath9k_set_wiphy_idle(aphy, true); | ||
1331 | ath_radio_disable(sc, hw); | 1333 | ath_radio_disable(sc, hw); |
1332 | 1334 | ||
1333 | sc->sc_flags |= SC_OP_INVALID; | 1335 | sc->sc_flags |= SC_OP_INVALID; |
@@ -1455,6 +1457,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, | |||
1455 | struct ath_wiphy *aphy = hw->priv; | 1457 | struct ath_wiphy *aphy = hw->priv; |
1456 | struct ath_softc *sc = aphy->sc; | 1458 | struct ath_softc *sc = aphy->sc; |
1457 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 1459 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
1460 | int ret = 0; | ||
1458 | 1461 | ||
1459 | ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); | 1462 | ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); |
1460 | mutex_lock(&sc->mutex); | 1463 | mutex_lock(&sc->mutex); |
@@ -1464,7 +1467,8 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, | |||
1464 | case NL80211_IFTYPE_ADHOC: | 1467 | case NL80211_IFTYPE_ADHOC: |
1465 | if (sc->nbcnvifs >= ATH_BCBUF) { | 1468 | if (sc->nbcnvifs >= ATH_BCBUF) { |
1466 | ath_err(common, "No beacon slot available\n"); | 1469 | ath_err(common, "No beacon slot available\n"); |
1467 | return -ENOBUFS; | 1470 | ret = -ENOBUFS; |
1471 | goto out; | ||
1468 | } | 1472 | } |
1469 | break; | 1473 | break; |
1470 | case NL80211_IFTYPE_STATION: | 1474 | case NL80211_IFTYPE_STATION: |
@@ -1478,14 +1482,15 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, | |||
1478 | default: | 1482 | default: |
1479 | ath_err(common, "Interface type %d not yet supported\n", | 1483 | ath_err(common, "Interface type %d not yet supported\n", |
1480 | vif->type); | 1484 | vif->type); |
1481 | mutex_unlock(&sc->mutex); | 1485 | ret = -ENOTSUPP; |
1482 | return -ENOTSUPP; | 1486 | goto out; |
1483 | } | 1487 | } |
1484 | vif->type = new_type; | 1488 | vif->type = new_type; |
1485 | vif->p2p = p2p; | 1489 | vif->p2p = p2p; |
1486 | 1490 | ||
1491 | out: | ||
1487 | mutex_unlock(&sc->mutex); | 1492 | mutex_unlock(&sc->mutex); |
1488 | return 0; | 1493 | return ret; |
1489 | } | 1494 | } |
1490 | 1495 | ||
1491 | static void ath9k_remove_interface(struct ieee80211_hw *hw, | 1496 | static void ath9k_remove_interface(struct ieee80211_hw *hw, |
@@ -1824,7 +1829,7 @@ static int ath9k_set_key(struct ieee80211_hw *hw, | |||
1824 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 1829 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
1825 | int ret = 0; | 1830 | int ret = 0; |
1826 | 1831 | ||
1827 | if (modparam_nohwcrypt) | 1832 | if (ath9k_modparam_nohwcrypt) |
1828 | return -ENOSPC; | 1833 | return -ENOSPC; |
1829 | 1834 | ||
1830 | mutex_lock(&sc->mutex); | 1835 | mutex_lock(&sc->mutex); |