From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755606Ab0IRTBt (ORCPT ); Sat, 18 Sep 2010 15:01:49 -0400 Received: from kroah.org ([198.145.64.141]:51126 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754380Ab0IRTBP (ORCPT ); Sat, 18 Sep 2010 15:01:15 -0400 X-Mailbox-Line: From gregkh@clark.site Sat Sep 18 11:59:53 2010 Message-Id: <20100918185953.755073875@clark.site> User-Agent: quilt/0.48-11.2 Date: Sat, 18 Sep 2010 11:57:35 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Haiyang Zhang , Hank Janssen Subject: [011/123] staging: hv: Fix missing functions for net_device_ops References: <20100918185724.290702750@clark.site> Content-Disposition: inline; filename=staging-hv-fix-missing-functions-for-net_device_ops.patch In-Reply-To: <20100918190024.GA14388@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Haiyang Zhang commit b681b5886bb5d1f5b6750a0ed7c62846da7ccea4 upstream. Fix missing functions for net_device_ops. It's a bug when porting the drivers from 2.6.27 to 2.6.32. In 2.6.27, the default functions for Ethernet, like eth_change_mtu(), were assigned by ether_setup(). But in 2.6.32, these function pointers moved to net_device_ops structure and no longer be assigned in ether_setup(). So we need to set these functions in our driver code. It will ensure the MTU won't be set beyond 1500. Otherwise, this can cause an error on the server side, because the HyperV linux driver doesn't support jumbo frame yet. Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/netvsc_drv.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -392,6 +392,9 @@ static const struct net_device_ops devic .ndo_start_xmit = netvsc_start_xmit, .ndo_get_stats = netvsc_get_stats, .ndo_set_multicast_list = netvsc_set_multicast_list, + .ndo_change_mtu = eth_change_mtu, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = eth_mac_addr, }; static int netvsc_probe(struct device *device)