utils: cleanup

Move some RRM utility functions around to simplify code structure / #includes.

[fix commit message]
Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
Ian Clowes 2022-01-31 10:47:32 +00:00 committed by Nick Hainke
parent 0e4fc507cb
commit c13c285bdd
5 changed files with 72 additions and 91 deletions

View file

@ -3,6 +3,23 @@
#include <stdint.h>
#ifndef BIT
#define BIT(x) (1U << (x))
#endif
#define WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE BIT(4)
#define WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE BIT(5)
#define WLAN_RRM_CAPS_BEACON_REPORT_TABLE BIT(6)
#define DEFAULT_RRM_MODE_ORDER "pat"
#define RRM_MODE_COUNT 3
enum rrm_beacon_rqst_mode {
RRM_BEACON_RQST_MODE_PASSIVE,
RRM_BEACON_RQST_MODE_ACTIVE,
RRM_BEACON_RQST_MODE_BEACON_TABLE,
__RRM_BEACON_RQST_MODE_MAX
};
/**
* Calculate bitrate using the supported rates values.
* @param supp_rate_val
@ -24,4 +41,12 @@ double iee80211_calculate_expected_throughput_mbit(int exp_thr);
*/
int rcpi_to_rssi(int rcpi);
/**
* Convert mode string to array of RRM masks
* @param rrm_mode_order
* @param mode_string
* @return
*/
int parse_rrm_mode(int* rrm_mode_order, const char* mode_string);
#endif //DAWN_IEEE80211_UTILS_H