diff options
author | Sam Leffler <sam@FreeBSD.org> | 2004-03-30 22:57:57 +0000 |
---|---|---|
committer | Sam Leffler <sam@FreeBSD.org> | 2004-03-30 22:57:57 +0000 |
commit | 2e79ca976239826b5d0de8c01f1aff7935cc4097 (patch) | |
tree | 12a9053951f77d1b9be43ee6f17dddb55b7347a7 /sys/net80211/ieee80211_ioctl.c | |
parent | 7e88a151e0771c241ddfc8a422a24a4abd06a4b2 (diff) | |
download | src-2e79ca976239826b5d0de8c01f1aff7935cc4097.tar.gz src-2e79ca976239826b5d0de8c01f1aff7935cc4097.zip |
o add support for controlling the power of transmitted frames
o add support for controlling the 11g protection mechanism used
to protect OFDM frames in a mixed 11b/g network
Reviewed by: imp
Notes
Notes:
svn path=/head/; revision=127648
Diffstat (limited to 'sys/net80211/ieee80211_ioctl.c')
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 99779f237ab9..75995910d253 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -873,6 +873,15 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case IEEE80211_IOC_RTSTHRESHOLD: ireq->i_val = ic->ic_rtsthreshold; break; + case IEEE80211_IOC_PROTMODE: + ireq->i_val = ic->ic_protmode; + break; + case IEEE80211_IOC_TXPOWER: + if ((ic->ic_caps & IEEE80211_C_TXPMGT) == 0) + error = EINVAL; + else + ireq->i_val = ic->ic_txpower; + break; default: error = EINVAL; break; @@ -1015,6 +1024,29 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ic->ic_rtsthreshold = ireq->i_val; error = ENETRESET; break; + case IEEE80211_IOC_PROTMODE: + if (ireq->i_val > IEEE80211_PROT_RTSCTS) { + error = EINVAL; + break; + } + ic->ic_protmode = ireq->i_val; + /* NB: if not operating in 11g this can wait */ + if (ic->ic_curmode == IEEE80211_MODE_11G) + error = ENETRESET; + break; + case IEEE80211_IOC_TXPOWER: + if ((ic->ic_caps & IEEE80211_C_TXPMGT) == 0) { + error = EINVAL; + break; + } + if (!(IEEE80211_TXPOWER_MIN < ireq->i_val && + ireq->i_val < IEEE80211_TXPOWER_MAX)) { + error = EINVAL; + break; + } + ic->ic_txpower = ireq->i_val; + error = ENETRESET; + break; default: error = EINVAL; break; |