linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] ath9k: fix SC_OP_INVALID test in ath9k_tx99_init()
@ 2013-11-05 20:20 Dan Carpenter
  2013-11-06  5:19 ` Sujith Manoharan
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2013-11-05 20:20 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Jouni Malinen, Vasanthakumar Thiagarajan,
	Senthil Balasubramanian, John W. Linville, linux-wireless,
	ath9k-devel, kernel-janitors

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')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 74f452c..7ad4e11 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2456,7 +2456,7 @@ 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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] ath9k: fix SC_OP_INVALID test in ath9k_tx99_init()
@ 2013-11-14 10:13 Sujith Manoharan
  0 siblings, 0 replies; 4+ messages in thread
From: Sujith Manoharan @ 2013-11-14 10:13 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, dan.carpenter

From: Dan Carpenter <dan.carpenter@oracle.com>

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')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/wireless/ath/ath9k/tx99.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/tx99.c b/drivers/net/wireless/ath/ath9k/tx99.c
index 6668197..c65c37f 100644
--- a/drivers/net/wireless/ath/ath9k/tx99.c
+++ b/drivers/net/wireless/ath/ath9k/tx99.c
@@ -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;
-- 
1.8.4.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-14 10:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-05 20:20 [patch] ath9k: fix SC_OP_INVALID test in ath9k_tx99_init() Dan Carpenter
2013-11-06  5:19 ` Sujith Manoharan
2013-11-06  6:50   ` Dan Carpenter
2013-11-14 10:13 [PATCH] " Sujith Manoharan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).