o add IEEE80211_IOC_FRAGTHRESHOLD for getting+setting the
tx fragmentation threshold o fix bounds checking on IEEE80211_IOC_RTSTHRESHOLD MFC after: 3 days
This commit is contained in:
parent
33acb1cec1
commit
70231e3d0a
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user