carl9170 firmware: fix inaccurate delay calculation
authorChristian Lamparter <chunkeey@googlemail.com>
Wed, 5 Jan 2011 16:14:59 +0000 (17:14 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Wed, 5 Jan 2011 16:34:57 +0000 (17:34 +0100)
commit10280c74bd62f63b1483bf1b17d40b0eeb35845e
tree96f64d53264ffcf0bbe19e633dc0e1c3e9d61e01
parentafb73dbf69800cbbe145bbbe4f1b3e40d0972eac
carl9170 firmware: fix inaccurate delay calculation

The internal refclock is set by the driver to either:
44MHz - when the device operates on a 2.4 GHz channel
40MHz - 5GHz Band

This patch removes the previously used "80MHz" constant
(that's wrong anyway since this is the HT40 AHB/CPU clock)
and enhance the code so it can deal with the slight clock
speed variations.

Reported-by: Ignacy Gawedzki <i@lri.fr>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/include/carl9170.h
carlfw/include/timer.h
carlfw/src/main.c
carlfw/src/rf.c
include/shared/hw.h