path: root/src/osmo-bts-sysmo/eeprom.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-07sysmobts: support eeprom map version 2Minh-Quang Nguyen1-61/+438
[hfreyther: Accept the mixing of whitespace to ease future merges]
2014-12-16eeprom: Fix brown paper bag introduced a long while agoHolger Hans Peter Freyther1-1/+1
91d204e2db8f53a6ae4827ecc4b0ccb0137375d0 while adding checks to resolve coverity issues. We simply had no one writing to the eeprom so this was unnoticed for a long time.
2013-12-28misc: Avoid using double numbers on our ARMHolger Hans Peter Freyther1-4/+4
In the perf the ARM EABI ddiv operation showed up in the most of expensive symbols. It doesn't really make much sense as the calls should only be done on configuration.
2013-12-12sysmobts: Fix resource leak in the error conditionHolger Hans Peter Freyther1-0/+1
Fixes: Coverity CID 1047336
2013-07-16eeprom: Check the return value of the fseek in all callsHolger Hans Peter Freyther1-3/+20
Coverity insists that we should check the return value of the calls to fseek. In general this is a good idea. Fixes: Coverity CID 1040770, CID 1040771, CID 1040772
2013-07-16eeprom: After eeprom_write g_file could point to a closed fileHolger Hans Peter Freyther1-0/+1
Calling eeprom_write would either re-use g_file or newly open the file and set g_file but it will close the file as well. This will lead to other code using fseek/fread on a closed file. On top of that the general rule for the eeprom code now is that read and write may not be mixed (due caching and other bits).
2013-07-04sysmobts: Cache the eeprom_Cfg_t for reading tx/rx calib dataHolger Hans Peter Freyther1-67/+75
The current code has 26 fseek/fread. Only the minority really results in a call to read. Nevertheless the time for reading during the bootstrap can take up to 7.82 seconds. Caching the header (which is already done by fopen/fread) will result in one call to fseek/fread and only consumes 0.784 seconds.
2013-07-04sysmobts: Add a method to free cached epprom resourcesHolger Hans Peter Freyther1-0/+7
Close the cached file descriptor once the calibration data is loaded and applied.
2013-07-01misc: Fix various warnings in the codeHolger Hans Peter Freyther1-1/+1
sysmobts_vty.c: In function 'activate_lchan': sysmobts_vty.c:373:3: warning: implicit declaration of function 'lchan_activate' [-Wimplicit-function-declaration] sysmobts_vty.c:375:3: warning: implicit declaration of function 'lchan_deactivate' [-Wimplicit-function-declaration] eeprom.c: In function 'eeprom_ReadEthAddr': eeprom.c:305:5: warning: pointer targets in passing argument 3 of 'eeprom_read' differ in signedness [-Wpointer-sign] eeprom.c:260:12: note: expected 'char *' but argument is of type 'uint8_t *'
2013-06-22calib: Add fixup for incompatible calib data / firmware versionHarald Welte1-0/+12
For certain sysmoBTS units, a fixup to the calibration table is needed, if the firmware is >= 3.3.0.
2013-06-22eeprom: wrap DISP_ERROR #ifdef/endif in PERROR() macroHarald Welte1-132/+50
This has the advantage that an user application might simply re-define the PERROR() macro rather than patching the code all over the place.
2013-06-22eeprom: cache the file descriptor instead of fopen/fclose all the timeHarald Welte1-14/+19
2013-06-22initial import of EEPROM calibration read routinesHarald Welte1-0/+1457