diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-08-22 20:53:22 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-26 20:09:01 +0200 |
commit | 634b80595fef79071d82bc231b7f82c4f808a1e8 (patch) | |
tree | 2cc23217226bd567c88f99f615b905196245401d /drivers/net/wireless/rt2x00/rt2800.h | |
parent | rt2x00: rt2800lib: add rt2800_hw_beacon_base helper (diff) | |
download | linux-634b80595fef79071d82bc231b7f82c4f808a1e8.tar.xz linux-634b80595fef79071d82bc231b7f82c4f808a1e8.zip |
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h index e25e5bf34aa7..fa33b5edf931 100644 --- a/drivers/net/wireless/rt2x00/rt2800.h +++ b/drivers/net/wireless/rt2x00/rt2800.h @@ -2024,6 +2024,8 @@ struct mac_iveiv_entry { (((__index) < 6) ? (HW_BEACON_BASE4 + ((__index - 4) * 0x0200)) : \ (HW_BEACON_BASE6 - ((__index - 6) * 0x0200)))) +#define BEACON_BASE_TO_OFFSET(_base) (((_base) - 0x4000) / 64) + /* * BBP registers. * The wordsize of the BBP is 8 bits. |