Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5ae7a6b authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville
Browse files

rt2800: 5592: setup LDO_CFG0 when configuring channel



Based on:
RT5592_ChipSwitchChannel()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: default avatarStanislaw Gruszka <stf_xl@wp.pl>
Tested-by: default avatarWanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c2675487
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -2187,12 +2187,17 @@ static void rt2800_config_channel_rf55xx(struct rt2x00_dev *rt2x00dev,
					 struct channel_info *info)
					 struct channel_info *info)
{
{
	u8 rfcsr, ep_reg;
	u8 rfcsr, ep_reg;
	u32 reg;
	int power_bound;
	int power_bound;


	/* TODO */
	/* TODO */
	const bool is_11b = false;
	const bool is_11b = false;
	const bool is_type_ep = false;
	const bool is_type_ep = false;


	rt2800_register_read(rt2x00dev, LDO_CFG0, &reg);
	rt2x00_set_field32(&reg, LDO_CFG0_LDO_CORE_VLEVEL,
			   (rf->channel > 14 || conf_is_ht40(conf)) ? 5 : 0);
	rt2800_register_write(rt2x00dev, LDO_CFG0, reg);


	/* Order of values on rf_channel entry: N, K, mod, R */
	/* Order of values on rf_channel entry: N, K, mod, R */
	rt2800_rfcsr_write(rt2x00dev, 8, rf->rf1 & 0xff);
	rt2800_rfcsr_write(rt2x00dev, 8, rf->rf1 & 0xff);