fix exp thr

This commit is contained in:
PolynomialDivision 2018-03-20 17:32:31 +01:00
parent 28c71fa44e
commit f8b5a7d652
2 changed files with 4 additions and 2 deletions

View file

@ -15,6 +15,6 @@ double iee80211_calculate_bitrate(uint8_t supp_rate_val);
* @param exp_thr * @param exp_thr
* @return * @return
*/ */
double iee80211_calculate_expected_throughput_mbit(int exp_thr) double iee80211_calculate_expected_throughput_mbit(int exp_thr);
#endif //DAWN_IEEE80211_UTILS_H #endif //DAWN_IEEE80211_UTILS_H

View file

@ -6,6 +6,7 @@
#include "ubus.h" #include "ubus.h"
#include "dawn_iwinfo.h" #include "dawn_iwinfo.h"
#include "utils.h" #include "utils.h"
#include "ieee80211_utils.h"
#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
@ -419,7 +420,8 @@ void kick_clients(uint8_t bssid[], uint32_t id) {
// update rssi // update rssi
int rssi = get_rssi_iwinfo(client_array[j].client_addr); int rssi = get_rssi_iwinfo(client_array[j].client_addr);
int exp_thr = get_expected_throughput_iwinfo(client_array[j].client_addr); int exp_thr = get_expected_throughput_iwinfo(client_array[j].client_addr);
printf("Expectd throughput %f Mbit/sec\n", iee80211_calculate_expected_throughput_mbit(exp_thr)); double exp_thr_tmp = iee80211_calculate_expected_throughput_mbit(exp_thr);
printf("Expectd throughput %f Mbit/sec\n", exp_thr_tmp);
if (rssi != INT_MIN) { if (rssi != INT_MIN) {
pthread_mutex_unlock(&probe_array_mutex); pthread_mutex_unlock(&probe_array_mutex);