public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: "Rémi Denis-Courmont" <remi@remlab.net>
Cc: netdev@vger.kernel.org,
	"Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>
Subject: Re: [PATCH 2/2] cdc-phonet: autoconfigure Phonet address
Date: Wed, 09 Sep 2009 12:24:10 +0200	[thread overview]
Message-ID: <1252491850.8931.28.camel@violet> (raw)
In-Reply-To: <1252490406-27951-2-git-send-email-remi@remlab.net>

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



  reply	other threads:[~2009-09-09 10:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09 10:00 [PATCH 1/2] Phonet: back-end for autoconfigured addresses Rémi Denis-Courmont
2009-09-09 10:00 ` [PATCH 2/2] cdc-phonet: autoconfigure Phonet address Rémi Denis-Courmont
2009-09-09 10:24   ` Marcel Holtmann [this message]
2009-09-09 10:28     ` Rémi Denis-Courmont
2009-09-09 10:33       ` Marcel Holtmann
2009-09-11 19:38   ` David Miller
2009-09-12  9:20     ` Rémi Denis-Courmont
2009-09-11 19:38 ` [PATCH 1/2] Phonet: back-end for autoconfigured addresses David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1252491850.8931.28.camel@violet \
    --to=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=remi.denis-courmont@nokia.com \
    --cc=remi@remlab.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox