diff options
author | Samuel Ortiz <samuel.ortiz@intel.com> | 2009-06-15 15:59:50 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 14:57:51 -0400 |
commit | 0c5553b1392dea5ba5ad678790367c1275ed1172 (patch) | |
tree | 1140189a99f9354c4c1f62b14497ed59e6c6a844 /drivers/net | |
parent | 030b865520c3e26f4a316852aa022a22c4948907 (diff) |
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: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/wext.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/wext.c b/drivers/net/wireless/iwmc3200wifi/wext.c index 584c94d0f399..889194931b4e 100644 --- a/drivers/net/wireless/iwmc3200wifi/wext.c +++ b/drivers/net/wireless/iwmc3200wifi/wext.c | |||
@@ -82,6 +82,7 @@ static int iwm_wext_siwap(struct net_device *dev, struct iw_request_info *info, | |||
82 | struct sockaddr *ap_addr, char *extra) | 82 | struct sockaddr *ap_addr, char *extra) |
83 | { | 83 | { |
84 | struct iwm_priv *iwm = ndev_to_iwm(dev); | 84 | struct iwm_priv *iwm = ndev_to_iwm(dev); |
85 | int ret; | ||
85 | 86 | ||
86 | if (iwm->conf.mode == UMAC_MODE_IBSS) | 87 | if (iwm->conf.mode == UMAC_MODE_IBSS) |
87 | return cfg80211_ibss_wext_siwap(dev, info, ap_addr, extra); | 88 | 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 | } | 105 | } |
105 | 106 | ||
106 | if (iwm->umac_profile_active) { | 107 | if (iwm->umac_profile_active) { |
108 | int i; | ||
109 | |||
107 | if (!memcmp(&iwm->umac_profile->bssid[0], iwm->bssid, ETH_ALEN)) | 110 | if (!memcmp(&iwm->umac_profile->bssid[0], iwm->bssid, ETH_ALEN)) |
108 | return 0; | 111 | return 0; |
109 | 112 | ||
110 | iwm_invalidate_mlme_profile(iwm); | 113 | /* |
114 | * If we're clearing the BSSID, and we're associated, | ||
115 | * we have to clear the keys as they're no longer valid. | ||
116 | */ | ||
117 | if (is_zero_ether_addr(ap_addr->sa_data)) { | ||
118 | for (i = 0; i < IWM_NUM_KEYS; i++) | ||
119 | iwm->keys[i].in_use = 0; | ||
120 | |||
121 | } | ||
122 | |||
123 | ret = iwm_invalidate_mlme_profile(iwm); | ||
124 | if (ret < 0) { | ||
125 | IWM_ERR(iwm, "Couldn't invalidate profile\n"); | ||
126 | return ret; | ||
127 | } | ||
111 | } | 128 | } |
112 | 129 | ||
113 | if (iwm->umac_profile->ssid.ssid_len) | 130 | if (iwm->umac_profile->ssid.ssid_len) |