aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2009-10-22 09:30:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:39 -0400
commitfea2b8ec8192c62dbf5347c873cb1c8a87717a6a (patch)
tree2db86e3b47d2b2d28245a3dfdcd757c69d6cf0f9 /drivers
parent8ec97cc803e1d52022e916074415acaec276288c (diff)
libertas: move SIOCGIWAP calls to wext.c
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c8
-rw-r--r--drivers/net/wireless/libertas/main.c5
-rw-r--r--drivers/net/wireless/libertas/wext.c9
-rw-r--r--drivers/net/wireless/libertas/wext.h1
4 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index e3b854cce69c..abd20ea92553 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -27,23 +27,17 @@
27 */ 27 */
28void lbs_mac_event_disconnected(struct lbs_private *priv) 28void lbs_mac_event_disconnected(struct lbs_private *priv)
29{ 29{
30 union iwreq_data wrqu;
31
32 if (priv->connect_status != LBS_CONNECTED) 30 if (priv->connect_status != LBS_CONNECTED)
33 return; 31 return;
34 32
35 lbs_deb_enter(LBS_DEB_ASSOC); 33 lbs_deb_enter(LBS_DEB_ASSOC);
36 34
37 memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN);
38 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
39
40 /* 35 /*
41 * Cisco AP sends EAP failure and de-auth in less than 0.5 ms. 36 * Cisco AP sends EAP failure and de-auth in less than 0.5 ms.
42 * It causes problem in the Supplicant 37 * It causes problem in the Supplicant
43 */ 38 */
44
45 msleep_interruptible(1000); 39 msleep_interruptible(1000);
46 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); 40 lbs_send_disconnect_notification(priv);
47 41
48 /* report disconnect to upper layer */ 42 /* report disconnect to upper layer */
49 netif_stop_queue(priv->dev); 43 netif_stop_queue(priv->dev);
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index eb61f6955e9e..01f46cf288d7 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -1227,7 +1227,6 @@ EXPORT_SYMBOL_GPL(lbs_add_card);
1227void lbs_remove_card(struct lbs_private *priv) 1227void lbs_remove_card(struct lbs_private *priv)
1228{ 1228{
1229 struct net_device *dev = priv->dev; 1229 struct net_device *dev = priv->dev;
1230 union iwreq_data wrqu;
1231 1230
1232 lbs_deb_enter(LBS_DEB_MAIN); 1231 lbs_deb_enter(LBS_DEB_MAIN);
1233 1232
@@ -1252,9 +1251,7 @@ void lbs_remove_card(struct lbs_private *priv)
1252 lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP); 1251 lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
1253 } 1252 }
1254 1253
1255 memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN); 1254 lbs_send_disconnect_notification(priv);
1256 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
1257 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
1258 1255
1259 if (priv->is_deep_sleep) { 1256 if (priv->is_deep_sleep) {
1260 priv->is_deep_sleep = 0; 1257 priv->is_deep_sleep = 0;
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index 18c045bcc947..dc63b33b01f0 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -45,6 +45,15 @@ static inline void lbs_cancel_association_work(struct lbs_private *priv)
45 priv->pending_assoc_req = NULL; 45 priv->pending_assoc_req = NULL;
46} 46}
47 47
48void lbs_send_disconnect_notification(struct lbs_private *priv)
49{
50 union iwreq_data wrqu;
51
52 memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN);
53 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
54 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
55}
56
48void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str) 57void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str)
49{ 58{
50 union iwreq_data iwrq; 59 union iwreq_data iwrq;
diff --git a/drivers/net/wireless/libertas/wext.h b/drivers/net/wireless/libertas/wext.h
index 607d0ffefddb..50558262ecc3 100644
--- a/drivers/net/wireless/libertas/wext.h
+++ b/drivers/net/wireless/libertas/wext.h
@@ -4,6 +4,7 @@
4#ifndef _LBS_WEXT_H_ 4#ifndef _LBS_WEXT_H_
5#define _LBS_WEXT_H_ 5#define _LBS_WEXT_H_
6 6
7void lbs_send_disconnect_notification(struct lbs_private *priv);
7void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str); 8void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str);
8 9
9extern struct iw_handler_def lbs_handler_def; 10extern struct iw_handler_def lbs_handler_def;