mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
wiphy: use HE element for data rate estimation
If an HE element is found, prefer using this for the rate estimation since it will likely yield the fastest rate.
This commit is contained in:
parent
43db085ef1
commit
4e55447a60
12
src/wiphy.c
12
src/wiphy.c
@ -788,6 +788,7 @@ int wiphy_estimate_data_rate(struct wiphy *wiphy,
|
||||
const void *vht_operation = NULL;
|
||||
const void *ht_capabilities = NULL;
|
||||
const void *ht_operation = NULL;
|
||||
const void *he_capabilities = NULL;
|
||||
const struct band *bandp;
|
||||
enum band_freq band;
|
||||
|
||||
@ -847,11 +848,22 @@ int wiphy_estimate_data_rate(struct wiphy *wiphy,
|
||||
|
||||
vht_operation = iter.data - 2;
|
||||
break;
|
||||
case IE_TYPE_HE_CAPABILITIES:
|
||||
if (!ie_validate_he_capabilities(iter.data, iter.len))
|
||||
return -EBADMSG;
|
||||
|
||||
he_capabilities = iter.data;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!band_estimate_he_rx_rate(bandp, he_capabilities,
|
||||
bss->signal_strength / 100,
|
||||
out_data_rate))
|
||||
return 0;
|
||||
|
||||
if (!band_estimate_vht_rx_rate(bandp, vht_capabilities, vht_operation,
|
||||
ht_capabilities, ht_operation,
|
||||
bss->signal_strength / 100,
|
||||
|
Loading…
Reference in New Issue
Block a user