From patchwork Fri Nov 27 08:37:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 7711791 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9699E9F1D3 for ; Fri, 27 Nov 2015 08:37:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C75572063F for ; Fri, 27 Nov 2015 08:37:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04477205F9 for ; Fri, 27 Nov 2015 08:37:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754152AbbK0Ihc (ORCPT ); Fri, 27 Nov 2015 03:37:32 -0500 Received: from mail-lf0-f53.google.com ([209.85.215.53]:34301 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754071AbbK0Ih2 (ORCPT ); Fri, 27 Nov 2015 03:37:28 -0500 Received: by lffu14 with SMTP id u14so121540494lff.1 for ; Fri, 27 Nov 2015 00:37:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SCQ2AQT8luoPXFSrzmSJ17BGiamZtL9gF6OsxV5wknE=; b=SQzZ4pDxsALUv0z7YdOjocxvXmZOIDaN05hpnyb5cucCcTiTL72gzSIik7glFk3QGr t47Sdl/0vN5eAzixuFdtCcntyYufUcH3qP6Jv7oC2xoglApmkeBi/055SJMFm0bksyOK /Yn2FkZODp57c8z6W318DczBSzXJ2kLs5Z3yg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SCQ2AQT8luoPXFSrzmSJ17BGiamZtL9gF6OsxV5wknE=; b=NOUAhSJoERF0AKRq2yUdP4S0AHwtouT7/+t3BgO1xAh7H4r0E+6qruGo2kAB3gdDHd 0AxlJDuUt8JqLatjVRpCmEiE4KzJCoD3dpOxcqdnsyIeYblnh7kdlqnkH1BarkSOfif0 aI3SK8zfKL30M5SeqLfxQL6tr47V+OPleAJVDTWXMFljoHgyOyrox5InLS/z8dIWR2y0 2MeihP1gSPI+yfFTsj+f/Rz6JSViRJ6WW67SAJ5SzGFPFBIx/8hDvAMPKyhaP8tvbSin LZeyoXgAujQXnKIdkAwBX7jCkMVzLxQZeeAvxeWOHO5+WuOWYGvCdYkiiVSjLEwD90yA /vQQ== X-Gm-Message-State: ALoCoQnvnZ1346yAwppAdqgwY2nwVeL4a9TXa2jTdWxQXHdjD9XHh06qNszbCZEi2cBTdM6tuTQSu6ENO75YXcAhQgiElw5TtfdA+Nd6C0xWpSpJuNxXGGEIJV9kwgZDjaPP8s9wJtaIikZpotZP/NcpuER5K4lsSdzhVv+hDbzkMl1aiRAnJnlOo7F5Hb4yjfkgxKVedQFj X-Received: by 10.25.85.200 with SMTP id j191mr19519229lfb.131.1448613446740; Fri, 27 Nov 2015 00:37:26 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id l128sm4838004lfe.27.2015.11.27.00.37.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Nov 2015 00:37:26 -0800 (PST) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: ath9k-devel@lists.ath9k.org, nbd@openwrt.org, Janusz Dziedzic Subject: [PATCH v2 04/13] ath9k: P2P_CLIENT, send frames after 1ms AP/GO will aprear Date: Fri, 27 Nov 2015 09:37:09 +0100 Message-Id: <1448613438-5173-4-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1448613438-5173-1-git-send-email-janusz.dziedzic@tieto.com> References: <1448613438-5173-1-git-send-email-janusz.dziedzic@tieto.com> X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP AP/GO will aprear after NOA, wait 1ms to be sure AP could receive/answer this frames. Signed-off-by: Janusz Dziedzic --- drivers/net/wireless/ath/ath9k/channel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index dddaaea..5640e88 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -1417,6 +1417,8 @@ static void ath9k_update_p2p_ps_timer(struct ath_softc *sc, struct ath_vif *avp) target_tsf = avp->noa.next_tsf; if (!avp->noa.absent) target_tsf -= ATH_P2P_PS_STOP_TIME; + else + target_tsf += ATH_P2P_PS_STOP_TIME; if (target_tsf - tsf < ATH_P2P_PS_STOP_TIME) target_tsf = tsf + ATH_P2P_PS_STOP_TIME; @@ -1543,6 +1545,8 @@ void ath9k_p2p_ps_timer(void *priv) tsf = ath9k_hw_gettsf32(sc->sc_ah); if (!avp->noa.absent) tsf += ATH_P2P_PS_STOP_TIME; + else + tsf -= ATH_P2P_PS_STOP_TIME; if (!avp->noa.has_next_tsf || avp->noa.next_tsf - tsf > BIT(31))