mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
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:
parent
0e4fc507cb
commit
8bae43c811
5 changed files with 72 additions and 91 deletions
|
|
@ -6,21 +6,13 @@
|
|||
#include <time.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "ieee80211_utils.h"
|
||||
#include "mac_utils.h"
|
||||
#include "utils.h"
|
||||
|
||||
/* Mac */
|
||||
|
||||
// ---------------- Defines -------------------
|
||||
#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
|
||||
};
|
||||
|
||||
// ---------------- Global variables ----------------
|
||||
extern struct mac_entry_s *mac_set;
|
||||
|
|
@ -212,12 +204,6 @@ typedef struct auth_entry_s assoc_entry;
|
|||
#define NR_OP_CLASS 20
|
||||
#define NR_CHANNEL 22
|
||||
#define NR_PHY 24
|
||||
#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)
|
||||
|
||||
// ---------------- Global variables ----------------
|
||||
extern struct auth_entry_s *denied_req_set;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue