Date: Tue, 3 Feb 2004 23:03:48 -0800 (PST) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 46465 for review Message-ID: <200402040703.i1473mBL043121@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=46465 Change 46465 by sam@sam_ebb on 2004/02/03 23:03:29 o s/PROTECTION/PROTMODE/ o bounds check transmit power setting o sync w/ madwifi Affected files ... .. //depot/projects/netperf+sockets/sys/net80211/ieee80211_ioctl.c#16 edit .. //depot/projects/netperf+sockets/sys/net80211/ieee80211_ioctl.h#10 edit Differences ... ==== //depot/projects/netperf+sockets/sys/net80211/ieee80211_ioctl.c#16 (text+ko) ==== @@ -897,7 +897,7 @@ case IEEE80211_IOC_RTSTHRESHOLD: ireq->i_val = ic->ic_rtsthreshold; break; - case IEEE80211_IOC_PROTECTION: + case IEEE80211_IOC_PROTMODE: ireq->i_val = ic->ic_protmode; break; case IEEE80211_IOC_TXPOWER: @@ -1054,9 +1054,9 @@ ic->ic_rtsthreshold = ireq->i_val; error = ieee80211_reset(ic); break; - case IEEE80211_IOC_PROTECTION: - if (!(IEEE80211_PROTECTION_OFF <= ireq->i_val && - ireq->i_val <= IEEE80211_PROTECTION_RTSCTS)) { + case IEEE80211_IOC_PROTMODE: + if (!(IEEE80211_PROTMODE_OFF <= ireq->i_val && + ireq->i_val <= IEEE80211_PROTMODE_RTSCTS)) { error = EINVAL; break; } @@ -1065,6 +1065,11 @@ break; case IEEE80211_IOC_TXPOWER: /* XXX units? */ + if (!(IEEE80211_TXPOWER_MIN <= ireq->i_val && + ireq->i_val <= IEEE80211_TXPOWER_MAX)) { + error = EINVAL; + break; + } ic->ic_bss->ni_txpower = ireq->i_val; error = ieee80211_reset(ic); break; ==== //depot/projects/netperf+sockets/sys/net80211/ieee80211_ioctl.h#10 (text+ko) ==== @@ -164,11 +164,10 @@ #define IEEE80211_POWERSAVE_ON IEEE80211_POWERSAVE_CAM #define IEEE80211_IOC_POWERSAVESLEEP 11 #define IEEE80211_IOC_RTSTHRESHOLD 12 -#define IEEE80211_IOC_PROTECTION 13 -#define IEEE80211_PROTECTION_NOSUP -1 -#define IEEE80211_PROTECTION_OFF 0 -#define IEEE80211_PROTECTION_CTS 1 -#define IEEE80211_PROTECTION_RTSCTS 2 +#define IEEE80211_IOC_PROTMODE 13 +#define IEEE80211_PROTMODE_OFF 0 +#define IEEE80211_PROTMODE_CTS 1 +#define IEEE80211_PROTMODE_RTSCTS 2 #define IEEE80211_IOC_TXPOWER 14 #ifndef IEEE80211_CHAN_ANY @@ -190,7 +189,8 @@ enum { IEEE80211_PARAM_TURBO = 1, /* turbo mode */ IEEE80211_PARAM_MODE = 2, /* phy mode (11a, 11b, etc.) */ - IEEE80211_PARAM_AUTHMODE= 3 /* authentication mode */ + IEEE80211_PARAM_AUTHMODE= 3, /* authentication mode */ + IEEE80211_PARAM_PROTMODE= 4 /* 802.11g protection */ }; #define SIOCG80211STATS (SIOCDEVPRIVATE+2)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402040703.i1473mBL043121>