diff options
author | sam <sam@FreeBSD.org> | 2005-12-14 19:32:53 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-12-14 19:32:53 +0000 |
commit | 7fcf256cd8e3d55bb6e44e883a134573d8323ece (patch) | |
tree | ad1f3ae2b416d74a9a25882cbc2ddcd1b1a7cd93 /sys/net80211 | |
parent | 2709861276e65d6acea86610b8408ed01eaec2e5 (diff) | |
download | FreeBSD-src-7fcf256cd8e3d55bb6e44e883a134573d8323ece.zip FreeBSD-src-7fcf256cd8e3d55bb6e44e883a134573d8323ece.tar.gz |
make packet bursting configurable (default to on if device is capable)
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211.c | 2 | ||||
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 12 | ||||
-rw-r--r-- | sys/net80211/ieee80211_ioctl.h | 1 | ||||
-rw-r--r-- | sys/net80211/ieee80211_proto.c | 2 | ||||
-rw-r--r-- | sys/net80211/ieee80211_var.h | 1 |
5 files changed, 17 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 9b1fa0b..69e564b 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -184,6 +184,8 @@ ieee80211_ifattach(struct ieee80211com *ic) if (ic->ic_caps & IEEE80211_C_WME) ic->ic_flags |= IEEE80211_F_WME; #endif + if (ic->ic_caps & IEEE80211_C_BURST) + ic->ic_flags |= IEEE80211_F_BURST; (void) ieee80211_setmode(ic, ic->ic_curmode); if (ic->ic_bintval == 0) diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 4c1aac2..0ec45c9 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1489,6 +1489,9 @@ ieee80211_ioctl_get80211(struct ieee80211com *ic, u_long cmd, struct ieee80211re case IEEE80211_IOC_MACCMD: error = ieee80211_ioctl_getmaccmd(ic, ireq); break; + case IEEE80211_IOC_BURST: + ireq->i_val = (ic->ic_flags & IEEE80211_F_BURST) != 0; + break; default: error = EINVAL; break; @@ -2382,6 +2385,15 @@ ieee80211_ioctl_set80211(struct ieee80211com *ic, u_long cmd, struct ieee80211re ic->ic_fragthreshold = ireq->i_val; error = IS_UP(ic) ? ic->ic_reset(ic->ic_ifp) : 0; break; + case IEEE80211_IOC_BURST: + if (ireq->i_val) { + if ((ic->ic_caps & IEEE80211_C_BURST) == 0) + return EINVAL; + ic->ic_flags |= IEEE80211_F_BURST; + } else + ic->ic_flags &= ~IEEE80211_F_BURST; + error = ENETRESET; /* XXX maybe not for station? */ + break; default: error = EINVAL; break; diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h index 86da41e..98fe16f 100644 --- a/sys/net80211/ieee80211_ioctl.h +++ b/sys/net80211/ieee80211_ioctl.h @@ -444,6 +444,7 @@ struct ieee80211req { #define IEEE80211_IOC_PUREG 56 /* pure 11g (no 11b stations) */ #define IEEE80211_IOC_MCAST_RATE 72 /* tx rate for mcast frames */ #define IEEE80211_IOC_FRAGTHRESHOLD 73 /* tx fragmentation threshold */ +#define IEEE80211_IOC_BURST 75 /* packet bursting */ /* * Scan result data returned for IEEE80211_IOC_SCAN_RESULTS. diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index f7834f9..991a6c2 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -752,7 +752,7 @@ ieee80211_wme_updateparams_locked(struct ieee80211com *ic) chanp->wmep_logcwmax = bssp->wmep_logcwmax = phyParam[ic->ic_curmode].logcwmax; chanp->wmep_txopLimit = bssp->wmep_txopLimit = - (ic->ic_caps & IEEE80211_C_BURST) ? + (ic->ic_flags & IEEE80211_F_BURST) ? phyParam[ic->ic_curmode].txopLimit : 0; IEEE80211_DPRINTF(ic, IEEE80211_MSG_WME, "%s: %s [acm %u aifsn %u log2(cwmin) %u " diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 3c918f5..e056a3f 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -212,6 +212,7 @@ struct ieee80211com { /* NB: bits 0x4c available */ #define IEEE80211_F_FF 0x00000001 /* CONF: ATH FF enabled */ #define IEEE80211_F_TURBOP 0x00000002 /* CONF: ATH Turbo enabled*/ +#define IEEE80211_F_BURST 0x00000004 /* CONF: bursting enabled */ /* NB: this is intentionally setup to be IEEE80211_CAPINFO_PRIVACY */ #define IEEE80211_F_PRIVACY 0x00000010 /* CONF: privacy enabled */ #define IEEE80211_F_PUREG 0x00000020 /* CONF: 11g w/o 11b sta's */ |