From: Jouni Malinen Date: Tue, 3 Mar 2009 17:23:36 +0000 (+0200) Subject: ath9k: Check virtual wiphy state on tx() X-Git-Tag: MMI-PSA29.97-13-9~29230^2~310 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ee166a0e71947e0ebeb044fd2277435f665270ac;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ath9k: Check virtual wiphy state on tx() mac80211 should not be requesting us to transmit frames on paused wiphys since we stop the TX queues. Just in case, add debug code to make sure we catch if this were to happen. Signed-off-by: Jouni Malinen Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 9b5f21493650..6d19a31934d5 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c @@ -2077,6 +2077,12 @@ static int ath9k_tx(struct ieee80211_hw *hw, struct ath_tx_control txctl; int hdrlen, padsize; + if (aphy->state != ATH_WIPHY_ACTIVE) { + printk(KERN_DEBUG "ath9k: %s: TX in unexpected wiphy state " + "%d\n", wiphy_name(hw->wiphy), aphy->state); + goto exit; + } + memset(&txctl, 0, sizeof(struct ath_tx_control)); /*