RE: [PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-09-06 Thread Charles.Hyde
> static int cdc_ncm_init(struct usbnet *dev) { > struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; > u8 iface_no = ctx->control->cur_altsetting->desc.bInterfaceNumber; > int err; > > err = usbnet_read_cmd(dev, USB_CDC_GET_NTB_PARAMETERS, >

Re: [PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-09-06 Thread Bjørn Mork
writes: >> > What better suggestion do folks have, instead of using >> USB_REQ_SET_ADDRESS? >> >> The spec is clear: wIndex is supposed to be 'NCM Communications Interface'. >> That's how you address a specific NCM function (a USB device can have more >> than one...), and that's what you'll see

RE: [PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-09-06 Thread Charles.Hyde
> > What better suggestion do folks have, instead of using > USB_REQ_SET_ADDRESS? > > The spec is clear: wIndex is supposed to be 'NCM Communications Interface'. > That's how you address a specific NCM function (a USB device can have more > than one...), and that's what you'll see in all the other

Re: [PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-09-06 Thread Bjørn Mork
writes: > What better suggestion do folks have, instead of using USB_REQ_SET_ADDRESS? The spec is clear: wIndex is supposed to be 'NCM Communications Interface'. That's how you address a specific NCM function (a USB device can have more than one...), and that's what you'll see in all the other

RE: [PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-09-06 Thread Charles.Hyde
> > > > > > + ret = usbnet_read_cmd(dev, USB_CDC_GET_NET_ADDRESS, > > > > + USB_DIR_IN | USB_TYPE_CLASS > > > > + | USB_RECIP_INTERFACE, 0, > > > > + USB_REQ_SET_ADDRESS, buf, ETH_ALEN); > > > > > > Where did

RE: [PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-09-06 Thread Alan Stern
On Fri, 6 Sep 2019 charles.h...@dellteam.com wrote: > > > > + ret = usbnet_read_cmd(dev, USB_CDC_GET_NET_ADDRESS, > > > + USB_DIR_IN | USB_TYPE_CLASS > > > + | USB_RECIP_INTERFACE, 0, > > > + USB_REQ_SET_ADDRESS, buf, ETH_ALEN); >

RE: [PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-09-06 Thread Charles.Hyde
> > + ret = usbnet_read_cmd(dev, USB_CDC_GET_NET_ADDRESS, > > + USB_DIR_IN | USB_TYPE_CLASS > > + | USB_RECIP_INTERFACE, 0, > > + USB_REQ_SET_ADDRESS, buf, ETH_ALEN); > > Where did that USB_REQ_SET_ADDRESS come from? Did y

Re: [PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-09-06 Thread Bjørn Mork
writes: > +static int cdc_ncm_get_ethernet_address(struct usbnet *dev, > + struct cdc_ncm_ctx *ctx) Is this function called anywhere? Shouldn't it replace the usbnet_get_ethernet_addr() call in cdc_ncm_bind_common()? But do note that cdc_ncm_bind_common() i

[PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-09-05 Thread Charles.Hyde
This patch adds support for pushing a MAC address out to USB based ethernet controllers driven by cdc_ncm. With this change, ifconfig can now set the device's MAC address. For example, the Dell Universal Dock D6000 is driven by cdc_ncm. The D6000 can now have its MAC address set by ifconfig, as

RE: [PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-09-03 Thread Charles.Hyde
> > This patch adds support for pushing a MAC address out to USB based > > ethernet controllers driven by cdc_ncm. With this change, ifconfig > > can now set the device's MAC address. For example, the Dell Universal > > Dock > > D6000 is driven by cdc_ncm. The D6000 can now have its MAC address

Re: [PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-09-02 Thread Oliver Neukum
Am Freitag, den 30.08.2019, 19:37 + schrieb charles.h...@dellteam.com: > This patch adds support for pushing a MAC address out to USB based > ethernet controllers driven by cdc_ncm. With this change, ifconfig can > now set the device's MAC address. For example, the Dell Universal Dock > D6000

[PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions

2019-08-30 Thread Charles.Hyde
This patch adds support for pushing a MAC address out to USB based ethernet controllers driven by cdc_ncm. With this change, ifconfig can now set the device's MAC address. For example, the Dell Universal Dock D6000 is driven by cdc_ncm. The D6000 can now have its MAC address set by ifconfig, as