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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > 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 it can be done in Windows.  This was tested with a
> > D6000 using ifconfig on an x86 based chromebook, where iproute2 is not
> > available.
> 
> > +/* Provide method to push MAC address to the USB device's ethernet
> controller.
> > + */
> > +int cdc_ncm_set_mac_addr(struct net_device *net, void *p) {
> > +	struct usbnet *dev = netdev_priv(net);
> > +
> > +	/* Try to push the MAC address out to the device.  Ignore any errors,
> > +	 * to be compatible with prior versions of this source.
> > +	 */
> > +	cdc_ncm_set_ethernet_address(dev, (struct sockaddr *)p);
> 
> You are throwing away error reports.
> 
> 	Regards
> 		Oliver


My intent is limit the changes needed to support setting the MAC address., thus any potential source code errors.  I have not changed the current behavior of the driver with respect to error processing.  The existing source does not check for error return values, therefore my changes also do not check error return values.

Charles




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux