From patchwork Mon Aug 21 16:36:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 804032 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WuZJQIQ/"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="QCHYDL9n"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xbbCn46gfz9rvt for ; Tue, 22 Aug 2017 00:09:25 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=q7IjH528z/Yb3d/meAuxiw4MG8NDRnoBGlx37fsL4TY=; b=WuZ JQIQ/1mTYON03erylyzbkFpaM2rtrJ4Mzb2lR0LmzDKqry2etQoATxap4yjQ/ttkeMdWWmZy4evS1 dCqG18RGMU4FmnM2om4IKHzwaPQGOBGoUrqwaGlmWYAYh8jpvXaPmhxLw74KDBmINsiz0Kt/3N++6 Y7MWzbWeI4VNEU2LymLgz8bHrBOk4hv43eX8lPTXeP/OcN721ubs8veKhd+94zgUr1nRag4oTgJED uAjKvSNAu0CaLA/JZPd317Lj4LeM3UOwqHPOEyRyYw1Th4ZGkQydF8sTT1GJsFS7lPNZmGHiVhzQA 6CVCwYUpS37jf3rwKVO9kFUNaHLhzPQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1djnOC-0007TL-KM; Mon, 21 Aug 2017 14:09:12 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1djnMX-0005sN-Rv for hostap@bombadil.infradead.org; Mon, 21 Aug 2017 14:07:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ITBDO/645h1XeGRHoCQeX/mQa6TdP2wAxXgiTPlYRXI=; b=QCHYDL9nu0x9UpuX0h5USqKtA RsuvA2e+kQGIc4C0SjbPpY1jpSCdtqvhKzCrf4yDAWX5b0puZv9UY6OVDgvZJW57xRAwx8+vX6+xB bYwfL/Mv2IHo7J+82X/48z0ImkNWl2NrBMJXQcRTNMGN9LSllgijGBAGh1SxfioI/aINTRTLGT7Ab t3WCxiU3Z3w9/aFDi3kIsC/ytj+2ByhxFZxcrF3jma4cGeWW5WaXEdwx32oYWDcw70fzBcYoRF7ja pDaaj6DwLUNqo38MrNair07v/18aPsQBdRzIjoS+EARiDx91GTBvJaxxBfi67otpsxhwP0d2x/k/b v3D1Pvl5A==; Received: from mga05.intel.com ([192.55.52.43]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1djmtW-0005az-Gw for hostap@lists.infradead.org; Mon, 21 Aug 2017 13:37:31 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP; 21 Aug 2017 06:37:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.41,409,1498546800"; d="scan'208"; a="1186135836" Received: from unknown (HELO andrei-XPS-12-9Q33.ger.corp.intel.com) ([10.12.217.183]) by fmsmga001.fm.intel.com with ESMTP; 21 Aug 2017 06:37:06 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Subject: [PATCH] AP: Remove unneeded check for 'added_unassociated' Date: Mon, 21 Aug 2017 19:36:21 +0300 Message-Id: <1503333385-15051-1-git-send-email-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.7.4 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ilan Peer MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Ilan Peer In fils_hlp_finish_assoc() the station is already added to the driver so it is not needed to check the 'added_unassociated' flag. Signed-off-by: Ilan Peer --- src/ap/ieee802_11.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 6f51214..f061839 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -2837,14 +2837,11 @@ void fils_hlp_finish_assoc(struct hostapd_data *hapd, struct sta_info *sta) sta->hlp_dhcp_discover = NULL; /* - * Remove the station in case tranmission of a success response fails - * (the STA was added associated to the driver) or if the station was - * previously added unassociated. + * Remove the station in case transmission of a success response fails. + * At this point the station was already added associated to the driver. */ - if (reply_res != WLAN_STATUS_SUCCESS || sta->added_unassoc) { + if (reply_res != WLAN_STATUS_SUCCESS) hostapd_drv_sta_remove(hapd, sta->addr); - sta->added_unassoc = 0; - } }