Return-path: Received: from he.sipsolutions.net ([78.46.109.217]:43696 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074Ab0LNHy5 (ORCPT ); Tue, 14 Dec 2010 02:54:57 -0500 Subject: Re: [PATCH] nl80211: Add notification for dropped Deauth/Disassoc From: Johannes Berg To: Jouni Malinen Cc: "John W. Linville" , linux-wireless@vger.kernel.org In-Reply-To: <1292313111.3569.7.camel@jlt3.sipsolutions.net> References: <20101213220048.GA24752@jm.kir.nu> <1292313111.3569.7.camel@jlt3.sipsolutions.net> Content-Type: text/plain; charset="UTF-8" Date: Tue, 14 Dec 2010 08:54:53 +0100 Message-ID: <1292313293.3569.8.camel@jlt3.sipsolutions.net> Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Tue, 2010-12-14 at 08:51 +0100, Johannes Berg wrote: > On Tue, 2010-12-14 at 00:00 +0200, Jouni Malinen wrote: > > > @@ -1539,12 +1539,30 @@ ieee80211_drop_unencrypted_mgmt(struct i > > if (rx->sta && test_sta_flags(rx->sta, WLAN_STA_MFP)) { > > if (unlikely(!ieee80211_has_protected(fc) && > > ieee80211_is_unicast_robust_mgmt_frame(rx->skb) && > > - rx->key)) > > + rx->key)) { > > + if (ieee80211_is_deauth(fc)) > > + cfg80211_send_unprot_deauth(rx->sdata->dev, > > + rx->skb->data, > > + rx->skb->len); > > This is the RX path. > > > +void cfg80211_send_unprot_disassoc(struct net_device *dev, const u8 *buf, > > + size_t len) > > +{ > > + struct wireless_dev *wdev = dev->ieee80211_ptr; > > + struct wiphy *wiphy = wdev->wiphy; > > + struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); > > + > > + wdev_lock(wdev); > > + nl80211_send_unprot_disassoc(rdev, dev, buf, len, GFP_KERNEL); > > And this uses GFP_KERNEL. Surely that can't be right? And the mutex too, for that matter, which seems unnecessary anyway. johannes