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()
120 local_info_t *local; in prism2_ioctl_siwencode() local
125 local = iface->local; in prism2_ioctl_siwencode()
129 i = local->crypt_info.tx_keyidx; in prism2_ioctl_siwencode()
135 crypt = &local->crypt_info.crypt[i]; in prism2_ioctl_siwencode()
139 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_siwencode()
146 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_siwencode()
183 if (j != i && local->crypt_info.crypt[j]) { in prism2_ioctl_siwencode()
189 local->crypt_info.tx_keyidx = i; in prism2_ioctl_siwencode()
192 local->crypt_info.tx_keyidx = i; in prism2_ioctl_siwencode()
196 local->open_wep = erq->flags & IW_ENCODE_OPEN; in prism2_ioctl_siwencode()
198 if (hostap_set_encryption(local)) { in prism2_ioctl_siwencode()
208 if (local->iw_mode != IW_MODE_INFRA && local->func->reset_port(dev)) { in prism2_ioctl_siwencode()
223 local_info_t *local; in prism2_ioctl_giwencode() local
229 local = iface->local; in prism2_ioctl_giwencode()
233 i = local->crypt_info.tx_keyidx; in prism2_ioctl_giwencode()
239 crypt = local->crypt_info.crypt[i]; in prism2_ioctl_giwencode()
261 if (local->func->get_rid(dev, HFA384X_RID_CNFWEPFLAGS, &val, 2, 1) < 0) in prism2_ioctl_giwencode()
283 local_info_t *local; in hostap_set_rate() local
287 local = iface->local; in hostap_set_rate()
289 basic_rates = local->basic_rates & local->tx_rate_control; in hostap_set_rate()
290 if (!basic_rates || basic_rates != local->basic_rates) { in hostap_set_rate()
295 basic_rates = local->tx_rate_control; in hostap_set_rate()
297 local->basic_rates = basic_rates; in hostap_set_rate()
305 local->tx_rate_control) || in hostap_set_rate()
307 local->tx_rate_control) || in hostap_set_rate()
308 local->func->reset_port(dev)); in hostap_set_rate()
313 dev->name, local->tx_rate_control); in hostap_set_rate()
318 hostap_update_rates(local); in hostap_set_rate()
330 local_info_t *local; in prism2_ioctl_siwrate() local
333 local = iface->local; in prism2_ioctl_siwrate()
338 local->tx_rate_control = HFA384X_RATES_11MBPS; in prism2_ioctl_siwrate()
341 local->tx_rate_control = HFA384X_RATES_5MBPS; in prism2_ioctl_siwrate()
344 local->tx_rate_control = HFA384X_RATES_2MBPS; in prism2_ioctl_siwrate()
347 local->tx_rate_control = HFA384X_RATES_1MBPS; in prism2_ioctl_siwrate()
350 local->tx_rate_control = HFA384X_RATES_1MBPS | in prism2_ioctl_siwrate()
358 local->tx_rate_control = HFA384X_RATES_1MBPS | in prism2_ioctl_siwrate()
363 local->tx_rate_control = HFA384X_RATES_1MBPS | in prism2_ioctl_siwrate()
367 local->tx_rate_control = HFA384X_RATES_1MBPS | in prism2_ioctl_siwrate()
371 local->tx_rate_control = HFA384X_RATES_1MBPS; in prism2_ioctl_siwrate()
374 local->tx_rate_control = HFA384X_RATES_1MBPS | in prism2_ioctl_siwrate()
392 local_info_t *local; in prism2_ioctl_giwrate() local
396 local = iface->local; in prism2_ioctl_giwrate()
398 if (local->func->get_rid(dev, HFA384X_RID_TXRATECONTROL, &val, 2, 1) < in prism2_ioctl_giwrate()
407 if (local->iw_mode == IW_MODE_MASTER && local->ap != NULL && in prism2_ioctl_giwrate()
408 !local->fw_tx_rate_control) { in prism2_ioctl_giwrate()
412 rrq->value = local->ap->last_tx_rate > 0 ? in prism2_ioctl_giwrate()
413 local->ap->last_tx_rate * 100000 : 11000000; in prism2_ioctl_giwrate()
417 if (local->func->get_rid(dev, HFA384X_RID_CURRENTTXRATE, &val, 2, 1) < in prism2_ioctl_giwrate()
451 local_info_t *local; in prism2_ioctl_siwsens() local
454 local = iface->local; in prism2_ioctl_siwsens()
461 local->func->reset_port(dev)) in prism2_ioctl_siwsens()
473 local_info_t *local; in prism2_ioctl_giwsens() local
477 local = iface->local; in prism2_ioctl_giwsens()
480 if (local->func->get_rid(dev, HFA384X_RID_CNFSYSTEMSCALE, &val, 2, 1) < in prism2_ioctl_giwsens()
498 local_info_t *local; in prism2_ioctl_giwaplist() local
503 local = iface->local; in prism2_ioctl_giwaplist()
505 if (local->iw_mode != IW_MODE_MASTER) { in prism2_ioctl_giwaplist()
521 data->length = prism2_ap_get_sta_qual(local, addr, qual, IW_MAX_AP, 1); in prism2_ioctl_giwaplist()
540 local_info_t *local; in prism2_ioctl_siwrts() local
544 local = iface->local; in prism2_ioctl_siwrts()
553 if (local->func->set_rid(dev, HFA384X_RID_RTSTHRESHOLD, &val, 2) || in prism2_ioctl_siwrts()
554 local->func->reset_port(dev)) in prism2_ioctl_siwrts()
557 local->rts_threshold = rts->value; in prism2_ioctl_siwrts()
568 local_info_t *local; in prism2_ioctl_giwrts() local
572 local = iface->local; in prism2_ioctl_giwrts()
574 if (local->func->get_rid(dev, HFA384X_RID_RTSTHRESHOLD, &val, 2, 1) < in prism2_ioctl_giwrts()
592 local_info_t *local; in prism2_ioctl_siwfrag() local
596 local = iface->local; in prism2_ioctl_siwfrag()
605 local->fragm_threshold = rts->value & ~0x1; in prism2_ioctl_siwfrag()
606 if (local->func->set_rid(dev, HFA384X_RID_FRAGMENTATIONTHRESHOLD, &val, in prism2_ioctl_siwfrag()
608 || local->func->reset_port(dev)) in prism2_ioctl_siwfrag()
620 local_info_t *local; in prism2_ioctl_giwfrag() local
624 local = iface->local; in prism2_ioctl_giwfrag()
626 if (local->func->get_rid(dev, HFA384X_RID_FRAGMENTATIONTHRESHOLD, in prism2_ioctl_giwfrag()
642 local_info_t *local; in hostap_join_ap() local
649 local = iface->local; in hostap_join_ap()
651 memcpy(req.bssid, local->preferred_ap, ETH_ALEN); in hostap_join_ap()
654 spin_lock_irqsave(&local->lock, flags); in hostap_join_ap()
655 for (i = 0; i < local->last_scan_results_count; i++) { in hostap_join_ap()
656 if (!local->last_scan_results) in hostap_join_ap()
658 entry = &local->last_scan_results[i]; in hostap_join_ap()
659 if (ether_addr_equal(local->preferred_ap, entry->bssid)) { in hostap_join_ap()
664 spin_unlock_irqrestore(&local->lock, flags); in hostap_join_ap()
666 if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req, in hostap_join_ap()
669 dev->name, local->preferred_ap); in hostap_join_ap()
674 dev->name, local->preferred_ap); in hostap_join_ap()
690 local_info_t *local; in prism2_ioctl_siwap() local
693 local = iface->local; in prism2_ioctl_siwap()
695 memcpy(local->preferred_ap, &ap_addr->sa_data, ETH_ALEN); in prism2_ioctl_siwap()
697 if (local->host_roaming == 1 && local->iw_mode == IW_MODE_INFRA) { in prism2_ioctl_siwap()
702 if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, in prism2_ioctl_siwap()
708 } else if (local->host_roaming == 2 && in prism2_ioctl_siwap()
709 local->iw_mode == IW_MODE_INFRA) { in prism2_ioctl_siwap()
728 local_info_t *local; in prism2_ioctl_giwap() local
731 local = iface->local; in prism2_ioctl_giwap()
739 memcpy(&ap_addr->sa_data, local->assoc_ap_addr, ETH_ALEN); in prism2_ioctl_giwap()
745 if (local->func->get_rid(dev, HFA384X_RID_CURRENTBSSID, in prism2_ioctl_giwap()
749 /* local->bssid is also updated in LinkStatus handler when in in prism2_ioctl_giwap()
751 memcpy(local->bssid, &ap_addr->sa_data, ETH_ALEN); in prism2_ioctl_giwap()
765 local_info_t *local; in prism2_ioctl_siwnickn() local
768 local = iface->local; in prism2_ioctl_siwnickn()
770 memset(local->name, 0, sizeof(local->name)); in prism2_ioctl_siwnickn()
771 memcpy(local->name, nickname, data->length); in prism2_ioctl_siwnickn()
772 local->name_set = 1; in prism2_ioctl_siwnickn()
774 if (hostap_set_string(dev, HFA384X_RID_CNFOWNNAME, local->name) || in prism2_ioctl_siwnickn()
775 local->func->reset_port(dev)) in prism2_ioctl_siwnickn()
787 local_info_t *local; in prism2_ioctl_giwnickn() local
793 local = iface->local; in prism2_ioctl_giwnickn()
795 len = local->func->get_rid(dev, HFA384X_RID_CNFOWNNAME, in prism2_ioctl_giwnickn()
815 local_info_t *local; in prism2_ioctl_siwfreq() local
818 local = iface->local; in prism2_ioctl_siwfreq()
836 !(local->channel_mask & (1 << (freq->m - 1)))) in prism2_ioctl_siwfreq()
839 local->channel = freq->m; /* channel is used in prism2_setup_rids() */ in prism2_ioctl_siwfreq()
840 if (hostap_set_word(dev, HFA384X_RID_CNFOWNCHANNEL, local->channel) || in prism2_ioctl_siwfreq()
841 local->func->reset_port(dev)) in prism2_ioctl_siwfreq()
853 local_info_t *local; in prism2_ioctl_giwfreq() local
857 local = iface->local; in prism2_ioctl_giwfreq()
859 if (local->func->get_rid(dev, HFA384X_RID_CURRENTCHANNEL, &val, 2, 1) < in prism2_ioctl_giwfreq()
874 static void hostap_monitor_set_type(local_info_t *local) in hostap_monitor_set_type() argument
876 struct net_device *dev = local->ddev; in hostap_monitor_set_type()
881 if (local->monitor_type == PRISM2_MONITOR_PRISM || in hostap_monitor_set_type()
882 local->monitor_type == PRISM2_MONITOR_CAPHDR) { in hostap_monitor_set_type()
884 } else if (local->monitor_type == PRISM2_MONITOR_RADIOTAP) { in hostap_monitor_set_type()
898 local_info_t *local; in prism2_ioctl_siwessid() local
901 local = iface->local; in prism2_ioctl_siwessid()
909 if (local->iw_mode == IW_MODE_MASTER && ssid[0] == '\0') { in prism2_ioctl_siwessid()
917 memcpy(local->essid, ssid, data->length); in prism2_ioctl_siwessid()
918 local->essid[data->length] = '\0'; in prism2_ioctl_siwessid()
920 if ((!local->fw_ap && in prism2_ioctl_siwessid()
921 hostap_set_string(dev, HFA384X_RID_CNFDESIREDSSID, local->essid)) in prism2_ioctl_siwessid()
922 || hostap_set_string(dev, HFA384X_RID_CNFOWNSSID, local->essid) || in prism2_ioctl_siwessid()
923 local->func->reset_port(dev)) in prism2_ioctl_siwessid()
935 local_info_t *local; in prism2_ioctl_giwessid() local
939 local = iface->local; in prism2_ioctl_giwessid()
945 if (local->iw_mode == IW_MODE_MASTER) { in prism2_ioctl_giwessid()
946 data->length = strlen(local->essid); in prism2_ioctl_giwessid()
947 memcpy(essid, local->essid, IW_ESSID_MAX_SIZE); in prism2_ioctl_giwessid()
952 len = local->func->get_rid(dev, HFA384X_RID_CURRENTSSID, in prism2_ioctl_giwessid()
972 local_info_t *local; in prism2_ioctl_giwrange() local
979 local = iface->local; in prism2_ioctl_giwrange()
989 if (local->iw_mode == IW_MODE_INFRA || local->iw_mode == IW_MODE_ADHOC) in prism2_ioctl_giwrange()
1013 if (local->channel_mask & (1 << i)) { in prism2_ioctl_giwrange()
1024 if (local->sta_fw_ver >= PRISM2_FW_VER(1,3,1)) { in prism2_ioctl_giwrange()
1081 if (local->sta_fw_ver >= PRISM2_FW_VER(1,3,1)) in prism2_ioctl_giwrange()
1088 static int hostap_monitor_mode_enable(local_info_t *local) in hostap_monitor_mode_enable() argument
1090 struct net_device *dev = local->dev; in hostap_monitor_mode_enable()
1093 hostap_monitor_set_type(local); in hostap_monitor_mode_enable()
1112 if (local->func->reset_port(dev) || in hostap_monitor_mode_enable()
1113 local->func->cmd(dev, HFA384X_CMDCODE_TEST | in hostap_monitor_mode_enable()
1124 static int hostap_monitor_mode_disable(local_info_t *local) in hostap_monitor_mode_disable() argument
1126 struct net_device *dev = local->ddev; in hostap_monitor_mode_disable()
1134 if (local->func->cmd(dev, HFA384X_CMDCODE_TEST | in hostap_monitor_mode_disable()
1138 return hostap_set_encryption(local); in hostap_monitor_mode_disable()
1148 local_info_t *local; in prism2_ioctl_siwmode() local
1152 local = iface->local; in prism2_ioctl_siwmode()
1164 if (*mode == local->iw_mode) in prism2_ioctl_siwmode()
1167 if (*mode == IW_MODE_MASTER && local->essid[0] == '\0') { in prism2_ioctl_siwmode()
1173 if (local->iw_mode == IW_MODE_MONITOR) in prism2_ioctl_siwmode()
1174 hostap_monitor_mode_disable(local); in prism2_ioctl_siwmode()
1176 if ((local->iw_mode == IW_MODE_ADHOC || in prism2_ioctl_siwmode()
1177 local->iw_mode == IW_MODE_MONITOR) && *mode == IW_MODE_MASTER) { in prism2_ioctl_siwmode()
1186 "%d -> %d\n", dev->name, local->iw_mode, *mode); in prism2_ioctl_siwmode()
1187 local->iw_mode = *mode; in prism2_ioctl_siwmode()
1189 if (local->iw_mode == IW_MODE_MONITOR) in prism2_ioctl_siwmode()
1190 hostap_monitor_mode_enable(local); in prism2_ioctl_siwmode()
1191 else if (local->iw_mode == IW_MODE_MASTER && !local->host_encrypt && in prism2_ioctl_siwmode()
1192 !local->fw_encrypt_ok) { in prism2_ioctl_siwmode()
1196 local->host_encrypt = 1; in prism2_ioctl_siwmode()
1200 hostap_get_porttype(local))) in prism2_ioctl_siwmode()
1203 if (local->func->reset_port(dev)) in prism2_ioctl_siwmode()
1205 if (double_reset && local->func->reset_port(dev)) in prism2_ioctl_siwmode()
1208 if (local->iw_mode != IW_MODE_INFRA && local->iw_mode != IW_MODE_ADHOC) in prism2_ioctl_siwmode()
1212 netif_carrier_on(local->dev); in prism2_ioctl_siwmode()
1213 netif_carrier_on(local->ddev); in prism2_ioctl_siwmode()
1225 local_info_t *local; in prism2_ioctl_giwmode() local
1228 local = iface->local; in prism2_ioctl_giwmode()
1238 *mode = local->iw_mode; in prism2_ioctl_giwmode()
1314 local_info_t *local; in prism2_ioctl_giwpower() local
1318 local = iface->local; in prism2_ioctl_giwpower()
1320 if (local->func->get_rid(dev, HFA384X_RID_CNFPMENABLED, &enable, 2, 1) in prism2_ioctl_giwpower()
1333 if (local->func->get_rid(dev, in prism2_ioctl_giwpower()
1342 if (local->func->get_rid(dev, HFA384X_RID_CNFMAXSLEEPDURATION, in prism2_ioctl_giwpower()
1350 if (local->func->get_rid(dev, HFA384X_RID_CNFMULTICASTRECEIVE, &mcast, in prism2_ioctl_giwpower()
1370 local_info_t *local; in prism2_ioctl_siwretry() local
1373 local = iface->local; in prism2_ioctl_siwretry()
1384 local->manual_retry_count = -1; in prism2_ioctl_siwretry()
1385 local->tx_control &= ~HFA384X_TX_CTRL_ALT_RTRY; in prism2_ioctl_siwretry()
1395 local->manual_retry_count = rrq->value; in prism2_ioctl_siwretry()
1396 local->tx_control |= HFA384X_TX_CTRL_ALT_RTRY; in prism2_ioctl_siwretry()
1432 local_info_t *local; in prism2_ioctl_giwretry() local
1436 local = iface->local; in prism2_ioctl_giwretry()
1438 if (local->func->get_rid(dev, HFA384X_RID_SHORTRETRYLIMIT, &shortretry, in prism2_ioctl_giwretry()
1440 local->func->get_rid(dev, HFA384X_RID_LONGRETRYLIMIT, &longretry, in prism2_ioctl_giwretry()
1442 local->func->get_rid(dev, HFA384X_RID_MAXTRANSMITLIFETIME, in prism2_ioctl_giwretry()
1452 if (local->manual_retry_count >= 0) { in prism2_ioctl_giwretry()
1454 if (local->func->get_rid(dev, in prism2_ioctl_giwretry()
1459 rrq->value = local->manual_retry_count; in prism2_ioctl_giwretry()
1527 local_info_t *local; in prism2_ioctl_siwtxpow() local
1535 local = iface->local; in prism2_ioctl_siwtxpow()
1538 if (local->txpower_type != PRISM2_TXPOWER_OFF) { in prism2_ioctl_siwtxpow()
1540 ret = local->func->cmd(dev, HFA384X_CMDCODE_WRITEMIF, in prism2_ioctl_siwtxpow()
1545 local->txpower_type = PRISM2_TXPOWER_OFF; in prism2_ioctl_siwtxpow()
1550 if (local->txpower_type == PRISM2_TXPOWER_OFF) { in prism2_ioctl_siwtxpow()
1552 ret = local->func->cmd(dev, HFA384X_CMDCODE_WRITEMIF, in prism2_ioctl_siwtxpow()
1556 local->txpower_type = PRISM2_TXPOWER_UNKNOWN; in prism2_ioctl_siwtxpow()
1560 if (!rrq->fixed && local->txpower_type != PRISM2_TXPOWER_AUTO) { in prism2_ioctl_siwtxpow()
1563 local->func->cmd(dev, HFA384X_CMDCODE_TEST | in prism2_ioctl_siwtxpow()
1565 local->txpower_type = PRISM2_TXPOWER_AUTO; in prism2_ioctl_siwtxpow()
1569 if (local->txpower_type != PRISM2_TXPOWER_FIXED) { in prism2_ioctl_siwtxpow()
1572 local->func->cmd(dev, HFA384X_CMDCODE_TEST | in prism2_ioctl_siwtxpow()
1574 local->txpower_type = PRISM2_TXPOWER_FIXED; in prism2_ioctl_siwtxpow()
1590 local->txpower = rrq->value; in prism2_ioctl_siwtxpow()
1591 val = prism2_txpower_dBm_to_hfa386x(local->txpower); in prism2_ioctl_siwtxpow()
1592 if (local->func->cmd(dev, HFA384X_CMDCODE_WRITEMIF, in prism2_ioctl_siwtxpow()
1610 local_info_t *local; in prism2_ioctl_giwtxpow() local
1614 local = iface->local; in prism2_ioctl_giwtxpow()
1620 if (local->txpower_type == PRISM2_TXPOWER_AUTO) { in prism2_ioctl_giwtxpow()
1621 if (local->func->cmd(dev, HFA384X_CMDCODE_READMIF, in prism2_ioctl_giwtxpow()
1629 } else if (local->txpower_type == PRISM2_TXPOWER_OFF) { in prism2_ioctl_giwtxpow()
1632 } else if (local->txpower_type == PRISM2_TXPOWER_FIXED) { in prism2_ioctl_giwtxpow()
1633 rrq->value = local->txpower; in prism2_ioctl_giwtxpow()
1637 local->txpower_type); in prism2_ioctl_giwtxpow()
1655 local_info_t *local; in prism2_request_hostscan() local
1659 local = iface->local; in prism2_request_hostscan()
1662 scan_req.channel_list = cpu_to_le16(local->channel_mask & in prism2_request_hostscan()
1663 local->scan_channel_mask); in prism2_request_hostscan()
1672 if (local->func->set_rid(dev, HFA384X_RID_HOSTSCAN, &scan_req, in prism2_request_hostscan()
1684 local_info_t *local; in prism2_request_scan() local
1689 local = iface->local; in prism2_request_scan()
1692 scan_req.channel_list = cpu_to_le16(local->channel_mask & in prism2_request_scan()
1693 local->scan_channel_mask); in prism2_request_scan()
1705 if (!local->host_roaming) in prism2_request_scan()
1709 if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, &scan_req, in prism2_request_scan()
1715 if (!local->host_roaming) in prism2_request_scan()
1745 local_info_t *local; in prism2_ioctl_siwscan() local
1751 local = iface->local; in prism2_ioctl_siwscan()
1756 if (local->iw_mode == IW_MODE_MASTER) { in prism2_ioctl_siwscan()
1757 /* In master mode, we just return the results of our local in prism2_ioctl_siwscan()
1764 if (!local->dev_enabled) in prism2_ioctl_siwscan()
1772 ((local->iw_mode != IW_MODE_INFRA && in prism2_ioctl_siwscan()
1773 local->iw_mode != IW_MODE_ADHOC) || in prism2_ioctl_siwscan()
1774 (local->sta_fw_ver < PRISM2_FW_VER(1,3,1)))) in prism2_ioctl_siwscan()
1778 if (local->sta_fw_ver >= PRISM2_FW_VER(1,3,1)) in prism2_ioctl_siwscan()
1784 local->scan_timestamp = jiffies; in prism2_ioctl_siwscan()
1793 static char * __prism2_translate_scan(local_info_t *local, in __prism2_translate_scan() argument
1874 if (local->last_scan_type == PRISM2_HOSTSCAN) { in __prism2_translate_scan()
1937 if (local->last_scan_type == PRISM2_HOSTSCAN && in __prism2_translate_scan()
1971 static inline int prism2_translate_scan(local_info_t *local, in prism2_translate_scan() argument
1981 spin_lock_bh(&local->lock); in prism2_translate_scan()
1983 list_for_each(ptr, &local->bss_list) { in prism2_translate_scan()
1989 for (entry = 0; entry < local->last_scan_results_count; entry++) { in prism2_translate_scan()
1991 scan = &local->last_scan_results[entry]; in prism2_translate_scan()
1996 list_for_each(ptr, &local->bss_list) { in prism2_translate_scan()
2002 local, info, scan, bss, current_ev, in prism2_translate_scan()
2009 local, info, scan, NULL, current_ev, end_buf); in prism2_translate_scan()
2014 spin_unlock_bh(&local->lock); in prism2_translate_scan()
2020 * of BSSes in scan results. Extend this limit by using local BSS list. in prism2_translate_scan()
2022 list_for_each(ptr, &local->bss_list) { in prism2_translate_scan()
2027 current_ev = __prism2_translate_scan(local, info, NULL, bss, in prism2_translate_scan()
2032 spin_unlock_bh(&local->lock); in prism2_translate_scan()
2037 spin_unlock_bh(&local->lock); in prism2_translate_scan()
2052 local_info_t *local; in prism2_ioctl_giwscan_sta()
2056 local = iface->local; in prism2_ioctl_giwscan_sta()
2060 if (local->scan_timestamp && in prism2_ioctl_giwscan_sta()
2061 time_before(jiffies, local->scan_timestamp + 3 * HZ)) { in prism2_ioctl_giwscan_sta()
2072 local->scan_timestamp = 0; in prism2_ioctl_giwscan_sta()
2074 res = prism2_translate_scan(local, info, extra, data->length); in prism2_ioctl_giwscan_sta()
2093 local_info_t *local; in prism2_ioctl_giwscan() local
2097 local = iface->local; in prism2_ioctl_giwscan()
2099 if (local->iw_mode == IW_MODE_MASTER) { in prism2_ioctl_giwscan()
2322 local_info_t *local; in prism2_ioctl_priv_inquire() local
2325 local = iface->local; in prism2_ioctl_priv_inquire()
2327 if (local->func->cmd(dev, HFA384X_CMDCODE_INQUIRE, *i, NULL, NULL)) in prism2_ioctl_priv_inquire()
2339 local_info_t *local; in prism2_ioctl_priv_prism2_param() local
2347 local = iface->local; in prism2_ioctl_priv_prism2_param()
2351 local->fw_tx_rate_control = value; in prism2_ioctl_priv_prism2_param()
2356 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2359 local->beacon_int = value; in prism2_ioctl_priv_prism2_param()
2364 if (value == local->pseudo_adhoc) in prism2_ioctl_priv_prism2_param()
2373 dev->name, local->pseudo_adhoc, value); in prism2_ioctl_priv_prism2_param()
2374 local->pseudo_adhoc = value; in prism2_ioctl_priv_prism2_param()
2375 if (local->iw_mode != IW_MODE_ADHOC) in prism2_ioctl_priv_prism2_param()
2379 hostap_get_porttype(local))) { in prism2_ioctl_priv_prism2_param()
2384 if (local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2393 local->func->cmd(dev, HFA384X_CMDCODE_TEST | in prism2_ioctl_priv_prism2_param()
2399 local->frame_dump = value; in prism2_ioctl_priv_prism2_param()
2407 if (local->ap != NULL) in prism2_ioctl_priv_prism2_param()
2408 local->ap->ap_policy = value; in prism2_ioctl_priv_prism2_param()
2416 if (local->ap != NULL) in prism2_ioctl_priv_prism2_param()
2417 local->ap->max_inactivity = value * HZ; in prism2_ioctl_priv_prism2_param()
2421 if (local->ap != NULL) in prism2_ioctl_priv_prism2_param()
2422 local->ap->bridge_packets = value; in prism2_ioctl_priv_prism2_param()
2431 || local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2434 local->dtim_period = value; in prism2_ioctl_priv_prism2_param()
2438 if (local->ap != NULL) in prism2_ioctl_priv_prism2_param()
2439 local->ap->nullfunc_ack = value; in prism2_ioctl_priv_prism2_param()
2443 local->wds_max_connections = value; in prism2_ioctl_priv_prism2_param()
2447 if (local->ap != NULL) { in prism2_ioctl_priv_prism2_param()
2448 if (!local->ap->autom_ap_wds && value) { in prism2_ioctl_priv_prism2_param()
2450 hostap_add_wds_links(local); in prism2_ioctl_priv_prism2_param()
2452 local->ap->autom_ap_wds = value; in prism2_ioctl_priv_prism2_param()
2457 local->auth_algs = value; in prism2_ioctl_priv_prism2_param()
2458 if (hostap_set_auth_algs(local)) in prism2_ioctl_priv_prism2_param()
2463 local->monitor_allow_fcserr = value; in prism2_ioctl_priv_prism2_param()
2467 local->host_encrypt = value; in prism2_ioctl_priv_prism2_param()
2468 if (hostap_set_encryption(local) || in prism2_ioctl_priv_prism2_param()
2469 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2474 local->host_decrypt = value; in prism2_ioctl_priv_prism2_param()
2475 if (hostap_set_encryption(local) || in prism2_ioctl_priv_prism2_param()
2476 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2486 local->host_roaming = value; in prism2_ioctl_priv_prism2_param()
2487 if (hostap_set_roaming(local) || local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2493 local->bcrx_sta_key = value; in prism2_ioctl_priv_prism2_param()
2497 local->ieee_802_1x = value; in prism2_ioctl_priv_prism2_param()
2505 local->antsel_tx = value; in prism2_ioctl_priv_prism2_param()
2506 hostap_set_antsel(local); in prism2_ioctl_priv_prism2_param()
2514 local->antsel_rx = value; in prism2_ioctl_priv_prism2_param()
2515 hostap_set_antsel(local); in prism2_ioctl_priv_prism2_param()
2526 local->monitor_type = value; in prism2_ioctl_priv_prism2_param()
2527 if (local->iw_mode == IW_MODE_MONITOR) in prism2_ioctl_priv_prism2_param()
2528 hostap_monitor_set_type(local); in prism2_ioctl_priv_prism2_param()
2532 local->wds_type = value; in prism2_ioctl_priv_prism2_param()
2552 if (local->iw_mode == IW_MODE_MASTER) { in prism2_ioctl_priv_prism2_param()
2555 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2560 if (local->func->set_rid(dev, HFA384X_RID_HOSTSCAN, &scan_req, in prism2_ioctl_priv_prism2_param()
2565 if (local->iw_mode == IW_MODE_MASTER) { in prism2_ioctl_priv_prism2_param()
2568 add_wait_queue(&local->hostscan_wq, &__wait); in prism2_ioctl_priv_prism2_param()
2574 remove_wait_queue(&local->hostscan_wq, &__wait); in prism2_ioctl_priv_prism2_param()
2578 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2586 local->passive_scan_interval = value; in prism2_ioctl_priv_prism2_param()
2587 if (timer_pending(&local->passive_scan_timer)) in prism2_ioctl_priv_prism2_param()
2588 del_timer(&local->passive_scan_timer); in prism2_ioctl_priv_prism2_param()
2590 local->passive_scan_timer.expires = jiffies + in prism2_ioctl_priv_prism2_param()
2591 local->passive_scan_interval * HZ; in prism2_ioctl_priv_prism2_param()
2592 add_timer(&local->passive_scan_timer); in prism2_ioctl_priv_prism2_param()
2601 local->enh_sec = value; in prism2_ioctl_priv_prism2_param()
2603 local->enh_sec) || in prism2_ioctl_priv_prism2_param()
2604 local->func->reset_port(dev)) { in prism2_ioctl_priv_prism2_param()
2613 local->io_debug_enabled = value; in prism2_ioctl_priv_prism2_param()
2618 if ((value & local->tx_rate_control) != value || value == 0) { in prism2_ioctl_priv_prism2_param()
2625 local->basic_rates = value; in prism2_ioctl_priv_prism2_param()
2627 local->basic_rates) || in prism2_ioctl_priv_prism2_param()
2628 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2633 local->tx_rate_control = value; in prism2_ioctl_priv_prism2_param()
2639 ret = hostap_set_hostapd(local, value, 1); in prism2_ioctl_priv_prism2_param()
2643 ret = hostap_set_hostapd_sta(local, value, 1); in prism2_ioctl_priv_prism2_param()
2647 local->wpa = value; in prism2_ioctl_priv_prism2_param()
2648 if (local->sta_fw_ver < PRISM2_FW_VER(1,7,0)) in prism2_ioctl_priv_prism2_param()
2656 local->privacy_invoked = value; in prism2_ioctl_priv_prism2_param()
2657 if (hostap_set_encryption(local) || in prism2_ioctl_priv_prism2_param()
2658 local->func->reset_port(dev)) in prism2_ioctl_priv_prism2_param()
2663 local->tkip_countermeasures = value; in prism2_ioctl_priv_prism2_param()
2667 local->drop_unencrypted = value; in prism2_ioctl_priv_prism2_param()
2671 local->scan_channel_mask = value; in prism2_ioctl_priv_prism2_param()
2690 local_info_t *local; in prism2_ioctl_priv_get_prism2_param() local
2695 local = iface->local; in prism2_ioctl_priv_get_prism2_param()
2699 *param = local->fw_tx_rate_control; in prism2_ioctl_priv_get_prism2_param()
2703 *param = local->beacon_int; in prism2_ioctl_priv_get_prism2_param()
2707 *param = local->pseudo_adhoc; in prism2_ioctl_priv_get_prism2_param()
2715 *param = local->frame_dump; in prism2_ioctl_priv_get_prism2_param()
2719 if (local->ap != NULL) in prism2_ioctl_priv_get_prism2_param()
2720 *param = local->ap->ap_policy; in prism2_ioctl_priv_get_prism2_param()
2726 if (local->ap != NULL) in prism2_ioctl_priv_get_prism2_param()
2727 *param = local->ap->max_inactivity / HZ; in prism2_ioctl_priv_get_prism2_param()
2733 if (local->ap != NULL) in prism2_ioctl_priv_get_prism2_param()
2734 *param = local->ap->bridge_packets; in prism2_ioctl_priv_get_prism2_param()
2740 *param = local->dtim_period; in prism2_ioctl_priv_get_prism2_param()
2744 if (local->ap != NULL) in prism2_ioctl_priv_get_prism2_param()
2745 *param = local->ap->nullfunc_ack; in prism2_ioctl_priv_get_prism2_param()
2751 *param = local->wds_max_connections; in prism2_ioctl_priv_get_prism2_param()
2755 if (local->ap != NULL) in prism2_ioctl_priv_get_prism2_param()
2756 *param = local->ap->autom_ap_wds; in prism2_ioctl_priv_get_prism2_param()
2762 *param = local->auth_algs; in prism2_ioctl_priv_get_prism2_param()
2766 *param = local->monitor_allow_fcserr; in prism2_ioctl_priv_get_prism2_param()
2770 *param = local->host_encrypt; in prism2_ioctl_priv_get_prism2_param()
2774 *param = local->host_decrypt; in prism2_ioctl_priv_get_prism2_param()
2778 *param = local->host_roaming; in prism2_ioctl_priv_get_prism2_param()
2782 *param = local->bcrx_sta_key; in prism2_ioctl_priv_get_prism2_param()
2786 *param = local->ieee_802_1x; in prism2_ioctl_priv_get_prism2_param()
2790 *param = local->antsel_tx; in prism2_ioctl_priv_get_prism2_param()
2794 *param = local->antsel_rx; in prism2_ioctl_priv_get_prism2_param()
2798 *param = local->monitor_type; in prism2_ioctl_priv_get_prism2_param()
2802 *param = local->wds_type; in prism2_ioctl_priv_get_prism2_param()
2810 *param = local->passive_scan_interval; in prism2_ioctl_priv_get_prism2_param()
2814 *param = local->enh_sec; in prism2_ioctl_priv_get_prism2_param()
2819 *param = local->io_debug_enabled; in prism2_ioctl_priv_get_prism2_param()
2824 *param = local->basic_rates; in prism2_ioctl_priv_get_prism2_param()
2828 *param = local->tx_rate_control; in prism2_ioctl_priv_get_prism2_param()
2832 *param = local->hostapd; in prism2_ioctl_priv_get_prism2_param()
2836 *param = local->hostapd_sta; in prism2_ioctl_priv_get_prism2_param()
2840 if (local->sta_fw_ver < PRISM2_FW_VER(1,7,0)) in prism2_ioctl_priv_get_prism2_param()
2842 *param = local->wpa; in prism2_ioctl_priv_get_prism2_param()
2846 *param = local->privacy_invoked; in prism2_ioctl_priv_get_prism2_param()
2850 *param = local->tkip_countermeasures; in prism2_ioctl_priv_get_prism2_param()
2854 *param = local->drop_unencrypted; in prism2_ioctl_priv_get_prism2_param()
2858 *param = local->scan_channel_mask; in prism2_ioctl_priv_get_prism2_param()
2877 local_info_t *local; in prism2_ioctl_priv_readmif() local
2881 local = iface->local; in prism2_ioctl_priv_readmif()
2883 if (local->func->cmd(dev, HFA384X_CMDCODE_READMIF, *extra, NULL, in prism2_ioctl_priv_readmif()
2898 local_info_t *local; in prism2_ioctl_priv_writemif() local
2902 local = iface->local; in prism2_ioctl_priv_writemif()
2906 if (local->func->cmd(dev, HFA384X_CMDCODE_WRITEMIF, cr, &val, NULL)) in prism2_ioctl_priv_writemif()
2916 local_info_t *local; in prism2_ioctl_priv_monitor() local
2921 local = iface->local; in prism2_ioctl_priv_monitor()
2943 local->monitor_type = PRISM2_MONITOR_80211; in prism2_ioctl_priv_monitor()
2946 local->monitor_type = PRISM2_MONITOR_PRISM; in prism2_ioctl_priv_monitor()
2951 hostap_monitor_mode_enable(local); in prism2_ioctl_priv_monitor()
2962 local_info_t *local; in prism2_ioctl_priv_reset() local
2965 local = iface->local; in prism2_ioctl_priv_reset()
2971 local->func->hw_shutdown(dev, 1); in prism2_ioctl_priv_reset()
2972 local->func->hw_config(dev, 0); in prism2_ioctl_priv_reset()
2977 local->func->hw_reset(dev); in prism2_ioctl_priv_reset()
2982 local->func->reset_port(dev); in prism2_ioctl_priv_reset()
2986 prism2_sta_deauth(local, WLAN_REASON_DEAUTH_LEAVING); in prism2_ioctl_priv_reset()
2987 if (local->func->cmd(dev, HFA384X_CMDCODE_DISABLE, 0, NULL, in prism2_ioctl_priv_reset()
2993 if (local->func->cmd(dev, HFA384X_CMDCODE_ENABLE, 0, NULL, in prism2_ioctl_priv_reset()
3022 static int ap_mac_cmd_ioctl(local_info_t *local, int *cmd) in ap_mac_cmd_ioctl() argument
3028 local->ap->mac_restrictions.policy = MAC_POLICY_OPEN; in ap_mac_cmd_ioctl()
3031 local->ap->mac_restrictions.policy = MAC_POLICY_ALLOW; in ap_mac_cmd_ioctl()
3034 local->ap->mac_restrictions.policy = MAC_POLICY_DENY; in ap_mac_cmd_ioctl()
3037 ap_control_flush_macs(&local->ap->mac_restrictions); in ap_mac_cmd_ioctl()
3040 ap_control_kickall(local->ap); in ap_mac_cmd_ioctl()
3041 hostap_deauth_all_stas(local->dev, local->ap, 0); in ap_mac_cmd_ioctl()
3054 static int prism2_ioctl_priv_download(local_info_t *local, struct iw_point *p) in prism2_ioctl_priv_download() argument
3074 ret = local->func->download(local, param); in prism2_ioctl_priv_download()
3087 local_info_t *local = iface->local; in prism2_set_genericelement() local
3101 kfree(local->generic_elem); in prism2_set_genericelement()
3102 local->generic_elem = buf; in prism2_set_genericelement()
3103 local->generic_elem_len = len + 2; in prism2_set_genericelement()
3105 return local->func->set_rid(local->dev, HFA384X_RID_GENERICELEMENT, in prism2_set_genericelement()
3116 local_info_t *local = iface->local; in prism2_ioctl_siwauth() local
3129 local->tkip_countermeasures = data->value; in prism2_ioctl_siwauth()
3132 local->drop_unencrypted = data->value; in prism2_ioctl_siwauth()
3135 local->auth_algs = data->value; in prism2_ioctl_siwauth()
3139 local->wpa = 0; in prism2_ioctl_siwauth()
3140 if (local->sta_fw_ver < PRISM2_FW_VER(1,7,0)) in prism2_ioctl_siwauth()
3143 local->host_roaming = 0; in prism2_ioctl_siwauth()
3144 local->privacy_invoked = 0; in prism2_ioctl_siwauth()
3147 hostap_set_roaming(local) || in prism2_ioctl_siwauth()
3148 hostap_set_encryption(local) || in prism2_ioctl_siwauth()
3149 local->func->reset_port(dev)) in prism2_ioctl_siwauth()
3153 if (local->sta_fw_ver < PRISM2_FW_VER(1,7,0)) in prism2_ioctl_siwauth()
3155 local->host_roaming = 2; in prism2_ioctl_siwauth()
3156 local->privacy_invoked = 1; in prism2_ioctl_siwauth()
3157 local->wpa = 1; in prism2_ioctl_siwauth()
3159 hostap_set_roaming(local) || in prism2_ioctl_siwauth()
3160 hostap_set_encryption(local) || in prism2_ioctl_siwauth()
3161 local->func->reset_port(dev)) in prism2_ioctl_siwauth()
3165 local->ieee_802_1x = data->value; in prism2_ioctl_siwauth()
3168 local->privacy_invoked = data->value; in prism2_ioctl_siwauth()
3183 local_info_t *local = iface->local; in prism2_ioctl_giwauth() local
3196 data->value = local->tkip_countermeasures; in prism2_ioctl_giwauth()
3199 data->value = local->drop_unencrypted; in prism2_ioctl_giwauth()
3202 data->value = local->auth_algs; in prism2_ioctl_giwauth()
3205 data->value = local->wpa; in prism2_ioctl_giwauth()
3208 data->value = local->ieee_802_1x; in prism2_ioctl_giwauth()
3223 local_info_t *local = iface->local; in prism2_ioctl_siwencodeext() local
3236 i = local->crypt_info.tx_keyidx; in prism2_ioctl_siwencodeext()
3245 crypt = &local->crypt_info.crypt[i]; in prism2_ioctl_siwencodeext()
3249 sta_ptr = ap_crypt_get_ptrs(local->ap, addr, 0, &crypt); in prism2_ioctl_siwencodeext()
3251 if (local->iw_mode == IW_MODE_INFRA) { in prism2_ioctl_siwencodeext()
3258 crypt = &local->crypt_info.crypt[i]; in prism2_ioctl_siwencodeext()
3267 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_siwencodeext()
3286 local->dev->name, ext->alg); in prism2_ioctl_siwencodeext()
3298 local->dev->name, alg); in prism2_ioctl_siwencodeext()
3309 local->host_decrypt = local->host_encrypt = 1; in prism2_ioctl_siwencodeext()
3315 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_siwencodeext()
3346 local->dev->name); in prism2_ioctl_siwencodeext()
3353 local->crypt_info.tx_keyidx = i; in prism2_ioctl_siwencodeext()
3360 if (j != i && local->crypt_info.crypt[j]) { in prism2_ioctl_siwencodeext()
3366 local->crypt_info.tx_keyidx = i; in prism2_ioctl_siwencodeext()
3373 local->open_wep = erq->flags & IW_ENCODE_OPEN; in prism2_ioctl_siwencodeext()
3383 (hostap_set_encryption(local) || in prism2_ioctl_siwencodeext()
3384 (local->iw_mode != IW_MODE_INFRA && in prism2_ioctl_siwencodeext()
3385 local->func->reset_port(local->dev)))) in prism2_ioctl_siwencodeext()
3398 local_info_t *local = iface->local; in prism2_ioctl_giwencodeext() local
3411 i = local->crypt_info.tx_keyidx; in prism2_ioctl_giwencodeext()
3418 crypt = &local->crypt_info.crypt[i]; in prism2_ioctl_giwencodeext()
3421 sta_ptr = ap_crypt_get_ptrs(local->ap, addr, 0, &crypt); in prism2_ioctl_giwencodeext()
3462 static int prism2_ioctl_set_encryption(local_info_t *local, in prism2_ioctl_set_encryption() argument
3483 crypt = &local->crypt_info.crypt[param->u.crypt.idx]; in prism2_ioctl_set_encryption()
3488 local->ap, param->sta_addr, in prism2_ioctl_set_encryption()
3500 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_set_encryption()
3517 local->dev->name, param->u.crypt.alg); in prism2_ioctl_set_encryption()
3525 local->host_decrypt = local->host_encrypt = 1; in prism2_ioctl_set_encryption()
3530 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_set_encryption()
3557 local->dev->name); in prism2_ioctl_set_encryption()
3565 local->crypt_info.tx_keyidx = param->u.crypt.idx; in prism2_ioctl_set_encryption()
3568 local->dev->name); in prism2_ioctl_set_encryption()
3586 (hostap_set_encryption(local) || in prism2_ioctl_set_encryption()
3587 (local->iw_mode != IW_MODE_INFRA && in prism2_ioctl_set_encryption()
3588 local->func->reset_port(local->dev)))) { in prism2_ioctl_set_encryption()
3597 static int prism2_ioctl_get_encryption(local_info_t *local, in prism2_ioctl_get_encryption() argument
3615 param->u.crypt.idx = local->crypt_info.tx_keyidx; in prism2_ioctl_get_encryption()
3616 crypt = &local->crypt_info.crypt[param->u.crypt.idx]; in prism2_ioctl_get_encryption()
3619 sta_ptr = ap_crypt_get_ptrs(local->ap, param->sta_addr, 0, in prism2_ioctl_get_encryption()
3654 static int prism2_ioctl_get_rid(local_info_t *local, in prism2_ioctl_get_rid() argument
3664 res = local->func->get_rid(local->dev, param->u.rid.rid, in prism2_ioctl_get_rid()
3675 static int prism2_ioctl_set_rid(local_info_t *local, in prism2_ioctl_set_rid() argument
3685 return local->func->set_rid(local->dev, param->u.rid.rid, in prism2_ioctl_set_rid()
3690 static int prism2_ioctl_set_assoc_ap_addr(local_info_t *local, in prism2_ioctl_set_assoc_ap_addr() argument
3695 local->dev->name, param->sta_addr); in prism2_ioctl_set_assoc_ap_addr()
3696 memcpy(local->assoc_ap_addr, param->sta_addr, ETH_ALEN); in prism2_ioctl_set_assoc_ap_addr()
3716 local_info_t *local = iface->local; in prism2_ioctl_giwgenie() local
3717 int len = local->generic_elem_len - 2; in prism2_ioctl_giwgenie()
3719 if (len <= 0 || local->generic_elem == NULL) { in prism2_ioctl_giwgenie()
3728 memcpy(extra, local->generic_elem + 2, len); in prism2_ioctl_giwgenie()
3734 static int prism2_ioctl_set_generic_element(local_info_t *local, in prism2_ioctl_set_generic_element() argument
3745 return prism2_set_genericelement(local->dev, in prism2_ioctl_set_generic_element()
3755 local_info_t *local = iface->local; in prism2_ioctl_siwmlme() local
3763 return prism2_sta_send_mgmt(local, mlme->addr.sa_data, in prism2_ioctl_siwmlme()
3767 return prism2_sta_send_mgmt(local, mlme->addr.sa_data, in prism2_ioctl_siwmlme()
3776 static int prism2_ioctl_mlme(local_info_t *local, in prism2_ioctl_mlme() argument
3784 return prism2_sta_send_mgmt(local, param->sta_addr, in prism2_ioctl_mlme()
3788 return prism2_sta_send_mgmt(local, param->sta_addr, in prism2_ioctl_mlme()
3797 static int prism2_ioctl_scan_req(local_info_t *local, in prism2_ioctl_scan_req() argument
3801 if ((local->iw_mode != IW_MODE_INFRA && in prism2_ioctl_scan_req()
3802 local->iw_mode != IW_MODE_ADHOC) || in prism2_ioctl_scan_req()
3803 (local->sta_fw_ver < PRISM2_FW_VER(1,3,1))) in prism2_ioctl_scan_req()
3806 if (!local->dev_enabled) in prism2_ioctl_scan_req()
3809 return prism2_request_hostscan(local->dev, param->u.scan_req.ssid, in prism2_ioctl_scan_req()
3817 static int prism2_ioctl_priv_hostapd(local_info_t *local, struct iw_point *p) in prism2_ioctl_priv_hostapd() argument
3834 ret = prism2_ioctl_set_encryption(local, param, p->length); in prism2_ioctl_priv_hostapd()
3837 ret = prism2_ioctl_get_encryption(local, param, p->length); in prism2_ioctl_priv_hostapd()
3840 ret = prism2_ioctl_get_rid(local, param, p->length); in prism2_ioctl_priv_hostapd()
3843 ret = prism2_ioctl_set_rid(local, param, p->length); in prism2_ioctl_priv_hostapd()
3846 ret = prism2_ioctl_set_assoc_ap_addr(local, param, p->length); in prism2_ioctl_priv_hostapd()
3849 ret = prism2_ioctl_set_generic_element(local, param, in prism2_ioctl_priv_hostapd()
3853 ret = prism2_ioctl_mlme(local, param); in prism2_ioctl_priv_hostapd()
3856 ret = prism2_ioctl_scan_req(local, param); in prism2_ioctl_priv_hostapd()
3859 ret = prism2_hostapd(local->ap, param); in prism2_ioctl_priv_hostapd()
3882 local_info_t *local; in prism2_get_drvinfo() local
3885 local = iface->local; in prism2_get_drvinfo()
3889 "%d.%d.%d", (local->sta_fw_ver >> 16) & 0xff, in prism2_get_drvinfo()
3890 (local->sta_fw_ver >> 8) & 0xff, in prism2_get_drvinfo()
3891 local->sta_fw_ver & 0xff); in prism2_get_drvinfo()
3972 local_info_t *local; in hostap_ioctl() local
3976 local = iface->local; in hostap_ioctl()
3996 else ret = prism2_wds_add(local, wrq->u.ap_addr.sa_data, 1); in hostap_ioctl()
4001 else ret = prism2_wds_del(local, wrq->u.ap_addr.sa_data, 1, 0); in hostap_ioctl()
4013 else ret = ap_mac_cmd_ioctl(local, (int *) wrq->u.name); in hostap_ioctl()
4018 else ret = ap_control_add_mac(&local->ap->mac_restrictions, in hostap_ioctl()
4023 else ret = ap_control_del_mac(&local->ap->mac_restrictions, in hostap_ioctl()
4028 else ret = ap_control_kick_mac(local->ap, local->dev, in hostap_ioctl()
4047 local_info_t *local; in hostap_siocdevprivate() local
4051 local = iface->local; in hostap_siocdevprivate()
4060 else ret = prism2_ioctl_priv_download(local, &wrq->u.data); in hostap_siocdevprivate()
4066 else ret = prism2_ioctl_priv_hostapd(local, &wrq->u.data); in hostap_siocdevprivate()