From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [2/5] ieee80211: ieee80211_device alignment fix and cleanup Date: Fri, 27 May 2005 23:37:46 -0400 Message-ID: <4297E78A.4030906@pobox.com> References: <20050524150711.01632672@griffin.suse.cz> <20050524151117.5e059d1d@griffin.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: NetDev , LKML , pavel@suse.cz Return-path: To: Jiri Benc In-Reply-To: <20050524151117.5e059d1d@griffin.suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Comments on the remaining patches in this series: 1) I am not convinced that the subclassing of net_device should be done in this manner. Read drivers/net/wan/hdlc_generic.c and .../pc300_drv.c for examples of how hdlc_device is handled. Comments and thoughts welcome. 2) Please put all the new, protocol-layer functions ieee80211_type_trans(), ieee80211_change_mtu(), ieee80211_header(), etc. in their own file. 3) Temporary or not, the following construct is simply not necessary. Modify the definition rather than repeating this two-call piece of code in multiple areas: ieee80211_priv(netdev_priv(dev)); 4) A low-level wireless hardware driver should look like other net drivers, and use the existing driver API. The low level driver should implement its own dev->hard_start_xmit(). ieee = netdev_priv(dev); - dev->hard_start_xmit = ieee80211_xmit; - ieee->dev = dev; + ieee->priv = ieee80211_priv(ieee); + + dev->hard_start_xmit = ieee80211_xmit; Certainly, the driver will make many calls to generic ieee80211_xxx functions to get things done. I understand this was not your change; you simply moved the dev->hard_start_xmit() assignment down. I just wanted to take this opportunity to make a point. 5) The wireless code in -mm all sourced directly from my netdev-2.6.git tree. I strongly encourage everyone who wants to work on wireless to download git (read http://lkml.org/lkml/2005/5/26/11) and check out branches 'we18' (wireless ex 18), 'we18-ieee80211' (we18 + ieee80211), and 'we18-ieee80211-wifi' (we18 + ieee80211 + hostAP) of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git