提交 fea2b8ec 编写于 作者: H Holger Schurig 提交者: John W. Linville

libertas: move SIOCGIWAP calls to wext.c

Signed-off-by: NHolger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 8ec97cc8
...@@ -27,23 +27,17 @@ ...@@ -27,23 +27,17 @@
*/ */
void lbs_mac_event_disconnected(struct lbs_private *priv) void lbs_mac_event_disconnected(struct lbs_private *priv)
{ {
union iwreq_data wrqu;
if (priv->connect_status != LBS_CONNECTED) if (priv->connect_status != LBS_CONNECTED)
return; return;
lbs_deb_enter(LBS_DEB_ASSOC); lbs_deb_enter(LBS_DEB_ASSOC);
memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN);
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
/* /*
* Cisco AP sends EAP failure and de-auth in less than 0.5 ms. * Cisco AP sends EAP failure and de-auth in less than 0.5 ms.
* It causes problem in the Supplicant * It causes problem in the Supplicant
*/ */
msleep_interruptible(1000); msleep_interruptible(1000);
wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); lbs_send_disconnect_notification(priv);
/* report disconnect to upper layer */ /* report disconnect to upper layer */
netif_stop_queue(priv->dev); netif_stop_queue(priv->dev);
......
...@@ -1227,7 +1227,6 @@ EXPORT_SYMBOL_GPL(lbs_add_card); ...@@ -1227,7 +1227,6 @@ EXPORT_SYMBOL_GPL(lbs_add_card);
void lbs_remove_card(struct lbs_private *priv) void lbs_remove_card(struct lbs_private *priv)
{ {
struct net_device *dev = priv->dev; struct net_device *dev = priv->dev;
union iwreq_data wrqu;
lbs_deb_enter(LBS_DEB_MAIN); lbs_deb_enter(LBS_DEB_MAIN);
...@@ -1252,9 +1251,7 @@ void lbs_remove_card(struct lbs_private *priv) ...@@ -1252,9 +1251,7 @@ void lbs_remove_card(struct lbs_private *priv)
lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP); lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
} }
memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN); lbs_send_disconnect_notification(priv);
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
if (priv->is_deep_sleep) { if (priv->is_deep_sleep) {
priv->is_deep_sleep = 0; priv->is_deep_sleep = 0;
......
...@@ -45,6 +45,15 @@ static inline void lbs_cancel_association_work(struct lbs_private *priv) ...@@ -45,6 +45,15 @@ static inline void lbs_cancel_association_work(struct lbs_private *priv)
priv->pending_assoc_req = NULL; priv->pending_assoc_req = NULL;
} }
void lbs_send_disconnect_notification(struct lbs_private *priv)
{
union iwreq_data wrqu;
memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN);
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
}
void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str) void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str)
{ {
union iwreq_data iwrq; union iwreq_data iwrq;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#ifndef _LBS_WEXT_H_ #ifndef _LBS_WEXT_H_
#define _LBS_WEXT_H_ #define _LBS_WEXT_H_
void lbs_send_disconnect_notification(struct lbs_private *priv);
void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str); void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str);
extern struct iw_handler_def lbs_handler_def; extern struct iw_handler_def lbs_handler_def;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部