lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101129120745.GA30031@pma.sysgo.com>
Date:	Mon, 29 Nov 2010 13:07:45 +0100
From:	Pavel Machek <pma@...go.com>
To:	Felix Fietkau <nbd@...nwrt.org>
Cc:	Sujith <Sujith.Manoharan@...eros.com>,
	"ath9k-devel@...ema.h4ckr.net" <ath9k-devel@...ema.h4ckr.net>,
	"cko@...go.com" <cko@...go.com>, "anl@...go.com" <anl@...go.com>,
	"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
	kernel list <linux-kernel@...r.kernel.org>,
	"mfa@...go.com" <mfa@...go.com>,
	"chunkeey@...glemail.com" <chunkeey@...glemail.com>,
	"rudolf.marek@...go.com" <rudolf.marek@...go.com>,
	Larry Finger <Larry.Finger@...inger.net>
Subject: Re: [ath9k-devel] [PATCH] fix endianity on ath9k_htc

Hi!

> > It seems struct eep_header lacks proper #ifdef BIG_ENDIAN_BITFIELD
> > markup. eep_4k_header has proper markup, but two fields were swapped.
> > 
> > Signed-off-by: Pavel Machek <pma@...go.com>
> > 
> > diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h
> > index 3c99830..022589d 100644
> > --- a/drivers/net/wireless/ath/ath9k/eeprom.h
> > +++ b/drivers/net/wireless/ath/ath9k/eeprom.h
> > @@ -378,10 +374,14 @@ struct modal_eep_header {
> >  	u8 xatten2Margin[AR5416_MAX_CHAINS];
> >  	u8 ob_ch1;
> >  	u8 db_ch1;
> > -	u8 useAnt1:1,
> > -	    force_xpaon:1,
> > -	    local_bias:1,
> > +#ifndef __BIG_ENDIAN_BITFIELD
> > +	u8 useAnt1:1, force_xpaon:1, local_bias:1,
> >  	    femBandSelectUsed:1, xlnabufin:1, xlnaisel:2, xlnabufmode:1;
> > +#else
> > +	u8 xlnabufmode:1, xlnaisel:2, xlnabufin:1, 
> > +	    femBandSelectUsed:1, local_bias:1, force_xpaon:1, useAnt1:1;
> > +#endif
> > +
> >  	u8 miscBits;
> >  	u16 xpaBiasLvlFreq[3];
> >  	u8 futureModal[6];
> I already sent a different fix for this part. See
> '[PATCH] ath9k_hw: fix more bitfield related endian issues'

Thanks, your patch is obviously better.

> > @@ -443,7 +444,7 @@ struct modal_eep_4k_header {
> >  	u8 antdiv_ctl1:4, ob_4:4;
> >  	u8 db1_3:4, db1_2:4;
> >  	u8 antdiv_ctl2:4, db1_4:4;
> > -	u8 db2_2:4, db2_3:4;
> > +	u8 db2_3:4, db2_2:4;
> >  	u8 reserved:4, db2_4:4;
> >  #else
> >  	u8 ob_2:4, ob_3:4;
> Looks good.

Yep, but it does not help :-(. Were you able to get the driver to work
on big-endian machine?
								Pavel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ