MCPcopy Index your code
hub / github.com/F-Stack/f-stack / set80211powersavemode

Function set80211powersavemode

tools/ifconfig/ifieee80211.c:877–897  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

875}
876
877static void
878set80211powersavemode(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
899static void
900set80211powersave(const char *val, int d, int s, const struct afswtch *rafp)

Callers

nothing calls this directly

Calls 2

strcasecmpFunction · 0.85
set80211Function · 0.85

Tested by

no test coverage detected