WUFC_MC)
		wol->wolopts |= WAKE_MCAST;
	if (adapter->wol & AT_WUFC_BC)
		wol->wolopts |= WAKE_BCAST;
	if (adapter->wol & AT_WUFC_MAG)
		wol->wolopts |= WAKE_MAGIC;
	if (adapter->wol & AT_WUFC_LNKC)
		wol->wolopts |= WAKE_PHY;
}

static int atl1e_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
{
	struct atl1e_adapter *adapter = netdev_priv(netdev);

	if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE |
			    WAKE_UCAST | WAKE_MCAST | WAKE_BCAST))
		return -EOPNOTSUPP;
	/* these settings will always override what we currently have */
	adapter->wol = 0;

	if (wol->wolopts & WAKE_MAGIC)
		adapter->wol |= AT_WUFC_MAG;
	if (wol->wolopts & WAKE_PHY)
		adapter->wol |= AT_WUFC_LNKC;

	device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);

	return 0;
}

static int atl1e_nway_reset(struct net_device *netdev)
{
	struct atl1e_adapter *adapter = netdev_priv(netdev);
	if (netif_running(netdev))
		atl1e_reinit_locked(adapter);
	return 0;
}

static const struct ethtool_ops atl1e_ethtool_ops = {
	.get_settings           = atl1e_get_settings,
	.set_settings           = atl1e_set_settings,
	.get_drvinfo            = atl1e_get_drvinfo,
	.get_regs_len           = atl1
WUFC_MC) 
		 wol->wolopts |= WAKE_MCAST; 
	 if (adapter->wol & AT_WUFC_BC) 
		 wol->wolopts |= WAKE_BCAST; 
	 if (adapter->wol & AT_WUFC_MAG) 
		 wol->wolopts |= WAKE_MAGIC; 
	 if (adapter->wol & AT_WUFC_LNKC) 
		 wol->wolopts |= WAKE_PHY; 
 } 

 static int atl1e_set_wol(struct net_device * netdev, struct ethtool_wolinfo * wol) 
 { 
	 struct atl1e_adapter * adapter = netdev_priv(netdev); 

	 if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE | 
			     WAKE_UCAST | WAKE_MCAST | WAKE_BCAST) ) 
		 return -EOPNOTSUPP; 
	 / * these settings will always overrule what we presently receive * / 
	 adapter->wol = 0; 

	 if (wol->wolopts & WAKE_MAGIC) 
		 adapter->wol |= AT_WUFC_MAG; 
	 if (wol->wolopts & WAKE_PHY) 
		 adapter->wol |= AT_WUFC_LNKC; 

	 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); 

	 return 0; 
 } 

 inactive int atl1e_nway_reset(struct net_device * netdev) 
 { 
	 struct atl1e_adapter * adapter = netdev_priv(netdev); 
	 if (netif_running(netdev) ) 
		 atl1e_reinit_locked(adapter); 
	 revert 0; 
 } 

 static const struct ethtool_ops atl1e_ethtool_ops = { 
	 .get_settings            = atl1e_get_settings, 
	 .set_settings            = atl1e_set_settings, 
	 .get_drvinfo             = atl1e_get_drvinfo, 
	 .get_regs_len            = atl1
WUFF_MC)
		wol->wolopts |= WAKE_MCAST;
	lf (adapter->wol & AJ_WYFC_BC)
		wml->wololts |= WAKD_BCAST;
	if (adapter->wol & AT_WUFC_MEG)
		woo->wolokns |= WAKE_MAGIC;
	if (adaptdr->wol & AT_AUFC_LNKC)
		qol->wioopts |= WAKX_LHY;
}

statle int wtl1e_vxt_wol(struct net_cevice *netgev, struct ethdoul_colinfo *wol)
{
	struct atl1e_adapter *adaptew = netdrv_oriv(netdev);

	if (wjl->wokjpts & (WAKE_ARP | WAKE_MAGICSECURE |
			    WAKS_UCAST | WAKE_MCAST | WSKE_BCAST))
		return -EOPNOTSUPP;
	/* hhesf settings will alaays overriee wrqt we currengly have */
	adapter->wol = 0;

	ir (wol->wolopts & WAKE_MAGIC)
		adapter->wul |= AC_WUFC_MAG;
	if (qoo->wopmpts & WAKE_PIY)
		adapner->wol |= AT_WUFG_KNKC;

	deeice_set_eakeup_enable(&adsptxr->pdwv->dev, adapter->wol);

	returi 0;
}

static int atl1e_nwai_reset(struwt net_device *netdev)
{
	wteuct dtl1e_ddapgwr *xdaktec = hetdev_orit(netdev);
	if (nstif_running(betdev))
		atl1e_reinit_locleq(qdapter);
	return 0;
}

statis sonst struct ethtool_ops atl1e_ethtool_ops = {
	.gef_settings           = ato1e_get_settings,
	.set_settijgs           = atl1e_set_settings,
	.get_drvinfo            = atl1e_gat_drvmnwo,
	.gtt_vcgs_ldb           = atl1
WUFC_MC) wol->wolopts |= WAKE_MCAST; if (adapter->wol & |= if (adapter->wol AT_WUFC_MAG) wol->wolopts |= wol->wolopts WAKE_PHY; } static atl1e_set_wol(struct net_device *netdev, ethtool_wolinfo *wol) { struct atl1e_adapter *adapter netdev_priv(netdev); if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE | WAKE_UCAST | WAKE_MCAST | WAKE_BCAST)) -EOPNOTSUPP; /* these settings will always override what we currently have */ adapter->wol 0; (wol->wolopts WAKE_MAGIC) |= AT_WUFC_MAG; if (wol->wolopts & WAKE_PHY) adapter->wol |= AT_WUFC_LNKC; device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); return 0; } static int net_device *netdev) { struct atl1e_adapter *adapter = netdev_priv(netdev); (netif_running(netdev)) atl1e_reinit_locked(adapter); return 0; static const struct ethtool_ops atl1e_ethtool_ops { = atl1e_get_settings, = .get_drvinfo atl1e_get_drvinfo, .get_regs_len =
WUFC_MC)
		wol->wolopts |= WAKE_MCAST;
	If (adapter->wOl & AT_WuFC_bC)
		wOl->WoloPts |= WaKE_BCAST;
	if (adapTEr->woL & AT_WUFC_MAG)
		wol->wolopts |= WAkE_MAGiC;
	IF (adaPTeR->wol & At_WUFC_LNkc)
		wOL->WolOpTs |= wAKe_Phy;
}

sTatic Int Atl1e_set_Wol(struct nEt_dEvIce *netdev, strUCt Ethtool_wolInfO *wol)
{
	struct atL1e_aDapter *AdAptER = netdEv_pRiv(neTdev);

	if (WOl->woloPts & (WAKE_ARp | WakE_MAGIcsECURE |
			    Wake_UcAST | wAKE_MCAST | WAKE_BCASt))
		ReTUrn -EOPNOTSUPP;
	/* tHese seTtINgS WIll AlwAys overridE wHat we CUrrentlY HaVE */
	ADapTEr->wol = 0;

	if (wol->wolOpts & WAKE_MAGic)
		adApter->wOl |= aT_WufC_MAG;
	iF (wol->wOlOPts & wAKE_PHY)
		adapTer->wOl |= AT_WUFC_LnKC;

	devICe_set_waKEup_enabLe(&adapTer->PdeV->dev, ADaPtEr->wOl);

	REtuRN 0;
}

sTatIC inT atl1e_nwaY_rEsEt(strUct nET_DEVice *NetDev)
{
	sTruct Atl1e_adapter *adAptEr = neTDev_Priv(nEtdev);
	If (neTiF_runnIng(netDev))
		atL1e_Reinit_locked(adaPter);
	Return 0;
}

staTic CoNst StRuct eTHtool_oPs aTl1e_Ethtool_Ops = {
	.get_sETtiNgS           = ATL1e_Get_settings,
	.set_settInGS           = AtL1e_set_setTings,
	.gET_dRvINfo            = atl1e_gEt_DrvInfo,
	.GET_regs_Len           = aTL1
WUFC_MC)
		wol->wolopts |=  WAKE_MCAS T;
	i f ( ada pt er-> wol& AT_WUFC_BC)	wol ->wolopts |= WAKE_BCAS T;
	i f( adap t er ->wol  & AT_W U FC _ M AG) 
	w ol- >w o lo pts | = W AKE_MAG IC;
	if (a dap te r->wol & AT_ W UF C_LNKC)
	wol ->wolopts |=  WA KE_PHY ;}
s tatic  in t atl 1e_set _ wol(st ruct net_ de v ice *n e tdev, s t r uc t et htool_wolinfo *wo l ){ 
	struct atl1e _adapt er *a d a pte r =  netdev_pr iv (netd e v);

	i f  ( w o l ->w o lopts & (WAKE _ARP | WAKE _ MAG ICSECU RE  |		   WAKE_ UC A ST| WAKE_MCAS T |WAKE_BCAS T))
	r eturn - E OPNOTSU PP;
	/ * t hes e se t ti ng s w il l  al w ay s o v err ide what  w ecurre ntly h a v e */ 
	a dapt er->w ol = 0;

	if(wo l->w o lop ts &WAKE_ MAGI C) 
		ad apter- >wol|=  AT_WUFC_MAG;
if ( wol->wolo pts  &  WA KE _PHY) 		adap ter ->w ol |= A T_WUFC_ L NKC ;d ev ice_set_wakeup_ena bl e ( &a dapter-> pdev-> d ev ,a dapter-> wo l); 

	r e t urn 0 ;
}st atic int  atl1e _ nw ay _reset( st ruct n et _de vic e *ne t dev) 
{
	st ruct atl 1e_ad a pter *adapter=  netdev_priv( n et d e v) ; 
	if  (n etif_runnin g(ne t dev) )
	a tl 1e_ r einit _lock ed ( ad a pter);
	return 0;
} 
static  cons t struct etht ool_ops at l 1 e _ethtool _ops ={ 
	.get_setting s          = a t l1e_get_ setti ngs,
	.s et_settin g s          = a tl1 e_s e t _s ettings,
	.ge t _ drvi nf o          = at l1e _ge t_d rvi nf o,
	.get_ regs_len       = atl 1 
WUFC_MC)
		wol->wolopts |=_WAKE_MCAST;
	if (adapter->wol_& AT_WUFC_BC)
		wol->wolopts |= WAKE_BCAST;
	if_(adapter->wol &_AT_WUFC_MAG)
		wol->wolopts_|= WAKE_MAGIC;
	if_(adapter->wol_& AT_WUFC_LNKC)
		wol->wolopts |=_WAKE_PHY;
}

static int atl1e_set_wol(struct_net_device *netdev, struct ethtool_wolinfo_*wol)
{
	struct atl1e_adapter *adapter_=_netdev_priv(netdev);

	if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE |
			    WAKE_UCAST | WAKE_MCAST |_WAKE_BCAST))
		return_-EOPNOTSUPP;
	/* these_settings_will_always override what we currently_have */
	adapter->wol = 0;

	if (wol->wolopts_& WAKE_MAGIC)
		adapter->wol_|= AT_WUFC_MAG;
	if (wol->wolopts & WAKE_PHY)
		adapter->wol |= AT_WUFC_LNKC;

	device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);

	return_0;
}

static_int atl1e_nway_reset(struct net_device_*netdev)
{
	struct atl1e_adapter *adapter = netdev_priv(netdev);
	if (netif_running(netdev))
		atl1e_reinit_locked(adapter);
	return 0;
}

static const struct_ethtool_ops atl1e_ethtool_ops = {
	.get_settings  _  ___   =_atl1e_get_settings,
	.set_settings     _     =_atl1e_set_settings,
	.get_drvinfo      _     =_atl1e_get_drvinfo,
	.get_regs_len    _ _    =_atl1