| 953 | } |
| 954 | |
| 955 | static void |
| 956 | set80211wepkey(const char *val, int d, int s, const struct afswtch *rafp) |
| 957 | { |
| 958 | int key = 0; |
| 959 | int len; |
| 960 | u_int8_t data[IEEE80211_KEYBUF_SIZE]; |
| 961 | |
| 962 | if (isdigit((int)val[0]) && val[1] == ':') { |
| 963 | key = atoi(val)-1; |
| 964 | val += 2; |
| 965 | } |
| 966 | |
| 967 | bzero(data, sizeof(data)); |
| 968 | len = sizeof(data); |
| 969 | get_string(val, NULL, data, &len); |
| 970 | |
| 971 | set80211(s, IEEE80211_IOC_WEPKEY, key, len, data); |
| 972 | } |
| 973 | |
| 974 | /* |
| 975 | * This function is purely a NetBSD compatibility interface. The NetBSD |
nothing calls this directly
no test coverage detected