View | Details | Raw Unified | Return to bug 17930
Collapse All | Expand All

(-)/usr/src/sys/i386/include/if_wavelan_ieee.h (+15 lines)
Lines 185-190 Link Here
185
#define WI_RID_WDS_ADDR5	0xFC15 /* port 1 MAC of WDS link node */
185
#define WI_RID_WDS_ADDR5	0xFC15 /* port 1 MAC of WDS link node */
186
#define WI_RID_WDS_ADDR6	0xFC16 /* port 1 MAC of WDS link node */
186
#define WI_RID_WDS_ADDR6	0xFC16 /* port 1 MAC of WDS link node */
187
#define WI_RID_MCAST_PM_BUF	0xFC17 /* PM buffering of mcast */
187
#define WI_RID_MCAST_PM_BUF	0xFC17 /* PM buffering of mcast */
188
#define WI_RID_ENCRYPTION	0xFC20 /* enable/disable WEP */
189
#define WI_RID_AUTHTYPE		0xFC21 /* specify authentication type */
188
190
189
/*
191
/*
190
 * Network parameters, dynamic configuration entities
192
 * Network parameters, dynamic configuration entities
Lines 216-222 Link Here
216
#define WI_RID_TX_RATE4		0xFCA2
218
#define WI_RID_TX_RATE4		0xFCA2
217
#define WI_RID_TX_RATE5		0xFCA3
219
#define WI_RID_TX_RATE5		0xFCA3
218
#define WI_RID_TX_RATE6		0xFCA4
220
#define WI_RID_TX_RATE6		0xFCA4
221
#define WI_RID_DEFLT_CRYPT_KEYS	0xFCB0
222
#define WI_RID_TX_CRYPT_KEY	0xFCB1
219
#define WI_RID_TICK_TIME	0xFCE0
223
#define WI_RID_TICK_TIME	0xFCE0
224
225
struct wi_key {
226
	u_int16_t		wi_keylen;
227
	u_int8_t		wi_keydat[14];
228
};
229
230
struct wi_ltv_keys {
231
	u_int16_t		wi_len;
232
	u_int16_t		wi_type;
233
	struct wi_key		wi_keys[4];
234
};
220
235
221
/*
236
/*
222
 * NIC information
237
 * NIC information
(-)/usr/src/sys/i386/isa/if_wi.c (+30 lines)
Lines 344-349 Link Here
344
	wi_read_record(sc, &gen);
344
	wi_read_record(sc, &gen);
345
	sc->wi_channel = gen.wi_val;
345
	sc->wi_channel = gen.wi_val;
346
346
347
	/*
348
	 * Find out if we support WEP on this card.
349
	 */
350
	gen.wi_type = WI_RID_WEP_AVAIL;
351
	gen.wi_len = 2;
352
	wi_read_record(sc, &gen);
353
	sc->wi_has_wep = gen.wi_val;
354
347
	bzero((char *)&sc->wi_stats, sizeof(sc->wi_stats));
355
	bzero((char *)&sc->wi_stats, sizeof(sc->wi_stats));
348
356
349
	wi_init(sc);
357
	wi_init(sc);
Lines 975-980 Link Here
975
	case WI_RID_MAX_SLEEP:
983
	case WI_RID_MAX_SLEEP:
976
		sc->wi_max_sleep = wreq->wi_val[0];
984
		sc->wi_max_sleep = wreq->wi_val[0];
977
		break;
985
		break;
986
	case WI_RID_ENCRYPTION:
987
		sc->wi_use_wep = wreq->wi_val[0];
988
		break;
989
	case WI_RID_TX_CRYPT_KEY:
990
		sc->wi_tx_key = wreq->wi_val[0];
991
		break;
992
	case WI_RID_DEFLT_CRYPT_KEYS:
993
		bcopy((char *)wreq, (char *)&sc->wi_keys,
994
		    sizeof(struct wi_ltv_keys));
995
		break;
978
	default:
996
	default:
979
		break;
997
		break;
980
	}
998
	}
Lines 1042-1047 Link Here
1042
			bcopy((char *)&sc->wi_stats, (char *)&wreq.wi_val,
1060
			bcopy((char *)&sc->wi_stats, (char *)&wreq.wi_val,
1043
			    sizeof(sc->wi_stats));
1061
			    sizeof(sc->wi_stats));
1044
			wreq.wi_len = (sizeof(sc->wi_stats) / 2) + 1;
1062
			wreq.wi_len = (sizeof(sc->wi_stats) / 2) + 1;
1063
		} else if (wreq.wi_type == WI_RID_DEFLT_CRYPT_KEYS) {
1064
			bcopy((char *)&sc->wi_keys, (char *)&wreq,
1065
			    sizeof(struct wi_ltv_keys));
1045
		} else {
1066
		} else {
1046
			if (wi_read_record(sc, (struct wi_ltv_gen *)&wreq)) {
1067
			if (wi_read_record(sc, (struct wi_ltv_gen *)&wreq)) {
1047
				error = EINVAL;
1068
				error = EINVAL;
Lines 1137-1142 Link Here
1137
	bcopy((char *)&sc->arpcom.ac_enaddr,
1158
	bcopy((char *)&sc->arpcom.ac_enaddr,
1138
	   (char *)&mac.wi_mac_addr, ETHER_ADDR_LEN);
1159
	   (char *)&mac.wi_mac_addr, ETHER_ADDR_LEN);
1139
	wi_write_record(sc, (struct wi_ltv_gen *)&mac);
1160
	wi_write_record(sc, (struct wi_ltv_gen *)&mac);
1161
1162
	/* Configure WEP. */
1163
	if (sc->wi_has_wep) {
1164
		WI_SETVAL(WI_RID_ENCRYPTION, sc->wi_use_wep);
1165
		WI_SETVAL(WI_RID_TX_CRYPT_KEY, sc->wi_tx_key);
1166
		sc->wi_keys.wi_len = (sizeof(struct wi_ltv_keys) / 2) + 1;
1167
		sc->wi_keys.wi_type = WI_RID_DEFLT_CRYPT_KEYS;
1168
		wi_write_record(sc, (struct wi_ltv_gen *)&sc->wi_keys);
1169
	}
1140
1170
1141
	/* Initialize promisc mode. */
1171
	/* Initialize promisc mode. */
1142
	if (ifp->if_flags & IFF_PROMISC) {
1172
	if (ifp->if_flags & IFF_PROMISC) {
(-)/usr/src/sys/i386/isa/if_wireg.h (-1 / +26 lines)
Lines 56-61 Link Here
56
	u_int32_t		wi_rx_msg_in_bad_msg_frags;
56
	u_int32_t		wi_rx_msg_in_bad_msg_frags;
57
};
57
};
58
58
59
/*
60
 * Encryption controls. We can enable or disable encryption as
61
 * well as specify up to 4 encryption keys. We can also specify
62
 * which of the four keys will be used for transmit encryption.
63
 */
64
#define WI_RID_ENCRYPTION	0xFC20
65
#define WI_RID_AUTHTYPE		0xFC21
66
#define WI_RID_DEFLT_CRYPT_KEYS	0xFCB0
67
#define WI_RID_TX_CRYPT_KEY	0xFCB1
68
#define WI_RID_WEP_AVAIL	0xFD4F
69
struct wi_key {
70
	u_int16_t		wi_keylen;
71
	u_int8_t		wi_keydat[14];
72
};
73
74
struct wi_ltv_keys {
75
	u_int16_t		wi_len;
76
	u_int16_t		wi_type;
77
	struct wi_key		wi_keys[4];
78
};
79
59
struct wi_softc	{
80
struct wi_softc	{
60
	struct arpcom		arpcom;
81
	struct arpcom		arpcom;
61
	struct ifmedia		ifmedia;
82
	struct ifmedia		ifmedia;
Lines 79-85 Link Here
79
	char			wi_node_name[32];
100
	char			wi_node_name[32];
80
	char			wi_net_name[32];
101
	char			wi_net_name[32];
81
	char			wi_ibss_name[32];
102
	char			wi_ibss_name[32];
82
	u_int8_t		wi_txbuf[1536];
103
	u_int8_t		wi_txbuf[1596];
104
	int			wi_has_wep;
105
	int			wi_use_wep;
106
	int			wi_tx_key;
107
	struct wi_ltv_keys	wi_keys;
83
	struct wi_counters	wi_stats;
108
	struct wi_counters	wi_stats;
84
	struct callout_handle	wi_stat_ch;
109
	struct callout_handle	wi_stat_ch;
85
};
110
};
(-)/usr/src/usr.sbin/wicontrol/wicontrol.8 (+35 lines)
Lines 58-63 Link Here
58
.Nm wicontrol
58
.Nm wicontrol
59
.Fl i Ar iface Fl d Ar max data length
59
.Fl i Ar iface Fl d Ar max data length
60
.Nm wicontrol
60
.Nm wicontrol
61
.Fl i Ar iface Fl e Ar 0|1
62
.Nm wicontrol
63
.Fl i Ar iface Fl k Ar key
64
.Op Fl v Ar 1|2|3|4
65
.Nm wicontrol
66
.Fl i Ar iface Fl T Ar 1|2|3|4
67
.Nm wicontrol
61
.Fl i Ar iface Fl r Ar RTS threshold
68
.Fl i Ar iface Fl r Ar RTS threshold
62
.Nm wicontrol
69
.Nm wicontrol
63
.Fl i Ar iface Fl f Ar frequency
70
.Fl i Ar iface Fl f Ar frequency
Lines 202-207 Link Here
202
.Ar max data length
209
.Ar max data length
203
can be any number from 350 to 2304.
210
can be any number from 350 to 2304.
204
The default is 2304.
211
The default is 2304.
212
.It Fl i Ar iface Fl e Ar 0|1
213
Enable or disable WEP encryption. Permitted values are
214
.Ar 0
215
(encryption disabled) or
216
.Ar 1
217
(encryption enabled). Encryption is off by default.
218
.It Fl i Ar iface Fl k Ar key "[-v 1|2|3|4]"
219
Set WEP encryption keys. There are four default encryption keys
220
that can be programmed. A specific key can be set using
221
the
222
.Fl v
223
flag. If the
224
.Fl v
225
flag is not specified, the first key will be set. Encryption keys
226
can either be normal text (i.e. "hello") or a series of hexadecimal
227
digits (i.e. "0x1234512345"). For
228
WaveLAN Turbo Silver cards, the key is restricted to 40 bits, hence
229
the key can be either a 5 character text string or 10 hex digits.
230
For WaveLAN Turbo Gold cards, the key can be up to 128 bits,
231
which means the key can be specified as either a 16 character text
232
string or 32 hex digits.
233
.Pp
234
Note: currently, the field in the structure used to program the key
235
into the NIC is only 14 bytes long, not 16. I'm not sure how this is
236
supposed to allow 128 bits of key info for the gold cards.
237
.It Fl i Ar iface Fl T Ar 1|2|3|4
238
Specify which of the four WEP encryption keys will be used to
239
encrypt transmitted packets.
205
.It Fl i Ar iface Fl r Ar RTS threshold
240
.It Fl i Ar iface Fl r Ar RTS threshold
206
Set the RTS/CTS threshold for a given interface.
241
Set the RTS/CTS threshold for a given interface.
207
This controls the
242
This controls the
(-)/usr/src/usr.sbin/wicontrol/wicontrol.c (-3 / +188 lines)
Lines 70-75 Link Here
70
static void wi_printbool	__P((struct wi_req *));
70
static void wi_printbool	__P((struct wi_req *));
71
static void wi_printhex		__P((struct wi_req *));
71
static void wi_printhex		__P((struct wi_req *));
72
static void wi_dumpinfo		__P((char *));
72
static void wi_dumpinfo		__P((char *));
73
static void wi_setkeys		__P((char *, char *, int));
74
static void wi_printkeys	__P((struct wi_req *));
73
static void usage		__P((char *));
75
static void usage		__P((char *));
74
76
75
static void wi_getval(iface, wreq)
77
static void wi_getval(iface, wreq)
Lines 236-241 Link Here
236
	return;
238
	return;
237
}
239
}
238
240
241
static int wi_hex2int(c)
242
	char			c;
243
{
244
	if (c >= '0' && c <= '9')
245
		return (c - '0');
246
	if (c >= 'A' && c <= 'F')
247
		return (c - 'A' + 10);
248
	if (c >= 'a' && c <= 'f')
249
		return (c - 'a' + 10);
250
251
	return (0);
252
}
253
254
static void wi_str2key(s, k)
255
	char			*s;
256
	struct wi_key		*k;
257
{
258
	int			n, i;
259
	char			*p;
260
261
	/* Is this a hex string? */
262
	if (s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) {
263
		/* Yes, convert to int. */
264
		n = 0;
265
		p = (char *)&k->wi_keydat[0];
266
		for (i = 2; i < strlen(s); i+= 2) {
267
			*p++ = (wi_hex2int(s[i]) << 4) + wi_hex2int(s[i + 1]);
268
			n++;
269
		}
270
		k->wi_keylen = n;
271
	} else {
272
		/* No, just copy it in. */
273
		bcopy(s, k->wi_keydat, strlen(s));
274
		k->wi_keylen = strlen(s);
275
	}
276
277
	return;
278
}
279
280
static void wi_setkeys(iface, key, idx)
281
	char			*iface;
282
	char			*key;
283
	int			idx;
284
{
285
	struct wi_req		wreq;
286
	struct wi_ltv_keys	*keys;
287
	struct wi_key		*k;
288
289
	bzero((char *)&wreq, sizeof(wreq));
290
	wreq.wi_len = WI_MAX_DATALEN;
291
	wreq.wi_type = WI_RID_WEP_AVAIL;
292
293
	wi_getval(iface, &wreq);
294
	if (wreq.wi_val[0] == 0)
295
		err(1, "no WEP option available on this card");
296
297
	bzero((char *)&wreq, sizeof(wreq));
298
	wreq.wi_len = WI_MAX_DATALEN;
299
	wreq.wi_type = WI_RID_DEFLT_CRYPT_KEYS;
300
301
	wi_getval(iface, &wreq);
302
	keys = (struct wi_ltv_keys *)&wreq;
303
304
	if (strlen(key) > 14) {
305
		err(1, "encryption key must be no "
306
		    "more than 14 characters long");
307
	}
308
309
	if (idx > 3)
310
		err(1, "only 4 encryption keys available");
311
312
	k = &keys->wi_keys[idx];
313
	wi_str2key(key, k);
314
315
	wreq.wi_len = (sizeof(struct wi_ltv_keys) / 2) + 1;
316
	wreq.wi_type = WI_RID_DEFLT_CRYPT_KEYS;
317
	wi_setval(iface, &wreq);
318
319
	return;
320
}
321
322
static void wi_printkeys(wreq)
323
	struct wi_req		*wreq;
324
{
325
	int			i, j;
326
	struct wi_key		*k;
327
	struct wi_ltv_keys	*keys;
328
	char			*ptr;
329
330
	keys = (struct wi_ltv_keys *)wreq;
331
332
	for (i = 0; i < 4; i++) {
333
		k = &keys->wi_keys[i];
334
		ptr = (char *)k->wi_keydat;
335
		for (j = 0; j < k->wi_keylen; j++) {
336
			if (ptr[i] == '\0')
337
				ptr[i] = ' ';
338
		}
339
		ptr[j] = '\0';
340
		printf("[ %s ]", ptr);
341
	}
342
343
	return;
344
};
345
239
void wi_printwords(wreq)
346
void wi_printwords(wreq)
240
	struct wi_req		*wreq;
347
	struct wi_req		*wreq;
241
{
348
{
Lines 283-288 Link Here
283
#define WI_BOOL			0x02
390
#define WI_BOOL			0x02
284
#define WI_WORDS		0x03
391
#define WI_WORDS		0x03
285
#define WI_HEXBYTES		0x04
392
#define WI_HEXBYTES		0x04
393
#define WI_KEYSTRUCT		0x05
286
394
287
struct wi_table {
395
struct wi_table {
288
	int			wi_code;
396
	int			wi_code;
Lines 304-310 Link Here
304
	{ WI_RID_PROMISC, WI_BOOL, "Promiscuous mode:\t\t\t" },
412
	{ WI_RID_PROMISC, WI_BOOL, "Promiscuous mode:\t\t\t" },
305
	{ WI_RID_PORTTYPE, WI_WORDS, "Port type (1=BSS, 3=ad-hoc):\t\t"},
413
	{ WI_RID_PORTTYPE, WI_WORDS, "Port type (1=BSS, 3=ad-hoc):\t\t"},
306
	{ WI_RID_MAC_NODE, WI_HEXBYTES, "MAC address:\t\t\t\t"},
414
	{ WI_RID_MAC_NODE, WI_HEXBYTES, "MAC address:\t\t\t\t"},
307
	{ WI_RID_TX_RATE, WI_WORDS, "TX rate:\t\t\t\t"},
415
	{ WI_RID_TX_RATE, WI_WORDS, "TX rate (selection):\t\t\t"},
416
	{ WI_RID_CUR_TX_RATE, WI_WORDS, "TX rate (actual speed):\t\t\t"},
308
	{ WI_RID_RTS_THRESH, WI_WORDS, "RTS/CTS handshake threshold:\t\t"},
417
	{ WI_RID_RTS_THRESH, WI_WORDS, "RTS/CTS handshake threshold:\t\t"},
309
	{ WI_RID_CREATE_IBSS, WI_BOOL, "Create IBSS:\t\t\t\t" },
418
	{ WI_RID_CREATE_IBSS, WI_BOOL, "Create IBSS:\t\t\t\t" },
310
	{ WI_RID_SYSTEM_SCALE, WI_WORDS, "Access point density:\t\t\t" },
419
	{ WI_RID_SYSTEM_SCALE, WI_WORDS, "Access point density:\t\t\t" },
Lines 313-325 Link Here
313
	{ 0, NULL }
422
	{ 0, NULL }
314
};
423
};
315
424
425
static struct wi_table wi_crypt_table[] = {
426
	{ WI_RID_ENCRYPTION, WI_BOOL, "WEP encryption:\t\t\t\t" },
427
	{ WI_RID_TX_CRYPT_KEY, WI_WORDS, "TX encryption key:\t\t\t" },
428
	{ WI_RID_DEFLT_CRYPT_KEYS, WI_KEYSTRUCT, "Encryption keys:\t\t\t" },
429
	{ 0, NULL }
430
};
431
316
static void wi_dumpinfo(iface)
432
static void wi_dumpinfo(iface)
317
	char			*iface;
433
	char			*iface;
318
{
434
{
319
	struct wi_req		wreq;
435
	struct wi_req		wreq;
320
	int			i;
436
	int			i, has_wep;
321
	struct wi_table		*w;
437
	struct wi_table		*w;
322
438
439
	bzero((char *)&wreq, sizeof(wreq));
440
441
	wreq.wi_len = WI_MAX_DATALEN;
442
	wreq.wi_type = WI_RID_WEP_AVAIL;
443
444
	wi_getval(iface, &wreq);
445
	has_wep = wreq.wi_val[0];
446
323
	w = wi_table;
447
	w = wi_table;
324
448
325
	for (i = 0; w[i].wi_type; i++) {
449
	for (i = 0; w[i].wi_type; i++) {
Lines 345-354 Link Here
345
			break;
469
			break;
346
		default:
470
		default:
347
			break;
471
			break;
348
		printf("\n");
472
		printf("\n");
349
	}
473
	}
350
474
475
	if (has_wep) {
476
		w = wi_crypt_table;
477
		for (i = 0; w[i].wi_type; i++) {
478
			bzero((char *)&wreq, sizeof(wreq));
479
480
			wreq.wi_len = WI_MAX_DATALEN;
481
			wreq.wi_type = w[i].wi_code;
482
483
			wi_getval(iface, &wreq);
484
			printf("%s", w[i].wi_str);
485
			switch(w[i].wi_type) {
486
			case WI_STRING:
487
				wi_printstr(&wreq);
488
				break;
489
			case WI_WORDS:
490
				if (wreq.wi_type == WI_RID_TX_CRYPT_KEY)
491
					wreq.wi_val[0]++;
492
				wi_printwords(&wreq);
493
				break;
494
			case WI_BOOL:
495
				wi_printbool(&wreq);
496
				break;
497
			case WI_HEXBYTES:
498
				wi_printhex(&wreq);
499
				break;
500
			case WI_KEYSTRUCT:
501
				wi_printkeys(&wreq);
502
				break;
503
			default:
504
				break;
505
			}
506
			printf("\n");
507
		}
508
	}
509
351
	return;
510
	return;
352
}
511
}
353
512
Lines 426-436 Link Here
426
	fprintf(stderr, "\t%s -i iface -p port type\n", p);
585
	fprintf(stderr, "\t%s -i iface -p port type\n", p);
427
	fprintf(stderr, "\t%s -i iface -a access point density\n", p);
586
	fprintf(stderr, "\t%s -i iface -a access point density\n", p);
428
	fprintf(stderr, "\t%s -i iface -m mac address\n", p);
587
	fprintf(stderr, "\t%s -i iface -m mac address\n", p);
588
	fprintf(stderr, "\t%s -i iface -e 0|1\n", p);
589
	fprintf(stderr, "\t%s -i iface -k encryption key [-v 1|2|3|4]\n", p);
429
	fprintf(stderr, "\t%s -i iface -d max data length\n", p);
590
	fprintf(stderr, "\t%s -i iface -d max data length\n", p);
430
	fprintf(stderr, "\t%s -i iface -r RTS threshold\n", p);
591
	fprintf(stderr, "\t%s -i iface -r RTS threshold\n", p);
431
	fprintf(stderr, "\t%s -i iface -f frequency\n", p);
592
	fprintf(stderr, "\t%s -i iface -f frequency\n", p);
432
	fprintf(stderr, "\t%s -i iface -P 0|1t\n", p);
593
	fprintf(stderr, "\t%s -i iface -P 0|1t\n", p);
433
	fprintf(stderr, "\t%s -i iface -S max sleep duration\n", p);
594
	fprintf(stderr, "\t%s -i iface -S max sleep duration\n", p);
595
	fprintf(stderr, "\t%s -i iface -T 1|2|3|4\n", p);
434
596
435
	exit(1);
597
	exit(1);
436
}
598
}
Lines 442-450 Link Here
442
	int			ch;
604
	int			ch;
443
	char			*iface = NULL;
605
	char			*iface = NULL;
444
	char			*p = argv[0];
606
	char			*p = argv[0];
607
	char			*key = NULL;
608
	int			modifier = 0;
445
609
446
	while((ch = getopt(argc, argv,
610
	while((ch = getopt(argc, argv,
447
	    "hoc:d:f:i:p:r:q:t:n:s:m:P:S:")) != -1) {
611
	    "hoc:d:e:f:i:k:p:r:q:t:n:s:m:v:P:S:T:")) != -1) {
448
		switch(ch) {
612
		switch(ch) {
449
		case 'o':
613
		case 'o':
450
			wi_dumpstats(iface);
614
			wi_dumpstats(iface);
Lines 461-470 Link Here
461
			wi_setword(iface, WI_RID_MAX_DATALEN, atoi(optarg));
625
			wi_setword(iface, WI_RID_MAX_DATALEN, atoi(optarg));
462
			exit(0);
626
			exit(0);
463
			break;
627
			break;
628
		case 'e':
629
			wi_setword(iface, WI_RID_ENCRYPTION, atoi(optarg));
630
			exit(0);
631
			break;
464
		case 'f':
632
		case 'f':
465
			wi_setword(iface, WI_RID_OWN_CHNL, atoi(optarg));
633
			wi_setword(iface, WI_RID_OWN_CHNL, atoi(optarg));
466
			exit(0);
634
			exit(0);
467
			break;
635
			break;
636
		case 'k':
637
			key = optarg;
638
			break;
468
		case 'p':
639
		case 'p':
469
			wi_setword(iface, WI_RID_PORTTYPE, atoi(optarg));
640
			wi_setword(iface, WI_RID_PORTTYPE, atoi(optarg));
470
			exit(0);
641
			exit(0);
Lines 497-506 Link Here
497
			wi_setword(iface, WI_RID_MAX_SLEEP, atoi(optarg));
668
			wi_setword(iface, WI_RID_MAX_SLEEP, atoi(optarg));
498
			exit(0);
669
			exit(0);
499
			break;
670
			break;
671
		case 'T':
672
			wi_setword(iface,
673
			    WI_RID_TX_CRYPT_KEY, atoi(optarg) - 1);
674
			exit(0);
675
			break;
500
		case 'P':
676
		case 'P':
501
			wi_setword(iface, WI_RID_PM_ENABLED, atoi(optarg));
677
			wi_setword(iface, WI_RID_PM_ENABLED, atoi(optarg));
502
			exit(0);
678
			exit(0);
503
			break;
679
			break;
680
		case 'v':
681
			modifier = atoi(optarg);
682
			modifier--;
683
			break;
504
		case 'h':
684
		case 'h':
505
		default:
685
		default:
506
			usage(p);
686
			usage(p);
Lines 510-515 Link Here
510
690
511
	if (iface == NULL)
691
	if (iface == NULL)
512
		usage(p);
692
		usage(p);
693
694
	if (key != NULL) {
695
		wi_setkeys(iface, key, modifier);
696
		exit(0);
697
	}
513
698
514
	wi_dumpinfo(iface);
699
	wi_dumpinfo(iface);

Return to bug 17930