From 0c4f1a9127c76de3bee577f58e9bb9ed34477d6f Mon Sep 17 00:00:00 2001
From: Derek Kozel <derek.kozel@ettus.com>
Date: Wed, 16 May 2018 19:23:22 +0100
Subject: LMX2592: Fix PFD calculation

---
 host/lib/usrp/common/lmx2592.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/host/lib/usrp/common/lmx2592.cpp b/host/lib/usrp/common/lmx2592.cpp
index 4a6cef887..dedc56626 100644
--- a/host/lib/usrp/common/lmx2592.cpp
+++ b/host/lib/usrp/common/lmx2592.cpp
@@ -200,7 +200,7 @@ public:
 
         const int min_n_divider = LMX2592_MIN_N_DIV[_regs.mash_order];
         double pfd_freq = input_freq / _regs.pll_r;
-        while (pfd_freq * (prescaler + min_n_divider) / vco_multiplier > core_vco_freq) {
+        while (pfd_freq * (prescaler * min_n_divider) / vco_multiplier > core_vco_freq) {
             _regs.pll_r++;
             pfd_freq = input_freq / _regs.pll_r;
         }
-- 
cgit v1.2.3