aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/commands.c
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2009-07-16 05:34:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:21 -0400
commit6e5db0a8454b44bf88fa74cf437a507ec08f436d (patch)
treecb5b4af8a02d2c857749d649f06183b55f32ad28 /drivers/net/wireless/iwmc3200wifi/commands.c
parentb6c321718e1376b1a55afc63cce090a2c4573417 (diff)
iwmc3200wifi: remove key caches in driver
cfg80211 now guarantees keys are set after connecting. We can remove the key cache code from the driver now. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/commands.c')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/commands.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/commands.c b/drivers/net/wireless/iwmc3200wifi/commands.c
index e6be29704a1..0d6637005f4 100644
--- a/drivers/net/wireless/iwmc3200wifi/commands.c
+++ b/drivers/net/wireless/iwmc3200wifi/commands.c
@@ -584,12 +584,6 @@ int iwm_set_key(struct iwm_priv *iwm, bool remove, struct iwm_key *key)
584 struct iwm_umac_key_tkip *tkip = (struct iwm_umac_key_tkip *)cmd; 584 struct iwm_umac_key_tkip *tkip = (struct iwm_umac_key_tkip *)cmd;
585 struct iwm_umac_key_ccmp *ccmp = (struct iwm_umac_key_ccmp *)cmd; 585 struct iwm_umac_key_ccmp *ccmp = (struct iwm_umac_key_ccmp *)cmd;
586 586
587 /*
588 * We check if our current profile is valid.
589 * If not, we dont push the key, we just cache them,
590 * so that with the next siwsessid call, the keys
591 * will be actually pushed.
592 */
593 if (!remove) { 587 if (!remove) {
594 ret = iwm_check_profile(iwm); 588 ret = iwm_check_profile(iwm);
595 if (ret < 0) 589 if (ret < 0)
@@ -727,7 +721,7 @@ int iwm_set_key(struct iwm_priv *iwm, bool remove, struct iwm_key *key)
727 721
728int iwm_send_mlme_profile(struct iwm_priv *iwm) 722int iwm_send_mlme_profile(struct iwm_priv *iwm)
729{ 723{
730 int ret, i; 724 int ret;
731 struct iwm_umac_profile profile; 725 struct iwm_umac_profile profile;
732 726
733 memcpy(&profile, iwm->umac_profile, sizeof(profile)); 727 memcpy(&profile, iwm->umac_profile, sizeof(profile));
@@ -742,27 +736,6 @@ int iwm_send_mlme_profile(struct iwm_priv *iwm)
742 return ret; 736 return ret;
743 } 737 }
744 738
745 for (i = 0; i < IWM_NUM_KEYS; i++)
746 if (iwm->keys[i].key_len) {
747 struct iwm_key *key = &iwm->keys[i];
748
749 /* Wait for the profile before sending the keys */
750 wait_event_interruptible_timeout(iwm->mlme_queue,
751 (test_bit(IWM_STATUS_ASSOCIATING, &iwm->status) ||
752 test_bit(IWM_STATUS_ASSOCIATED, &iwm->status)),
753 3 * HZ);
754
755 ret = iwm_set_key(iwm, 0, key);
756 if (ret)
757 return ret;
758
759 if (iwm->default_key == i) {
760 ret = iwm_set_tx_key(iwm, i);
761 if (ret)
762 return ret;
763 }
764 }
765
766 return 0; 739 return 0;
767} 740}
768 741