summaryrefslogtreecommitdiffstats
path: root/sys/net80211
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-07-22 17:00:48 +0000
committersam <sam@FreeBSD.org>2005-07-22 17:00:48 +0000
commitecefd1689dd5edd0ce18705368e6efe6d4418a38 (patch)
treeae69b422a5f1c179d58b7895e028a4d971711c80 /sys/net80211
parent6f738197e30b168d8c1ed5190c408fc80bd58984 (diff)
downloadFreeBSD-src-ecefd1689dd5edd0ce18705368e6efe6d4418a38.zip
FreeBSD-src-ecefd1689dd5edd0ce18705368e6efe6d4418a38.tar.gz
o add IEEE80211_IOC_FRAGTHRESHOLD for getting+setting the
tx fragmentation threshold o fix bounds checking on IEEE80211_IOC_RTSTHRESHOLD MFC after: 3 days
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_ioctl.c17
-rw-r--r--sys/net80211/ieee80211_ioctl.h1
2 files changed, 16 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 017c927..2a47920 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -1454,6 +1454,9 @@ ieee80211_ioctl_get80211(struct ieee80211com *ic, u_long cmd, struct ieee80211re
case IEEE80211_IOC_PUREG:
ireq->i_val = (ic->ic_flags & IEEE80211_F_PUREG) != 0;
break;
+ case IEEE80211_IOC_FRAGTHRESHOLD:
+ ireq->i_val = ic->ic_fragthreshold;
+ break;
default:
error = EINVAL;
break;
@@ -2089,8 +2092,8 @@ ieee80211_ioctl_set80211(struct ieee80211com *ic, u_long cmd, struct ieee80211re
error = IS_UP(ic) ? ic->ic_reset(ic->ic_ifp) : 0;
break;
case IEEE80211_IOC_RTSTHRESHOLD:
- if (!(IEEE80211_RTS_MIN < ireq->i_val &&
- ireq->i_val < IEEE80211_RTS_MAX))
+ if (!(IEEE80211_RTS_MIN <= ireq->i_val &&
+ ireq->i_val <= IEEE80211_RTS_MAX))
return EINVAL;
ic->ic_rtsthreshold = ireq->i_val;
error = IS_UP(ic) ? ic->ic_reset(ic->ic_ifp) : 0;
@@ -2328,6 +2331,16 @@ ieee80211_ioctl_set80211(struct ieee80211com *ic, u_long cmd, struct ieee80211re
if (ic->ic_curmode == IEEE80211_MODE_11G)
error = ENETRESET;
break;
+ case IEEE80211_IOC_FRAGTHRESHOLD:
+ if ((ic->ic_caps & IEEE80211_C_TXFRAG) == 0 &&
+ ireq->i_val != IEEE80211_FRAG_MAX)
+ return EINVAL;
+ if (!(IEEE80211_FRAG_MIN <= ireq->i_val &&
+ ireq->i_val <= IEEE80211_FRAG_MAX))
+ return EINVAL;
+ ic->ic_fragthreshold = ireq->i_val;
+ error = IS_UP(ic) ? ic->ic_reset(ic->ic_ifp) : 0;
+ break;
default:
error = EINVAL;
break;
diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h
index 658bd56..3430020 100644
--- a/sys/net80211/ieee80211_ioctl.h
+++ b/sys/net80211/ieee80211_ioctl.h
@@ -427,6 +427,7 @@ struct ieee80211req {
#define IEEE80211_IOC_ADDMAC 54 /* add sta to MAC ACL table */
#define IEEE80211_IOC_DELMAC 55 /* del sta from MAC ACL table */
#define IEEE80211_IOC_PUREG 56 /* pure 11g (no 11b stations) */
+#define IEEE80211_IOC_FRAGTHRESHOLD 73 /* tx fragmentation threshold */
/*
* Scan result data returned for IEEE80211_IOC_SCAN_RESULTS.
OpenPOWER on IntegriCloud