aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/iwctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/vt6656/iwctl.c')
-rw-r--r--drivers/staging/vt6656/iwctl.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index 4f33b0c0812..b24e5314a6a 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -1010,27 +1010,19 @@ void iwctl_giwrate(struct net_device *dev,
1010/* 1010/*
1011 * Wireless Handler : set rts threshold 1011 * Wireless Handler : set rts threshold
1012 */ 1012 */
1013
1014int iwctl_siwrts(struct net_device *dev, 1013int iwctl_siwrts(struct net_device *dev,
1015 struct iw_request_info *info, 1014 struct iw_param *wrq)
1016 struct iw_param *wrq,
1017 char *extra)
1018{ 1015{
1019 PSDevice pDevice = (PSDevice)netdev_priv(dev); 1016 PSDevice pDevice = (PSDevice)netdev_priv(dev);
1020 int rc = 0;
1021 1017
1022 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRTS \n"); 1018 if ((wrq->value < 0 || wrq->value > 2312) && !wrq->disabled)
1019 return -EINVAL;
1023 1020
1024 { 1021 else if (wrq->disabled)
1025 int rthr = wrq->value; 1022 pDevice->wRTSThreshold = 2312;
1026 if(wrq->disabled) 1023
1027 rthr = 2312; 1024 else
1028 if((rthr < 0) || (rthr > 2312)) { 1025 pDevice->wRTSThreshold = wrq->value;
1029 rc = -EINVAL;
1030 }else {
1031 pDevice->wRTSThreshold = rthr;
1032 }
1033 }
1034 1026
1035 return 0; 1027 return 0;
1036} 1028}