|
@@ -494,6 +494,7 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
|
struct rt2x00lib_crypto crypto;
|
|
struct rt2x00lib_crypto crypto;
|
|
static const u8 bcast_addr[ETH_ALEN] =
|
|
static const u8 bcast_addr[ETH_ALEN] =
|
|
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, };
|
|
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, };
|
|
|
|
+ struct rt2x00_sta *sta_priv = NULL;
|
|
|
|
|
|
if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
|
|
if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
|
|
return 0;
|
|
return 0;
|
|
@@ -511,9 +512,11 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
|
|
|
|
|
crypto.cmd = cmd;
|
|
crypto.cmd = cmd;
|
|
|
|
|
|
- if (sta)
|
|
|
|
|
|
+ if (sta) {
|
|
crypto.address = sta->addr;
|
|
crypto.address = sta->addr;
|
|
- else
|
|
|
|
|
|
+ sta_priv = sta_to_rt2x00_sta(sta);
|
|
|
|
+ crypto.wcid = sta_priv->wcid;
|
|
|
|
+ } else
|
|
crypto.address = bcast_addr;
|
|
crypto.address = bcast_addr;
|
|
|
|
|
|
if (crypto.cipher == CIPHER_TKIP)
|
|
if (crypto.cipher == CIPHER_TKIP)
|