lkml.org 
[lkml]   [2008]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ipwireless: driver for 3G PC Card
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


\
 
 \ /
  Last update: 2008-01-30 14:31    [W:0.136 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site