From patchwork Thu Nov 12 13:15:41 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: 7602141 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 EBA2F9F1C2 for ; Thu, 12 Nov 2015 13:16:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1BB922079F for ; Thu, 12 Nov 2015 13:16:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0016C20434 for ; Thu, 12 Nov 2015 13:16:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753060AbbKLNQV (ORCPT ); Thu, 12 Nov 2015 08:16:21 -0500 Received: from mail-lb0-f170.google.com ([209.85.217.170]:34393 "EHLO mail-lb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752927AbbKLNQQ (ORCPT ); Thu, 12 Nov 2015 08:16:16 -0500 Received: by lbbcs9 with SMTP id cs9so34648999lbb.1 for ; Thu, 12 Nov 2015 05:16:14 -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=TGFG8yE6FABhPEQDsbn3wc/ptUh1A1Wzs3ko84znr/8SsyRp3ggXMz3Vg3/3xbMmab VJJbJGBe8DVNoRxIAsTHH10B3uqIWEhKfH5iZZauVm4OFHnOYAaX2Lnp92Dmv3fFU3lM Fgo2TpTS3zWApy7q15mmv+Ow8iziMSgt4Eix0= 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=DCiZrJfTrneEXqigHyzZHMq7s7uVVrREFrVRJrrrGicRf9WUGUVuPwl8GMeLyko1n/ j2CyO24xE1HnFUM1h+C3deQJ36+Daa+bVGsLLHEbVP6wclgkwgTEsgVXvlxiUH9XIXTf X57k848xYyXb+QomkTuYt4S4Sq2zT+3XKaK6TH2nj1B4GNDavCLYoVWFCOT1SgwpzS12 L0cuo1LY8r7bghj1cc3GY2x0QW9up4/CpyOhBXZtv9ikuwzaGjdaS72SbXZv2TuHAd0m 5eW8qr1ZiLPrDOKhGYJ21fzX6sgg6wwBGxtOnipTsfmxzxVeIBLqnfZImKUcBT68bD34 1gDw== X-Gm-Message-State: ALoCoQk9S/xzt9ZeSLd3wzxNcsjex9DQnBSz+l3QpUQtFBsRhtz0OSpOwvS7bLFxDoZHinESVx7xwlkTZnZnOZ+fTkMNAx2RRrg5g/Ph8hLAWheEX2cQlvv1MFyKBt/MmdgMtuVUHaXYhWnO/AfkbMCgnbekOwbzyQUMlf+bg5NPaK/I1zGpGZHl6zqVMYiCgfdctf12fxdZ X-Received: by 10.112.42.41 with SMTP id k9mr7122264lbl.63.1447334174712; Thu, 12 Nov 2015 05:16:14 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id i7sm2251430lbo.39.2015.11.12.05.16.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Nov 2015 05:16:14 -0800 (PST) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: ath9k-devel@lists.ath9k.org, Janusz Dziedzic Subject: [PATCH 04/12] ath9k: P2P_CLIENT, send frames after 1ms AP/GO will aprear Date: Thu, 12 Nov 2015 14:15:41 +0100 Message-Id: <1447334149-15507-4-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447334149-15507-1-git-send-email-janusz.dziedzic@tieto.com> References: <1447334149-15507-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=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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))