summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/airo.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-01 01:59:15 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-01 01:59:15 -0500
commit75e47b36004d136edff68295420424cba3a5ccd0 (patch)
tree363c2bc1f8b5185b37f05106fec4ba2a07134182 /drivers/net/wireless/airo.c
parent68727fed5469100bec0764207d7efb7a9ecdee29 (diff)
parent07981aa43f6aec32b875f360755ed3d14f9d5139 (diff)
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r--drivers/net/wireless/airo.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index ef6495b07890..864937a409e5 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5036,7 +5036,6 @@ static int set_wep_key(struct airo_info *ai, u16 index,
wkr.len = sizeof(wkr);
wkr.kindex = 0xffff;
wkr.mac[0] = (char)index;
- if (perm) printk(KERN_INFO "Setting transmit key to %d\n", index);
if (perm) ai->defindex = (char)index;
} else {
// We are actually setting the key
@@ -5045,7 +5044,6 @@ static int set_wep_key(struct airo_info *ai, u16 index,
wkr.klen = keylen;
memcpy( wkr.key, key, keylen );
memcpy( wkr.mac, macaddr, ETH_ALEN );
- printk(KERN_INFO "Setting key %d\n", index);
}
if (perm) disable_MAC(ai, lock);
@@ -6266,7 +6264,7 @@ static int airo_set_encodeext(struct net_device *dev,
CapabilityRid cap_rid; /* Card capability info */
int perm = ( encoding->flags & IW_ENCODE_TEMP ? 0 : 1 );
u16 currentAuthType = local->config.authType;
- int idx, key_len, alg = ext->alg; /* Check encryption mode */
+ int idx, key_len, alg = ext->alg, set_key = 1;
wep_key_t key;
/* Is WEP supported ? */
@@ -6289,10 +6287,15 @@ static int airo_set_encodeext(struct net_device *dev,
if (encoding->flags & IW_ENCODE_DISABLED)
alg = IW_ENCODE_ALG_NONE;
- /* Just setting the transmit key? */
if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) {
+ /* Only set transmit key index here, actual
+ * key is set below if needed.
+ */
set_wep_key(local, idx, NULL, 0, perm, 1);
- } else {
+ set_key = ext->key_len > 0 ? 1 : 0;
+ }
+
+ if (set_key) {
/* Set the requested key first */
memset(key.key, 0, MAX_KEY_SIZE);
switch (alg) {