diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-11-20 10:13:44 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-11-20 10:13:44 +0100 |
commit | 73a809e57b8a531b9b8a33b6841ed3df2ea22620 (patch) | |
tree | 76effaeb610b2394769991614fd54e5802e292ab /src/host/layer23/src/misc | |
parent | 2879e77bd3720f261330dad2ef7f14d6a0988421 (diff) |
Tell L1CTL_FBSB_REQ the expected received signal level
As Dieter points out, this drastically improves the resiliance to high
receive levels on the C155. We cannot blindly assume a received signal
level of -85 dBm if the BTS is 2m away and we actually receive -40 dBm.
This patch extends the L1CTL_FBSB_REQ data structure in layer 1 with the
respective field, as well as the l1ctl_tx_fbsb_req() API function called
from the various layer23 apps.
"mobile" and "bcch_scan" already did a PM request and thus know the
expected signal power. "ccch_scan" and "cbch_sniff" apparently don't
do, so the -85 dBm constant is now hardcoded into the host-side source
code there, and should probably be fixed in a follow-up patch.
Diffstat (limited to 'src/host/layer23/src/misc')
-rw-r--r-- | src/host/layer23/src/misc/app_cbch_sniff.c | 3 | ||||
-rw-r--r-- | src/host/layer23/src/misc/app_ccch_scan.c | 2 | ||||
-rw-r--r-- | src/host/layer23/src/misc/bcch_scan.c | 3 | ||||
-rw-r--r-- | src/host/layer23/src/misc/cell_log.c | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/src/host/layer23/src/misc/app_cbch_sniff.c b/src/host/layer23/src/misc/app_cbch_sniff.c index 2f45e483..8256eaf6 100644 --- a/src/host/layer23/src/misc/app_cbch_sniff.c +++ b/src/host/layer23/src/misc/app_cbch_sniff.c @@ -169,7 +169,8 @@ static int signal_cb(unsigned int subsys, unsigned int signal, case S_L1CTL_FBSB_ERR: ms = g_ms; return l1ctl_tx_fbsb_req(ms, ms->test_arfcn, - L1CTL_FBSB_F_FB01SB, 100, 0, CCCH_MODE_COMBINED); + L1CTL_FBSB_F_FB01SB, 100, 0, CCCH_MODE_COMBINED, + dbm2rxlev(-85)); case S_L1CTL_FBSB_RESP: return 0; } diff --git a/src/host/layer23/src/misc/app_ccch_scan.c b/src/host/layer23/src/misc/app_ccch_scan.c index d301b7b7..f92b13ba 100644 --- a/src/host/layer23/src/misc/app_ccch_scan.c +++ b/src/host/layer23/src/misc/app_ccch_scan.c @@ -484,7 +484,7 @@ static int signal_cb(unsigned int subsys, unsigned int signal, layer3_app_reset(); return l1ctl_tx_fbsb_req(ms, ms->test_arfcn, L1CTL_FBSB_F_FB01SB, 100, 0, - CCCH_MODE_NONE); + CCCH_MODE_NONE, dbm2rxlev(-85)); break; } return 0; diff --git a/src/host/layer23/src/misc/bcch_scan.c b/src/host/layer23/src/misc/bcch_scan.c index 4636c9ab..3ba3a1cd 100644 --- a/src/host/layer23/src/misc/bcch_scan.c +++ b/src/host/layer23/src/misc/bcch_scan.c @@ -153,7 +153,8 @@ static int _cinfo_start_arfcn(unsigned int band_arfcn) /* ask L1 to try to tune to new ARFCN */ /* FIXME: decode band */ rc = l1ctl_tx_fbsb_req(fps.ms, band_arfcn, - L1CTL_FBSB_F_FB01SB, 100, 0, CCCH_MODE_COMBINED); + L1CTL_FBSB_F_FB01SB, 100, 0, CCCH_MODE_COMBINED, + fps.arfcn_state[band_arfcn].rxlev); if (rc < 0) return rc; diff --git a/src/host/layer23/src/misc/cell_log.c b/src/host/layer23/src/misc/cell_log.c index aa964f48..afd532a4 100644 --- a/src/host/layer23/src/misc/cell_log.c +++ b/src/host/layer23/src/misc/cell_log.c @@ -343,7 +343,7 @@ static void start_sync(void) state = SCAN_STATE_SYNC; l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); l1ctl_tx_fbsb_req(ms, arfcn, L1CTL_FBSB_F_FB01SB, 100, 0, - CCCH_MODE_NONE); + CCCH_MODE_NONE, pm[arfcn].rxlev); } static void start_pm(void) |