Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
const char * iwinfo_type(const char *ifname);
const struct iwinfo_ops * iwinfo_backend(const char *ifname);
+const struct iwinfo_ops * iwinfo_backend_by_name(const char *name);
void iwinfo_finish(void);
extern const struct iwinfo_ops wext_ops;
return NULL;
}
+const struct iwinfo_ops * iwinfo_backend_by_name(const char *name)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(backends); i++)
+ if (!strcmp(backends[i]->name, name))
+ return backends[i];
+
+ return NULL;
+}
+
void iwinfo_finish(void)
{
int i;