| 875 | } |
| 876 | |
| 877 | static void |
| 878 | set80211powersavemode(const char *val, int d, int s, const struct afswtch *rafp) |
| 879 | { |
| 880 | int mode; |
| 881 | |
| 882 | if (strcasecmp(val, "off") == 0) { |
| 883 | mode = IEEE80211_POWERSAVE_OFF; |
| 884 | } else if (strcasecmp(val, "on") == 0) { |
| 885 | mode = IEEE80211_POWERSAVE_ON; |
| 886 | } else if (strcasecmp(val, "cam") == 0) { |
| 887 | mode = IEEE80211_POWERSAVE_CAM; |
| 888 | } else if (strcasecmp(val, "psp") == 0) { |
| 889 | mode = IEEE80211_POWERSAVE_PSP; |
| 890 | } else if (strcasecmp(val, "psp-cam") == 0) { |
| 891 | mode = IEEE80211_POWERSAVE_PSP_CAM; |
| 892 | } else { |
| 893 | errx(1, "unknown powersavemode"); |
| 894 | } |
| 895 | |
| 896 | set80211(s, IEEE80211_IOC_POWERSAVE, mode, 0, NULL); |
| 897 | } |
| 898 | |
| 899 | static void |
| 900 | set80211powersave(const char *val, int d, int s, const struct afswtch *rafp) |
nothing calls this directly
no test coverage detected