From patchwork Sat Oct 31 10:33:16 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 56762 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 n9VAXTUk023646 for ; Sat, 31 Oct 2009 10:33:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757325AbZJaKdU (ORCPT ); Sat, 31 Oct 2009 06:33:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754992AbZJaKdT (ORCPT ); Sat, 31 Oct 2009 06:33:19 -0400 Received: from fg-out-1718.google.com ([72.14.220.155]:34522 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756152AbZJaKdQ (ORCPT ); Sat, 31 Oct 2009 06:33:16 -0400 Received: by fg-out-1718.google.com with SMTP id 16so1945241fgg.1 for ; Sat, 31 Oct 2009 03:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=5TMrWmcjwpldQoWgef76as8FDPw4FgecUtCdV07mKOA=; b=BgnLfJn5vQNoHvlX/EFqcm5ld+angXvRCOOD02FOrNtqiqoEnIIPRv7tv18nuJPRF+ +qzTh/m08hYrmrvHpnJ0GWE+qTe07IOC+CoJMWSJznfuPxjTvUc8RFygvav9YYYTNvO9 3QDNxUfuDx/DftN53Yc88bvpI6Yux7NP20yx4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=rNu5qmjr13lp4IiwomlPwndrfQ69njBg9BABU9oL4DuVcgowCD7s+Qxj6fCNPXu6Ia 31n9ZzEOiKAelFLBJls7bzCg0gN9ynRgNrCZkigLAijCJIcqtyA0l3Pvixik829418pP /V1ekCRZDtwHvNSbtR8PC4hXYKQI/SuUtzIqo= Received: by 10.87.62.6 with SMTP id p6mr366075fgk.10.1256985200618; Sat, 31 Oct 2009 03:33:20 -0700 (PDT) Received: from ?10.1.0.2? (87.68.245.230.adsl.012.net.il [87.68.245.230]) by mx.google.com with ESMTPS id l19sm924666fgb.21.2009.10.31.03.33.18 (version=SSLv3 cipher=RC4-MD5); Sat, 31 Oct 2009 03:33:19 -0700 (PDT) Subject: Re: [PATCH 1/2] Allow scanning while in authenticated only state From: Maxim Levitsky To: Johannes Berg Cc: linux-wireless , "hostap@lists.shmoo.com" In-Reply-To: <1256983366.3555.119.camel@johannes.local> References: <1256939391.31271.11.camel@maxim-laptop> <1256939549.31271.14.camel@maxim-laptop> <1256967782.3555.69.camel@johannes.local> <1256982381.3089.10.camel@maxim-laptop> <1256983366.3555.119.camel@johannes.local> Date: Sat, 31 Oct 2009 12:33:16 +0200 Message-ID: <1256985196.3089.34.camel@maxim-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index b3861f5..dfed87d 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -2046,12 +2046,18 @@ static int wpa_driver_nl80211_deauthenticate(void *priv, const u8 *addr, static int wpa_driver_nl80211_disassociate(void *priv, const u8 *addr, int reason_code) { + int err; struct wpa_driver_nl80211_data *drv = priv; if (!(drv->capa.flags & WPA_DRIVER_FLAGS_SME)) return wpa_driver_nl80211_disconnect(drv, addr, reason_code); wpa_printf(MSG_DEBUG, "%s", __func__); drv->associated = 0; - return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DISASSOCIATE, + + err = wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DISASSOCIATE, + reason_code); + if (err) + return err; + return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DEAUTHENTICATE, reason_code); }