Lines Matching full:local
20 local_info_t *local; in hostap_get_wireless_stats() local
24 local = iface->local; in hostap_get_wireless_stats()
30 wstats = &local->wstats; in hostap_get_wireless_stats()
34 local->comm_tallies.rx_discards_wep_undecryptable; in hostap_get_wireless_stats()
36 local->comm_tallies.rx_fcs_errors + in hostap_get_wireless_stats()
37 local->comm_tallies.rx_discards_no_buffer + in hostap_get_wireless_stats()
38 local->comm_tallies.tx_discards_wrong_sa; in hostap_get_wireless_stats()
41 local->comm_tallies.tx_retry_limit_exceeded; in hostap_get_wireless_stats()
43 local->comm_tallies.rx_message_in_bad_msg_fragments; in hostap_get_wireless_stats()
45 if (local->iw_mode != IW_MODE_MASTER && in hostap_get_wireless_stats()
46 local->iw_mode != IW_MODE_REPEAT) { in hostap_get_wireless_stats()
52 wstats->qual.qual = local->comms_qual; in hostap_get_wireless_stats()
53 wstats->qual.level = local->avg_signal; in hostap_get_wireless_stats()
54 wstats->qual.noise = local->avg_noise; in hostap_get_wireless_stats()
69 local_info_t *local; in prism2_get_datarates() local
75 local = iface->local; in prism2_get_datarates()
77 len = local->func->get_rid(dev, HFA384X_RID_SUPPORTEDDATARATES, buf, in prism2_get_datarates()
119 local_info_t *local; in prism2_ioctl_siwencode() local
124 local = iface->local; in prism2_ioctl_siwencode()
128 i = local->crypt_info.tx_keyidx; in prism2_ioctl_siwencode()
134 crypt = &local->crypt_info.crypt[i]; in prism2_ioctl_siwencode()
138 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_siwencode()
145 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_siwencode()
182 if (j != i && local->crypt_info.crypt[j]) { in prism2_ioctl_siwencode()
188 local->crypt_info.tx_keyidx = i; in prism2_ioctl_siwencode()
191 local->crypt_info.tx_keyidx = i; in prism2_ioctl_siwencode()
195 local->open_wep = erq->flags & IW_ENCODE_OPEN; in prism2_ioctl_siwencode()
197 if (hostap_set_encryption(local)) { in prism2_ioctl_siwencode()
207 if (local->iw_mode != IW_MODE_INFRA && local->func->reset_port(dev)) { in prism2_ioctl_siwencode()
221 local_info_t *local; in prism2_ioctl_giwencode() local
227 local = iface->local; in prism2_ioctl_giwencode()
231 i = local->crypt_info.tx_keyidx; in prism2_ioctl_giwencode()
237 crypt = local->crypt_info.crypt[i]; in prism2_ioctl_giwencode()
259 if (local->func->get_rid(dev, HFA384X_RID_CNFWEPFLAGS, &val, 2, 1) < 0) in prism2_ioctl_giwencode()
281 local_info_t *local; in hostap_set_rate() local
285 local = iface->local; in hostap_set_rate()
287 basic_rates = local->basic_rates & local->tx_rate_control; in hostap_set_rate()
288 if (!basic_rates || basic_rates != local->basic_rates) { in hostap_set_rate()
293 basic_rates = local->tx_rate_control; in hostap_set_rate()
295 local->basic_rates = basic_rates; in hostap_set_rate()
303 local->tx_rate_control) || in hostap_set_rate()
305 local->tx_rate_control) || in hostap_set_rate()
306 local->func->reset_port(dev)); in hostap_set_rate()
311 dev->name, local->tx_rate_control); in hostap_set_rate()
316 hostap_update_rates(local); in hostap_set_rate()
327 local_info_t *local; in prism2_ioctl_siwrate() local
330 local = iface->local; in prism2_ioctl_siwrate()
335 local->tx_rate_control = HFA384X_RATES_11MBPS; in prism2_ioctl_siwrate()
338 local->tx_rate_control = HFA384X_RATES_5MBPS; in prism2_ioctl_siwrate()
341 local->tx_rate_control = HFA384X_RATES_2MBPS; in prism2_ioctl_siwrate()
344 local->tx_rate_control = HFA384X_RATES_1MBPS; in prism2_ioctl_siwrate()
347 local->tx_rate_control = HFA384X_RATES_1MBPS | in prism2_ioctl_siwrate()
355 local->tx_rate_control = HFA384X_RATES_1MBPS | in prism2_ioctl_siwrate()
360 local->tx_rate_control = HFA384X_RATES_1MBPS | in prism2_ioctl_siwrate()
364 local->tx_rate_control = HFA384X_RATES_1MBPS | in prism2_ioctl_siwrate()
368 local->tx_rate_control = HFA384X_RATES_1MBPS; in prism2_ioctl_siwrate()
371 local->tx_rate_control = HFA384X_RATES_1MBPS | in prism2_ioctl_siwrate()
388 local_info_t *local; in prism2_ioctl_giwrate() local
392 local = iface->local; in prism2_ioctl_giwrate()
394 if (local->func->get_rid(dev, HFA384X_RID_TXRATECONTROL, &val, 2, 1) < in prism2_ioctl_giwrate()
403 if (local->iw_mode == IW_MODE_MASTER && local->ap != NULL && in prism2_ioctl_giwrate()
404 !local->fw_tx_rate_control) { in prism2_ioctl_giwrate()
408 rrq->value = local->ap->last_tx_rate > 0 ? in prism2_ioctl_giwrate()
409 local->ap->last_tx_rate * 100000 : 11000000; in prism2_ioctl_giwrate()
413 if (local->func->get_rid(dev, HFA384X_RID_CURRENTTXRATE, &val, 2, 1) < in prism2_ioctl_giwrate()
446 local_info_t *local; in prism2_ioctl_siwsens() local
449 local = iface->local; in prism2_ioctl_siwsens()
456 local->func->reset_port(dev)) in prism2_ioctl_siwsens()
467 local_info_t *local; in prism2_ioctl_giwsens() local
471 local = iface->local; in prism2_ioctl_giwsens()
474 if (local->func->get_rid(dev, HFA384X_RID_CNFSYSTEMSCALE, &val, 2, 1) < in prism2_ioctl_giwsens()
491 local_info_t *local; in prism2_ioctl_giwaplist() local
496 local = iface->local; in prism2_ioctl_giwaplist()
498 if (local->iw_mode != IW_MODE_MASTER) { in prism2_ioctl_giwaplist()
514 data->length = prism2_ap_get_sta_qual(local, addr, qual, IW_MAX_AP, 1); in prism2_ioctl_giwaplist()
532 local_info_t *local; in prism2_ioctl_siwrts() local
536 local = iface->local; in prism2_ioctl_siwrts()
545 if (local->func->set_rid(dev, HFA384X_RID_RTSTHRESHOLD, &val, 2) || in prism2_ioctl_siwrts()
546 local->func->reset_port(dev)) in prism2_ioctl_siwrts()
549 local->rts_threshold = rts->value; in prism2_ioctl_siwrts()
559 local_info_t *local; in prism2_ioctl_giwrts() local
563 local = iface->local; in prism2_ioctl_giwrts()
565 if (local->func->get_rid(dev, HFA384X_RID_RTSTHRESHOLD, &val, 2, 1) < in prism2_ioctl_giwrts()
582 local_info_t *local; in prism2_ioctl_siwfrag() local
586 local = iface->local; in prism2_ioctl_siwfrag()
595 local->fragm_threshold = rts->value & ~0x1; in prism2_ioctl_siwfrag()
596 if (local->func->set_rid(dev, HFA384X_RID_FRAGMENTATIONTHRESHOLD, &val, in prism2_ioctl_siwfrag()
598 || local->func->reset_port(dev)) in prism2_ioctl_siwfrag()
609 local_info_t *local; in prism2_ioctl_giwfrag() local
613 local = iface->local; in prism2_ioctl_giwfrag()
615 if (local->func->get_rid(dev, HFA384X_RID_FRAGMENTATIONTHRESHOLD, in prism2_ioctl_giwfrag()
631 local_info_t *local; in hostap_join_ap() local
638 local = iface->local; in hostap_join_ap()
640 memcpy(req.bssid, local->preferred_ap, ETH_ALEN); in hostap_join_ap()
643 spin_lock_irqsave(&local->lock, flags); in hostap_join_ap()
644 for (i = 0; i < local->last_scan_results_count; i++) { in hostap_join_ap()
645 if (!local->last_scan_results) in hostap_join_ap()
647 entry = &local->last_scan_results[i]; in hostap_join_ap()
648 if (ether_addr_equal(local->preferred_ap, entry->bssid)) { in hostap_join_ap()
653 spin_unlock_irqrestore(&local->lock, flags); in hostap_join_ap()
655 if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req, in hostap_join_ap()
658 dev->name, local->preferred_ap); in hostap_join_ap()
663 dev->name, local->preferred_ap); in hostap_join_ap()
678 local_info_t *local; in prism2_ioctl_siwap()
681 local = iface->local; in prism2_ioctl_siwap()
683 memcpy(local->preferred_ap, &ap_addr->sa_data, ETH_ALEN); in prism2_ioctl_siwap()
685 if (local->host_roaming == 1 && local->iw_mode == IW_MODE_INFRA) { in prism2_ioctl_siwap()
690 if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, in prism2_ioctl_siwap()
696 } else if (local->host_roaming == 2 && in prism2_ioctl_siwap()
697 local->iw_mode == IW_MODE_INFRA) { in prism2_ioctl_siwap()
715 local_info_t *local; in prism2_ioctl_giwap() local
718 local = iface->local; in prism2_ioctl_giwap()
726 memcpy(&ap_addr->sa_data, local->assoc_ap_addr, ETH_ALEN); in prism2_ioctl_giwap()
732 if (local->func->get_rid(dev, HFA384X_RID_CURRENTBSSID, in prism2_ioctl_giwap()
736 /* local->bssid is also updated in LinkStatus handler when in in prism2_ioctl_giwap()
738 memcpy(local->bssid, &ap_addr->sa_data, ETH_ALEN); in prism2_ioctl_giwap()
751 local_info_t *local; in prism2_ioctl_siwnickn() local
754 local = iface->local; in prism2_ioctl_siwnickn()
756 memset(local->name, 0, sizeof(local->name)); in prism2_ioctl_siwnickn()
757 memcpy(local->name, nickname, data->length); in prism2_ioctl_siwnickn()
758 local->name_set = 1; in prism2_ioctl_siwnickn()
760 if (hostap_set_string(dev, HFA384X_RID_CNFOWNNAME, local->name) || in prism2_ioctl_siwnickn()
761 local->func->reset_port(dev)) in prism2_ioctl_siwnickn()
772 local_info_t *local; in prism2_ioctl_giwnickn() local
778 local = iface->local; in prism2_ioctl_giwnickn()
780 len = local->func->get_rid(dev, HFA384X_RID_CNFOWNNAME, in prism2_ioctl_giwnickn()
799 local_info_t *local; in prism2_ioctl_siwfreq() local
802 local = iface->local; in prism2_ioctl_siwfreq()
820 !(local->channel_mask & (1 << (freq->m - 1)))) in prism2_ioctl_siwfreq()
823 local->channel = freq->m; /* channel is used in prism2_setup_rids() */ in prism2_ioctl_siwfreq()
824 if (hostap_set_word(dev, HFA384X_RID_CNFOWNCHANNEL, local->channel) || in prism2_ioctl_siwfreq()
825 local->func->reset_port(dev)) in prism2_ioctl_siwfreq()
836 local_info_t *local; in prism2_ioctl_giwfreq() local
840 local = iface->local; in prism2_ioctl_giwfreq()
842 if (local->func->get_rid(dev, HFA384X_RID_CURRENTCHANNEL, &val, 2, 1) < in prism2_ioctl_giwfreq()
857 static void hostap_monitor_set_type(local_info_t *local) in hostap_monitor_set_type() argument
859 struct net_device *dev = local->ddev; in hostap_monitor_set_type()
864 if (local->monitor_type == PRISM2_MONITOR_PRISM || in hostap_monitor_set_type()
865 local->monitor_type == PRISM2_MONITOR_CAPHDR) { in hostap_monitor_set_type()
867 } else if (local->monitor_type == PRISM2_MONITOR_RADIOTAP) { in hostap_monitor_set_type()
880 local_info_t *local; in prism2_ioctl_siwessid() local
883 local = iface->local; in prism2_ioctl_siwessid()
891 if (local->iw_mode == IW_MODE_MASTER && ssid[0] == '\0') { in prism2_ioctl_siwessid()
899 memcpy(local->essid, ssid, data->length); in prism2_ioctl_siwessid()
900 local->essid[data->length] = '\0'; in prism2_ioctl_siwessid()
902 if ((!local->fw_ap && in prism2_ioctl_siwessid()
903 hostap_set_string(dev, HFA384X_RID_CNFDESIREDSSID, local->essid)) in prism2_ioctl_siwessid()
904 || hostap_set_string(dev, HFA384X_RID_CNFOWNSSID, local->essid) || in prism2_ioctl_siwessid()
905 local->func->reset_port(dev)) in prism2_ioctl_siwessid()
916 local_info_t *local; in prism2_ioctl_giwessid() local
920 local = iface->local; in prism2_ioctl_giwessid()
926 if (local->iw_mode == IW_MODE_MASTER) { in prism2_ioctl_giwessid()
927 data->length = strlen(local->essid); in prism2_ioctl_giwessid()
928 memcpy(essid, local->essid, IW_ESSID_MAX_SIZE); in prism2_ioctl_giwessid()
933 len = local->func->get_rid(dev, HFA384X_RID_CURRENTSSID, in prism2_ioctl_giwessid()
952 local_info_t *local; in prism2_ioctl_giwrange() local
959 local = iface->local; in prism2_ioctl_giwrange()
969 if (local->iw_mode == IW_MODE_INFRA || local->iw_mode == IW_MODE_ADHOC) in prism2_ioctl_giwrange()
993 if (local->channel_mask & (1 << i)) { in prism2_ioctl_giwrange()
1004 if (local->sta_fw_ver >= PRISM2_FW_VER(1,3,1)) { in prism2_ioctl_giwrange()
1061 if (local->sta_fw_ver >= PRISM2_FW_VER(1,3,1)) in prism2_ioctl_giwrange()
1068 static int hostap_monitor_mode_enable(local_info_t *local) in hostap_monitor_mode_enable() argument
1070 struct net_device *dev = local->dev; in hostap_monitor_mode_enable()
1073 hostap_monitor_set_type(local); in hostap_monitor_mode_enable()
1092 if (local->func->reset_port(dev) || in hostap_monitor_mode_enable()
1093 local->func->cmd(dev, HFA384X_CMDCODE_TEST | in hostap_monitor_mode_enable()
1104 static int hostap_monitor_mode_disable(local_info_t *local) in hostap_monitor_mode_disable() argument
1106 struct net_device *dev = local->ddev; in hostap_monitor_mode_disable()
1114 if (local->func->cmd(dev, HFA384X_CMDCODE_TEST | in hostap_monitor_mode_disable()
1118 return hostap_set_encryption(local); in hostap_monitor_mode_disable()
1127 local_info_t *local; in prism2_ioctl_siwmode() local
1131 local = iface->local; in prism2_ioctl_siwmode()
1143 if (*mode == local->iw_mode) in prism2_ioctl_siwmode()
1146 if (*mode == IW_MODE_MASTER && local->essid[0] == '\0') { in prism2_ioctl_siwmode()
1152 if (local->iw_mode == IW_MODE_MONITOR) in prism2_ioctl_siwmode()
1153 hostap_monitor_mode_disable(local); in prism2_ioctl_siwmode()
1155 if ((local->iw_mode == IW_MODE_ADHOC || in prism2_ioctl_siwmode()
1156 local->iw_mode == IW_MODE_MONITOR) && *mode == IW_MODE_MASTER) { in prism2_ioctl_siwmode()
1165 "%d -> %d\n", dev->name, local->iw_mode, *mode); in prism2_ioctl_siwmode()
1166 local->iw_mode = *mode; in prism2_ioctl_siwmode()
1168 if (local->iw_mode == IW_MODE_MONITOR) in prism2_ioctl_siwmode()
1169 hostap_monitor_mode_enable(local); in prism2_ioctl_siwmode()
1170 else if (local->iw_mode == IW_MODE_MASTER && !local->host_encrypt && in prism2_ioctl_siwmode()
1171 !local->fw_encrypt_ok) { in prism2_ioctl_siwmode()
1175 local->host_encrypt = 1; in prism2_ioctl_siwmode()
1179 hostap_get_porttype(local))) in prism2_ioctl_siwmode()
1182 if (local->func->reset_port(dev)) in prism2_ioctl_siwmode()
1184 if (double_reset && local->func->reset_port(dev)) in prism2_ioctl_siwmode()
1187 if (local->iw_mode != IW_MODE_INFRA && local->iw_mode != IW_MODE_ADHOC) in prism2_ioctl_siwmode()
1191 netif_carrier_on(local->dev); in prism2_ioctl_siwmode()
1192 netif_carrier_on(local->ddev); in prism2_ioctl_siwmode()
1203 local_info_t *local; in prism2_ioctl_giwmode() local
1206 local = iface->local; in prism2_ioctl_giwmode()
1216 *mode = local->iw_mode; in prism2_ioctl_giwmode()
1290 local_info_t *local; in prism2_ioctl_giwpower()
1294 local = iface->local; in prism2_ioctl_giwpower()
1296 if (local->func->get_rid(dev, HFA384X_RID_CNFPMENABLED, &enable, 2, 1) in prism2_ioctl_giwpower()
1309 if (local->func->get_rid(dev, in prism2_ioctl_giwpower()
1318 if (local->func->get_rid(dev, HFA384X_RID_CNFMAXSLEEPDURATION, in prism2_ioctl_giwpower()
1326 if (local->func->get_rid(dev, HFA384X_RID_CNFMULTICASTRECEIVE, &mcast, in prism2_ioctl_giwpower()
1345 local_info_t *local; in prism2_ioctl_siwretry() local
1348 local = iface->local; in prism2_ioctl_siwretry()
1359 local->manual_retry_count = -1; in prism2_ioctl_siwretry()
1360 local->tx_control &= ~HFA384X_TX_CTRL_ALT_RTRY; in prism2_ioctl_siwretry()
1370 local->manual_retry_count = rrq->value; in prism2_ioctl_siwretry()
1371 local->tx_control |= HFA384X_TX_CTRL_ALT_RTRY; in prism2_ioctl_siwretry()
1406 local_info_t *local; in prism2_ioctl_giwretry() local
1410 local = iface->local; in prism2_ioctl_giwretry()
1412 if (local->func->get_rid(dev, HFA384X_RID_SHORTRETRYLIMIT, &shortretry, in prism2_ioctl_giwretry()
1414 local->func->get_rid(dev, HFA384X_RID_LONGRETRYLIMIT, &longretry, in prism2_ioctl_giwretry()
1416 local->func->get_rid(dev, HFA384X_RID_MAXTRANSMITLIFETIME, in prism2_ioctl_giwretry()
1426 if (local->manual_retry_count >= 0) { in prism2_ioctl_giwretry()
1428 if (local->func->get_rid(dev, in prism2_ioctl_giwretry()
1433 rrq->value = local->manual_retry_count; in prism2_ioctl_giwretry()
1500 local_info_t *local; in prism2_ioctl_siwtxpow() local
1508 local = iface->local; in prism2_ioctl_siwtxpow()
1511 if (local->txpower_type != PRISM2_TXPOWER_OFF) { in prism2_ioctl_siwtxpow()
1513 ret = local->func->cmd(dev, HFA384X_CMDCODE_WRITEMIF, in prism2_ioctl_siwtxpow()
1518 local->txpower_type = PRISM2_TXPOWER_OFF; in prism2_ioctl_siwtxpow()
1523 if (local->txpower_type == PRISM2_TXPOWER_OFF) { in prism2_ioctl_siwtxpow()
1525 ret = local->func->cmd(dev, HFA384X_CMDCODE_WRITEMIF, in prism2_ioctl_siwtxpow()
1529 local->txpower_type = PRISM2_TXPOWER_UNKNOWN; in prism2_ioctl_siwtxpow()
1533 if (!rrq->fixed && local->txpower_type != PRISM2_TXPOWER_AUTO) { in prism2_ioctl_siwtxpow()
1536 local->func->cmd(dev, HFA384X_CMDCODE_TEST | in prism2_ioctl_siwtxpow()
1538 local->txpower_type = PRISM2_TXPOWER_AUTO; in prism2_ioctl_siwtxpow()
1542 if (local->txpower_type != PRISM2_TXPOWER_FIXED) { in prism2_ioctl_siwtxpow()
1545 local->func->cmd(dev, HFA384X_CMDCODE_TEST | in prism2_ioctl_siwtxpow()
1547 local->txpower_type = PRISM2_TXPOWER_FIXED; in prism2_ioctl_siwtxpow()
1563 local->txpower = rrq->value; in prism2_ioctl_siwtxpow()
1564 val = prism2_txpower_dBm_to_hfa386x(local->txpower); in prism2_ioctl_siwtxpow()
1565 if (local->func->cmd(dev, HFA384X_CMDCODE_WRITEMIF, in prism2_ioctl_siwtxpow()
1582 local_info_t *local; in prism2_ioctl_giwtxpow() local
1586 local = iface->local; in prism2_ioctl_giwtxpow()
1592 if (local->txpower_type == PRISM2_TXPOWER_AUTO) { in prism2_ioctl_giwtxpow()
1593 if (local->func->cmd(dev, HFA384X_CMDCODE_READMIF, in prism2_ioctl_giwtxpow()
1601 } else if (local->txpower_type == PRISM2_TXPOWER_OFF) { in prism2_ioctl_giwtxpow()
1604 } else if (local->txpower_type == PRISM2_TXPOWER_FIXED) { in prism2_ioctl_giwtxpow()
1605 rrq->value = local->txpower; in prism2_ioctl_giwtxpow()
1609 local->txpower_type); in prism2_ioctl_giwtxpow()
1627 local_info_t *local; in prism2_request_hostscan() local
1631 local = iface->local; in prism2_request_hostscan()
1634 scan_req.channel_list = cpu_to_le16(local->channel_mask & in prism2_request_hostscan()
1635 local->scan_channel_mask); in prism2_request_hostscan()
1644 if (local->func->set_rid(dev, HFA384X_RID_HOSTSCAN, &scan_req, in prism2_request_hostscan()
1656 local_info_t *local; in prism2_request_scan() local
1661 local = iface->local; in prism2_request_scan()
1664 scan_req.channel_list = cpu_to_le16(local->channel_mask & in prism2_request_scan()
1665 local->scan_channel_mask); in prism2_request_scan()
1677 if (!local->host_roaming) in prism2_request_scan()
1681 if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, &scan_req, in prism2_request_scan()
1687 if (!local->host_roaming) in prism2_request_scan()
1716 local_info_t *local; in prism2_ioctl_siwscan() local
1722 local = iface->local; in prism2_ioctl_siwscan()
1727 if (local->iw_mode == IW_MODE_MASTER) { in prism2_ioctl_siwscan()
1728 /* In master mode, we just return the results of our local in prism2_ioctl_siwscan()
1735 if (!local->dev_enabled) in prism2_ioctl_siwscan()
1743 ((local->iw_mode != IW_MODE_INFRA && in prism2_ioctl_siwscan()
1744 local->iw_mode != IW_MODE_ADHOC) || in prism2_ioctl_siwscan()
1745 (local->sta_fw_ver < PRISM2_FW_VER(1,3,1)))) in prism2_ioctl_siwscan()
1749 if (local->sta_fw_ver >= PRISM2_FW_VER(1,3,1)) in prism2_ioctl_siwscan()
1755 local->scan_timestamp = jiffies; in prism2_ioctl_siwscan()
1764 static char * __prism2_translate_scan(local_info_t *local, in __prism2_translate_scan() argument
1845 if (local->last_scan_type == PRISM2_HOSTSCAN) { in __prism2_translate_scan()
1908 if (local->last_scan_type == PRISM2_HOSTSCAN && in __prism2_translate_scan()
1942 static inline int prism2_translate_scan(local_info_t *local, in prism2_translate_scan() argument
1952 spin_lock_bh(&local->lock); in prism2_translate_scan()
1954 list_for_each(ptr, &local->bss_list) { in prism2_translate_scan()
1960 for (entry = 0; entry < local->last_scan_results_count; entry++) { in prism2_translate_scan()
1962 scan = &local->last_scan_results[entry]; in prism2_translate_scan()
1967 list_for_each(ptr, &local->bss_list) { in prism2_translate_scan()
1973 local, info, scan, bss, current_ev, in prism2_translate_scan()
1980 local, info, scan, NULL, current_ev, end_buf); in prism2_translate_scan()
1985 spin_unlock_bh(&local->lock); in prism2_translate_scan()
1991 * of BSSes in scan results. Extend this limit by using local BSS list. in prism2_translate_scan()
1993 list_for_each(ptr, &local->bss_list) { in prism2_translate_scan()
1998 current_ev = __prism2_translate_scan(local, info, NULL, bss, in prism2_translate_scan()
2003 spin_unlock_bh(&local->lock); in prism2_translate_scan()
2008 spin_unlock_bh(&local->lock); in prism2_translate_scan()
2023 local_info_t *local; in prism2_ioctl_giwscan_sta()
2027 local = iface->local; in prism2_ioctl_giwscan_sta()
2031 if (local->scan_timestamp && in prism2_ioctl_giwscan_sta()
2032 time_before(jiffies, local->scan_timestamp + 3 * HZ)) { in prism2_ioctl_giwscan_sta()
2043 local->scan_timestamp = 0; in prism2_ioctl_giwscan_sta()
2045 res = prism2_translate_scan(local, info, extra, data->length); in prism2_ioctl_giwscan_sta()
2063 local_info_t *local; in prism2_ioctl_giwscan() local
2067 local = iface->local; in prism2_ioctl_giwscan()
2069 if (local->iw_mode == IW_MODE_MASTER) { in prism2_ioctl_giwscan()
2292 local_info_t *local; in prism2_ioctl_priv_inquire() local
2295 local = iface->local; in prism2_ioctl_priv_inquire()
2297 if (local->func->cmd(dev, HFA384X_CMDCODE_INQUIRE, *i, NULL, NULL)) in prism2_ioctl_priv_inquire()
2309 local_info_t *local; in prism2_ioctl_priv_prism2_param() local
2317 local = iface->local; in prism2_ioctl_priv_prism2_param()
2321 local->fw_tx_rate_control = value; in prism2_ioctl_priv_prism2_param()
2326 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2329 local->beacon_int = value; in prism2_ioctl_priv_prism2_param()
2334 if (value == local->pseudo_adhoc) in prism2_ioctl_priv_prism2_param()
2343 dev->name, local->pseudo_adhoc, value); in prism2_ioctl_priv_prism2_param()
2344 local->pseudo_adhoc = value; in prism2_ioctl_priv_prism2_param()
2345 if (local->iw_mode != IW_MODE_ADHOC) in prism2_ioctl_priv_prism2_param()
2349 hostap_get_porttype(local))) { in prism2_ioctl_priv_prism2_param()
2354 if (local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2363 local->func->cmd(dev, HFA384X_CMDCODE_TEST | in prism2_ioctl_priv_prism2_param()
2369 local->frame_dump = value; in prism2_ioctl_priv_prism2_param()
2377 if (local->ap != NULL) in prism2_ioctl_priv_prism2_param()
2378 local->ap->ap_policy = value; in prism2_ioctl_priv_prism2_param()
2386 if (local->ap != NULL) in prism2_ioctl_priv_prism2_param()
2387 local->ap->max_inactivity = value * HZ; in prism2_ioctl_priv_prism2_param()
2391 if (local->ap != NULL) in prism2_ioctl_priv_prism2_param()
2392 local->ap->bridge_packets = value; in prism2_ioctl_priv_prism2_param()
2401 || local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2404 local->dtim_period = value; in prism2_ioctl_priv_prism2_param()
2408 if (local->ap != NULL) in prism2_ioctl_priv_prism2_param()
2409 local->ap->nullfunc_ack = value; in prism2_ioctl_priv_prism2_param()
2413 local->wds_max_connections = value; in prism2_ioctl_priv_prism2_param()
2417 if (local->ap != NULL) { in prism2_ioctl_priv_prism2_param()
2418 if (!local->ap->autom_ap_wds && value) { in prism2_ioctl_priv_prism2_param()
2420 hostap_add_wds_links(local); in prism2_ioctl_priv_prism2_param()
2422 local->ap->autom_ap_wds = value; in prism2_ioctl_priv_prism2_param()
2427 local->auth_algs = value; in prism2_ioctl_priv_prism2_param()
2428 if (hostap_set_auth_algs(local)) in prism2_ioctl_priv_prism2_param()
2433 local->monitor_allow_fcserr = value; in prism2_ioctl_priv_prism2_param()
2437 local->host_encrypt = value; in prism2_ioctl_priv_prism2_param()
2438 if (hostap_set_encryption(local) || in prism2_ioctl_priv_prism2_param()
2439 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2444 local->host_decrypt = value; in prism2_ioctl_priv_prism2_param()
2445 if (hostap_set_encryption(local) || in prism2_ioctl_priv_prism2_param()
2446 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2456 local->host_roaming = value; in prism2_ioctl_priv_prism2_param()
2457 if (hostap_set_roaming(local) || local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2463 local->bcrx_sta_key = value; in prism2_ioctl_priv_prism2_param()
2467 local->ieee_802_1x = value; in prism2_ioctl_priv_prism2_param()
2475 local->antsel_tx = value; in prism2_ioctl_priv_prism2_param()
2476 hostap_set_antsel(local); in prism2_ioctl_priv_prism2_param()
2484 local->antsel_rx = value; in prism2_ioctl_priv_prism2_param()
2485 hostap_set_antsel(local); in prism2_ioctl_priv_prism2_param()
2496 local->monitor_type = value; in prism2_ioctl_priv_prism2_param()
2497 if (local->iw_mode == IW_MODE_MONITOR) in prism2_ioctl_priv_prism2_param()
2498 hostap_monitor_set_type(local); in prism2_ioctl_priv_prism2_param()
2502 local->wds_type = value; in prism2_ioctl_priv_prism2_param()
2522 if (local->iw_mode == IW_MODE_MASTER) { in prism2_ioctl_priv_prism2_param()
2525 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2530 if (local->func->set_rid(dev, HFA384X_RID_HOSTSCAN, &scan_req, in prism2_ioctl_priv_prism2_param()
2535 if (local->iw_mode == IW_MODE_MASTER) { in prism2_ioctl_priv_prism2_param()
2538 add_wait_queue(&local->hostscan_wq, &__wait); in prism2_ioctl_priv_prism2_param()
2544 remove_wait_queue(&local->hostscan_wq, &__wait); in prism2_ioctl_priv_prism2_param()
2548 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2556 local->passive_scan_interval = value; in prism2_ioctl_priv_prism2_param()
2557 if (timer_pending(&local->passive_scan_timer)) in prism2_ioctl_priv_prism2_param()
2558 del_timer(&local->passive_scan_timer); in prism2_ioctl_priv_prism2_param()
2560 local->passive_scan_timer.expires = jiffies + in prism2_ioctl_priv_prism2_param()
2561 local->passive_scan_interval * HZ; in prism2_ioctl_priv_prism2_param()
2562 add_timer(&local->passive_scan_timer); in prism2_ioctl_priv_prism2_param()
2571 local->enh_sec = value; in prism2_ioctl_priv_prism2_param()
2573 local->enh_sec) || in prism2_ioctl_priv_prism2_param()
2574 local->func->reset_port(dev)) { in prism2_ioctl_priv_prism2_param()
2583 local->io_debug_enabled = value; in prism2_ioctl_priv_prism2_param()
2588 if ((value & local->tx_rate_control) != value || value == 0) { in prism2_ioctl_priv_prism2_param()
2595 local->basic_rates = value; in prism2_ioctl_priv_prism2_param()
2597 local->basic_rates) || in prism2_ioctl_priv_prism2_param()
2598 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2603 local->tx_rate_control = value; in prism2_ioctl_priv_prism2_param()
2609 ret = hostap_set_hostapd(local, value, 1); in prism2_ioctl_priv_prism2_param()
2613 ret = hostap_set_hostapd_sta(local, value, 1); in prism2_ioctl_priv_prism2_param()
2617 local->wpa = value; in prism2_ioctl_priv_prism2_param()
2618 if (local->sta_fw_ver < PRISM2_FW_VER(1,7,0)) in prism2_ioctl_priv_prism2_param()
2626 local->privacy_invoked = value; in prism2_ioctl_priv_prism2_param()
2627 if (hostap_set_encryption(local) || in prism2_ioctl_priv_prism2_param()
2628 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2633 local->tkip_countermeasures = value; in prism2_ioctl_priv_prism2_param()
2637 local->drop_unencrypted = value; in prism2_ioctl_priv_prism2_param()
2641 local->scan_channel_mask = value; in prism2_ioctl_priv_prism2_param()
2660 local_info_t *local; in prism2_ioctl_priv_get_prism2_param() local
2665 local = iface->local; in prism2_ioctl_priv_get_prism2_param()
2669 *param = local->fw_tx_rate_control; in prism2_ioctl_priv_get_prism2_param()
2673 *param = local->beacon_int; in prism2_ioctl_priv_get_prism2_param()
2677 *param = local->pseudo_adhoc; in prism2_ioctl_priv_get_prism2_param()
2685 *param = local->frame_dump; in prism2_ioctl_priv_get_prism2_param()
2689 if (local->ap != NULL) in prism2_ioctl_priv_get_prism2_param()
2690 *param = local->ap->ap_policy; in prism2_ioctl_priv_get_prism2_param()
2696 if (local->ap != NULL) in prism2_ioctl_priv_get_prism2_param()
2697 *param = local->ap->max_inactivity / HZ; in prism2_ioctl_priv_get_prism2_param()
2703 if (local->ap != NULL) in prism2_ioctl_priv_get_prism2_param()
2704 *param = local->ap->bridge_packets; in prism2_ioctl_priv_get_prism2_param()
2710 *param = local->dtim_period; in prism2_ioctl_priv_get_prism2_param()
2714 if (local->ap != NULL) in prism2_ioctl_priv_get_prism2_param()
2715 *param = local->ap->nullfunc_ack; in prism2_ioctl_priv_get_prism2_param()
2721 *param = local->wds_max_connections; in prism2_ioctl_priv_get_prism2_param()
2725 if (local->ap != NULL) in prism2_ioctl_priv_get_prism2_param()
2726 *param = local->ap->autom_ap_wds; in prism2_ioctl_priv_get_prism2_param()
2732 *param = local->auth_algs; in prism2_ioctl_priv_get_prism2_param()
2736 *param = local->monitor_allow_fcserr; in prism2_ioctl_priv_get_prism2_param()
2740 *param = local->host_encrypt; in prism2_ioctl_priv_get_prism2_param()
2744 *param = local->host_decrypt; in prism2_ioctl_priv_get_prism2_param()
2748 *param = local->host_roaming; in prism2_ioctl_priv_get_prism2_param()
2752 *param = local->bcrx_sta_key; in prism2_ioctl_priv_get_prism2_param()
2756 *param = local->ieee_802_1x; in prism2_ioctl_priv_get_prism2_param()
2760 *param = local->antsel_tx; in prism2_ioctl_priv_get_prism2_param()
2764 *param = local->antsel_rx; in prism2_ioctl_priv_get_prism2_param()
2768 *param = local->monitor_type; in prism2_ioctl_priv_get_prism2_param()
2772 *param = local->wds_type; in prism2_ioctl_priv_get_prism2_param()
2780 *param = local->passive_scan_interval; in prism2_ioctl_priv_get_prism2_param()
2784 *param = local->enh_sec; in prism2_ioctl_priv_get_prism2_param()
2789 *param = local->io_debug_enabled; in prism2_ioctl_priv_get_prism2_param()
2794 *param = local->basic_rates; in prism2_ioctl_priv_get_prism2_param()
2798 *param = local->tx_rate_control; in prism2_ioctl_priv_get_prism2_param()
2802 *param = local->hostapd; in prism2_ioctl_priv_get_prism2_param()
2806 *param = local->hostapd_sta; in prism2_ioctl_priv_get_prism2_param()
2810 if (local->sta_fw_ver < PRISM2_FW_VER(1,7,0)) in prism2_ioctl_priv_get_prism2_param()
2812 *param = local->wpa; in prism2_ioctl_priv_get_prism2_param()
2816 *param = local->privacy_invoked; in prism2_ioctl_priv_get_prism2_param()
2820 *param = local->tkip_countermeasures; in prism2_ioctl_priv_get_prism2_param()
2824 *param = local->drop_unencrypted; in prism2_ioctl_priv_get_prism2_param()
2828 *param = local->scan_channel_mask; in prism2_ioctl_priv_get_prism2_param()
2847 local_info_t *local; in prism2_ioctl_priv_readmif() local
2851 local = iface->local; in prism2_ioctl_priv_readmif()
2853 if (local->func->cmd(dev, HFA384X_CMDCODE_READMIF, *extra, NULL, in prism2_ioctl_priv_readmif()
2868 local_info_t *local; in prism2_ioctl_priv_writemif() local
2872 local = iface->local; in prism2_ioctl_priv_writemif()
2876 if (local->func->cmd(dev, HFA384X_CMDCODE_WRITEMIF, cr, &val, NULL)) in prism2_ioctl_priv_writemif()
2886 local_info_t *local; in prism2_ioctl_priv_monitor() local
2891 local = iface->local; in prism2_ioctl_priv_monitor()
2913 local->monitor_type = PRISM2_MONITOR_80211; in prism2_ioctl_priv_monitor()
2916 local->monitor_type = PRISM2_MONITOR_PRISM; in prism2_ioctl_priv_monitor()
2921 hostap_monitor_mode_enable(local); in prism2_ioctl_priv_monitor()
2932 local_info_t *local; in prism2_ioctl_priv_reset() local
2935 local = iface->local; in prism2_ioctl_priv_reset()
2941 local->func->hw_shutdown(dev, 1); in prism2_ioctl_priv_reset()
2942 local->func->hw_config(dev, 0); in prism2_ioctl_priv_reset()
2947 local->func->hw_reset(dev); in prism2_ioctl_priv_reset()
2952 local->func->reset_port(dev); in prism2_ioctl_priv_reset()
2956 prism2_sta_deauth(local, WLAN_REASON_DEAUTH_LEAVING); in prism2_ioctl_priv_reset()
2957 if (local->func->cmd(dev, HFA384X_CMDCODE_DISABLE, 0, NULL, in prism2_ioctl_priv_reset()
2963 if (local->func->cmd(dev, HFA384X_CMDCODE_ENABLE, 0, NULL, in prism2_ioctl_priv_reset()
2992 static int ap_mac_cmd_ioctl(local_info_t *local, int *cmd) in ap_mac_cmd_ioctl() argument
2998 local->ap->mac_restrictions.policy = MAC_POLICY_OPEN; in ap_mac_cmd_ioctl()
3001 local->ap->mac_restrictions.policy = MAC_POLICY_ALLOW; in ap_mac_cmd_ioctl()
3004 local->ap->mac_restrictions.policy = MAC_POLICY_DENY; in ap_mac_cmd_ioctl()
3007 ap_control_flush_macs(&local->ap->mac_restrictions); in ap_mac_cmd_ioctl()
3010 ap_control_kickall(local->ap); in ap_mac_cmd_ioctl()
3011 hostap_deauth_all_stas(local->dev, local->ap, 0); in ap_mac_cmd_ioctl()
3024 static int prism2_ioctl_priv_download(local_info_t *local, struct iw_point *p) in prism2_ioctl_priv_download() argument
3044 ret = local->func->download(local, param); in prism2_ioctl_priv_download()
3057 local_info_t *local = iface->local; in prism2_set_genericelement() local
3071 kfree(local->generic_elem); in prism2_set_genericelement()
3072 local->generic_elem = buf; in prism2_set_genericelement()
3073 local->generic_elem_len = len + 2; in prism2_set_genericelement()
3075 return local->func->set_rid(local->dev, HFA384X_RID_GENERICELEMENT, in prism2_set_genericelement()
3085 local_info_t *local = iface->local; in prism2_ioctl_siwauth() local
3098 local->tkip_countermeasures = data->value; in prism2_ioctl_siwauth()
3101 local->drop_unencrypted = data->value; in prism2_ioctl_siwauth()
3104 local->auth_algs = data->value; in prism2_ioctl_siwauth()
3108 local->wpa = 0; in prism2_ioctl_siwauth()
3109 if (local->sta_fw_ver < PRISM2_FW_VER(1,7,0)) in prism2_ioctl_siwauth()
3112 local->host_roaming = 0; in prism2_ioctl_siwauth()
3113 local->privacy_invoked = 0; in prism2_ioctl_siwauth()
3116 hostap_set_roaming(local) || in prism2_ioctl_siwauth()
3117 hostap_set_encryption(local) || in prism2_ioctl_siwauth()
3118 local->func->reset_port(dev)) in prism2_ioctl_siwauth()
3122 if (local->sta_fw_ver < PRISM2_FW_VER(1,7,0)) in prism2_ioctl_siwauth()
3124 local->host_roaming = 2; in prism2_ioctl_siwauth()
3125 local->privacy_invoked = 1; in prism2_ioctl_siwauth()
3126 local->wpa = 1; in prism2_ioctl_siwauth()
3128 hostap_set_roaming(local) || in prism2_ioctl_siwauth()
3129 hostap_set_encryption(local) || in prism2_ioctl_siwauth()
3130 local->func->reset_port(dev)) in prism2_ioctl_siwauth()
3134 local->ieee_802_1x = data->value; in prism2_ioctl_siwauth()
3137 local->privacy_invoked = data->value; in prism2_ioctl_siwauth()
3151 local_info_t *local = iface->local; in prism2_ioctl_giwauth() local
3164 data->value = local->tkip_countermeasures; in prism2_ioctl_giwauth()
3167 data->value = local->drop_unencrypted; in prism2_ioctl_giwauth()
3170 data->value = local->auth_algs; in prism2_ioctl_giwauth()
3173 data->value = local->wpa; in prism2_ioctl_giwauth()
3176 data->value = local->ieee_802_1x; in prism2_ioctl_giwauth()
3190 local_info_t *local = iface->local; in prism2_ioctl_siwencodeext() local
3203 i = local->crypt_info.tx_keyidx; in prism2_ioctl_siwencodeext()
3212 crypt = &local->crypt_info.crypt[i]; in prism2_ioctl_siwencodeext()
3216 sta_ptr = ap_crypt_get_ptrs(local->ap, addr, 0, &crypt); in prism2_ioctl_siwencodeext()
3218 if (local->iw_mode == IW_MODE_INFRA) { in prism2_ioctl_siwencodeext()
3225 crypt = &local->crypt_info.crypt[i]; in prism2_ioctl_siwencodeext()
3234 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_siwencodeext()
3253 local->dev->name, ext->alg); in prism2_ioctl_siwencodeext()
3265 local->dev->name, alg); in prism2_ioctl_siwencodeext()
3276 local->host_decrypt = local->host_encrypt = 1; in prism2_ioctl_siwencodeext()
3282 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_siwencodeext()
3313 local->dev->name); in prism2_ioctl_siwencodeext()
3320 local->crypt_info.tx_keyidx = i; in prism2_ioctl_siwencodeext()
3327 if (j != i && local->crypt_info.crypt[j]) { in prism2_ioctl_siwencodeext()
3333 local->crypt_info.tx_keyidx = i; in prism2_ioctl_siwencodeext()
3340 local->open_wep = erq->flags & IW_ENCODE_OPEN; in prism2_ioctl_siwencodeext()
3350 (hostap_set_encryption(local) || in prism2_ioctl_siwencodeext()
3351 (local->iw_mode != IW_MODE_INFRA && in prism2_ioctl_siwencodeext()
3352 local->func->reset_port(local->dev)))) in prism2_ioctl_siwencodeext()
3364 local_info_t *local = iface->local; in prism2_ioctl_giwencodeext() local
3377 i = local->crypt_info.tx_keyidx; in prism2_ioctl_giwencodeext()
3384 crypt = &local->crypt_info.crypt[i]; in prism2_ioctl_giwencodeext()
3387 sta_ptr = ap_crypt_get_ptrs(local->ap, addr, 0, &crypt); in prism2_ioctl_giwencodeext()
3428 static int prism2_ioctl_set_encryption(local_info_t *local, in prism2_ioctl_set_encryption() argument
3449 crypt = &local->crypt_info.crypt[param->u.crypt.idx]; in prism2_ioctl_set_encryption()
3454 local->ap, param->sta_addr, in prism2_ioctl_set_encryption()
3466 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_set_encryption()
3483 local->dev->name, param->u.crypt.alg); in prism2_ioctl_set_encryption()
3491 local->host_decrypt = local->host_encrypt = 1; in prism2_ioctl_set_encryption()
3496 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_set_encryption()
3523 local->dev->name); in prism2_ioctl_set_encryption()
3531 local->crypt_info.tx_keyidx = param->u.crypt.idx; in prism2_ioctl_set_encryption()
3534 local->dev->name); in prism2_ioctl_set_encryption()
3552 (hostap_set_encryption(local) || in prism2_ioctl_set_encryption()
3553 (local->iw_mode != IW_MODE_INFRA && in prism2_ioctl_set_encryption()
3554 local->func->reset_port(local->dev)))) { in prism2_ioctl_set_encryption()
3563 static int prism2_ioctl_get_encryption(local_info_t *local, in prism2_ioctl_get_encryption() argument
3581 param->u.crypt.idx = local->crypt_info.tx_keyidx; in prism2_ioctl_get_encryption()
3582 crypt = &local->crypt_info.crypt[param->u.crypt.idx]; in prism2_ioctl_get_encryption()
3585 sta_ptr = ap_crypt_get_ptrs(local->ap, param->sta_addr, 0, in prism2_ioctl_get_encryption()
3620 static int prism2_ioctl_get_rid(local_info_t *local, in prism2_ioctl_get_rid() argument
3630 res = local->func->get_rid(local->dev, param->u.rid.rid, in prism2_ioctl_get_rid()
3641 static int prism2_ioctl_set_rid(local_info_t *local, in prism2_ioctl_set_rid() argument
3651 return local->func->set_rid(local->dev, param->u.rid.rid, in prism2_ioctl_set_rid()
3656 static int prism2_ioctl_set_assoc_ap_addr(local_info_t *local, in prism2_ioctl_set_assoc_ap_addr() argument
3661 local->dev->name, param->sta_addr); in prism2_ioctl_set_assoc_ap_addr()
3662 memcpy(local->assoc_ap_addr, param->sta_addr, ETH_ALEN); in prism2_ioctl_set_assoc_ap_addr()
3680 local_info_t *local = iface->local; in prism2_ioctl_giwgenie() local
3681 int len = local->generic_elem_len - 2; in prism2_ioctl_giwgenie()
3683 if (len <= 0 || local->generic_elem == NULL) { in prism2_ioctl_giwgenie()
3692 memcpy(extra, local->generic_elem + 2, len); in prism2_ioctl_giwgenie()
3698 static int prism2_ioctl_set_generic_element(local_info_t *local, in prism2_ioctl_set_generic_element() argument
3709 return prism2_set_genericelement(local->dev, in prism2_ioctl_set_generic_element()
3719 local_info_t *local = iface->local; in prism2_ioctl_siwmlme() local
3727 return prism2_sta_send_mgmt(local, mlme->addr.sa_data, in prism2_ioctl_siwmlme()
3731 return prism2_sta_send_mgmt(local, mlme->addr.sa_data, in prism2_ioctl_siwmlme()
3740 static int prism2_ioctl_mlme(local_info_t *local, in prism2_ioctl_mlme() argument
3748 return prism2_sta_send_mgmt(local, param->sta_addr, in prism2_ioctl_mlme()
3752 return prism2_sta_send_mgmt(local, param->sta_addr, in prism2_ioctl_mlme()
3761 static int prism2_ioctl_scan_req(local_info_t *local, in prism2_ioctl_scan_req() argument
3765 if ((local->iw_mode != IW_MODE_INFRA && in prism2_ioctl_scan_req()
3766 local->iw_mode != IW_MODE_ADHOC) || in prism2_ioctl_scan_req()
3767 (local->sta_fw_ver < PRISM2_FW_VER(1,3,1))) in prism2_ioctl_scan_req()
3770 if (!local->dev_enabled) in prism2_ioctl_scan_req()
3773 return prism2_request_hostscan(local->dev, param->u.scan_req.ssid, in prism2_ioctl_scan_req()
3781 static int prism2_ioctl_priv_hostapd(local_info_t *local, struct iw_point *p) in prism2_ioctl_priv_hostapd() argument
3798 ret = prism2_ioctl_set_encryption(local, param, p->length); in prism2_ioctl_priv_hostapd()
3801 ret = prism2_ioctl_get_encryption(local, param, p->length); in prism2_ioctl_priv_hostapd()
3804 ret = prism2_ioctl_get_rid(local, param, p->length); in prism2_ioctl_priv_hostapd()
3807 ret = prism2_ioctl_set_rid(local, param, p->length); in prism2_ioctl_priv_hostapd()
3810 ret = prism2_ioctl_set_assoc_ap_addr(local, param, p->length); in prism2_ioctl_priv_hostapd()
3813 ret = prism2_ioctl_set_generic_element(local, param, in prism2_ioctl_priv_hostapd()
3817 ret = prism2_ioctl_mlme(local, param); in prism2_ioctl_priv_hostapd()
3820 ret = prism2_ioctl_scan_req(local, param); in prism2_ioctl_priv_hostapd()
3823 ret = prism2_hostapd(local->ap, param); in prism2_ioctl_priv_hostapd()
3846 local_info_t *local; in prism2_get_drvinfo() local
3849 local = iface->local; in prism2_get_drvinfo()
3853 "%d.%d.%d", (local->sta_fw_ver >> 16) & 0xff, in prism2_get_drvinfo()
3854 (local->sta_fw_ver >> 8) & 0xff, in prism2_get_drvinfo()
3855 local->sta_fw_ver & 0xff); in prism2_get_drvinfo()
3950 local_info_t *local; in hostap_ioctl() local
3954 local = iface->local; in hostap_ioctl()
3974 else ret = prism2_wds_add(local, wrq->u.ap_addr.sa_data, 1); in hostap_ioctl()
3979 else ret = prism2_wds_del(local, wrq->u.ap_addr.sa_data, 1, 0); in hostap_ioctl()
3991 else ret = ap_mac_cmd_ioctl(local, (int *) wrq->u.name); in hostap_ioctl()
3996 else ret = ap_control_add_mac(&local->ap->mac_restrictions, in hostap_ioctl()
4001 else ret = ap_control_del_mac(&local->ap->mac_restrictions, in hostap_ioctl()
4006 else ret = ap_control_kick_mac(local->ap, local->dev, in hostap_ioctl()
4025 local_info_t *local; in hostap_siocdevprivate() local
4029 local = iface->local; in hostap_siocdevprivate()
4038 else ret = prism2_ioctl_priv_download(local, &wrq->u.data); in hostap_siocdevprivate()
4044 else ret = prism2_ioctl_priv_hostapd(local, &wrq->u.data); in hostap_siocdevprivate()