Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156320
b: refs/heads/master
c: 3d0ccd0
h: refs/heads/master
v: v3
  • Loading branch information
Roel Kluin authored and John W. Linville committed Jul 27, 2009
1 parent d18afc0 commit 54c783e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 2a21f86917f7a9fe13b180e895a816871a234dee
refs/heads/master: 3d0ccd021b23c18ea2d399fe4a43c955485c765c
13 changes: 6 additions & 7 deletions trunk/drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -5918,20 +5918,19 @@ static int airo_set_essid(struct net_device *dev,
readSsidRid(local, &SSID_rid);

/* Check if we asked for `any' */
if(dwrq->flags == 0) {
if (dwrq->flags == 0) {
/* Just send an empty SSID list */
memset(&SSID_rid, 0, sizeof(SSID_rid));
} else {
int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
unsigned index = (dwrq->flags & IW_ENCODE_INDEX) - 1;

/* Check the size of the string */
if(dwrq->length > IW_ESSID_MAX_SIZE) {
if (dwrq->length > IW_ESSID_MAX_SIZE)
return -E2BIG ;
}

/* Check if index is valid */
if((index < 0) || (index >= 4)) {
if (index >= ARRAY_SIZE(SSID_rid.ssids))
return -EINVAL;
}

/* Set the SSID */
memset(SSID_rid.ssids[index].ssid, 0,
Expand Down Expand Up @@ -6819,7 +6818,7 @@ static int airo_set_txpow(struct net_device *dev,
return -EINVAL;
}
clear_bit (FLAG_RADIO_OFF, &local->flags);
for (i = 0; cap_rid.txPowerLevels[i] && (i < 8); i++)
for (i = 0; i < 8 && cap_rid.txPowerLevels[i]; i++)
if (v == cap_rid.txPowerLevels[i]) {
readConfigRid(local, 1);
local->config.txPower = v;
Expand Down

0 comments on commit 54c783e

Please sign in to comment.