Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98576
b: refs/heads/master
c: 23976ef
h: refs/heads/master
v: v3
  • Loading branch information
Emmanuel Grumbach authored and John W. Linville committed Jun 30, 2008
1 parent 22bfe76 commit 87655ba
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1bcca3c463e4930cef9986b05165bb0b3eb46f63
refs/heads/master: 23976efedd5ecb420b87455787c537eb4aed1981
9 changes: 9 additions & 0 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,15 @@ enum ieee80211_key_alg {
ALG_CCMP,
};

/**
* enum ieee80211_key_len - key length
* @WEP40: WEP 5 byte long key
* @WEP104: WEP 13 byte long key
*/
enum ieee80211_key_len {
LEN_WEP40 = 5,
LEN_WEP104 = 13,
};

/**
* enum ieee80211_key_flags - key flags
Expand Down
7 changes: 7 additions & 0 deletions trunk/net/mac80211/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ static int ieee80211_set_encryption(struct net_device *dev, u8 *sta_addr,
}
}

if (alg == ALG_WEP &&
key_len != LEN_WEP40 && key_len != LEN_WEP104) {
ieee80211_key_free(key);
err = -EINVAL;
goto out_unlock;
}

ieee80211_key_link(key, sdata, sta);

if (set_tx_key || (!sta && !sdata->default_key && key))
Expand Down

0 comments on commit 87655ba

Please sign in to comment.