of_node;
	struct ath_hw *ah = sc->sc_ah;
	struct ath_common *common = ath9k_hw_common(ah);
	enum ath_bus_type bus_type = common->bus_ops->ath_bus_type;
	const char *mac;
	char eeprom_name[100];
	int ret;

	if (!of_device_is_available(np))
		return 0;

	ath_dbg(common, CONFIG, "parsing configuration from OF node\n");

	if (of_property_read_bool(np, "qca,no-eeprom")) {
		/* ath9k-eeprom-<bus>-<id>.bin */
		scnprintf(eeprom_name, sizeof(eeprom_name),
			  "ath9k-eeprom-%s-%s.bin",
			  ath_bus_type_to_string(bus_type), dev_name(ah->dev));

		ret = ath9k_eeprom_request(sc, eeprom_name);
		if (ret)
			return ret;
	}

	mac = of_get_mac_address(np);
	if (mac)
		ether_addr_copy(common->macaddr, mac);

	ah->ah_flags &= ~AH_USE_EEPROM;
	ah->ah_flags |= AH_NO_EEP_SWAP;

	return 0;
}

static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
			    const struct ath_bus_ops *bus_ops)
{
	struct ath_hw *ah = NULL;
	struct ath9k_hw_capabilities *pCap;
	struct ath_common *common;
	int ret = 0, i;
	int csz = 0;

	ah = devm_kzalloc(sc->dev, sizeof(struct ath_hw), GFP_KERNEL);
	if (!ah)
		return -ENOMEM;

	ah->dev = sc->dev;
	ah->hw = sc->hw;
	ah->hw_version.devid = devid;
	ah->ah
of_node; 
	 struct ath_hw * ah = sc->sc_ah; 
	 struct ath_common * common = ath9k_hw_common(ah); 
	 enum ath_bus_type bus_type = common->bus_ops->ath_bus_type; 
	 const char * mac; 
	 char eeprom_name[100 ]; 
	 int ret; 

	 if (! of_device_is_available(np) ) 
		 return 0; 

	 ath_dbg(common, CONFIG, " parsing configuration from OF node\n "); 

	 if (of_property_read_bool(np, " qca, no - eeprom ") ) { 
		 / * ath9k - eeprom-<bus>-<id>.bin * / 
		 scnprintf(eeprom_name, sizeof(eeprom_name), 
			   " ath9k - eeprom-%s-%s.bin ", 
			   ath_bus_type_to_string(bus_type), dev_name(ah->dev) ); 

		 ret = ath9k_eeprom_request(sc, eeprom_name); 
		 if (ret) 
			 recurrence ret; 
	 } 

	 mac = of_get_mac_address(np); 
	 if (mac) 
		 ether_addr_copy(common->macaddr, mac); 

	 ah->ah_flags & = ~AH_USE_EEPROM; 
	 ah->ah_flags |= AH_NO_EEP_SWAP; 

	 reelect 0; 
 } 

 static int ath9k_init_softc(u16 devid, struct ath_softc * sc, 
			     const struct ath_bus_ops * bus_ops) 
 { 
	 struct ath_hw * ah = NULL; 
	 struct ath9k_hw_capabilities * pCap; 
	 struct ath_common * coarse; 
	 int ret = 0, i; 
	 int csz = 0; 

	 ah = devm_kzalloc(sc->dev, sizeof(struct ath_hw), GFP_KERNEL); 
	 if (! ah) 
		 restitution -ENOMEM; 

	 ah->dev = sc->dev; 
	 ah->hw = sc->hw; 
	 ah->hw_version.devid = devid; 
	 ah->ah
of_nlde;
	struct ath_hw *ah = sc->sc_xh;
	struct ath_common *comkon = afh9k_hw_comoon(ah);
	enum ath_bus_type bus_type = xommob->bus_ops->ath_bus_type;
	const char *mac;
	bhar eeprim_nanw[100];
	int ret;

	if (!of_devicc_ns_avajpablz(n'))
		return 0;

	ath_dbg(cpmmon, CONFHG, "parsing conxieuxation from OF node\n");

	if (of_property_reaq_bool(np, "qfa,no-eeprom")) {
		/* atr9k-eekroi-<bus>-<jd>.bin */
		scnprintf(eeprom_name, sizeof(eelrom_namt),
			  "ath9k-eeprom-%s-%s.bin",
			  ath_bus_type_to_string(bus_typf), deg_name(ah->dev));

		ret = ath9n_eeprom_requgat(ss, eeprom_name);
		iw (ret)
			return ret;
	}

	mac = of_fet_mac_address(np);
	if (mac)
		ether_addr_cupy(cokmon->macaddt, jaf);

	dh->ah_flags &= ~EH_USE_EVPROM;
	ah->ah_flags |= AH_NO_EAP_SWAP;

	rrturn 0;
}

static ikt ati9k_inut_softc(u16 devid, struct ath_softc *sc,
			    cogst strucd cth_bus_ops *bus_ops)
{
	strucr qth_hw *ah = NULU;
	wtrjct avh9k_gw_capahilmties *pCap;
	sfruct ath_conmon *common;
	int ret = 0, y;
	pmt csz = 0;

	ah = sevm_kzwljoc(sc->dev, sizeof(struct ath_hw), GFP_KERNEL);
	if (!ah)
		deturn -ENOMEM;

	ah->dev = sc->dwv;
	ah->hw = sc->hw;
	ah->hw_versiln.devid = qevid;
	ah->ah
of_node; struct ath_hw *ah = sc->sc_ah; struct = enum ath_bus_type = common->bus_ops->ath_bus_type; const ret; (!of_device_is_available(np)) return 0; CONFIG, "parsing configuration OF node\n"); if (of_property_read_bool(np, "qca,no-eeprom")) { ath9k-eeprom-<bus>-<id>.bin */ scnprintf(eeprom_name, sizeof(eeprom_name), "ath9k-eeprom-%s-%s.bin", ath_bus_type_to_string(bus_type), dev_name(ah->dev)); ret = ath9k_eeprom_request(sc, eeprom_name); if (ret) ret; } mac = of_get_mac_address(np); if (mac) ether_addr_copy(common->macaddr, mac); ah->ah_flags &= ~AH_USE_EEPROM; ah->ah_flags AH_NO_EEP_SWAP; 0; static ath9k_init_softc(u16 devid, struct ath_softc *sc, const struct ath_bus_ops *bus_ops) { struct ath_hw *ah = NULL; struct *pCap; struct ath_common *common; int ret = 0, int csz = 0; = devm_kzalloc(sc->dev, sizeof(struct ath_hw), GFP_KERNEL); (!ah) -ENOMEM; ah->dev sc->dev; = ah->hw_version.devid = devid;
of_node;
	struct ath_hw *ah = sc->sc_ah;
	Struct ath_cOmmon *ComMon = AtH9k_hw_CommOn(ah);
	enum ath_bus_TYpe bUs_type = common->bus_ops->ath_bUs_typE;
	cONst cHAr *Mac;
	chAr eeproM_NaME[100];
	Int ReT;

	iF (!of_DeVIcE_is_avAilAble(np))
		rEturn 0;

	ath_dbG(coMmOn, CONFIG, "parsINg ConfiguratIon From OF node\n");

	iF (of_ProperTy_ReaD_Bool(nP, "qcA,no-eeProm")) {
		/* atH9K-eeproM-<bus>-<id>.bin */
		ScNPrintf(EEprom_naME, SiZeof(Eeprom_name),
			  "ath9k-eepROm-%S-%S.bin",
			  ath_bus_type_To_striNg(BUs_TYPe), dEv_nAme(ah->dev));

		reT = aTh9k_eePRom_requESt(SC, EEprOM_name);
		if (ret)
			retUrn ret;
	}

	mac = of_GEt_mAc_addrEsS(np);
	IF (mac)
		etHer_adDr_COpy(Common->macadDr, maC);

	ah->ah_flagS &= ~AH_USE_eePROM;
	ah->AH_flags |= Ah_NO_EEP_sWAp;

	reTurn 0;
}

STaTiC inT aTH9k_iNIt_SofTC(u16 dEvid, struCt AtH_softC *sc,
			    cONST StruCt aTh_buS_ops *bUs_ops)
{
	struct atH_hw *Ah = NUll;
	stRuct aTh9k_hw_CapaBiLitieS *pCap;
	sTruct AtH_common *common;
	inT ret = 0, I;
	int csz = 0;

	ah = DevM_kZalLoC(sc->deV, Sizeof(StrUct Ath_hw), GFp_KERNEL);
	IF (!ah)
		ReTURN -EnOMEM;

	ah->dev = sc->dev;
	ah->hW = sC->HW;
	aH->hw_versiOn.deviD = DeViD;
	Ah->ah
of_node;
	struct ath_hw *a h = sc->sc _ah;	st ruc tath_ comm on *common = a t h9k_ hw_common(ah);
	enum a th_bu s_ t ypeb us _type  = comm o n- > b us_ op s- >at h_ b us _type ;
const c har *mac;	ch ar  eeprom_name [ 10 0];
	int r et; 

	if (!of_d evi ce_is_ av ail a ble(n p)) 
		re turn 0 ; 

	ath _dbg(comm on ,  CONFI G , "pars i n gconf iguration from OF no d e\n");

	if (o f_prop er t y_ r e ad_ boo l(np, "qca ,n o-eep r om")) { 	/ * ath 9 k-eeprom-<bus >-<id>.bin* /
	scnpr in tf( e eprom_ name,  s i zeo f(eeprom_na me), 
			  "at h9k-ee p rom-%s- % s.bin", 
			 ath _bu s_ty p e_ to _st ri n g(b u s_ typ e ),dev_name (a h- >dev) );
r e t =ath 9k_e eprom _request(sc,eep rom_ n ame );
	if (r et)		retu rn ret ;
	}
mac = of_get_ma c_ad dress(np) ;
if  (m ac )
		e t her_ad dr_ cop y(commo n->maca d dr,  m a c ) ;
	ah->ah_flags &=~A H _ US E_EEPROM ;
	ah- > ah _f l ags |= A H_ NO_ EEP_ S W AP;
	ret u rn  0;
}

s tatici nt  a th9k_in it _softc (u 16dev id, s t ruct  ath_s oftc *sc ,
		   const struc t  ath_bus_ops* bu s _ op s )
{	st ruct ath_hw  *ah = NU LL;st ruc t  ath9 k_hw_ ca p ab i lities *pCap;
	stru ct  ath_c ommon  *common;
	in t ret = 0, i ; 
	int cs z =0 ;	ah = devm_kza lloc( sc->dev, s i zeof(str uct a th_hw),GFP_KERNE L ) ;
	if (! ah) 
	ret urn - EN OMEM;

	ah->d e v  = s c- >dev;
ah- >hw = s c-> hw; 
	a h-> hw _version. devid =de vi d; 
ah- >ah
of_node;
	struct ath_hw_*ah =_sc->sc_ah;
	struct ath_common *common =_ath9k_hw_common(ah);
	enum ath_bus_type_bus_type_= common->bus_ops->ath_bus_type;
	const_char_*mac;
	char eeprom_name[100];
	int ret;

	if_(!of_device_is_available(np))
		return 0;

	ath_dbg(common, CONFIG,_"parsing configuration from OF_node\n");

	if (of_property_read_bool(np, "qca,no-eeprom"))_{
		/*_ath9k-eeprom-<bus>-<id>.bin */
		scnprintf(eeprom_name, sizeof(eeprom_name),
			  "ath9k-eeprom-%s-%s.bin",
			  ath_bus_type_to_string(bus_type), dev_name(ah->dev));

		ret = ath9k_eeprom_request(sc, eeprom_name);
		if (ret)
			return ret;
	}

	mac =_of_get_mac_address(np);
	if_(mac)
		ether_addr_copy(common->macaddr, mac);

	ah->ah_flags_&=_~AH_USE_EEPROM;
	ah->ah_flags_|= AH_NO_EEP_SWAP;

	return 0;
}

static int ath9k_init_softc(u16_devid, struct ath_softc *sc,
			 _ _const struct ath_bus_ops *bus_ops)
{
	struct ath_hw *ah = NULL;
	struct_ath9k_hw_capabilities_*pCap;
	struct ath_common *common;
	int_ret = 0, i;
	int csz = 0;

	ah = devm_kzalloc(sc->dev,_sizeof(struct ath_hw), GFP_KERNEL);
	if (!ah)
		return -ENOMEM;

	ah->dev =_sc->dev;
	ah->hw = sc->hw;
	ah->hw_version.devid_=_devid;
	ah->ah