Search Linux Wireless

Re: Dividing by a non-static value in carl9170-fw?

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

 



Hi,

On Sun, Jan 16, 2011 at 01:48:33PM +0100, thus spake Ignacy Gawedzki:
> On Sun, Jan 16, 2011 at 12:45:53PM +0100, thus spake Christian Lamparter:
> > No need for a hack, just get a udivsi3_i4i.S (a good place is the linux kernel
> > library sources in arch/sh/lib, you could also import one from the original
> > ar9170fw.git) and place it into carlfw/src. Next, you need to modify the
> > carlfw/CMakeLists.txt: add src/udivsi3_i4i.S to carl9170_lib_src and put
> > "set_source_files_properties(src/udivsi3_i4i.S PROPERTIES LANGUAGE C)"
> > a few lines further down.
> > 
> > compile...
> > 
> > [Note: you probably have to change the name of the __udivsi3_i4i symbol 
> > to ___udivsi3_i4i too]
> 
> Great, thanks for the hint, I'll try that as soon as I can.

So I finally got the time to test that solution.  Compilation worked like a
charm indeed, thanks.  All seemed fine until I ran that code.  Indeed the
result of the division is completely off. :(

For instance, if I have A = 17719, B = 44, then A / B gives C = 12886, instead
of the expected 402.  It is as though the result was multiplied by 32.

At this point, it is much simpler for me to simply return both A and B, and to
perform the division on the host's CPU instead of in the FW.  Unless I commit
some gross error and there is a more elegant solution around, I'll stick with
that one, since I don't feel like debugging udivsi3_i4i. :/

Ignacy

-- 
Information wants to be beer, or something like that.
--
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