Commit 79b4c945 authored by Daniel Golle's avatar Daniel Golle Committed by Kalle Valo

wifi: rt2x00: move helper functions up in file

Move register access helper functions up to the head of the file so
they can be used in all functions.
Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
Acked-by: default avatarStanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/c27baa8efd5c29e2bcb2432925d9cdc5c913a125.1663445157.git.daniel@makrotopia.org
parent dab902fe
......@@ -198,6 +198,26 @@ static void rt2800_rfcsr_write_dccal(struct rt2x00_dev *rt2x00dev,
rt2800_rfcsr_write_bank(rt2x00dev, 7, reg, value);
}
static void rt2800_bbp_dcoc_write(struct rt2x00_dev *rt2x00dev,
const u8 reg, const u8 value)
{
rt2800_bbp_write(rt2x00dev, 158, reg);
rt2800_bbp_write(rt2x00dev, 159, value);
}
static u8 rt2800_bbp_dcoc_read(struct rt2x00_dev *rt2x00dev, const u8 reg)
{
rt2800_bbp_write(rt2x00dev, 158, reg);
return rt2800_bbp_read(rt2x00dev, 159);
}
static void rt2800_bbp_glrt_write(struct rt2x00_dev *rt2x00dev,
const u8 reg, const u8 value)
{
rt2800_bbp_write(rt2x00dev, 195, reg);
rt2800_bbp_write(rt2x00dev, 196, value);
}
static u8 rt2800_rfcsr_read(struct rt2x00_dev *rt2x00dev,
const unsigned int word)
{
......@@ -6947,26 +6967,6 @@ static void rt2800_init_bbp_5592(struct rt2x00_dev *rt2x00dev)
rt2800_bbp_write(rt2x00dev, 103, 0xc0);
}
static void rt2800_bbp_glrt_write(struct rt2x00_dev *rt2x00dev,
const u8 reg, const u8 value)
{
rt2800_bbp_write(rt2x00dev, 195, reg);
rt2800_bbp_write(rt2x00dev, 196, value);
}
static void rt2800_bbp_dcoc_write(struct rt2x00_dev *rt2x00dev,
const u8 reg, const u8 value)
{
rt2800_bbp_write(rt2x00dev, 158, reg);
rt2800_bbp_write(rt2x00dev, 159, value);
}
static u8 rt2800_bbp_dcoc_read(struct rt2x00_dev *rt2x00dev, const u8 reg)
{
rt2800_bbp_write(rt2x00dev, 158, reg);
return rt2800_bbp_read(rt2x00dev, 159);
}
static void rt2800_init_bbp_6352(struct rt2x00_dev *rt2x00dev)
{
u8 bbp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment