summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-07-15 22:37:42 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-07-15 22:37:42 +0000
commitef6c2c98d54b454383df18e29316fbbaf9b3bda6 (patch)
tree2e3313bb86275014b26806342f86dd19002128a1
parentfbd80c76d6d657690686abfc99c850d90b3da0b3 (diff)
fix for setting antena diversity; from Brian Falk <falk@seas.upenn.edu>
-rw-r--r--sbin/ancontrol/ancontrol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ancontrol/ancontrol.c b/sbin/ancontrol/ancontrol.c
index 67fd83a4ddc..e10b4dd787e 100644
--- a/sbin/ancontrol/ancontrol.c
+++ b/sbin/ancontrol/ancontrol.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ancontrol.c,v 1.23 2004/05/13 16:36:38 mickey Exp $ */
+/* $OpenBSD: ancontrol.c,v 1.24 2004/07/15 22:37:41 mickey Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@@ -848,7 +848,7 @@ an_setconfig(int act, void *arg)
errx(1, "bad diversity setting: %u", diversity);
break;
}
- if (atoi(arg) == ACT_SET_DIVERSITY_RX) {
+ if (act == ACT_SET_DIVERSITY_TX) {
cfg->an_diversity &= 0x00FF;
cfg->an_diversity |= (diversity << 8);
} else {
@@ -1343,7 +1343,7 @@ main(int argc, char *argv[])
an_setconfig(ACT_SET_DIVERSITY_RX, optarg);
break;
case 1:
- an_setconfig(ACT_SET_DIVERSITY_RX, optarg);
+ an_setconfig(ACT_SET_DIVERSITY_TX, optarg);
break;
default:
errx(1, "must specify RX or TX diversity");