aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2009-08-03 02:37:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-04 16:44:25 -0400
commitbeda278d987cf7091302cf730c5b226d88e01c5b (patch)
tree4bdc39b38c224c7b51d75f926800363b1e8d306b /drivers
parent554503f8c9e11cbea92b7cf1e31f7e4d93ad4492 (diff)
iwmc3200wifi: set WEP key static flag correctly
We should only set the static_key flag for open and legacy authentication types. It should not be set for 802.1X and TKIP. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/commands.c10
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;