public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: David Sterba <dsterba@suse.cz>,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	jkosina@suse.cz, benm@symmetric.co.nz, stephen@symmetric.co.nz
Subject: Re: [PATCH] ipwireless: driver for 3G PC Card
Date: Wed, 30 Jan 2008 14:28:33 +0100	[thread overview]
Message-ID: <20080130132833.GA5139@elf.ucw.cz> (raw)
In-Reply-To: <20080128175357.GA1990@martell.zuzino.mipt.ru>

On Mon 2008-01-28 20:53:57, Alexey Dobriyan wrote:
> On Mon, Jan 28, 2008 at 06:19:29PM +0100, David Sterba wrote:
> > ipwireless: driver for PC Card, 3G internet connection
> 
> > +struct nl_first_paket_header {
> > +#if defined(__BIG_ENDIAN)
> > +	unsigned char packet_rank:2;
> > +	unsigned char address:3;
> > +	unsigned char protocol:3;
> > +#else
> > +	unsigned char protocol:3;
> > +	unsigned char address:3;
> > +	unsigned char packet_rank:2;
> > +#endif
> > +	unsigned char length_lsb;
> > +	unsigned char length_msb;
> > +};
> > +
> > +struct nl_packet_header {
> > +#if defined(__BIG_ENDIAN)
> > +	unsigned char packet_rank:2;
> > +	unsigned char address:3;
> > +	unsigned char protocol:3;
> > +#else
> > +	unsigned char protocol:3;
> > +	unsigned char address:3;
> > +	unsigned char packet_rank:2;
> > +#endif
> > +};
> 
> You want __BIG_ENDIAN_BITFIELD here.

Actually, you probably want to avoid bitfields here, and just do bit
arithmetics by hand.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2008-01-30 13:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-28 17:19 [PATCH] ipwireless: driver for 3G PC Card David Sterba
2008-01-28 17:53 ` Alexey Dobriyan
2008-01-30 13:28   ` Pavel Machek [this message]
2008-01-28 18:08 ` Randy Dunlap
2008-01-28 23:18   ` Jiri Slaby
2008-01-28 23:28     ` Randy Dunlap
2008-01-28 23:29       ` Jiri Slaby
2008-01-28 23:33         ` Randy Dunlap
2008-01-29  6:22           ` Pekka Enberg
2008-01-29 13:42     ` David Sterba
2008-01-29 13:40   ` David Sterba
2008-01-30 13:40 ` Pavel Machek
2008-01-30 21:29   ` Stephen Blackheath [to Foxconn]
2008-01-30 23:15     ` Pavel Machek
2008-02-01 15:21   ` David Sterba
2008-02-01 23:43     ` Pavel Machek

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=20080130132833.GA5139@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=adobriyan@gmail.com \
    --cc=benm@symmetric.co.nz \
    --cc=dsterba@suse.cz \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stephen@symmetric.co.nz \
    --cc=torvalds@linux-foundation.org \
    /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