mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
core: Store feature flags of wiphy devices
This commit is contained in:
parent
c9b3adbbcf
commit
218e38aa87
15
src/wiphy.c
15
src/wiphy.c
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user