commit de131b54b8571e766e53f54edc005826f305bad7
parent fcb2d123bcce2137b15ab19e0fd4e8feac388963
Author: Denis Kenzior <denkenz@gmail.com>
Date: Wed, 10 Jul 2019 16:42:06 -0500
netdev: Use RRM & send RM Enabled Capabilities IE
If supported by the wiphy and if the target AP supports Radio Management
capability, then send the relevant IE and set the USE_RRM flag on
nl80211
Diffstat:
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/netdev.c b/src/netdev.c
@@ -2225,7 +2225,7 @@ static struct l_genl_msg *netdev_build_cmd_connect(struct netdev *netdev,
{
uint32_t auth_type = NL80211_AUTHTYPE_OPEN_SYSTEM;
struct l_genl_msg *msg;
- struct iovec iov[3];
+ struct iovec iov[4];
int iov_elems = 0;
bool is_rsn = hs->supplicant_ie != NULL;
const uint8_t *extended_capabilities;
@@ -2300,6 +2300,19 @@ static struct l_genl_msg *netdev_build_cmd_connect(struct netdev *netdev,
NL80211_ATTR_CONTROL_PORT_OVER_NL80211,
0, NULL);
+ if (wiphy_rrm_capable(netdev->wiphy) &&
+ bss->capability & IE_BSS_CAP_RM) {
+ uint8_t rm_cap_ie[7] = { IE_TYPE_RM_ENABLED_CAPABILITIES, 5,
+ 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+ /* TODO: Send an empty IE for now */
+ iov[iov_elems].iov_base = rm_cap_ie;
+ iov[iov_elems].iov_len = rm_cap_ie[1] + 2;
+ iov_elems += 1;
+
+ l_genl_msg_append_attr(msg, NL80211_ATTR_USE_RRM, 0, NULL);
+ }
+
if (hs->mde) {
iov[iov_elems].iov_base = (void *) hs->mde;
iov[iov_elems].iov_len = hs->mde[1] + 2;