3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-29 05:39:24 +01:00

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
This commit is contained in:
Denis Kenzior 2019-07-10 16:42:06 -05:00
parent fcb2d123bc
commit de131b54b8

View File

@ -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;