Commit 0c5553b1 authored by Samuel Ortiz's avatar Samuel Ortiz Committed by John W. Linville
Browse files

iwmc3200wifi: invalidate keys when changing the BSSID



While associated, we have to invalidate our key cache if we clear our BSSID
through siwap.
Signed-off-by: default avatarSamuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 030b8655
...@@ -82,6 +82,7 @@ static int iwm_wext_siwap(struct net_device *dev, struct iw_request_info *info, ...@@ -82,6 +82,7 @@ static int iwm_wext_siwap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra) struct sockaddr *ap_addr, char *extra)
{ {
struct iwm_priv *iwm = ndev_to_iwm(dev); struct iwm_priv *iwm = ndev_to_iwm(dev);
int ret;
if (iwm->conf.mode == UMAC_MODE_IBSS) if (iwm->conf.mode == UMAC_MODE_IBSS)
return cfg80211_ibss_wext_siwap(dev, info, ap_addr, extra); return cfg80211_ibss_wext_siwap(dev, info, ap_addr, extra);
...@@ -104,10 +105,26 @@ static int iwm_wext_siwap(struct net_device *dev, struct iw_request_info *info, ...@@ -104,10 +105,26 @@ static int iwm_wext_siwap(struct net_device *dev, struct iw_request_info *info,
} }
if (iwm->umac_profile_active) { if (iwm->umac_profile_active) {
int i;
if (!memcmp(&iwm->umac_profile->bssid[0], iwm->bssid, ETH_ALEN)) if (!memcmp(&iwm->umac_profile->bssid[0], iwm->bssid, ETH_ALEN))
return 0; return 0;
iwm_invalidate_mlme_profile(iwm); /*
* If we're clearing the BSSID, and we're associated,
* we have to clear the keys as they're no longer valid.
*/
if (is_zero_ether_addr(ap_addr->sa_data)) {
for (i = 0; i < IWM_NUM_KEYS; i++)
iwm->keys[i].in_use = 0;
}
ret = iwm_invalidate_mlme_profile(iwm);
if (ret < 0) {
IWM_ERR(iwm, "Couldn't invalidate profile\n");
return ret;
}
} }
if (iwm->umac_profile->ssid.ssid_len) if (iwm->umac_profile->ssid.ssid_len)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment