3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 04:32:37 +01:00

core: Store feature flags of wiphy devices

This commit is contained in:
Marcel Holtmann 2014-08-07 15:41:30 -07:00
parent c9b3adbbcf
commit 218e38aa87

View File

@ -46,6 +46,7 @@ struct netdev {
struct wiphy {
uint32_t id;
char name[20];
uint32_t feature_flags;
struct l_queue *netdev_list;
};
@ -253,6 +254,20 @@ static void wiphy_dump_callback(struct l_genl_msg *msg, void *user_data)
memcpy(wiphy->name, data, len);
break;
case NL80211_ATTR_FEATURE_FLAGS:
if (!wiphy) {
l_warn("No wiphy structure found");
return;
}
if (len != sizeof(uint32_t)) {
l_warn("Invalid feature flags attribute");
return;
}
wiphy->feature_flags = *((uint32_t *) data);
break;
}
}
}