aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-04-07 13:07:17 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-08 13:06:30 -0400
commit96f372c95d32f76fa2b0e035e0a6269234bfda09 (patch)
tree6fff40a25844d7ec927ce1f1d361f4c57b9096ff /drivers/net/wireless/ath/ath9k
parentbd39a274fb7b43374c797bafdb7f506598f36f77 (diff)
ath9k: fix missing ath9k_ps_wakeup/ath9k_ps_restore calls
These missing chip wakeups mainly cause crashes on AR5416 cards in MIPS boards, but have also been reported to cause radio stability issues on AR9285. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-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 dddb85de622..17d04ff8d67 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1376,7 +1376,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
1376 1376
1377 ath9k_calculate_iter_data(hw, vif, &iter_data); 1377 ath9k_calculate_iter_data(hw, vif, &iter_data);
1378 1378
1379 ath9k_ps_wakeup(sc);
1380 /* Set BSSID mask. */ 1379 /* Set BSSID mask. */
1381 memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); 1380 memcpy(common->bssidmask, iter_data.mask, ETH_ALEN);
1382 ath_hw_setbssidmask(common); 1381 ath_hw_setbssidmask(common);
@@ -1411,7 +1410,6 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
1411 } 1410 }
1412 1411
1413 ath9k_hw_set_interrupts(ah, ah->imask); 1412 ath9k_hw_set_interrupts(ah, ah->imask);
1414 ath9k_ps_restore(sc);
1415 1413
1416 /* Set up ANI */ 1414 /* Set up ANI */
1417 if ((iter_data.naps + iter_data.nadhocs) > 0) { 1415 if ((iter_data.naps + iter_data.nadhocs) > 0) {
@@ -1457,6 +1455,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1457 struct ath_vif *avp = (void *)vif->drv_priv; 1455 struct ath_vif *avp = (void *)vif->drv_priv;
1458 int ret = 0; 1456 int ret = 0;
1459 1457
1458 ath9k_ps_wakeup(sc);
1460 mutex_lock(&sc->mutex); 1459 mutex_lock(&sc->mutex);
1461 1460
1462 switch (vif->type) { 1461 switch (vif->type) {
@@ -1503,6 +1502,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1503 ath9k_do_vif_add_setup(hw, vif); 1502 ath9k_do_vif_add_setup(hw, vif);
1504out: 1503out:
1505 mutex_unlock(&sc->mutex); 1504 mutex_unlock(&sc->mutex);
1505 ath9k_ps_restore(sc);
1506 return ret; 1506 return ret;
1507} 1507}
1508 1508
@@ -1517,6 +1517,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
1517 1517
1518 ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); 1518 ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n");
1519 mutex_lock(&sc->mutex); 1519 mutex_lock(&sc->mutex);
1520 ath9k_ps_wakeup(sc);
1520 1521
1521 /* See if new interface type is valid. */ 1522 /* See if new interface type is valid. */
1522 if ((new_type == NL80211_IFTYPE_ADHOC) && 1523 if ((new_type == NL80211_IFTYPE_ADHOC) &&
@@ -1546,6 +1547,7 @@ static int ath9k_change_interface(struct ieee80211_hw *hw,
1546 1547
1547 ath9k_do_vif_add_setup(hw, vif); 1548 ath9k_do_vif_add_setup(hw, vif);
1548out: 1549out:
1550 ath9k_ps_restore(sc);
1549 mutex_unlock(&sc->mutex); 1551 mutex_unlock(&sc->mutex);
1550 return ret; 1552 return ret;
1551} 1553}
@@ -1558,6 +1560,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
1558 1560
1559 ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n"); 1561 ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n");
1560 1562
1563 ath9k_ps_wakeup(sc);
1561 mutex_lock(&sc->mutex); 1564 mutex_lock(&sc->mutex);
1562 1565
1563 sc->nvifs--; 1566 sc->nvifs--;
@@ -1569,6 +1572,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
1569 ath9k_calculate_summary_state(hw, NULL); 1572 ath9k_calculate_summary_state(hw, NULL);
1570 1573
1571 mutex_unlock(&sc->mutex); 1574 mutex_unlock(&sc->mutex);
1575 ath9k_ps_restore(sc);
1572} 1576}
1573 1577
1574static void ath9k_enable_ps(struct ath_softc *sc) 1578static void ath9k_enable_ps(struct ath_softc *sc)
@@ -1809,6 +1813,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue,
1809 1813
1810 txq = sc->tx.txq_map[queue]; 1814 txq = sc->tx.txq_map[queue];
1811 1815
1816 ath9k_ps_wakeup(sc);
1812 mutex_lock(&sc->mutex); 1817 mutex_lock(&sc->mutex);
1813 1818
1814 memset(&qi, 0, sizeof(struct ath9k_tx_queue_info)); 1819 memset(&qi, 0, sizeof(struct ath9k_tx_queue_info));
@@ -1832,6 +1837,7 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue,
1832 ath_beaconq_config(sc); 1837 ath_beaconq_config(sc);
1833 1838
1834 mutex_unlock(&sc->mutex); 1839 mutex_unlock(&sc->mutex);
1840 ath9k_ps_restore(sc);
1835 1841
1836 return ret; 1842 return ret;
1837} 1843}
@@ -1894,6 +1900,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
1894 int slottime; 1900 int slottime;
1895 int error; 1901 int error;
1896 1902
1903 ath9k_ps_wakeup(sc);
1897 mutex_lock(&sc->mutex); 1904 mutex_lock(&sc->mutex);
1898 1905
1899 if (changed & BSS_CHANGED_BSSID) { 1906 if (changed & BSS_CHANGED_BSSID) {
@@ -1994,6 +2001,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
1994 } 2001 }
1995 2002
1996 mutex_unlock(&sc->mutex); 2003 mutex_unlock(&sc->mutex);
2004 ath9k_ps_restore(sc);
1997} 2005}
1998 2006
1999static u64 ath9k_get_tsf(struct ieee80211_hw *hw) 2007static u64 ath9k_get_tsf(struct ieee80211_hw *hw)