Make 128-bit WEP (aka 104-bit WEP) work with Prism based cards.

Submitted by:	Thomas Skibo <skibo@pacbell.net>
MFC after:	3 days
This commit is contained in:
brooks 2002-03-02 00:06:23 +00:00
parent 0f9133b440
commit 0fa4aee42b

View File

@ -1186,16 +1186,19 @@ wi_write_record(sc, ltv)
case WI_RID_DEFLT_CRYPT_KEYS:
{
int error;
int keylen;
struct wi_ltv_str ws;
struct wi_ltv_keys *wk =
(struct wi_ltv_keys *)ltv;
keylen = wk->wi_keys[sc->wi_tx_key].wi_keylen;
for (i = 0; i < 4; i++) {
ws.wi_len = 4;
bzero(&ws, sizeof(ws));
ws.wi_len = (keylen > 5) ? 8 : 4;
ws.wi_type = WI_RID_P2_CRYPT_KEY0 + i;
memcpy(ws.wi_str,
&wk->wi_keys[i].wi_keydat, 5);
ws.wi_str[5] = '\0';
&wk->wi_keys[i].wi_keydat, keylen);
error = wi_write_record(sc,
(struct wi_ltv_gen *)&ws);
if (error)