From patchwork Thu Oct 22 13:30:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Schurig X-Patchwork-Id: 55344 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9MDZbOa017491 for ; Thu, 22 Oct 2009 13:35:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756057AbZJVNfb (ORCPT ); Thu, 22 Oct 2009 09:35:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756042AbZJVNfb (ORCPT ); Thu, 22 Oct 2009 09:35:31 -0400 Received: from mx51.mymxserver.com ([85.199.173.110]:34058 "EHLO mx51.mymxserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756054AbZJVNfa (ORCPT ); Thu, 22 Oct 2009 09:35:30 -0400 Received: from localhost (localhost [127.0.0.1]) by localhost.mx51.mymxserver.com (Postfix) with ESMTP id 7124750009; Thu, 22 Oct 2009 15:35:34 +0200 (CEST) X-Virus-Scanned: by Mittwald Mailscanner Received: from mx51.mymxserver.com ([127.0.0.1]) by localhost (mx51.mymxserver.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 24aENoLN3i6U; Thu, 22 Oct 2009 15:35:34 +0200 (CEST) Received: from lin01.mn-solutions.de (pD95FA4CF.dip0.t-ipconnect.de [217.95.164.207]) by mx51.mymxserver.com (Postfix) with ESMTP id 040C950004; Thu, 22 Oct 2009 15:35:34 +0200 (CEST) Received: by lin01.mn-solutions.de (Postfix, from userid 116) id 8D4A11E0010; Thu, 22 Oct 2009 15:35:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.1.7-deb3 (2006-10-05) on lin01.mn-logistik.de X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.7-deb3 Received: from mnz66.mn-solutions.de (mnz66.mn-solutions.de [192.168.233.66]) by lin01.mn-solutions.de (Postfix) with SMTP id AE1AD1E00ED; Thu, 22 Oct 2009 15:34:34 +0200 (CEST) Received: by mnz66.mn-solutions.de (sSMTP sendmail emulation); Thu, 22 Oct 2009 15:34:18 +0200 Message-Id: <20091022133418.301622356@mail.mn-solutions.de> References: <20091022133043.185554096@mail.mn-solutions.de> User-Agent: quilt/0.46-1 Date: Thu, 22 Oct 2009 15:30:56 +0200 From: Holger Schurig To: linux-wireless@vger.kernel.org, John Linville , Dan Williams Subject: [PATCH 13/19] libertas: move SIOCGIWAP calls to wext.c Content-Disposition: inline; filename=lbs-iw-send-disconnect.patch Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --- linux-wl.orig/drivers/net/wireless/libertas/cmdresp.c +++ linux-wl/drivers/net/wireless/libertas/cmdresp.c @@ -27,23 +27,17 @@ */ void lbs_mac_event_disconnected(struct lbs_private *priv) { - union iwreq_data wrqu; - if (priv->connect_status != LBS_CONNECTED) return; 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. * It causes problem in the Supplicant */ - msleep_interruptible(1000); - wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); + lbs_send_disconnect_notification(priv); /* report disconnect to upper layer */ netif_stop_queue(priv->dev); --- linux-wl.orig/drivers/net/wireless/libertas/main.c +++ linux-wl/drivers/net/wireless/libertas/main.c @@ -1227,7 +1227,6 @@ void lbs_remove_card(struct lbs_private *priv) { struct net_device *dev = priv->dev; - union iwreq_data wrqu; lbs_deb_enter(LBS_DEB_MAIN); @@ -1252,9 +1251,7 @@ lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP); } - memset(wrqu.ap_addr.sa_data, 0xaa, ETH_ALEN); - wrqu.ap_addr.sa_family = ARPHRD_ETHER; - wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); + lbs_send_disconnect_notification(priv); if (priv->is_deep_sleep) { priv->is_deep_sleep = 0; --- linux-wl.orig/drivers/net/wireless/libertas/wext.c +++ linux-wl/drivers/net/wireless/libertas/wext.c @@ -45,6 +45,15 @@ 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) { union iwreq_data iwrq; --- linux-wl.orig/drivers/net/wireless/libertas/wext.h +++ linux-wl/drivers/net/wireless/libertas/wext.h @@ -4,6 +4,7 @@ #ifndef _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); extern struct iw_handler_def lbs_handler_def;