airtime_policy.h revision 351377
1160994Ssam/*
2160994Ssam * Airtime policy configuration
3160994Ssam * Copyright (c) 2018-2019, Toke H��iland-J��rgensen <toke@toke.dk>
4160994Ssam *
5160994Ssam * This software may be distributed under the terms of the BSD license.
6160994Ssam * See README for more details.
7160994Ssam */
8160994Ssam
9160994Ssam#ifndef AIRTIME_POLICY_H
10160994Ssam#define AIRTIME_POLICY_H
11160994Ssam
12160994Ssamstruct hostapd_iface;
13160994Ssam
14160994Ssam#ifdef CONFIG_AIRTIME_POLICY
15160994Ssam
16160994Ssam#define AIRTIME_DEFAULT_UPDATE_INTERVAL 200 /* ms */
17160994Ssam#define AIRTIME_BACKLOG_EXPIRY_FACTOR 2500 /* 2.5 intervals + convert to usec */
18160994Ssam
19160994Ssam/* scale quantum so this becomes the effective quantum after applying the max
20160994Ssam * weight, but never go below min or above max */
21160994Ssam#define AIRTIME_QUANTUM_MIN 8 /* usec */
22160994Ssam#define AIRTIME_QUANTUM_MAX 256 /* usec */
23160994Ssam#define AIRTIME_QUANTUM_TARGET 1024 /* usec */
24160994Ssam
25160994Ssamint airtime_policy_new_sta(struct hostapd_data *hapd, struct sta_info *sta);
26160994Ssamint airtime_policy_update_init(struct hostapd_iface *iface);
27160994Ssamvoid airtime_policy_update_deinit(struct hostapd_iface *iface);
28160994Ssam
29160994Ssam#else /* CONFIG_AIRTIME_POLICY */
30160994Ssam
31160994Ssamstatic inline int airtime_policy_new_sta(struct hostapd_data *hapd,
32160994Ssam					 struct sta_info *sta)
33160994Ssam{
34160994Ssam	return -1;
35160994Ssam}
36160994Ssam
37160994Ssamstatic inline int airtime_policy_update_init(struct hostapd_iface *iface)
38160994Ssam{
39160994Ssam	return -1;
40160994Ssam}
41160994Ssam
42160994Ssamstatic inline void airtime_policy_update_deinit(struct hostapd_iface *iface)
43160994Ssam{
44160994Ssam}
45160994Ssam
46160994Ssam#endif /* CONFIG_AIRTIME_POLICY */
47160994Ssam
48160994Ssam#endif /* AIRTIME_POLICY_H */
49160994Ssam