From: Yu Watanabe Date: Sun, 13 Feb 2022 18:19:29 +0000 (+0900) Subject: wifi-util: introduce nl80211_iftype_from_string() X-Git-Tag: v251-rc1~280^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4d55e83643eed49474db392aecc9834477d294c;p=thirdparty%2Fsystemd.git wifi-util: introduce nl80211_iftype_from_string() --- diff --git a/src/shared/wifi-util.c b/src/shared/wifi-util.c index cf0f5625508..d32bb5d704a 100644 --- a/src/shared/wifi-util.c +++ b/src/shared/wifi-util.c @@ -153,7 +153,7 @@ static const char * const nl80211_iftype_table[NUM_NL80211_IFTYPES] = { [NL80211_IFTYPE_NAN] = "nan", }; -DEFINE_STRING_TABLE_LOOKUP_TO_STRING(nl80211_iftype, enum nl80211_iftype); +DEFINE_STRING_TABLE_LOOKUP(nl80211_iftype, enum nl80211_iftype); static const char * const nl80211_cmd_table[__NL80211_CMD_AFTER_LAST] = { [NL80211_CMD_GET_WIPHY] = "get_wiphy", diff --git a/src/shared/wifi-util.h b/src/shared/wifi-util.h index 8afd1a4ec33..a762fbcd462 100644 --- a/src/shared/wifi-util.h +++ b/src/shared/wifi-util.h @@ -12,4 +12,5 @@ int wifi_get_interface(sd_netlink *genl, int ifindex, enum nl80211_iftype *ret_i int wifi_get_station(sd_netlink *genl, int ifindex, struct ether_addr *ret_bssid); const char *nl80211_iftype_to_string(enum nl80211_iftype iftype) _const_; +enum nl80211_iftype nl80211_iftype_from_string(const char *s) _pure_; const char *nl80211_cmd_to_string(int cmd) _const_;