From 4cd568babf36c8d7cb11399cf1b3f98e7efdd7a3 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Tue, 16 Jun 2020 00:28:08 +0000 Subject: [net80211] Add uapsd option to ifconfig Add an enable/disable option for controlling uapsd. I'm not yet controlling the individual AC configs or the service period. --- sbin/ifconfig/ifieee80211.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'sbin/ifconfig/ifieee80211.c') diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index dcb91e0441da..0adbc67f6d54 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -1804,6 +1804,12 @@ set80211ldpc(const char *val, int d, int s, const struct afswtch *rafp) set80211(s, IEEE80211_IOC_LDPC, ldpc, 0, NULL); } +static void +set80211uapsd(const char *val, int d, int s, const struct afswtch *rafp) +{ + set80211(s, IEEE80211_IOC_UAPSD, d, 0, NULL); +} + static DECL_CMD_FUNC(set80211ampdulimit, val, d) { @@ -5288,6 +5294,16 @@ end: break; } } + if (get80211val(s, IEEE80211_IOC_UAPSD, &val) != -1) { + switch (val) { + case 0: + LINE_CHECK("-uapsd"); + break; + case 1: + LINE_CHECK("uapsd"); + break; + } + } } if (IEEE80211_IS_CHAN_VHT(c) || verbose) { @@ -5872,6 +5888,8 @@ static struct cmd ieee80211_cmds[] = { DEF_CMD("-ldpctx", -1, set80211ldpc), DEF_CMD("ldpc", 3, set80211ldpc), /* NB: tx+rx */ DEF_CMD("-ldpc", -3, set80211ldpc), + DEF_CMD("uapsd", 1, set80211uapsd), + DEF_CMD("-uapsd", 0, set80211uapsd), DEF_CMD("puren", 1, set80211puren), DEF_CMD("-puren", 0, set80211puren), DEF_CMD("doth", 1, set80211doth), -- cgit v1.2.3