From patchwork Mon Nov 17 23:42:16 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stephen hemminger X-Patchwork-Id: 9272 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 1AFDEDDE1E for ; Tue, 18 Nov 2008 11:00:40 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752438AbYKRAAZ (ORCPT ); Mon, 17 Nov 2008 19:00:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752355AbYKRAAY (ORCPT ); Mon, 17 Nov 2008 19:00:24 -0500 Received: from suva.vyatta.com ([76.74.103.44]:55057 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752081AbYKRAAC (ORCPT ); Mon, 17 Nov 2008 19:00:02 -0500 Received: from suva.vyatta.com (suva [127.0.0.1]) by suva.vyatta.com (8.13.7/8.13.7) with ESMTP id mAI001id018118; Mon, 17 Nov 2008 16:00:01 -0800 Received: (from shemminger@localhost) by suva.vyatta.com (8.13.7/8.13.7/Submit) id mAI000T8018115; Mon, 17 Nov 2008 16:00:00 -0800 Message-Id: <20081117234355.542288294@vyatta.com> References: <20081117234207.854110282@vyatta.com> User-Agent: quilt/0.46-1 Date: Mon, 17 Nov 2008 15:42:16 -0800 From: Stephen Hemminger To: David Miller Cc: netdev@vger.kernel.org Subject: [PATCH 09/33] macvlan: convert to net_device_ops Content-Disposition: inline; filename=macvlan-netdev_ops.patch Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Convert to net_device_ops function table. Signed-off-by: Stephen Hemminger --- a/drivers/net/macvlan.c 2008-11-04 13:58:06.000000000 -0800 +++ b/drivers/net/macvlan.c 2008-11-17 10:25:18.000000000 -0800 @@ -361,17 +361,22 @@ static const struct ethtool_ops macvlan_ .get_flags = macvlan_ethtool_get_flags, }; +static const struct net_device_ops macvlan_netdev_ops = { + .init = macvlan_init, + .open = macvlan_open, + .stop = macvlan_stop, + .change_mtu = macvlan_change_mtu, + .change_rx_flags= macvlan_change_rx_flags, + .set_mac_address= macvlan_set_mac_address, + .set_multicast_list= macvlan_set_multicast_list, + .validate_addr = eth_validate_addr, +}; + static void macvlan_setup(struct net_device *dev) { ether_setup(dev); - dev->init = macvlan_init; - dev->open = macvlan_open; - dev->stop = macvlan_stop; - dev->change_mtu = macvlan_change_mtu; - dev->change_rx_flags = macvlan_change_rx_flags; - dev->set_mac_address = macvlan_set_mac_address; - dev->set_multicast_list = macvlan_set_multicast_list; + dev->netdev_ops = &macvlan_netdev_ops; dev->hard_start_xmit = macvlan_hard_start_xmit; dev->destructor = free_netdev; dev->header_ops = &macvlan_hard_header_ops,