[ath5k] Update for changes in kernel 2.6.31

This adds basic rfkill support for enabling the wireless card on certain
laptops, and changes miscellaneous other details that may help in obscure
cases.

Also change the error handling to not report CRC errors, which due to the
basic facts of wireless may happen even more frequently than valid packets.

Signed-off-by: Marty Connor <mdc@etherboot.org>
This commit is contained in:
Joshua Oreman
2009-09-12 09:01:47 -07:00
committed by Marty Connor
parent 224ef7f483
commit 489bd2f396
8 changed files with 147 additions and 5 deletions

View File

@@ -1195,11 +1195,12 @@ ath5k_handle_rx(struct ath5k_softc *sc)
if (rs.rs_status) {
if (rs.rs_status & AR5K_RXERR_PHY) {
DBG("ath5k: rx PHY error\n");
/* These are uncommon, and may indicate a real problem. */
net80211_rx_err(sc->dev, NULL, EIO);
goto next;
}
if (rs.rs_status & AR5K_RXERR_CRC) {
net80211_rx_err(sc->dev, NULL, EIO);
/* These occur *all the time*. */
goto next;
}
if (rs.rs_status & AR5K_RXERR_DECRYPT) {
@@ -1358,6 +1359,8 @@ ath5k_init(struct ath5k_softc *sc)
if (ret)
goto done;
ath5k_rfkill_hw_start(ah);
/*
* Reset the key cache since some parts do not reset the
* contents on initial power up or resume from suspend.
@@ -1405,6 +1408,8 @@ ath5k_stop_hw(struct ath5k_softc *sc)
} else
sc->rxlink = NULL;
ath5k_rfkill_hw_stop(sc->ah);
return 0;
}