diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/vt6656/iwctl.c | 26 | ||||
-rw-r--r-- | drivers/staging/vt6656/iwctl.h | 5 | ||||
-rw-r--r-- | drivers/staging/vt6656/main_usb.c | 2 |
3 files changed, 11 insertions, 22 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 | |||
1014 | int iwctl_siwrts(struct net_device *dev, | 1013 | int 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 | } |
diff --git a/drivers/staging/vt6656/iwctl.h b/drivers/staging/vt6656/iwctl.h index bd38e9dc6f3..0c6e0496779 100644 --- a/drivers/staging/vt6656/iwctl.h +++ b/drivers/staging/vt6656/iwctl.h | |||
@@ -113,10 +113,7 @@ void iwctl_giwrate(struct net_device *dev, | |||
113 | char *extra); | 113 | char *extra); |
114 | 114 | ||
115 | int iwctl_siwrts(struct net_device *dev, | 115 | int iwctl_siwrts(struct net_device *dev, |
116 | struct iw_request_info *info, | 116 | struct iw_param *wrq); |
117 | struct iw_param *wrq, | ||
118 | char *extra); | ||
119 | |||
120 | 117 | ||
121 | int iwctl_giwrts(struct net_device *dev, | 118 | int iwctl_giwrts(struct net_device *dev, |
122 | struct iw_request_info *info, | 119 | struct iw_request_info *info, |
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 33a451c6ac1..763e028a5cc 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c | |||
@@ -1704,7 +1704,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { | |||
1704 | // Set the desired RTS threshold | 1704 | // Set the desired RTS threshold |
1705 | case SIOCSIWRTS: | 1705 | case SIOCSIWRTS: |
1706 | 1706 | ||
1707 | rc = iwctl_siwrts(dev, NULL, &(wrq->u.rts), NULL); | 1707 | rc = iwctl_siwrts(dev, &(wrq->u.rts)); |
1708 | break; | 1708 | break; |
1709 | 1709 | ||
1710 | // Get the current RTS threshold | 1710 | // Get the current RTS threshold |