From patchwork Tue Jan 30 11:10:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Otcheretianski, Andrei" X-Patchwork-Id: 867414 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="rlhiEn1d"; 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 3zVzdk1RQyz9s7n for ; Tue, 30 Jan 2018 19:12:58 +1100 (AEDT) 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=Sk+nIt5WcvnNkkZS1C3xJ+XP+0en9RpaXLE9D/o5ZIk=; b=rlh iEn1dNe7AIlcXPLBVh78KG3t3ulHyzwP8KDmgeuMtoEWLMfYriMkNqdtTytlt3wKEZuuSLJRKtdYL idUT0ARfsunAoC0dIUaTpWsv/BGkZbu8NdqMSr8zE7oUe2u64HvV7C9aHAd/eluOR4dT10BhSKq9v hBzcxWRgQBRJ+RsLRJ21pqpkNv95Cw0gdulzfTFxIcntDL23jyLjpq0vXRyFgF2Jaect8E/V58dng hxti5d9fZqsHoqdhDryjlYmxyMDXe4V70+n7eABpK7p7i+LdX+lHccvn1b+4T3Akp1muF2diJH481 0RbTcZJWDFvyoiG5UN1qiXz8GnqP8ag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1egR23-0008Ep-4U; Tue, 30 Jan 2018 08:12:43 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1egR1v-0008EQ-Ni for hostap@lists.infradead.org; Tue, 30 Jan 2018 08:12:42 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2018 00:12:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,433,1511856000"; d="scan'208";a="23522113" Received: from unknown (HELO andrei-XPS-12-9Q33.ger.corp.intel.com) ([10.12.217.183]) by FMSMGA003.fm.intel.com with ESMTP; 30 Jan 2018 00:12:23 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Subject: [PATCH] tests: enable device ps before sending ps_poll Date: Tue, 30 Jan 2018 13:10:10 +0200 Message-Id: <1517310610-9300-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: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.55.52.115 listed in list.dnswl.org] -0.0 T_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: Adiel Aloni MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Adiel Aloni Commit c9491367b759 ("mac80211: always update the PM state of a peer on MGMT / DATA frames") enforces the ap to check only mgmt/data frames pm bit, and to update station's power save accordingly. When sending only ps-poll (control frame) the ap will ignore the PM bit. As the result, the partial virtual bitmap will not be updated, and the test ap_open_disconnect_in_ps will fail on tshark check. Since the test needs only the TIM to be updated, setting ps enable will send NDP that will signal that the station is sleeping. Sending PS-POLL to enable power save is not correct, according to the following spec statement: "A PS-Poll frame exchange does not necessarily result in an Ack frame from the AP, so a non-AP STA cannot change power management mode using a PS-Poll frame" Signed-off-by: Adiel Aloni --- tests/hwsim/test_ap_open.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_ap_open.py b/tests/hwsim/test_ap_open.py index b888002..1b62ea6 100644 --- a/tests/hwsim/test_ap_open.py +++ b/tests/hwsim/test_ap_open.py @@ -426,7 +426,9 @@ def test_ap_open_disconnect_in_ps(dev, apdev, params): raise Exception("No connection event received from hostapd") time.sleep(0.2) - hwsim_utils.set_powersave(dev[0], hwsim_utils.PS_MANUAL_POLL) + #setting power save enabled + hwsim_utils.set_powersave(dev[0], hwsim_utils.PS_ENABLED) + time.sleep(0.1) try: # inject some traffic sa = hapd.own_addr()