Skip to content

Commit bfb4701

Browse files
mhennerichcommodo
authored andcommitted
iio: adc: ad9361: Fix to prevent invalid RFBW setting during enable FIR
Only if filt_[rx|tx]_bw_Hz is set in ad9361_parse_fir() use it otherwise keep current RFBW for chain. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
1 parent 2502d7f commit bfb4701

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iio/adc/ad9361.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5642,8 +5642,8 @@ static int ad9361_validate_enable_fir(struct ad9361_rf_phy *phy)
56425642
ad9361_dig_tune(phy, 0, RESTORE_DEFAULT);
56435643

56445644
return ad9361_update_rf_bandwidth(phy,
5645-
valid ? st->filt_rx_bw_Hz : st->current_rx_bw_Hz,
5646-
valid ? st->filt_tx_bw_Hz : st->current_tx_bw_Hz);
5645+
(valid && st->filt_rx_bw_Hz) ? st->filt_rx_bw_Hz : st->current_rx_bw_Hz,
5646+
(valid && st->filt_tx_bw_Hz) ? st->filt_tx_bw_Hz : st->current_tx_bw_Hz);
56475647
}
56485648

56495649
static void ad9361_work_func(struct work_struct *work)

0 commit comments

Comments
 (0)