aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/cfg80211.c
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2009-09-01 09:13:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-09-01 12:48:25 -0400
commitae73abf2350de7cbfc5c46a936f4d2a532b36679 (patch)
tree889f3584f65a6e94fac7765283d40249a14d5e3b /drivers/net/wireless/iwmc3200wifi/cfg80211.c
parent2b7dcfb7d01c9fc9efc6e39618cbf495a6051f9a (diff)
iwmc3200wifi: invalidate profile when necessary before connect
If cfg80211 requests to connect when we have already had an active profile, invalidate the current profile first before sending a new profile to UMAC. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.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.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
index a6e852f4f92c..789ef5ca88ba 100644
--- a/drivers/net/wireless/iwmc3200wifi/cfg80211.c
+++ b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
@@ -326,11 +326,8 @@ static int iwm_cfg80211_change_iface(struct wiphy *wiphy,
326 326
327 iwm->umac_profile->mode = cpu_to_le32(iwm->conf.mode); 327 iwm->umac_profile->mode = cpu_to_le32(iwm->conf.mode);
328 328
329 if (iwm->umac_profile_active) { 329 if (iwm->umac_profile_active)
330 int ret = iwm_invalidate_mlme_profile(iwm); 330 iwm_invalidate_mlme_profile(iwm);
331 if (ret < 0)
332 IWM_ERR(iwm, "Couldn't invalidate profile\n");
333 }
334 331
335 return 0; 332 return 0;
336} 333}
@@ -573,6 +570,14 @@ static int iwm_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
573 if (!sme->ssid) 570 if (!sme->ssid)
574 return -EINVAL; 571 return -EINVAL;
575 572
573 if (iwm->umac_profile_active) {
574 ret = iwm_invalidate_mlme_profile(iwm);
575 if (ret) {
576 IWM_ERR(iwm, "Couldn't invalidate profile\n");
577 return ret;
578 }
579 }
580
576 if (chan) 581 if (chan)
577 iwm->channel = 582 iwm->channel =
578 ieee80211_frequency_to_channel(chan->center_freq); 583 ieee80211_frequency_to_channel(chan->center_freq);