Skip to contentSkip to conversation

ath9k: fix SC_OP_INVALID test in ath9k_tx99_init()

PATCH New Sujith Manoharan 1 participant 1 message Nov 14, 2013 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: fix SC_OP_INVALID test in ath9k_tx99_init()

From: Dan Carpenter <[email protected]>

SC_OP_INVALID is zero so the test is always false. We're supposed to be testing the lowest bit instead.

Fixes 89f927af7f33 ('ath9k: add TX99 support')
---
 drivers/net/wireless/ath/ath9k/tx99.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/tx99.c +1 -1
index 6668197..c65c37f 100644
@@ -99,7 +99,7 @@ static int ath9k_tx99_init(struct ath_softc *sc)
 	struct ath_tx_control txctl;
 	int r;
 
-	if (sc->sc_flags & SC_OP_INVALID) {
+	if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {
 		ath_err(common,
 			"driver is in invalid state unable to use TX99");
 		return -EINVAL;
Signature · 1 line
1.8.4.2