From patchwork Thu Nov 12 13:15:45 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: 7602211 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 29680BF90C for ; Thu, 12 Nov 2015 13:16:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AE6520434 for ; Thu, 12 Nov 2015 13:16:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 685E52079F for ; Thu, 12 Nov 2015 13:16:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753160AbbKLNQd (ORCPT ); Thu, 12 Nov 2015 08:16:33 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:33994 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752643AbbKLNQV (ORCPT ); Thu, 12 Nov 2015 08:16:21 -0500 Received: by lffu14 with SMTP id u14so33762952lff.1 for ; Thu, 12 Nov 2015 05:16:19 -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=jQAHutTTGVhASWr4MsZkUVO8D/nsUCWuFMNGLCYCaTg=; b=vfvGzpGPffVko3PGSZ1YmSk+dKw0uycVnyRsyKe6gCub9r4uMXllGfb/DAeQZ5DXpK qoPxmcrBjOEWmo08DFr9+UKlahXCoSSGwxSU4HEVvMs4bC5ro/JHoG2csfhYCPQraMNL Qo8AvbNp5FJuAxzv3p7q3v4QvdGR60xy/8ijU= 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=jQAHutTTGVhASWr4MsZkUVO8D/nsUCWuFMNGLCYCaTg=; b=ish9vbwTXfFYjWpw/77eO2PxVQLwEO1SrZ6qBb1KxJ4/hsAxWz2D6lXcIBhikcmgoZ pu5vMJwkVnGWCUFu1w3wOvKGYndxIMVo0hYmmmraQtSiESbQFkBjO1e/KBiz9kHWQVCy W9TTO9SuEWeQCPliHsVqfdz95FZ9NkP7UuhY+2ITyw3uQzUsslZA1WflUchF1c0L5FoK Iqq8jjoQuu7mdWPq1PThRVoQCJd5l8vbAkWd06FWuJoZS8HUUXElRljhKi6pdQoBDwbW hQp3kZQEbR7+JyOv1njCMRvzUMdNY97s698Phl826fvDbzj0aYd8J0Sz4rPvyFQ3ugJT mz0g== X-Gm-Message-State: ALoCoQm2sd7VPZKHBZKH7jNbN2ILGk3UBd54ZyQ31i4l09DrldfFA/yHKGdYj9NlzboXkX5EERjRCkClxp8gwZRDOVZEEBMA4+6WcXCoCO+6JanL4Azk7hG2yqKUW7s0sb14Y08bUWPU7B43HoeT5TXLvipyLxcgvqZgffhaSTDot6OZGturKe2J+O06xiwgpNCN/xadJW0n X-Received: by 10.25.35.194 with SMTP id j185mr6985270lfj.62.1447334179783; Thu, 12 Nov 2015 05:16:19 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id i7sm2251430lbo.39.2015.11.12.05.16.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Nov 2015 05:16:18 -0800 (PST) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: ath9k-devel@lists.ath9k.org, Janusz Dziedzic Subject: [PATCH 08/12] ath9k: P2P_CLIENT, get/set NOA correctly Date: Thu, 12 Nov 2015 14:15:45 +0100 Message-Id: <1447334149-15507-8-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 In case we get BSS_CHANGED_P2P_PS early, from mac80211, we didn't set NOA timer correctly, while p2p_ps_vif was NULL. Signed-off-by: Janusz Dziedzic --- drivers/net/wireless/ath/ath9k/channel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 2615392..db49bc5 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -1443,6 +1443,10 @@ static void ath9k_update_p2p_ps(struct ath_softc *sc, struct ieee80211_vif *vif) return; sc->p2p_ps_vif = avp; + + if (sc->ps_flags & PS_BEACON_SYNC) + return; + tsf = ath9k_hw_gettsf32(sc->sc_ah); ieee80211_parse_p2p_noa(&vif->bss_conf.p2p_noa_attr, &avp->noa, tsf); ath9k_update_p2p_ps_timer(sc, avp); @@ -1585,8 +1589,7 @@ void ath9k_p2p_bss_info_changed(struct ath_softc *sc, spin_lock_bh(&sc->sc_pcu_lock); spin_lock_irqsave(&sc->sc_pm_lock, flags); - if (!(sc->ps_flags & PS_BEACON_SYNC)) - ath9k_update_p2p_ps(sc, vif); + ath9k_update_p2p_ps(sc, vif); spin_unlock_irqrestore(&sc->sc_pm_lock, flags); spin_unlock_bh(&sc->sc_pcu_lock); }