blob: 7183b173e5c8d01bf5bd838ac2ace6b81c05950b [file] [log] [blame]
Sylvain Munaut12ba7782014-06-16 10:13:40 +02001#pragma once
Harald Welte63d3e392010-03-06 11:34:27 +01002
3#define NUM_RXLEVS 32
4#define NUM_ARFCNS 1024
5
6struct rxlev_stats {
7 /* the maximum number of ARFCN's is 1024, and there are 32 RxLevels,
8 * so in we keep one 1024bit-bitvec for each RxLev */
9 uint8_t rxlev_buckets[NUM_RXLEVS][NUM_ARFCNS/8];
10};
11
12void rxlev_stat_input(struct rxlev_stats *st, uint16_t arfcn, uint8_t rxlev);
13
14/* get the next ARFCN that has the specified Rxlev */
15int16_t rxlev_stat_get_next(const struct rxlev_stats *st, uint8_t rxlev, int16_t arfcn);
16
17void rxlev_stat_reset(struct rxlev_stats *st);
18
19void rxlev_stat_dump(const struct rxlev_stats *st);