mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
change exp thr to mbit/sec
This commit is contained in:
parent
4e975b5829
commit
28c71fa44e
3 changed files with 13 additions and 1 deletions
|
@ -10,4 +10,11 @@
|
|||
*/
|
||||
double iee80211_calculate_bitrate(uint8_t supp_rate_val);
|
||||
|
||||
/**
|
||||
* Calculate expected throughput in Mbit/sec.
|
||||
* @param exp_thr
|
||||
* @return
|
||||
*/
|
||||
double iee80211_calculate_expected_throughput_mbit(int exp_thr)
|
||||
|
||||
#endif //DAWN_IEEE80211_UTILS_H
|
||||
|
|
|
@ -419,7 +419,7 @@ void kick_clients(uint8_t bssid[], uint32_t id) {
|
|||
// update rssi
|
||||
int rssi = get_rssi_iwinfo(client_array[j].client_addr);
|
||||
int exp_thr = get_expected_throughput_iwinfo(client_array[j].client_addr);
|
||||
printf("Expectd throughput %d\n", exp_thr);
|
||||
printf("Expectd throughput %f Mbit/sec\n", iee80211_calculate_expected_throughput_mbit(exp_thr));
|
||||
|
||||
if (rssi != INT_MIN) {
|
||||
pthread_mutex_unlock(&probe_array_mutex);
|
||||
|
|
|
@ -6,3 +6,8 @@ double iee80211_calculate_bitrate(uint8_t supp_rate_val)
|
|||
{
|
||||
return ((double) supp_rate_val) / 2;
|
||||
}
|
||||
|
||||
double iee80211_calculate_expected_throughput_mbit(int exp_thr)
|
||||
{
|
||||
return (((double) exp_thr)/ 1000);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue