rt2x00: rt2800lib: don't hardcode beacon offsets
authorGabor Juhos <juhosg@openwrt.org>
Thu, 22 Aug 2013 18:53:22 +0000 (20:53 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Aug 2013 18:09:01 +0000 (14:09 -0400)
commit634b80595fef79071d82bc231b7f82c4f808a1e8
tree2cc23217226bd567c88f99f615b905196245401d
parent21c6af6b69b609b7934caaccda1b4535dceb402c
rt2x00: rt2800lib: don't hardcode beacon offsets

The values written into the BCN_OFFSET[01] registers are
hardcoded in the rt2800_init_register function.

Add a macro and a helper function to derive these values
directly from the base address of a given beacon, and use
the new function instead of the hardcoded numbers.

The patch contains no functional changes. The programmed
register values are the same before and after the patch.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800.h
drivers/net/wireless/rt2x00/rt2800lib.c