Lines Matching refs:param

54 static int hostapd_ioctl(void *priv, struct prism2_hostapd_param *param,
328 struct prism2_hostapd_param param; in hostap_sta_set_flags() local
336 memset(&param, 0, sizeof(param)); in hostap_sta_set_flags()
337 param.cmd = PRISM2_HOSTAPD_SET_FLAGS_STA; in hostap_sta_set_flags()
338 memcpy(param.sta_addr, addr, ETH_ALEN); in hostap_sta_set_flags()
339 param.u.set_flags_sta.flags_or = flags_or; in hostap_sta_set_flags()
340 param.u.set_flags_sta.flags_and = flags_and; in hostap_sta_set_flags()
341 return hostapd_ioctl(drv, &param, sizeof(param)); in hostap_sta_set_flags()
370 static int hostapd_ioctl(void *priv, struct prism2_hostapd_param *param, in hostapd_ioctl() argument
378 iwr.u.data.pointer = (caddr_t) param; in hostapd_ioctl()
398 struct prism2_hostapd_param *param; in wpa_driver_hostap_set_key() local
403 blen = sizeof(*param) + key_len; in wpa_driver_hostap_set_key()
408 param = (struct prism2_hostapd_param *) buf; in wpa_driver_hostap_set_key()
409 param->cmd = PRISM2_SET_ENCRYPTION; in wpa_driver_hostap_set_key()
411 memset(param->sta_addr, 0xff, ETH_ALEN); in wpa_driver_hostap_set_key()
413 memcpy(param->sta_addr, addr, ETH_ALEN); in wpa_driver_hostap_set_key()
416 os_strlcpy((char *) param->u.crypt.alg, "NONE", in wpa_driver_hostap_set_key()
420 os_strlcpy((char *) param->u.crypt.alg, "WEP", in wpa_driver_hostap_set_key()
424 os_strlcpy((char *) param->u.crypt.alg, "TKIP", in wpa_driver_hostap_set_key()
428 os_strlcpy((char *) param->u.crypt.alg, "CCMP", in wpa_driver_hostap_set_key()
435 param->u.crypt.flags = set_tx ? HOSTAP_CRYPT_FLAG_SET_TX_KEY : 0; in wpa_driver_hostap_set_key()
436 param->u.crypt.idx = key_idx; in wpa_driver_hostap_set_key()
437 param->u.crypt.key_len = key_len; in wpa_driver_hostap_set_key()
438 memcpy((u8 *) (param + 1), key, key_len); in wpa_driver_hostap_set_key()
440 if (hostapd_ioctl(drv, param, blen)) { in wpa_driver_hostap_set_key()
454 struct prism2_hostapd_param *param; in hostap_get_seqnum() local
459 blen = sizeof(*param) + 32; in hostap_get_seqnum()
464 param = (struct prism2_hostapd_param *) buf; in hostap_get_seqnum()
465 param->cmd = PRISM2_GET_ENCRYPTION; in hostap_get_seqnum()
467 os_memset(param->sta_addr, 0xff, ETH_ALEN); in hostap_get_seqnum()
469 os_memcpy(param->sta_addr, addr, ETH_ALEN); in hostap_get_seqnum()
470 param->u.crypt.idx = idx; in hostap_get_seqnum()
472 if (hostapd_ioctl(drv, param, blen)) { in hostap_get_seqnum()
476 os_memcpy(seq, param->u.crypt.seq, 8); in hostap_get_seqnum()
484 static int hostap_ioctl_prism2param(void *priv, int param, int value) in hostap_ioctl_prism2param() argument
493 *i++ = param; in hostap_ioctl_prism2param()
567 struct prism2_hostapd_param param; in hostap_flush() local
569 memset(&param, 0, sizeof(param)); in hostap_flush()
570 param.cmd = PRISM2_HOSTAPD_FLUSH; in hostap_flush()
571 return hostapd_ioctl(drv, &param, sizeof(param)); in hostap_flush()
620 struct prism2_hostapd_param param; in hostap_sta_add() local
640 memset(&param, 0, sizeof(param)); in hostap_sta_add()
641 param.cmd = PRISM2_HOSTAPD_ADD_STA; in hostap_sta_add()
642 memcpy(param.sta_addr, params->addr, ETH_ALEN); in hostap_sta_add()
643 param.u.add_sta.aid = params->aid; in hostap_sta_add()
644 param.u.add_sta.capability = params->capability; in hostap_sta_add()
645 param.u.add_sta.tx_supp_rates = tx_supp_rates; in hostap_sta_add()
646 return hostapd_ioctl(drv, &param, sizeof(param)); in hostap_sta_add()
653 struct prism2_hostapd_param param; in hostap_sta_remove() local
657 memset(&param, 0, sizeof(param)); in hostap_sta_remove()
658 param.cmd = PRISM2_HOSTAPD_REMOVE_STA; in hostap_sta_remove()
659 memcpy(param.sta_addr, addr, ETH_ALEN); in hostap_sta_remove()
660 if (hostapd_ioctl(drv, &param, sizeof(param))) { in hostap_sta_remove()
671 struct prism2_hostapd_param param; in hostap_get_inact_sec() local
673 memset(&param, 0, sizeof(param)); in hostap_get_inact_sec()
674 param.cmd = PRISM2_HOSTAPD_GET_INFO_STA; in hostap_get_inact_sec()
675 memcpy(param.sta_addr, addr, ETH_ALEN); in hostap_get_inact_sec()
676 if (hostapd_ioctl(drv, &param, sizeof(param))) { in hostap_get_inact_sec()
680 return param.u.get_info_sta.inactive_sec; in hostap_get_inact_sec()
687 struct prism2_hostapd_param param; in hostap_sta_clear_stats() local
689 memset(&param, 0, sizeof(param)); in hostap_sta_clear_stats()
690 param.cmd = PRISM2_HOSTAPD_STA_CLEAR_STATS; in hostap_sta_clear_stats()
691 memcpy(param.sta_addr, addr, ETH_ALEN); in hostap_sta_clear_stats()
692 if (hostapd_ioctl(drv, &param, sizeof(param))) { in hostap_sta_clear_stats()
702 struct prism2_hostapd_param *param; in hostapd_ioctl_set_generic_elem() local
708 if (blen < sizeof(*param)) in hostapd_ioctl_set_generic_elem()
709 blen = sizeof(*param); in hostapd_ioctl_set_generic_elem()
711 param = os_zalloc(blen); in hostapd_ioctl_set_generic_elem()
712 if (param == NULL) in hostapd_ioctl_set_generic_elem()
715 param->cmd = PRISM2_HOSTAPD_SET_GENERIC_ELEMENT; in hostapd_ioctl_set_generic_elem()
716 param->u.generic_elem.len = elem_len; in hostapd_ioctl_set_generic_elem()
718 os_memcpy(param->u.generic_elem.data, drv->generic_ie, in hostapd_ioctl_set_generic_elem()
722 os_memcpy(&param->u.generic_elem.data[drv->generic_ie_len], in hostapd_ioctl_set_generic_elem()
726 param->u.generic_elem.data, elem_len); in hostapd_ioctl_set_generic_elem()
727 res = hostapd_ioctl(drv, param, blen); in hostapd_ioctl_set_generic_elem()
729 os_free(param); in hostapd_ioctl_set_generic_elem()