Skip to content

Commit

Permalink
ath9k: Check virtual wiphy state on tx()
Browse files Browse the repository at this point in the history
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 <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Jouni Malinen authored and John W. Linville committed Mar 5, 2009
1 parent 18eb62f commit ee166a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

/*
Expand Down

0 comments on commit ee166a0

Please sign in to comment.