On Friday 18 March 2011 20:16:15 Ignacy Gawedzki wrote: > 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. I gave it a try and It worked?! [54670.551750] ieee80211 phy14: FW: a:0x4537 b:0x2c a/b:0x192 (0x192 = 402). (It was nothing else than just define "a" and "b" (as global variables) and add the INFO("a:0x%x b:0x%x a/b:0x%x", a, b, a/b);) Regards, Chr -- 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