aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-04-26 15:39:10 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-26 15:39:10 -0400
commit429576b97c623b9c4e3375fb7c37bce377f51e68 (patch)
treedc4fd40ae54d177ddb3cb3991e8c3ff019eef238 /drivers/net/wireless/ath/ath9k/main.c
parent9835a30e980561082beb02ce724f6e555787bc19 (diff)
parent069f40fc07f6df3da325e7ea1698a0d6247983d5 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 20a2cf731d83..475009b578de 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1371,7 +1371,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
1371 1371
1372 ath9k_calculate_iter_data(hw, vif, &iter_data); 1372 ath9k_calculate_iter_data(hw, vif, &iter_data);
1373 1373
1374 ath9k_ps_wakeup(sc);
1375 /* Set BSSID mask. */ 1374 /* Set BSSID mask. */
1376 memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); 1375 memcpy(common->bssidmask, iter_data.mask, ETH_ALEN);
1377 ath_hw_setbssidmask(common); 1376 ath_hw_setbssidmask(common);
@@ -1406,7 +1405,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
1406 } 1405 }
1407 1406
1408 ath9k_hw_set_interrupts(ah, ah->imask); 1407 ath9k_hw_set_interrupts(ah, ah->imask);
1409 ath9k_ps_restore(sc);
1410 1408
1411 /* Set up ANI */ 1409 /* Set up ANI */
1412 if ((iter_data.naps + iter_data.nadhocs) > 0) { 1410 if ((iter_data.naps + iter_data.nadhocs) > 0) {
@@ -1451,6 +1449,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1451 struct ath_common *common = ath9k_hw_common(ah); 1449 struct ath_common *common = ath9k_hw_common(ah);
1452 int ret = 0; 1450 int ret = 0;
1453 1451
1452 ath9k_ps_wakeup(sc);
1454 mutex_lock(&sc->mutex); 1453 mutex_lock(&sc->mutex);
1455 1454
1456 switch (vif->type) { 1455 switch (vif->type) {
@@ -1494,6 +1493,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1494 ath9k_do_vif_add_setup(hw, vif); 1493 ath9k_do_vif_add_setup(hw, vif);
1495out: 1494out:
1496 mutex_unlock(&sc->mutex); 1495 mutex_unlock(&sc->mutex);
1496 ath9k_ps_restore(sc);
1497 return ret; 1497 return ret;
1498} 1498}
1499 1499
@@ -1508,6 +1508,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
1508 1508
1509 ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); 1509 ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n");
1510 mutex_lock(&sc->mutex); 1510 mutex_lock(&sc->mutex);
1511 ath9k_ps_wakeup(sc);
1511 1512
1512 /* See if new interface type is valid. */ 1513 /* See if new interface type is valid. */
1513 if ((new_type == NL80211_IFTYPE_ADHOC) && 1514 if ((new_type == NL80211_IFTYPE_ADHOC) &&
@@ -1537,6 +1538,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
1537 1538
1538 ath9k_do_vif_add_setup(hw, vif); 1539 ath9k_do_vif_add_setup(hw, vif);
1539out: 1540out:
1541 ath9k_ps_restore(sc);
1540 mutex_unlock(&sc->mutex); 1542 mutex_unlock(&sc->mutex);
1541 return ret; 1543 return ret;
1542} 1544}
@@ -1549,6 +1551,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
1549 1551
1550 ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n"); 1552 ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n");
1551 1553
1554 ath9k_ps_wakeup(sc);
1552 mutex_lock(&sc->mutex); 1555 mutex_lock(&sc->mutex);
1553 1556
1554 sc->nvifs--; 1557 sc->nvifs--;
@@ -1560,6 +1563,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
1560 ath9k_calculate_summary_state(hw, NULL); 1563 ath9k_calculate_summary_state(hw, NULL);
1561 1564
1562 mutex_unlock(&sc->mutex); 1565 mutex_unlock(&sc->mutex);
1566 ath9k_ps_restore(sc);
1563} 1567}
1564 1568
1565static void ath9k_enable_ps(struct ath_softc *sc) 1569static void ath9k_enable_ps(struct ath_softc *sc)
@@ -1840,6 +1844,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue,
1840 1844
1841 txq = sc->tx.txq_map[queue]; 1845 txq = sc->tx.txq_map[queue];
1842 1846
1847 ath9k_ps_wakeup(sc);
1843 mutex_lock(&sc->mutex); 1848 mutex_lock(&sc->mutex);
1844 1849
1845 memset(&qi, 0, sizeof(struct ath9k_tx_queue_info)); 1850 memset(&qi, 0, sizeof(struct ath9k_tx_queue_info));
@@ -1863,6 +1868,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue,
1863 ath_beaconq_config(sc); 1868 ath_beaconq_config(sc);
1864 1869
1865 mutex_unlock(&sc->mutex); 1870 mutex_unlock(&sc->mutex);
1871 ath9k_ps_restore(sc);
1866 1872
1867 return ret; 1873 return ret;
1868} 1874}
@@ -2021,6 +2027,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
2021 int slottime; 2027 int slottime;
2022 int error; 2028 int error;
2023 2029
2030 ath9k_ps_wakeup(sc);
2024 mutex_lock(&sc->mutex); 2031 mutex_lock(&sc->mutex);
2025 2032
2026 if (changed & BSS_CHANGED_BSSID) { 2033 if (changed & BSS_CHANGED_BSSID) {
@@ -2106,6 +2113,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
2106 } 2113 }
2107 2114
2108 mutex_unlock(&sc->mutex); 2115 mutex_unlock(&sc->mutex);
2116 ath9k_ps_restore(sc);
2109} 2117}
2110 2118
2111static u64 ath9k_get_tsf(struct ieee80211_hw *hw) 2119static u64 ath9k_get_tsf(struct ieee80211_hw *hw)