Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225239
b: refs/heads/master
c: 897bed8
h: refs/heads/master
i:
  225237: 44d8658
  225235: 4a8dfde
  225231: 0db81aa
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Dec 13, 2010
1 parent 6c5e9ce commit d7474f2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 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: f33fdcf1b3a02fb92971a577d194ec6c579374af
refs/heads/master: 897bed8b4320774e56f282cdc1cceb4d77442797
23 changes: 21 additions & 2 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,12 +955,31 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
* have been expected.
*/
struct ieee80211_key *key = NULL;
struct ieee80211_sub_if_data *sdata = rx->sdata;
int i;

if (ieee80211_is_mgmt(fc) &&
is_multicast_ether_addr(hdr->addr1) &&
(key = rcu_dereference(rx->sdata->default_mgmt_key)))
rx->key = key;
else if ((key = rcu_dereference(rx->sdata->default_key)))
rx->key = key;
else {
if (rx->sta) {
for (i = 0; i < NUM_DEFAULT_KEYS; i++) {
key = rcu_dereference(rx->sta->gtk[i]);
if (key)
break;
}
}
if (!key) {
for (i = 0; i < NUM_DEFAULT_KEYS; i++) {
key = rcu_dereference(sdata->keys[i]);
if (key)
break;
}
}
if (key)
rx->key = key;
}
return RX_CONTINUE;
} else {
u8 keyid;
Expand Down

0 comments on commit d7474f2

Please sign in to comment.