diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-03-05 21:10:07 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-06 15:16:07 -0500 |
commit | e9a8e8ec1e487536568adc4b3efa8f56e4391a7b (patch) | |
tree | 1ceeaf8ccafc6179a04fb0f8b948d809069ae8cb | |
parent | 342bbf3fee2fa9a18147e74b2e3c4229a4564912 (diff) |
airo: fix test for FLAG_RADIO_DOWN
We should be doing a shift (1 << FLAG_RADIO_DOWN) here before testing
the flag. As luck would have it, this test works almost correctly.
The current code tests for FLAG_RADIO_OFF instead of FLAG_RADIO_DOWN.
#define FLAG_RADIO_OFF 0 /* User disabling of MAC */
#define FLAG_RADIO_DOWN 1 /* ifup/ifdown disabling of MAC */
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/airo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 1c008c61b95c..ddc061dd150c 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -1869,7 +1869,7 @@ static int readStatsRid(struct airo_info*ai, StatsRid *sr, int rid, int lock) static void try_auto_wep(struct airo_info *ai) { - if (auto_wep && !(ai->flags & FLAG_RADIO_DOWN)) { + if (auto_wep && !test_bit(FLAG_RADIO_DOWN, &ai->flags)) { ai->expires = RUN_AT(3*HZ); wake_up_interruptible(&ai->thr_wait); } |