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

netdev: simplify

This commit is contained in:
Denis Kenzior 2016-07-19 17:52:36 -05:00
parent 480332226d
commit 1c5438d3ab

View File

@ -370,29 +370,27 @@ static void netdev_rekey_offload_event(struct l_genl_msg *msg,
return; return;
while (l_genl_attr_next(&attr, &type, &len, &data)) { while (l_genl_attr_next(&attr, &type, &len, &data)) {
switch (type) { if (type != NL80211_ATTR_REKEY_DATA)
case NL80211_ATTR_REKEY_DATA: continue;
if (!l_genl_attr_recurse(&attr, &nested))
return;
while (l_genl_attr_next(&nested, &type, &len, &data)) { if (!l_genl_attr_recurse(&attr, &nested))
switch (type) { return;
case NL80211_REKEY_DATA_REPLAY_CTR:
if (len != sizeof(uint64_t)) while (l_genl_attr_next(&nested, &type, &len, &data)) {
l_warn("Invalid replay_ctr"); if (type != NL80211_REKEY_DATA_REPLAY_CTR)
else { continue;
replay_ctr = *((uint64_t *)
data); if (len != sizeof(uint64_t)) {
__eapol_update_replay_counter( l_warn("Invalid replay_ctr");
netdev->index, return;
}
replay_ctr = *((uint64_t *) data);
__eapol_update_replay_counter(netdev->index,
netdev->addr, netdev->addr,
netdev->remote_addr, netdev->remote_addr,
replay_ctr); replay_ctr);
} return;
break;
}
}
} }
} }
} }