linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pma@sysgo.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: Sujith <Sujith.Manoharan@atheros.com>,
	"ath9k-devel@venema.h4ckr.net" <ath9k-devel@venema.h4ckr.net>,
	"cko@sysgo.com" <cko@sysgo.com>, "anl@sysgo.com" <anl@sysgo.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	kernel list <linux-kernel@vger.kernel.org>,
	"mfa@sysgo.com" <mfa@sysgo.com>,
	"chunkeey@googlemail.com" <chunkeey@googlemail.com>,
	"rudolf.marek@sysgo.com" <rudolf.marek@sysgo.com>,
	Larry Finger <Larry.Finger@lwfinger.net>
Subject: Re: [ath9k-devel] [PATCH] fix endianity on ath9k_htc
Date: Mon, 29 Nov 2010 13:07:45 +0100	[thread overview]
Message-ID: <20101129120745.GA30031@pma.sysgo.com> (raw)
In-Reply-To: <4CF3929E.9020702@openwrt.org>

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@sysgo.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

  reply	other threads:[~2010-11-29 12:07 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03  9:24 working usb wifi card, that is still possible to buy Pavel Machek
2010-11-05  9:26 ` Josh Lehan
2010-11-05 13:15   ` Larry Finger
2010-11-05 17:54     ` Johannes Berg
2010-11-05 20:12       ` Larry Finger
2010-11-06 10:43         ` Christian Lamparter
2010-11-08  7:19           ` Pavel Machek
2010-11-24  8:16 ` Pavel Machek
2010-11-24  8:42   ` Johannes Berg
2010-11-24  9:57     ` Pavel Machek
2010-11-24 13:13   ` Pavel Machek
2010-11-24 15:48     ` Larry Finger
2010-11-26  8:31       ` ath9k_htc vs. powerpc (was Re: working usb wifi card, that is still possible to buy) Pavel Machek
2010-11-26 10:20         ` Pavel Machek
2010-11-26 11:27           ` Pavel Machek
2010-11-26 11:35             ` [PATCH] ath9k_htc: cleanup eeprom endiannes handling Pavel Machek
2010-11-26 11:37             ` [PATCH?] do structures need to be packed? [was Re: ath9k_htc vs. powerpc (was Re: working usb wifi card, that is still possible to buy)] Pavel Machek
2010-11-26 11:47             ` ath9k_htc vs. powerpc (was Re: working usb wifi card, that is still possible to buy) Sujith
2010-11-26 12:37               ` Pavel Machek
2010-11-29  9:58                 ` [PATCH] fix endianity on ath9k_htc Pavel Machek
2010-11-29 11:46                   ` [ath9k-devel] " Felix Fietkau
2010-11-29 12:07                     ` Pavel Machek [this message]
2010-11-29 12:11                       ` [patch] remove unneeded prototype " Pavel Machek
2010-11-29  9:59                 ` [PATCH] ath9k_htc cleanups Pavel Machek
2010-11-29 11:34                   ` [PATCH] ath9k_htc more cleanups Pavel Machek
2010-11-29 10:01                 ` ath9k_htc vs. powerpc (was Re: working usb wifi card, that is still possible to buy) Pavel Machek
2010-11-29 12:37                   ` Sujith
2010-11-29 12:48                     ` Pavel Machek
2010-11-29 12:57                     ` Pavel Machek
2010-11-29 13:28                       ` Sujith
2010-11-29 12:16                 ` Sujith
2010-12-06  8:37     ` working usb wifi card, that is still possible to buy Pavel Machek
2010-12-06 15:30       ` Larry Finger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101129120745.GA30031@pma.sysgo.com \
    --to=pma@sysgo.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=Sujith.Manoharan@atheros.com \
    --cc=anl@sysgo.com \
    --cc=ath9k-devel@venema.h4ckr.net \
    --cc=chunkeey@googlemail.com \
    --cc=cko@sysgo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mfa@sysgo.com \
    --cc=nbd@openwrt.org \
    --cc=rudolf.marek@sysgo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).