From patchwork Tue May 18 08:20:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jussi Kivilinna X-Patchwork-Id: 100368 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4I8Ktcu019533 for ; Tue, 18 May 2010 08:20:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754226Ab0ERIUy (ORCPT ); Tue, 18 May 2010 04:20:54 -0400 Received: from sinikuusama.dnainternet.net ([83.102.40.134]:49818 "EHLO sinikuusama.dnainternet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752490Ab0ERIUw (ORCPT ); Tue, 18 May 2010 04:20:52 -0400 Received: from localhost (localhost [127.0.0.1]) by sinikuusama.dnainternet.net (Postfix) with ESMTP id BD3C02BFF2; Tue, 18 May 2010 11:20:51 +0300 (EEST) X-Virus-Scanned: DNA Postiturva at dnainternet.net X-Spam-Flag: NO X-Spam-Score: -1.36 X-Spam-Level: X-Spam-Status: No, score=-1.36 tagged_above=-9999 required=6 tests=[ALL_TRUSTED=-1.36] Received: from sinikuusama.dnainternet.net ([83.102.40.134]) by localhost (sinikuusama.dnainternet.net [127.0.0.1]) (amavisd-new, port 10041) with ESMTP id mi320M8yuhyD; Tue, 18 May 2010 11:20:51 +0300 (EEST) Received: from kirsikkapuu.dnainternet.net (kirsikkapuu.dnainternet.net [83.102.40.214]) by sinikuusama.dnainternet.net (Postfix) with ESMTP id 9B70A2BF58; Tue, 18 May 2010 11:20:51 +0300 (EEST) Received: from fate.lan (dyn2-85-23-163-72.psoas.suomi.net [85.23.163.72]) by kirsikkapuu.dnainternet.net (Postfix) with ESMTP id 81CA77F004; Tue, 18 May 2010 11:20:51 +0300 (EEST) Subject: [PATCH] rndis_wlan: replace wireless_send_event with cfg80211_disconnected in rndis_wlan_do_link_down_work To: "John W. Linville" From: Jussi Kivilinna Cc: =?utf-8?q?Rog=C3=A9rio?= Brito , linux-wireless@vger.kernel.org Date: Tue, 18 May 2010 11:20:51 +0300 Message-ID: <20100518082051.18988.85196.stgit@fate.lan> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 18 May 2010 08:20:56 +0000 (UTC) diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 393f600..b280ad1 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c @@ -2572,14 +2572,18 @@ static void rndis_wlan_do_link_up_work(struct usbnet *usbdev) static void rndis_wlan_do_link_down_work(struct usbnet *usbdev) { - union iwreq_data evt; + struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); - netif_carrier_off(usbdev->net); + if (priv->connected) { + priv->connected = false; + memset(priv->bssid, 0, ETH_ALEN); + + deauthenticate(usbdev); - evt.data.flags = 0; - evt.data.length = 0; - memset(evt.ap_addr.sa_data, 0, ETH_ALEN); - wireless_send_event(usbdev->net, SIOCGIWAP, &evt, NULL); + cfg80211_disconnected(usbdev->net, 0, NULL, 0, GFP_KERNEL); + } + + netif_carrier_off(usbdev->net); } static void rndis_wlan_worker(struct work_struct *work)