diff options
author | Felix Fietkau <nbd@nbd.name> | 2024-07-09 17:53:30 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2024-07-09 17:53:32 +0200 |
commit | abc2aef2864132bbf07dd2607f41c189f81b1c21 (patch) | |
tree | a65ec93496068a79ef074952f2b2e9cc8e2747c3 /lib | |
parent | 6ff24d5488a9aca426e5cb5a48de19b8fb6b433a (diff) |
nl80211: add wiphy multi-radio support
Support new attributes that describe multiple radios belonging to a single
wiphy.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nl80211.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/nl80211.c b/lib/nl80211.c index 3d2f6e2..fcaffb7 100644 --- a/lib/nl80211.c +++ b/lib/nl80211.c @@ -808,9 +808,28 @@ static const uc_nl_nested_spec_t nl80211_mpath_info_nla = { } }; +static const uc_nl_nested_spec_t nl80211_radio_freq_range_nla = { + .headsize = 0, + .nattrs = 2, + .attrs = { + { NL80211_WIPHY_RADIO_FREQ_ATTR_START, "start", DT_U32, 0, NULL }, + { NL80211_WIPHY_RADIO_FREQ_ATTR_END, "end", DT_U32, 0, NULL }, + } +}; + +static const uc_nl_nested_spec_t nl80211_wiphy_radio_nla = { + .headsize = 0, + .nattrs = 3, + .attrs = { + { NL80211_WIPHY_RADIO_ATTR_INDEX, "index", DT_U32, 0, NULL }, + { NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE, "freq_ranges", DT_NESTED, DF_REPEATED, &nl80211_radio_freq_range_nla }, + { NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION, "interface_combinations", DT_NESTED, DF_REPEATED, &nl80211_ifcomb_nla }, + } +}; + static const uc_nl_nested_spec_t nl80211_msg = { .headsize = 0, - .nattrs = 127, + .nattrs = 128, .attrs = { { NL80211_ATTR_4ADDR, "4addr", DT_U8, 0, NULL }, { NL80211_ATTR_AIRTIME_WEIGHT, "airtime_weight", DT_U16, 0, NULL }, @@ -939,6 +958,7 @@ static const uc_nl_nested_spec_t nl80211_msg = { { NL80211_ATTR_SOFTWARE_IFTYPES, "software_iftypes", DT_NESTED, 0, &nl80211_ifcomb_limit_types_nla }, { NL80211_ATTR_MAX_AP_ASSOC_STA, "max_ap_assoc", DT_U16, 0, NULL }, { NL80211_ATTR_SURVEY_INFO, "survey_info", DT_NESTED, 0, &nl80211_survey_info_nla }, + { NL80211_ATTR_WIPHY_RADIOS, "radios", DT_NESTED, DF_MULTIPLE|DF_AUTOIDX, &nl80211_wiphy_radio_nla }, } }; |