Lines Matching defs:index

262 		 "A value of 2 will try using the key at index 0 and index 1.");
774 __le16 index; /* First is 0 and 0xffff means end of list */
1564 u32 seq, index;
1596 index = 1 << seq; //Get an index number
1598 if (!(context->rx & index)) {
1601 context->rx |= index;
3027 if ((rc) || (bss.index == cpu_to_le16(0xffff))) {
3034 while ((!rc) && (bss.index != cpu_to_le16(0xffff))) {
3441 int i, index = -1;
3467 index = i;
3470 if (index != -1) {
3472 get_tx_error(ai, index);
3477 ai->fids[index] &= 0xffff;
3478 if (index < MAX_FIDS / 2) {
4897 int v, i = 0, k = 0; /* i is index into line,
4898 k is index to rates */
5190 /* Returns the WEP key at the specified index, or -1 if that key does
5193 static int get_wep_key(struct airo_info *ai, u16 index, char *buf, u16 buflen)
5204 if (le16_to_cpu(wkr.kindex) == index) {
5236 static int set_wep_key(struct airo_info *ai, u16 index, const u8 *key,
5248 wkr.kindex = cpu_to_le16(index);
5259 static int set_wep_tx_idx(struct airo_info *ai, u16 index, int perm, int lock)
5267 wkr.mac[0] = (char)index;
5270 ai->defindex = (char)index;
5288 u16 index = 0;
5298 index = data->wbuffer[0] - '0';
5300 rc = set_wep_tx_idx(ai, index, 1, 1);
5303 "WEP transmit index to %d: %d.",
5304 index, rc);
5310 airo_print_err(ai->dev->name, "WepKey passed invalid key index");
5335 rc = set_wep_key(ai, index, key, i/3, 1, 1);
5337 airo_print_err(ai->dev->name, "failed to set WEP key at index "
5338 "%d: %d.", index, rc);
5525 while (rc == 0 && BSSList_rid.index != cpu_to_le16(0xffff)) {
5921 unsigned index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
5927 /* Check if index is valid */
5928 if (index >= ARRAY_SIZE(SSID_rid.ssids))
5932 memset(SSID_rid.ssids[index].ssid, 0,
5933 sizeof(SSID_rid.ssids[index].ssid));
5934 memcpy(SSID_rid.ssids[index].ssid, extra, dwrq->length);
5935 SSID_rid.ssids[index].len = cpu_to_le16(dwrq->length);
6097 /* Setting by rate index */
6358 static inline int valid_index(struct airo_info *ai, int index)
6360 return (index >= 0) && (index <= ai->max_wep_idx);
6391 int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
6403 /* Check the index (none -> use current) */
6404 if (!valid_index(local, index))
6405 index = current_index;
6419 rc = set_wep_key(local, index, key.key, key.len, perm, 1);
6422 " WEP key at index %d: %d.",
6423 index, rc);
6430 if ((index == current_index) && (key.len > 0) &&
6434 /* Do we want to just set the transmit key index ? */
6435 int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
6436 if (valid_index(local, index)) {
6437 rc = set_wep_tx_idx(local, index, perm, 1);
6440 " WEP transmit index to %d: %d.",
6441 index, rc);
6474 int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
6500 /* Which key do we want ? -1 -> tx index */
6501 if (!valid_index(local, index)) {
6502 index = get_wep_tx_idx(local);
6503 if (index < 0)
6504 index = 0;
6506 dwrq->flags |= index + 1;
6509 wep_key_len = get_wep_key(local, index, &buf[0], sizeof(buf));
6542 /* Determine and validate the key index */
6558 /* Only set transmit key index here, actual
6564 "WEP transmit index to %d: %d.",
6596 "failed to set WEP transmit index to %d: %d.",
6604 "failed to set WEP key at index %d: %d.",
6968 range->freq[k].i = i + 1; /* List index */
7242 if (BSSList.index == cpu_to_le16(0xffff))