diff options
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/commands.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/commands.c b/drivers/net/wireless/iwmc3200wifi/commands.c index 0d6637005f42..6b3626013fd2 100644 --- a/drivers/net/wireless/iwmc3200wifi/commands.c +++ b/drivers/net/wireless/iwmc3200wifi/commands.c | |||
@@ -596,6 +596,8 @@ int iwm_set_key(struct iwm_priv *iwm, bool remove, struct iwm_key *key) | |||
596 | key_idx = key->hdr.key_idx; | 596 | key_idx = key->hdr.key_idx; |
597 | 597 | ||
598 | if (!remove) { | 598 | if (!remove) { |
599 | u8 auth_type = iwm->umac_profile->sec.auth_type; | ||
600 | |||
599 | IWM_DBG_WEXT(iwm, DBG, "key_idx:%d\n", key_idx); | 601 | IWM_DBG_WEXT(iwm, DBG, "key_idx:%d\n", key_idx); |
600 | IWM_DBG_WEXT(iwm, DBG, "key_len:%d\n", key_len); | 602 | IWM_DBG_WEXT(iwm, DBG, "key_len:%d\n", key_len); |
601 | IWM_DBG_WEXT(iwm, DBG, "MAC:%pM, idx:%d, multicast:%d\n", | 603 | IWM_DBG_WEXT(iwm, DBG, "MAC:%pM, idx:%d, multicast:%d\n", |
@@ -618,7 +620,9 @@ int iwm_set_key(struct iwm_priv *iwm, bool remove, struct iwm_key *key) | |||
618 | memcpy(&wep40->key_hdr, key_hdr, | 620 | memcpy(&wep40->key_hdr, key_hdr, |
619 | sizeof(struct iwm_umac_key_hdr)); | 621 | sizeof(struct iwm_umac_key_hdr)); |
620 | memcpy(wep40->key, key_data, key_len); | 622 | memcpy(wep40->key, key_data, key_len); |
621 | wep40->static_key = 1; | 623 | wep40->static_key = |
624 | !!((auth_type != UMAC_AUTH_TYPE_8021X) && | ||
625 | (auth_type != UMAC_AUTH_TYPE_RSNA_PSK)); | ||
622 | 626 | ||
623 | cmd_size = sizeof(struct iwm_umac_key_wep40); | 627 | cmd_size = sizeof(struct iwm_umac_key_wep40); |
624 | break; | 628 | break; |
@@ -632,7 +636,9 @@ int iwm_set_key(struct iwm_priv *iwm, bool remove, struct iwm_key *key) | |||
632 | memcpy(&wep104->key_hdr, key_hdr, | 636 | memcpy(&wep104->key_hdr, key_hdr, |
633 | sizeof(struct iwm_umac_key_hdr)); | 637 | sizeof(struct iwm_umac_key_hdr)); |
634 | memcpy(wep104->key, key_data, key_len); | 638 | memcpy(wep104->key, key_data, key_len); |
635 | wep104->static_key = 1; | 639 | wep104->static_key = |
640 | !!((auth_type != UMAC_AUTH_TYPE_8021X) && | ||
641 | (auth_type != UMAC_AUTH_TYPE_RSNA_PSK)); | ||
636 | 642 | ||
637 | cmd_size = sizeof(struct iwm_umac_key_wep104); | 643 | cmd_size = sizeof(struct iwm_umac_key_wep104); |
638 | break; | 644 | break; |