Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66422
b: refs/heads/master
c: 139c3a0
h: refs/heads/master
v: v3
  • Loading branch information
Volker Braun authored and David S. Miller committed Oct 10, 2007
1 parent c32042d commit 632aa21
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 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: c39e3a0d0380b12f45bf85a619d3df45e437ee45
refs/heads/master: 139c3a0492745192f999aaa67d11cb63983211f5
18 changes: 12 additions & 6 deletions trunk/net/mac80211/ieee80211_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,23 @@ static int ieee80211_set_encryption(struct net_device *dev, u8 *sta_addr,

sdata = IEEE80211_DEV_TO_SUB_IF(dev);

if (idx < 0 || idx >= NUM_DEFAULT_KEYS) {
printk(KERN_DEBUG "%s: set_encrypt - invalid idx=%d\n",
dev->name, idx);
return -EINVAL;
}

if (is_broadcast_ether_addr(sta_addr)) {
sta = NULL;
if (idx >= NUM_DEFAULT_KEYS) {
printk(KERN_DEBUG "%s: set_encrypt - invalid idx=%d\n",
dev->name, idx);
return -EINVAL;
}
key = sdata->keys[idx];
} else {
set_tx_key = 0;
if (idx != 0) {
/*
* According to the standard, the key index of a pairwise
* key must be zero. However, some AP are broken when it
* comes to WEP key indices, so we work around this.
*/
if (idx != 0 && alg != ALG_WEP) {
printk(KERN_DEBUG "%s: set_encrypt - non-zero idx for "
"individual key\n", dev->name);
return -EINVAL;
Expand Down

0 comments on commit 632aa21

Please sign in to comment.