Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36513
b: refs/heads/master
c: 7f8544c
h: refs/heads/master
i:
  36511: 7c7f1a7
v: v3
  • Loading branch information
Jean Tourrilhes authored and John W. Linville committed Sep 25, 2006
1 parent e748364 commit 7dc49b3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: baef186519c69b11cf7e48c26e75feb1e6173baa
refs/heads/master: 7f8544cc95c7f521847fa760ce38d932e6ab4542
19 changes: 10 additions & 9 deletions trunk/drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -5868,7 +5868,7 @@ static int airo_set_essid(struct net_device *dev,
int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;

/* Check the size of the string */
if(dwrq->length > IW_ESSID_MAX_SIZE+1) {
if(dwrq->length > IW_ESSID_MAX_SIZE) {
return -E2BIG ;
}
/* Check if index is valid */
Expand All @@ -5880,7 +5880,7 @@ static int airo_set_essid(struct net_device *dev,
memset(SSID_rid.ssids[index].ssid, 0,
sizeof(SSID_rid.ssids[index].ssid));
memcpy(SSID_rid.ssids[index].ssid, extra, dwrq->length);
SSID_rid.ssids[index].len = dwrq->length - 1;
SSID_rid.ssids[index].len = dwrq->length;
}
SSID_rid.len = sizeof(SSID_rid);
/* Write it to the card */
Expand Down Expand Up @@ -5990,7 +5990,7 @@ static int airo_set_nick(struct net_device *dev,
struct airo_info *local = dev->priv;

/* Check the size of the string */
if(dwrq->length > 16 + 1) {
if(dwrq->length > 16) {
return -E2BIG;
}
readConfigRid(local, 1);
Expand All @@ -6015,7 +6015,7 @@ static int airo_get_nick(struct net_device *dev,
readConfigRid(local, 1);
strncpy(extra, local->config.nodeName, 16);
extra[16] = '\0';
dwrq->length = strlen(extra) + 1;
dwrq->length = strlen(extra);

return 0;
}
Expand Down Expand Up @@ -6767,9 +6767,9 @@ static int airo_set_retry(struct net_device *dev,
}
readConfigRid(local, 1);
if(vwrq->flags & IW_RETRY_LIMIT) {
if(vwrq->flags & IW_RETRY_MAX)
if(vwrq->flags & IW_RETRY_LONG)
local->config.longRetryLimit = vwrq->value;
else if (vwrq->flags & IW_RETRY_MIN)
else if (vwrq->flags & IW_RETRY_SHORT)
local->config.shortRetryLimit = vwrq->value;
else {
/* No modifier : set both */
Expand Down Expand Up @@ -6805,14 +6805,14 @@ static int airo_get_retry(struct net_device *dev,
if((vwrq->flags & IW_RETRY_TYPE) == IW_RETRY_LIFETIME) {
vwrq->flags = IW_RETRY_LIFETIME;
vwrq->value = (int)local->config.txLifetime * 1024;
} else if((vwrq->flags & IW_RETRY_MAX)) {
vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX;
} else if((vwrq->flags & IW_RETRY_LONG)) {
vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_LONG;
vwrq->value = (int)local->config.longRetryLimit;
} else {
vwrq->flags = IW_RETRY_LIMIT;
vwrq->value = (int)local->config.shortRetryLimit;
if((int)local->config.shortRetryLimit != (int)local->config.longRetryLimit)
vwrq->flags |= IW_RETRY_MIN;
vwrq->flags |= IW_RETRY_SHORT;
}

return 0;
Expand Down Expand Up @@ -6990,6 +6990,7 @@ static int airo_set_power(struct net_device *dev,
local->config.rmode |= RXMODE_BC_MC_ADDR;
set_bit (FLAG_COMMIT, &local->flags);
case IW_POWER_ON:
/* This is broken, fixme ;-) */
break;
default:
return -EINVAL;
Expand Down

0 comments on commit 7dc49b3

Please sign in to comment.