diff options
Diffstat (limited to 'drivers/net/wireless/libertas/cfg.c')
-rw-r--r-- | drivers/net/wireless/libertas/cfg.c | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index 682b276f06f9..089f0722fa20 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c | |||
@@ -1238,28 +1238,6 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev, | |||
1238 | return ret; | 1238 | return ret; |
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | |||
1242 | |||
1243 | |||
1244 | /* callback from lbs_cfg_disconnect() */ | ||
1245 | static int lbs_cfg_ret_disconnect(struct lbs_private *priv, unsigned long dummy, | ||
1246 | struct cmd_header *resp) | ||
1247 | { | ||
1248 | lbs_deb_enter(LBS_DEB_CFG80211); | ||
1249 | |||
1250 | cfg80211_disconnected(priv->dev, | ||
1251 | priv->disassoc_reason, | ||
1252 | NULL, 0, /* TODO? */ | ||
1253 | GFP_KERNEL); | ||
1254 | |||
1255 | /* TODO: get rid of priv->connect_status */ | ||
1256 | priv->connect_status = LBS_CONNECTED; | ||
1257 | |||
1258 | lbs_deb_leave(LBS_DEB_CFG80211); | ||
1259 | return 0; | ||
1260 | } | ||
1261 | |||
1262 | |||
1263 | static int lbs_cfg_disconnect(struct wiphy *wiphy, struct net_device *dev, | 1241 | static int lbs_cfg_disconnect(struct wiphy *wiphy, struct net_device *dev, |
1264 | u16 reason_code) | 1242 | u16 reason_code) |
1265 | { | 1243 | { |
@@ -1277,9 +1255,14 @@ static int lbs_cfg_disconnect(struct wiphy *wiphy, struct net_device *dev, | |||
1277 | memcpy(cmd.macaddr, &priv->assoc_bss, ETH_ALEN); | 1255 | memcpy(cmd.macaddr, &priv->assoc_bss, ETH_ALEN); |
1278 | cmd.reasoncode = cpu_to_le16(reason_code); | 1256 | cmd.reasoncode = cpu_to_le16(reason_code); |
1279 | 1257 | ||
1280 | __lbs_cmd_async(priv, CMD_802_11_DEAUTHENTICATE, | 1258 | if (lbs_cmd_with_response(priv, CMD_802_11_DEAUTHENTICATE, &cmd)) |
1281 | &cmd.hdr, sizeof(cmd), | 1259 | return -EFAULT; |
1282 | lbs_cfg_ret_disconnect, 0); | 1260 | |
1261 | cfg80211_disconnected(priv->dev, | ||
1262 | priv->disassoc_reason, | ||
1263 | NULL, 0, | ||
1264 | GFP_KERNEL); | ||
1265 | priv->connect_status = LBS_DISCONNECTED; | ||
1283 | 1266 | ||
1284 | return 0; | 1267 | return 0; |
1285 | } | 1268 | } |
@@ -1673,6 +1656,10 @@ static void lbs_join_post(struct lbs_private *priv, | |||
1673 | params->beacon_interval, | 1656 | params->beacon_interval, |
1674 | fake_ie, fake - fake_ie, | 1657 | fake_ie, fake - fake_ie, |
1675 | 0, GFP_KERNEL); | 1658 | 0, GFP_KERNEL); |
1659 | |||
1660 | memcpy(priv->wdev->ssid, params->ssid, params->ssid_len); | ||
1661 | priv->wdev->ssid_len = params->ssid_len; | ||
1662 | |||
1676 | cfg80211_ibss_joined(priv->dev, bssid, GFP_KERNEL); | 1663 | cfg80211_ibss_joined(priv->dev, bssid, GFP_KERNEL); |
1677 | 1664 | ||
1678 | /* TODO: consider doing this at MACREG_INT_CODE_LINK_SENSED time */ | 1665 | /* TODO: consider doing this at MACREG_INT_CODE_LINK_SENSED time */ |