Search Linux Wireless

Re: coding style lesson: iwlwifi vs. endianness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> ACK
>
> While I can understand why you might think that Johannes was being
> smug, I doubt if he really meant to be.  Please try to presume the
> best intent. :-)
>
Here I'm speaking for myself here not for Intel.
He is a smug,  he has 'everything is a crap' attitude yet that's good
for revolution and I honestly appreciate Johannes' work on mac80211.
Things are finally moving somewhere. Thanks Johannes.

> As Dan points-out, Johannes main point (i.e. convert data at system
> boundaries) makes plenty of sense.  Please do take the time to tell
> us what he is missing?
>
Since all of also hold a CS degree the first thing that come to  us is
to create a clean cut, to translate the data from native order to
little endian just before submitting to HW and same on the opposite
direction.

Iwlwifi driver talks to firmware using so called host command
structures defined naturally in little endian. Statistically most of
the operations are setting and testing bits which is endianity
agnostic meaning no run time swap operations are needed.
The few computation including the shifting one visible in Johannes
example are the trade off of run time efficiency and 'ugliness'. It
was better bargain for us.  Iwlwifi keeps that in host command
structures through the driver operation so we don't need to keep
shadow native layered structures and there is quite a few of them.
Also number swap operation is much lower then the other approach.
We rather think of all constants for host commands as liitle endian.
As we stick consistently to this paradigma it becomes natural.
I'm not sure if this was a good decision for a long run as we are
adding more hardware and we are need more abstraction, at that point
it looked correct.
As Stephan is pressing for splitting the driver. If I look from his
point it seams like a right way  but as I see it now  from my point he
just made us few weeks of work more. And don't take me wrong I also
share his opinion that those ifdefs were evil.
So I'm not saying that Johannes is wrong in general he just came with
different assumptions.

Thanks for your attentions and I'm waiting for your flames, just
remember I don't answers to insults :)

Thanks
Tomas..

> Thanks,
>
> John
> --
> John W. Linville
> linville@xxxxxxxxxxxxx
>
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux