diff options
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 3b71d792bbf5..cbf8eb334e96 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -478,6 +478,8 @@ struct rt2x00lib_crypto { | |||
478 | u8 key[16]; | 478 | u8 key[16]; |
479 | u8 tx_mic[8]; | 479 | u8 tx_mic[8]; |
480 | u8 rx_mic[8]; | 480 | u8 rx_mic[8]; |
481 | |||
482 | int wcid; | ||
481 | }; | 483 | }; |
482 | 484 | ||
483 | /* | 485 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 6a03f93e92ac..cef1c878c37e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -494,6 +494,7 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
494 | struct rt2x00lib_crypto crypto; | 494 | struct rt2x00lib_crypto crypto; |
495 | static const u8 bcast_addr[ETH_ALEN] = | 495 | static const u8 bcast_addr[ETH_ALEN] = |
496 | { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; | 496 | { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; |
497 | struct rt2x00_sta *sta_priv = NULL; | ||
497 | 498 | ||
498 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) | 499 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) |
499 | return 0; | 500 | return 0; |
@@ -511,9 +512,11 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
511 | 512 | ||
512 | crypto.cmd = cmd; | 513 | crypto.cmd = cmd; |
513 | 514 | ||
514 | if (sta) | 515 | if (sta) { |
515 | crypto.address = sta->addr; | 516 | crypto.address = sta->addr; |
516 | else | 517 | sta_priv = sta_to_rt2x00_sta(sta); |
518 | crypto.wcid = sta_priv->wcid; | ||
519 | } else | ||
517 | crypto.address = bcast_addr; | 520 | crypto.address = bcast_addr; |
518 | 521 | ||
519 | if (crypto.cipher == CIPHER_TKIP) | 522 | if (crypto.cipher == CIPHER_TKIP) |