summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorDavid S. Miller2011-05-12 01:13:08 +0200
committerDavid S. Miller2011-05-12 01:13:08 +0200
commit78d41b35a9570b7a9a45686789df5dfaeb2b7f4c (patch)
treea28432584132a7c810b6b243795aec43544205ab /drivers/net/wireless/ath
parentMerge branch 'pablo/nf-2.6-updates' of git://1984.lsi.us.es/net-2.6 (diff)
parentlibertas: fix cmdpendingq locking (diff)
downloadkernel-qcow2-linux-78d41b35a9570b7a9a45686789df5dfaeb2b7f4c.tar.gz
kernel-qcow2-linux-78d41b35a9570b7a9a45686789df5dfaeb2b7f4c.tar.xz
kernel-qcow2-linux-78d41b35a9570b7a9a45686789df5dfaeb2b7f4c.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 17d04ff8d678..1482fa650833 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2141,6 +2141,8 @@ static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class)
static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
{
struct ath_softc *sc = hw->priv;
+ struct ath_hw *ah = sc->sc_ah;
+ struct ath_common *common = ath9k_hw_common(ah);
int timeout = 200; /* ms */
int i, j;
@@ -2149,6 +2151,12 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
cancel_delayed_work_sync(&sc->tx_complete_work);
+ if (sc->sc_flags & SC_OP_INVALID) {
+ ath_dbg(common, ATH_DBG_ANY, "Device not present\n");
+ mutex_unlock(&sc->mutex);
+ return;
+ }
+
if (drop)
timeout = 1;