summaryrefslogtreecommitdiff
path: root/usrp2
diff options
context:
space:
mode:
Diffstat (limited to 'usrp2')
-rw-r--r--usrp2/firmware/lib/db_basic.c4
-rw-r--r--usrp2/firmware/lib/db_dbsrx.c1
-rw-r--r--usrp2/firmware/lib/db_init.c1
-rw-r--r--usrp2/firmware/lib/db_init_wbx.c1
-rw-r--r--usrp2/firmware/lib/db_init_xcvr.c1
-rw-r--r--usrp2/firmware/lib/db_rfx.c10
-rw-r--r--usrp2/firmware/lib/db_tvrx.c3
-rw-r--r--usrp2/firmware/lib/db_wbxng.c2
8 files changed, 23 insertions, 0 deletions
diff --git a/usrp2/firmware/lib/db_basic.c b/usrp2/firmware/lib/db_basic.c
index 2bd4ebfbe..8f86f060b 100644
--- a/usrp2/firmware/lib/db_basic.c
+++ b/usrp2/firmware/lib/db_basic.c
@@ -53,6 +53,7 @@ struct db_basic db_basic_tx = {
.base.set_freq = db_basic_set_freq,
.base.set_gain = db_basic_set_gain,
.base.set_tx_enable = db_basic_set_tx_enable,
+ .base.set_antenna = 0,
};
struct db_basic db_basic_rx = {
@@ -79,6 +80,7 @@ struct db_basic db_basic_rx = {
.base.set_freq = db_basic_set_freq,
.base.set_gain = db_basic_set_gain,
.base.set_tx_enable = db_basic_set_tx_enable,
+ .base.set_antenna = 0,
};
struct db_basic db_lf_tx = {
@@ -105,6 +107,7 @@ struct db_basic db_lf_tx = {
.base.set_freq = db_basic_set_freq,
.base.set_gain = db_basic_set_gain,
.base.set_tx_enable = db_basic_set_tx_enable,
+ .base.set_antenna = 0,
};
struct db_basic db_lf_rx = {
@@ -131,6 +134,7 @@ struct db_basic db_lf_rx = {
.base.set_freq = db_basic_set_freq,
.base.set_gain = db_basic_set_gain,
.base.set_tx_enable = db_basic_set_tx_enable,
+ .base.set_antenna = 0,
};
diff --git a/usrp2/firmware/lib/db_dbsrx.c b/usrp2/firmware/lib/db_dbsrx.c
index 2174a6cd8..ce1300bf2 100644
--- a/usrp2/firmware/lib/db_dbsrx.c
+++ b/usrp2/firmware/lib/db_dbsrx.c
@@ -103,6 +103,7 @@ struct db_dbsrx db_dbsrx = {
.common.d_adl = 0,
.common.d_gc2 = 31,
.common.d_diag = 0,
+ .base.set_antenna = 0,
};
bool
diff --git a/usrp2/firmware/lib/db_init.c b/usrp2/firmware/lib/db_init.c
index 7dababa30..bc82946fc 100644
--- a/usrp2/firmware/lib/db_init.c
+++ b/usrp2/firmware/lib/db_init.c
@@ -427,5 +427,6 @@ db_set_gain(struct db_base *db, u2_fxpt_gain_t gain)
bool
db_set_antenna(struct db_base *db, int ant)
{
+ if (db->set_antenna == 0) return false;
return db->set_antenna(db, ant);
}
diff --git a/usrp2/firmware/lib/db_init_wbx.c b/usrp2/firmware/lib/db_init_wbx.c
index f396423c0..8810e0d4d 100644
--- a/usrp2/firmware/lib/db_init_wbx.c
+++ b/usrp2/firmware/lib/db_init_wbx.c
@@ -399,5 +399,6 @@ db_set_gain(struct db_base *db, u2_fxpt_gain_t gain)
bool
db_set_antenna(struct db_base *db, int ant)
{
+ if (db->set_antenna == 0) return false;
return db->set_antenna(db, ant);
}
diff --git a/usrp2/firmware/lib/db_init_xcvr.c b/usrp2/firmware/lib/db_init_xcvr.c
index 729faa0be..3e3d3eb86 100644
--- a/usrp2/firmware/lib/db_init_xcvr.c
+++ b/usrp2/firmware/lib/db_init_xcvr.c
@@ -399,5 +399,6 @@ db_set_gain(struct db_base *db, u2_fxpt_gain_t gain)
bool
db_set_antenna(struct db_base *db, int ant)
{
+ if (db->set_antenna == 0) return false;
return db->set_antenna(db, ant);
}
diff --git a/usrp2/firmware/lib/db_rfx.c b/usrp2/firmware/lib/db_rfx.c
index ff12f9e32..546559010 100644
--- a/usrp2/firmware/lib/db_rfx.c
+++ b/usrp2/firmware/lib/db_rfx.c
@@ -157,6 +157,7 @@ struct db_rfx_400_rx db_rfx_400_rx = {
.base.atr_rxval = POWER_UP|MIX_EN,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.DIV2 = 0,
.common.CP1 = 7,
.common.CP2 = 7,
@@ -188,6 +189,7 @@ struct db_rfx_400_tx db_rfx_400_tx = {
.base.atr_rxval = POWER_UP|ANT_SW,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.DIV2 = 1,
.common.CP1 = 7,
.common.CP2 = 7,
@@ -218,6 +220,7 @@ struct db_rfx_900_rx db_rfx_900_rx = {
.base.atr_rxval = MIX_EN,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.DIV2 = 1,
.common.CP1 = 7,
.common.CP2 = 7,
@@ -249,6 +252,7 @@ struct db_rfx_900_tx db_rfx_900_tx = {
.base.atr_rxval = ANT_SW,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.DIV2 = 1,
.common.CP1 = 7,
.common.CP2 = 7,
@@ -279,6 +283,7 @@ struct db_rfx_1200_rx db_rfx_1200_rx = {
.base.atr_rxval = MIX_EN,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.DIV2 = 1,
.common.CP1 = 7,
.common.CP2 = 7,
@@ -310,6 +315,7 @@ struct db_rfx_1200_tx db_rfx_1200_tx = {
.base.atr_rxval = ANT_SW,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.DIV2 = 1,
.common.CP1 = 7,
.common.CP2 = 7,
@@ -340,6 +346,7 @@ struct db_rfx_1800_rx db_rfx_1800_rx = {
.base.atr_rxval = MIX_EN,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.DIV2 = 0,
.common.CP1 = 7,
.common.CP2 = 7,
@@ -371,6 +378,7 @@ struct db_rfx_1800_tx db_rfx_1800_tx = {
.base.atr_rxval = ANT_SW,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.DIV2 = 0,
.common.CP1 = 7,
.common.CP2 = 7,
@@ -402,6 +410,7 @@ struct db_rfx_2400_rx db_rfx_2400_rx = {
.base.atr_rxval = MIX_EN,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.DIV2 = 0,
.common.CP1 = 7,
.common.CP2 = 7,
@@ -433,6 +442,7 @@ struct db_rfx_2400_tx db_rfx_2400_tx = {
.base.atr_rxval = ANT_SW,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.DIV2 = 0,
.common.CP1 = 7,
.common.CP2 = 7,
diff --git a/usrp2/firmware/lib/db_tvrx.c b/usrp2/firmware/lib/db_tvrx.c
index 49bf75883..077e59e88 100644
--- a/usrp2/firmware/lib/db_tvrx.c
+++ b/usrp2/firmware/lib/db_tvrx.c
@@ -97,6 +97,7 @@ struct db_tvrx1 db_tvrx1 = {
.base.atr_rxval = 0,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.first_if = U2_DOUBLE_TO_FXPT_FREQ(43.75e6),
.common.second_if = U2_DOUBLE_TO_FXPT_FREQ(5.75e6),
};
@@ -125,6 +126,7 @@ struct db_tvrx2 db_tvrx2 = {
.base.atr_rxval = 0,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.first_if = U2_DOUBLE_TO_FXPT_FREQ(44e6),
.common.second_if = U2_DOUBLE_TO_FXPT_FREQ(56e6), // Fs - 44e6
};
@@ -153,6 +155,7 @@ struct db_tvrx3 db_tvrx3 = {
.base.atr_rxval = 0,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.first_if = U2_DOUBLE_TO_FXPT_FREQ(44e6),
.common.second_if = U2_DOUBLE_TO_FXPT_FREQ(56e6), // Fs - 44e6
};
diff --git a/usrp2/firmware/lib/db_wbxng.c b/usrp2/firmware/lib/db_wbxng.c
index c02a5bdaa..115ac8a24 100644
--- a/usrp2/firmware/lib/db_wbxng.c
+++ b/usrp2/firmware/lib/db_wbxng.c
@@ -63,6 +63,7 @@ struct db_wbxng_rx db_wbxng_rx = {
.base.atr_rxval = RXBB_EN,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.adf4350_regs_int = UINT16_C(100),
.common.adf4350_regs_frac = 0,
.common.adf4350_regs_prescaler = 1,
@@ -98,6 +99,7 @@ struct db_wbxng_tx db_wbxng_tx = {
.base.atr_rxval = RX_TXN,
// .base.atr_tx_delay =
// .base.atr_rx_delay =
+ .base.set_antenna = 0,
.common.adf4350_regs_int = UINT16_C(100),
.common.adf4350_regs_frac = 0,
.common.adf4350_regs_prescaler = 1,