nl80211: add "band" to iwinfo_freqlist_entry

So that consumers don't have to fiddle around with mapping frequencies
to bands, which everyone seems to do a little differently.

Note: This changes the ABI.

Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
Andre Heider 2022-11-21 13:48:43 +01:00 committed by Christian Marangi
parent dba0f0690b
commit 0d5ea34245
No known key found for this signature in database
GPG key ID: AC001D09ADBFEAD7
2 changed files with 2 additions and 0 deletions

View file

@ -271,6 +271,7 @@ struct iwinfo_txpwrlist_entry {
};
struct iwinfo_freqlist_entry {
uint8_t band;
uint8_t channel;
uint32_t mhz;
uint8_t restricted;

View file

@ -3009,6 +3009,7 @@ static int nl80211_get_freqlist_cb(struct nl_msg *msg, void *arg)
freqs[NL80211_FREQUENCY_ATTR_DISABLED])
continue;
e->band = nl80211_get_band(band->nla_type);
e->mhz = nla_get_u32(freqs[NL80211_FREQUENCY_ATTR_FREQ]);
e->channel = nl80211_freq2channel(e->mhz);