Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031231Ab2B2RQm (ORCPT ); Wed, 29 Feb 2012 12:16:42 -0500 Received: from mms3.broadcom.com ([216.31.210.19]:3778 "EHLO MMS3.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965496Ab2B2RQk (ORCPT ); Wed, 29 Feb 2012 12:16:40 -0500 X-Server-Uuid: B55A25B1-5D7D-41F8-BC53-C57E7AD3C201 Message-ID: <1330535788.25281.3.camel@lb-tlvb-dmitry> Subject: Re: [PATCH 2/8] bnx2x: adopt bnx2x_validate_addr() to .ndo_validate_addr changes From: "Dmitry Kravkov" To: "Danny Kukawka" cc: "Eilon Greenstein" , netdev@vger.kernel.org, "David S. Miller" , linux-kernel@vger.kernel.org Date: Wed, 29 Feb 2012 19:16:28 +0200 In-Reply-To: <201202291808.30599.danny.kukawka@bisect.de> References: <1330530176-24952-1-git-send-email-danny.kukawka@bisect.de> <1330530176-24952-3-git-send-email-danny.kukawka@bisect.de> <1330532535.25281.2.camel@lb-tlvb-dmitry> <201202291808.30599.danny.kukawka@bisect.de> X-Mailer: Evolution 3.2.2- MIME-Version: 1.0 X-WSS-ID: 6350800E50428931892-01-01 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 629 Lines: 29 On Wed, 2012-02-29 at 18:08 +0100, Danny Kukawka wrote: > Do you mean something like this: > > int eth_validate_addr(struct net_device *dev, void *addr) > { > u8 *vaddr; > > if (addr) > vaddr = ((struct sockaddr *) addr)->sa_data; > else > vaddr = dev->dev_addr; > > if (!is_valid_ether_addr(vaddr)) > return -EADDRNOTAVAIL; > > return 0; > } > Exactly :) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/