aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/calib_file.c
AgeCommit message (Collapse)AuthorFilesLines
2024-02-17Fix license headers.Harald Welte1-1/+1
We have licensed the code under GNU Afffero Public License, and state that in the first paragraph as well as in the link to the license. However, a paragraph in the middle stated "see the GNU General Public License", which is somewhat misleading. Let's fix that. Change-Id: I37e503b195fe43e1da42c080900504ca8e682e76
2018-06-22sysmo: calib_file.c: Avoid decl of unused vars and funcs with femtobts_v2.7 ↵Pau Espin Pedrol1-19/+19
build Change-Id: I853ff6d3562c5852bff58a07e7c23d49329d9a4f
2016-02-15LC15/sysmobts: Don't try to refer to fl1h from PHY configHarald Welte1-3/+5
At the time the phy link / phy instance level VTY configuration commands are parsed, we did not yet call l1if_open() and thus pinst->u.{lc15,sysmobts}.hdl == NULL. PHY or PHY instance specific configuration must thus be stored inside the phy_link or phy_instance itself, and not inside the (not yet existing) handle. We solve this by moving around some parameters: * clk_use_eeprom/clk_cal/clk_src/calib_path get replicated in phy_instance * min_qual_{rach,norm} are moved into the generic part (which means that osmo-bts-octphy and osmo-bts-trx should also implement them)
2015-12-07sysmobts: Catch up with the API changes and specify the versionHolger Hans Peter Freyther1-0/+12
API revision 5.1 allows us to pass a version number for the rx/tx calibration and the DSP/FPGA will inform us about clock errors.
2014-08-24l1_if: pass private 'void *data' from call to callbackHarald Welte1-3/+5
When enqueueing a command towards the L1, we can now pass along a private data pointer, which then gets passed to the call-back upon completion.
2013-12-12sysmobts: Fix compiler warning by including utils.hHolger Hans Peter Freyther1-0/+1
calib_file.c: In function 'next_calib_file_idx': calib_file.c:126:3: warning: implicit declaration of function 'band_femto2osmo' [-Wimplicit-function-declaration]
2013-12-12sysmobts: Remove stray semicolon from the PCU band filtering code.Holger Hans Peter Freyther1-1/+1
The information from band_mask has never been used as the return was executed unconditionally. Fixes: Coverity CID 1113473
2013-10-28sysmobts calibration: Load further tables even if one failsHarald Welte1-1/+11
Even if one calibration table cannot be loaded, continue to try to load the other tables, instead of aborting very early.
2013-10-28sysmobts calibration: skip bands not supported by L1Harald Welte1-5/+24
If L1 tells us that a certain band is not supported, then there is no point in even trying to read+load calibration tables from EEPROM or files.
2013-10-28sysmbts calibration: print error if we fail to read from EEPROMHarald Welte1-2/+10
2013-07-16calib: The call to fscanf can fail and we should check the return valueHolger Hans Peter Freyther1-4/+14
Coverity wants us to check that fscanf has scanned the amount of variables we want to have. Initialize the scan result to 0/0.0f and warn if the scan has failed. Fixes: Coverity CID 1040774, CID 1040773
2013-07-04sysmobts: Add a method to free cached epprom resourcesHolger Hans Peter Freyther1-0/+1
Close the cached file descriptor once the calibration data is loaded and applied.
2013-07-04sysmobts: Read the mac and determine fixup only once during startHolger Hans Peter Freyther1-8/+24
2013-06-24calib: Attempt to fix the build for v2.7 of the api headersHolger Hans Peter Freyther1-0/+2
This should fix: calib_file.c: In function 'calib_eeprom_read': calib_file.c:262: error: 'SuperFemto_SetRxCalibTblReq_t' undeclared (first use in this function) calib_file.c:262: error: (Each undeclared identifier is reported only once calib_file.c:262: error: for each function it appears in.)
2013-06-24calib: Attempt to fix the build for v2.7 of the api headersHolger Hans Peter Freyther1-0/+2
This should fix: calib_file.c: In function 'calib_fixup_rx': calib_file.c:148: error: 'SuperFemto_SetRxCalibTblReq_t' undeclared (first use in this function) calib_file.c:148: error: (Each undeclared identifier is reported only once
2013-06-24sysmobts: Fix potential memory leaks in the prim callback handlingHolger Hans Peter Freyther1-0/+2
Make sure the l1msg is always freed in the callback. There were several error conditions were the msgb would not have been freed, in the case of the calib data and the system information the message was not freed even in normal condition. I will modify this code to __use a msgb. This allows to re-use the allocated msgb across read operations.
2013-06-22calib: Add fixup for incompatible calib data / firmware versionHarald Welte1-0/+49
For certain sysmoBTS units, a fixup to the calibration table is needed, if the firmware is >= 3.3.0.
2013-06-22calib: Read calibration data from EEPROM, not just filesHarald Welte1-3/+72
On v2D (and later) hardware, the calibration data can be read directly from the EEPROM and doesn't have to be read from files. If there is no trx-calib-path set in the VTY, we will read from EEPROM.
2013-02-27calib: Use 2.4.0 as cut-off for the firmware, log errorsHolger Hans Peter Freyther1-2/+6
In case opening a calibration file is failing an error will will be logged, the caller and implementation were inconsistent about the API version that is supported for the calibration data, attempt to make the cut-off at 2.4.0.
2013-02-27sysmobts: Remove the is_system_primitive from l1if_req_complHolger Hans Peter Freyther1-1/+1
All users (but the gsm_compl) of the l1if_req_compl use it with is_system_primitive=1. We can now remove this parameter from the method. Introduce _l1if_req_compl that will insert the item into the queue for us.
2013-02-27sysmobts: We can now pass the trx to the callback change the signaturesHolger Hans Peter Freyther1-3/+2
2013-02-27sysmobts: Remove the trx parameter from the signatureHolger Hans Peter Freyther1-1/+1
l1if_gsm_req_compl everyone is passing the trx as data pointer right now, remove it from the request procedure right now as it can be deducted from the femtol1_hdl.
2013-02-27sysmobts: Embed the calib state in the femtol1_hdl and use hdl->privHolger Hans Peter Freyther1-17/+9
2012-11-18Ensure osmo-bts builds agsainst sysmobts-v1 headers (again)Harald Welte1-0/+1
2012-10-28sysmobts: Add support for reading calibration tables0.1.0Harald Welte1-8/+80
'trx-calibration-path' is the new VTY command indicating the path name where the calibration files can be found. Calibration is only implemented for SUPERFEMTO API version 2.4.0 or later.
2012-10-27sysmobts: Add code to read calibration filesHarald Welte1-0/+202
... and convert them to L1 primitives. The code is not yet used.