lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 09 Sep 2009 12:24:10 +0200
From:	Marcel Holtmann <marcel@...tmann.org>
To:	Rémi Denis-Courmont <remi@...lab.net>
Cc:	netdev@...r.kernel.org,
	Rémi Denis-Courmont 
	<remi.denis-courmont@...ia.com>
Subject: Re: [PATCH 2/2] cdc-phonet: autoconfigure Phonet address

Hi Remi,

>  drivers/net/usb/cdc-phonet.c |   15 +++++++++++++++
>  include/linux/phonet.h       |    3 +++
>  2 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c
> index 0ca5916..97e54d9 100644
> --- a/drivers/net/usb/cdc-phonet.c
> +++ b/drivers/net/usb/cdc-phonet.c
> @@ -27,6 +27,7 @@
>  #include <linux/netdevice.h>
>  #include <linux/if_arp.h>
>  #include <linux/if_phonet.h>
> +#include <linux/phonet.h>
>  
>  #define PN_MEDIA_USB	0x1B
>  
> @@ -256,6 +257,19 @@ static int usbpn_close(struct net_device *dev)
>  	return usb_set_interface(pnd->usb, num, !pnd->active_setting);
>  }
>  
> +static int usbpn_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
> +{
> +	struct if_phonet_req *req = (struct if_phonet_req *)ifr;
> +
> +	switch (cmd) {
> +	case SIOCPNGAUTOCONF:
> +		req->ifr_phonet_autoconf.device = PN_DEV_PC;
> +		printk(KERN_CRIT"device is PN_DEV_PC\n");
> +		return 0;
> +	}
> +	return -ENOIOCTLCMD;
> +}
> +

am I understanding this correctly, that even for the USB ones we still
have to execute that ioctl() and can not just auto configure them all
the time? For the USB ones, I would expect to should plug them in and
they are getting configured right away.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ