From patchwork Fri Nov 27 08:37:14 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: 7711881 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 284AE9F1D3 for ; Fri, 27 Nov 2015 08:38:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5A5092060D for ; Fri, 27 Nov 2015 08:38:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7069720641 for ; Fri, 27 Nov 2015 08:38:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754169AbbK0Ihs (ORCPT ); Fri, 27 Nov 2015 03:37:48 -0500 Received: from mail-lf0-f46.google.com ([209.85.215.46]:36039 "EHLO mail-lf0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753982AbbK0Ihf (ORCPT ); Fri, 27 Nov 2015 03:37:35 -0500 Received: by lfs39 with SMTP id 39so118585476lfs.3 for ; Fri, 27 Nov 2015 00:37:33 -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=b9ggVaji7DU0zvW8ynt7vlfymw8pRreL0KhqBx5/Blg=; b=J0Y6d7HFTijeK8BpXFgFJPM7Sy8kRNe/dZnhPiIBBR+49OmtA8xe+TY/G33AJ03+g4 Yop0+wVpUSffyFGzQ6EnsivWigZn8LyLwTlTIM9b4kR2l/LwJkapikT0nHJM791MSbI/ WSqoO/TdjBVmI3vuGjaDKgWp6McG4eyO3/Z+4= 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=b9ggVaji7DU0zvW8ynt7vlfymw8pRreL0KhqBx5/Blg=; b=fV7mcIRnfshRAjSYvNvFLCZaVVojlZiDPHTe4SfNxEHOyQaQTCNGEgj8cnrKIlcWMn LaWWfcMsPoduRmS/YX/o8rp4YE0mWiWJSE+9Jhad2nceGg1dE75spa5yh9G3kRoC+Zei dUWQkmAMY+I4yTB/K+FENh0+4ZDPydgtFDrZ4CmI9UxuGuHQkpNqn5gBwxhE7gDz6u9w sX/HEAuVGvDDcD4Rxr+J2k6atyn9/eJ/Chf5JgcU1YWOTb0GTW8tvWzRna5iQTQvsD8q xLJRM9t//6HxZOtAWW4yZyUf4dUT8xBibaAxuJ+3ElMsz3n8aqaaT0nfdSVz1JGg6BTg y7Tg== X-Gm-Message-State: ALoCoQnjUA9r4rs+K76f0DYxgN0xlxFHUHtGVw/WtNhmfYeJa+zh18sQoAyM8hBZfOBnuprgZ1bM5mFjXHsGnFEdgYrFx3HbUhh8N+c+0+9fGcAQWXRIP2AsRs4He7YzcwY7Q6mROGO4I70Ia+0Hkj5hi8CYQUDni/Qk3+EeHNuXE6/f1thGvDJTC9UKr/RWvHDqNUY8f7A5 X-Received: by 10.112.134.169 with SMTP id pl9mr19316324lbb.145.1448613453743; Fri, 27 Nov 2015 00:37:33 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id l128sm4838004lfe.27.2015.11.27.00.37.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Nov 2015 00:37:32 -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 09/13] ath9k: request NOA update when chanctx active Date: Fri, 27 Nov 2015 09:37:14 +0100 Message-Id: <1448613438-5173-9-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 Request NOA update when chanctx active, also in case of STA. Signed-off-by: Janusz Dziedzic --- This depends on: mac80211: add new IEEE80211_VIF_GET_NOA_UPDATE flag drivers/net/wireless/ath/ath9k/channel.c | 2 +- drivers/net/wireless/ath/ath9k/main.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 5a1ede6..c94d7d9 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -1439,7 +1439,7 @@ static void ath9k_update_p2p_ps(struct ath_softc *sc, struct ieee80211_vif *vif) if (!sc->p2p_ps_timer) return; - if (vif->type != NL80211_IFTYPE_STATION || !vif->p2p) + if (vif->type != NL80211_IFTYPE_STATION) return; sc->p2p_ps_vif = avp; diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index d184e68..ab46a4d 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -974,7 +974,7 @@ static void ath9k_update_bssid_mask(struct ath_softc *sc, if (ctx->nvifs_assigned != 1) continue; - if (!avp->vif->p2p || !iter_data->has_hw_macaddr) + if (!iter_data->has_hw_macaddr) continue; ether_addr_copy(common->curbssid, avp->bssid); @@ -1251,6 +1251,9 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type); sc->cur_chan->nvifs++; + if (vif->type == NL80211_IFTYPE_STATION && ath9k_is_chanctx_enabled()) + vif->driver_flags |= IEEE80211_VIF_GET_NOA_UPDATE; + if (ath9k_uses_beacons(vif->type)) ath9k_beacon_assign_slot(sc, vif);