Lines Matching refs:erq
583 static int orinoco_ioctl_setiwencode(struct net_device *dev, struct iw_point *erq);
584 static int orinoco_ioctl_getiwencode(struct net_device *dev, struct iw_point *erq);
585 static int orinoco_ioctl_setessid(struct net_device *dev, struct iw_point *erq);
586 static int orinoco_ioctl_getessid(struct net_device *dev, struct iw_point *erq);
2714 static int orinoco_ioctl_setiwencode(struct net_device *dev, struct iw_point *erq) in orinoco_ioctl_setiwencode() argument
2717 int index = (erq->flags & IW_ENCODE_INDEX) - 1; in orinoco_ioctl_setiwencode()
2726 if (erq->pointer) { in orinoco_ioctl_setiwencode()
2728 if ( (erq->length < SMALL_KEY_SIZE) || (erq->length > ORINOCO_MAX_KEY_SIZE) ) in orinoco_ioctl_setiwencode()
2731 if (copy_from_user(keybuf, erq->pointer, erq->length)) in orinoco_ioctl_setiwencode()
2739 if (erq->pointer) { in orinoco_ioctl_setiwencode()
2740 if (erq->length > ORINOCO_MAX_KEY_SIZE) { in orinoco_ioctl_setiwencode()
2745 if ( (erq->length > LARGE_KEY_SIZE) in orinoco_ioctl_setiwencode()
2746 || ( ! priv->has_big_wep && (erq->length > SMALL_KEY_SIZE)) ) { in orinoco_ioctl_setiwencode()
2754 if (erq->length > SMALL_KEY_SIZE) { in orinoco_ioctl_setiwencode()
2756 } else if (erq->length > 0) { in orinoco_ioctl_setiwencode()
2771 if((index != -1) || (erq->flags == 0)) { in orinoco_ioctl_setiwencode()
2785 if (erq->flags & IW_ENCODE_DISABLED) in orinoco_ioctl_setiwencode()
2788 if (erq->flags & IW_ENCODE_OPEN) in orinoco_ioctl_setiwencode()
2790 if (erq->flags & IW_ENCODE_RESTRICTED) in orinoco_ioctl_setiwencode()
2793 if (erq->pointer) { in orinoco_ioctl_setiwencode()
2796 memcpy(priv->keys[index].data, keybuf, erq->length); in orinoco_ioctl_setiwencode()
2809 static int orinoco_ioctl_getiwencode(struct net_device *dev, struct iw_point *erq) in orinoco_ioctl_getiwencode() argument
2812 int index = (erq->flags & IW_ENCODE_INDEX) - 1; in orinoco_ioctl_getiwencode()
2825 erq->flags = 0; in orinoco_ioctl_getiwencode()
2827 erq->flags |= IW_ENCODE_DISABLED; in orinoco_ioctl_getiwencode()
2828 erq->flags |= index + 1; in orinoco_ioctl_getiwencode()
2833 erq->flags |= IW_ENCODE_RESTRICTED; in orinoco_ioctl_getiwencode()
2835 erq->flags |= IW_ENCODE_OPEN; in orinoco_ioctl_getiwencode()
2840 erq->length = xlen; in orinoco_ioctl_getiwencode()
2842 if (erq->pointer) { in orinoco_ioctl_getiwencode()
2848 if (erq->pointer) { in orinoco_ioctl_getiwencode()
2849 if (copy_to_user(erq->pointer, keybuf, xlen)) in orinoco_ioctl_getiwencode()
2856 static int orinoco_ioctl_setessid(struct net_device *dev, struct iw_point *erq) in orinoco_ioctl_setessid() argument
2868 if (erq->flags) { in orinoco_ioctl_setessid()
2869 if (erq->length > IW_ESSID_MAX_SIZE) in orinoco_ioctl_setessid()
2872 if (copy_from_user(&essidbuf, erq->pointer, erq->length)) in orinoco_ioctl_setessid()
2875 essidbuf[erq->length] = '\0'; in orinoco_ioctl_setessid()
2889 static int orinoco_ioctl_getessid(struct net_device *dev, struct iw_point *erq) in orinoco_ioctl_getessid() argument
2911 erq->flags = 1; in orinoco_ioctl_getessid()
2912 erq->length = strlen(essidbuf) + 1; in orinoco_ioctl_getessid()
2913 if (erq->pointer) in orinoco_ioctl_getessid()
2914 if ( copy_to_user(erq->pointer, essidbuf, erq->length) ) in orinoco_ioctl_getessid()