Lines Matching refs:key
46 int wep_change_key(struct wlandevice *wlandev, int keynum, u8 *key, int keylen)
52 if (!key)
60 memcpy(wlandev->wep_keys[keynum], key, keylen);
73 u8 s[256], key[64], c_crc[4];
80 /* initialize the first bytes of the key from the IV */
81 key[0] = iv[0];
82 key[1] = iv[1];
83 key[2] = iv[2];
97 /* copy the rest of the key over from the designated key */
98 memcpy(key + 3, wlandev->wep_keys[keyidx], keylen);
107 j = (j + s[i] + key[i % keylen]) & 0xff;
144 u8 s[256], key[64];
150 /* we need to have a real key.. */
164 key[0] = iv[0];
165 key[1] = iv[1];
166 key[2] = iv[2];
168 /* copy the rest of the key over from the designated key */
169 memcpy(key + 3, wlandev->wep_keys[keynum], keylen);
178 j = (j + s[i] + key[i % keylen]) & 0xff;