Skip to content
Snippets Groups Projects
Commit 665809c7 authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

nl80211: implement lookup_phy() op


Signed-off-by: default avatarJo-Philipp Wich <jow@openwrt.org>
parent d051a0bf
No related branches found
No related tags found
No related merge requests found
...@@ -2575,6 +2575,17 @@ static int nl80211_get_frequency_offset(const char *ifname, int *buf) ...@@ -2575,6 +2575,17 @@ static int nl80211_get_frequency_offset(const char *ifname, int *buf)
return 0; return 0;
} }
static int nl80211_lookup_phyname(const char *section, char *buf)
{
int idx;
if ((idx = nl80211_phy_idx_from_uci(section)) < 0)
return -1;
sprintf(buf, "phy%d", idx);
return 0;
}
const struct iwinfo_ops nl80211_ops = { const struct iwinfo_ops nl80211_ops = {
.name = "nl80211", .name = "nl80211",
.probe = nl80211_probe, .probe = nl80211_probe,
...@@ -2603,5 +2614,6 @@ const struct iwinfo_ops nl80211_ops = { ...@@ -2603,5 +2614,6 @@ const struct iwinfo_ops nl80211_ops = {
.scanlist = nl80211_get_scanlist, .scanlist = nl80211_get_scanlist,
.freqlist = nl80211_get_freqlist, .freqlist = nl80211_get_freqlist,
.countrylist = nl80211_get_countrylist, .countrylist = nl80211_get_countrylist,
.lookup_phy = nl80211_lookup_phyname,
.close = nl80211_close .close = nl80211_close
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment