Lines Matching defs:key
263 "A value of 2 will try using the key at index 0 and index 1.");
513 u8 key[16];
975 u8 key[16];
1100 u8 key[16]; /* 40-bit and 104-bit keys */
1306 static void age_mic_context(miccntx *cur, miccntx *old, u8 *key, int key_len,
1309 /* If the current MIC context is valid and its key is the same as
1312 if (cur->valid && (memcmp(cur->key, key, key_len) == 0))
1319 memcpy(cur->key, key, key_len);
1325 /* Give key to mic seed */
1326 emmh32_setseed(&cur->seed, key, key_len, tfm);
1341 /* So next time we have a valid key and mic is enabled, we will
1342 * update the sequence number if the key is the same as before.
1407 // If not adhoc, always use unicast key
1636 /* expand the key to fill the MMH coefficient array */
3967 /* Grab the initial wep key, we gotta save it for auto_wep */
5193 /* Returns the WEP key at the specified index, or -1 if that key does
5209 memcpy(buf, wkr.key, klen);
5239 static int set_wep_key(struct airo_info *ai, u16 index, const u8 *key,
5253 memcpy(wkr.key, key, keylen);
5290 u8 key[16];
5294 memset(key, 0, sizeof(key));
5313 airo_print_err(ai->dev->name, "WepKey passed invalid key index");
5325 airo_print_err(ai->dev->name, "WebKey passed invalid key hex");
5330 key[i/3] = (u8)val << 4;
5333 key[i/3] |= (u8)val;
5338 rc = set_wep_key(ai, index, key, i/3, 1, 1);
5340 airo_print_err(ai->dev->name, "failed to set WEP key at index "
5379 j += sprintf(ptr+j, "Tx key = %d\n",
6371 /* Basic checking: do we have a key to set ?
6373 * Therefore, we need to check a key size == 0 instead.
6375 * when no key is present (only change flags), but older versions
6378 wep_key_t key;
6382 /* Check the size of the key */
6397 key.len = MAX_KEY_SIZE;
6399 key.len = MIN_KEY_SIZE;
6400 /* Check if the key is not marked as invalid */
6403 memset(key.key, 0, MAX_KEY_SIZE);
6404 /* Copy the key in the driver */
6405 memcpy(key.key, extra, dwrq->length);
6406 /* Send the key to the card */
6407 rc = set_wep_key(local, index, key.key, key.len, perm, 1);
6410 " WEP key at index %d: %d.",
6415 /* WE specify that if a valid key is set, encryption
6417 * This is also how "iwconfig ethX key on" works */
6418 if ((index == current_index) && (key.len > 0) &&
6422 /* Do we want to just set the transmit key index ? */
6483 /* We can't return the key, so set the proper flag and return zero */
6487 /* Which key do we want ? -1 -> tx index */
6495 /* Copy the key to the user buffer */
6522 wep_key_t key;
6529 /* Determine and validate the key index */
6545 /* Only set transmit key index here, actual
6546 * key is set below if needed.
6559 /* Set the requested key first */
6560 memset(key.key, 0, MAX_KEY_SIZE);
6563 key.len = 0;
6567 key.len = MAX_KEY_SIZE;
6569 key.len = MIN_KEY_SIZE;
6573 key_len = min (ext->key_len, key.len);
6574 memcpy(key.key, ext->key, key_len);
6579 if (key.len == 0) {
6588 rc = set_wep_key(local, idx, key.key, key.len, perm, 1);
6591 "failed to set WEP key at index %d: %d.",
6664 /* We can't return the key, so set the proper flag and return zero */
6668 /* Copy the key to the user buffer */