Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266043
b: refs/heads/master
c: f03fcfc
h: refs/heads/master
i:
  266041: 3a22551
  266039: bbac5f0
v: v3
  • Loading branch information
Helmut Schaa authored and John W. Linville committed Sep 14, 2011
1 parent 6d60179 commit 9aed9d1
Show file tree
Hide file tree
Showing 3 changed files with 8 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: b4943d8113500ee783072ba2ba7506ad76df3726
refs/heads/master: f03fcfc110739be5bae4f0edf33998b019ff7436
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/rt2x00/rt2x00.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ struct rt2x00lib_crypto {
u8 key[16];
u8 tx_mic[8];
u8 rx_mic[8];

int wcid;
};

/*
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/net/wireless/rt2x00/rt2x00mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
struct rt2x00lib_crypto crypto;
static const u8 bcast_addr[ETH_ALEN] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, };
struct rt2x00_sta *sta_priv = NULL;

if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
return 0;
Expand All @@ -511,9 +512,11 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,

crypto.cmd = cmd;

if (sta)
if (sta) {
crypto.address = sta->addr;
else
sta_priv = sta_to_rt2x00_sta(sta);
crypto.wcid = sta_priv->wcid;
} else
crypto.address = bcast_addr;

if (crypto.cipher == CIPHER_TKIP)
Expand Down

0 comments on commit 9aed9d1

Please sign in to comment.