aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r--drivers/net/wireless/airo.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index bff04cba3fed..ba737c6cebec 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5868,7 +5868,7 @@ static int airo_set_essid(struct net_device *dev,
5868 int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; 5868 int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
5869 5869
5870 /* Check the size of the string */ 5870 /* Check the size of the string */
5871 if(dwrq->length > IW_ESSID_MAX_SIZE+1) { 5871 if(dwrq->length > IW_ESSID_MAX_SIZE) {
5872 return -E2BIG ; 5872 return -E2BIG ;
5873 } 5873 }
5874 /* Check if index is valid */ 5874 /* Check if index is valid */
@@ -5880,7 +5880,7 @@ static int airo_set_essid(struct net_device *dev,
5880 memset(SSID_rid.ssids[index].ssid, 0, 5880 memset(SSID_rid.ssids[index].ssid, 0,
5881 sizeof(SSID_rid.ssids[index].ssid)); 5881 sizeof(SSID_rid.ssids[index].ssid));
5882 memcpy(SSID_rid.ssids[index].ssid, extra, dwrq->length); 5882 memcpy(SSID_rid.ssids[index].ssid, extra, dwrq->length);
5883 SSID_rid.ssids[index].len = dwrq->length - 1; 5883 SSID_rid.ssids[index].len = dwrq->length;
5884 } 5884 }
5885 SSID_rid.len = sizeof(SSID_rid); 5885 SSID_rid.len = sizeof(SSID_rid);
5886 /* Write it to the card */ 5886 /* Write it to the card */
@@ -5990,7 +5990,7 @@ static int airo_set_nick(struct net_device *dev,
5990 struct airo_info *local = dev->priv; 5990 struct airo_info *local = dev->priv;
5991 5991
5992 /* Check the size of the string */ 5992 /* Check the size of the string */
5993 if(dwrq->length > 16 + 1) { 5993 if(dwrq->length > 16) {
5994 return -E2BIG; 5994 return -E2BIG;
5995 } 5995 }
5996 readConfigRid(local, 1); 5996 readConfigRid(local, 1);
@@ -6015,7 +6015,7 @@ static int airo_get_nick(struct net_device *dev,
6015 readConfigRid(local, 1); 6015 readConfigRid(local, 1);
6016 strncpy(extra, local->config.nodeName, 16); 6016 strncpy(extra, local->config.nodeName, 16);
6017 extra[16] = '\0'; 6017 extra[16] = '\0';
6018 dwrq->length = strlen(extra) + 1; 6018 dwrq->length = strlen(extra);
6019 6019
6020 return 0; 6020 return 0;
6021} 6021}
@@ -6767,9 +6767,9 @@ static int airo_set_retry(struct net_device *dev,
6767 } 6767 }
6768 readConfigRid(local, 1); 6768 readConfigRid(local, 1);
6769 if(vwrq->flags & IW_RETRY_LIMIT) { 6769 if(vwrq->flags & IW_RETRY_LIMIT) {
6770 if(vwrq->flags & IW_RETRY_MAX) 6770 if(vwrq->flags & IW_RETRY_LONG)
6771 local->config.longRetryLimit = vwrq->value; 6771 local->config.longRetryLimit = vwrq->value;
6772 else if (vwrq->flags & IW_RETRY_MIN) 6772 else if (vwrq->flags & IW_RETRY_SHORT)
6773 local->config.shortRetryLimit = vwrq->value; 6773 local->config.shortRetryLimit = vwrq->value;
6774 else { 6774 else {
6775 /* No modifier : set both */ 6775 /* No modifier : set both */
@@ -6805,14 +6805,14 @@ static int airo_get_retry(struct net_device *dev,
6805 if((vwrq->flags & IW_RETRY_TYPE) == IW_RETRY_LIFETIME) { 6805 if((vwrq->flags & IW_RETRY_TYPE) == IW_RETRY_LIFETIME) {
6806 vwrq->flags = IW_RETRY_LIFETIME; 6806 vwrq->flags = IW_RETRY_LIFETIME;
6807 vwrq->value = (int)local->config.txLifetime * 1024; 6807 vwrq->value = (int)local->config.txLifetime * 1024;
6808 } else if((vwrq->flags & IW_RETRY_MAX)) { 6808 } else if((vwrq->flags & IW_RETRY_LONG)) {
6809 vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX; 6809 vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_LONG;
6810 vwrq->value = (int)local->config.longRetryLimit; 6810 vwrq->value = (int)local->config.longRetryLimit;
6811 } else { 6811 } else {
6812 vwrq->flags = IW_RETRY_LIMIT; 6812 vwrq->flags = IW_RETRY_LIMIT;
6813 vwrq->value = (int)local->config.shortRetryLimit; 6813 vwrq->value = (int)local->config.shortRetryLimit;
6814 if((int)local->config.shortRetryLimit != (int)local->config.longRetryLimit) 6814 if((int)local->config.shortRetryLimit != (int)local->config.longRetryLimit)
6815 vwrq->flags |= IW_RETRY_MIN; 6815 vwrq->flags |= IW_RETRY_SHORT;
6816 } 6816 }
6817 6817
6818 return 0; 6818 return 0;
@@ -6990,6 +6990,7 @@ static int airo_set_power(struct net_device *dev,
6990 local->config.rmode |= RXMODE_BC_MC_ADDR; 6990 local->config.rmode |= RXMODE_BC_MC_ADDR;
6991 set_bit (FLAG_COMMIT, &local->flags); 6991 set_bit (FLAG_COMMIT, &local->flags);
6992 case IW_POWER_ON: 6992 case IW_POWER_ON:
6993 /* This is broken, fixme ;-) */
6993 break; 6994 break;
6994 default: 6995 default:
6995 return -EINVAL; 6996 return -EINVAL;