summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/cfg80211.c
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2009-07-16 11:34:13 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 21:05:21 +0200
commit6e5db0a8454b44bf88fa74cf437a507ec08f436d (patch)
treecb5b4af8a02d2c857749d649f06183b55f32ad28 /drivers/net/wireless/iwmc3200wifi/cfg80211.c
parentiwmc3200wifi: make iwm_send_wifi_if_cmd return 0 on success (diff)
downloadlinux-6e5db0a8454b44bf88fa74cf437a507ec08f436d.tar.xz
linux-6e5db0a8454b44bf88fa74cf437a507ec08f436d.zip
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/cfg80211.c')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/cfg80211.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
index 0372658bac99..3f5a08fa401f 100644
--- a/drivers/net/wireless/iwmc3200wifi/cfg80211.c
+++ b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
@@ -158,34 +158,6 @@ static int iwm_key_init(struct iwm_key *key, u8 key_index,
return 0;
}
-static int iwm_reset_profile(struct iwm_priv *iwm)
-{
- int ret;
-
- if (!iwm->umac_profile_active)
- return 0;
-
- /*
- * If there is a current active profile, but no
- * default key, it's not worth trying to associate again.
- */
- if (iwm->default_key < 0)
- return 0;
-
- /*
- * Here we have an active profile, but a key setting changed.
- * We thus have to invalidate the current profile, and push the
- * new one. Keys will be pushed when association takes place.
- */
- ret = iwm_invalidate_mlme_profile(iwm);
- if (ret < 0) {
- IWM_ERR(iwm, "Couldn't invalidate profile\n");
- return ret;
- }
-
- return iwm_send_mlme_profile(iwm);
-}
-
static int iwm_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
u8 key_index, const u8 *mac_addr,
struct key_params *params)
@@ -245,10 +217,6 @@ static int iwm_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
if (key_index == iwm->default_key)
iwm->default_key = -1;
- /* If the interface is down, we just cache this */
- if (!test_bit(IWM_STATUS_READY, &iwm->status))
- return 0;
-
return iwm_set_key(iwm, 1, key);
}
@@ -257,7 +225,6 @@ static int iwm_cfg80211_set_default_key(struct wiphy *wiphy,
u8 key_index)
{
struct iwm_priv *iwm = ndev_to_iwm(ndev);
- int ret;
IWM_DBG_WEXT(iwm, DBG, "Default key index is: %d\n", key_index);
@@ -268,15 +235,7 @@ static int iwm_cfg80211_set_default_key(struct wiphy *wiphy,
iwm->default_key = key_index;
- /* If the interface is down, we just cache this */
- if (!test_bit(IWM_STATUS_READY, &iwm->status))
- return 0;
-
- ret = iwm_set_tx_key(iwm, key_index);
- if (ret < 0)
- return ret;
-
- return iwm_reset_profile(iwm);
+ return iwm_set_tx_key(iwm, key_index);
}
int iwm_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev,