Skip to content

Commit

Permalink
iio: adc: ad9361: Fix to prevent invalid RFBW setting during enable FIR
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mhennerich authored and commodo committed Dec 7, 2018
1 parent 2502d7f commit bfb4701
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iio/adc/ad9361.c
Original file line number Diff line number Diff line change
Expand Up @@ -5642,8 +5642,8 @@ static int ad9361_validate_enable_fir(struct ad9361_rf_phy *phy)
ad9361_dig_tune(phy, 0, RESTORE_DEFAULT);

return ad9361_update_rf_bandwidth(phy,
valid ? st->filt_rx_bw_Hz : st->current_rx_bw_Hz,
valid ? st->filt_tx_bw_Hz : st->current_tx_bw_Hz);
(valid && st->filt_rx_bw_Hz) ? st->filt_rx_bw_Hz : st->current_rx_bw_Hz,
(valid && st->filt_tx_bw_Hz) ? st->filt_tx_bw_Hz : st->current_tx_bw_Hz);
}

static void ad9361_work_func(struct work_struct *work)
Expand Down

0 comments on commit bfb4701

Please sign in to comment.