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]
Message-ID: <465DC91D.1030104@hartkopp.net>
Date:	Wed, 30 May 2007 20:57:33 +0200
From:	Oliver Hartkopp <oliver@...tkopp.net>
To:	Stephen Hemminger <shemminger@...ux-foundation.org>
CC:	Urs Thuermann <urs@...ogud.escape.de>,
	David Miller <davem@...emloft.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Oliver Hartkopp <oliver.hartkopp@...kswagen.de>,
	Urs Thuermann <urs.thuermann@...kswagen.de>,
	netdev@...r.kernel.org
Subject: Re: [patch 5/7] CAN: Add virtual CAN netdevice driver

Stephen Hemminger wrote:
> In addition to Patrick's comments.
>
>   
>> +
>> +static void vcan_init(struct net_device *dev)
>> +{
>> +	DBG("dev %s\n", dev->name);
>> +
>> +	ether_setup(dev);
>>     
>
> Do really want to do this?
>   - you set different flags/type after this.
>   - do you really want change_mtu to call eth_change_mtu
> Better off to just copy what you want out of ether_setup if
> your device is not really an ether device.
>   

Yep! That's reasonable. Thanks.


>> +
>> +	dev->type              = ARPHRD_CAN;
>> +	dev->mtu               = sizeof(struct can_frame);
>> +	dev->flags             = IFF_NOARP;
>> +
>> +	/* set flags according to driver capabilities */
>> +	if (loopback)
>> +		dev->flags |= IFF_LOOPBACK;
>> +
>> +	dev->open              = vcan_open;
>> +	dev->stop              = vcan_stop;
>> +	dev->set_config        = NULL;
>>     
> unneeded
>
>   
>> +	dev->hard_start_xmit   = vcan_tx;
>> +	dev->do_ioctl          = vcan_ioctl;
>> +	dev->get_stats         = vcan_get_stats;
>> +	dev->hard_header       = vcan_header;
>> +	dev->rebuild_header    = vcan_rebuild_header;
>> +	dev->hard_header_cache = NULL;
>>     
> unneeded
>
>   

Does 'unneeded' belong to always the last line of the quoted code snippet?

Regards,
Oliver


-
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