From patchwork Mon Jun 22 11:43:05 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: 6655171 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 2AC31C05AC for ; Mon, 22 Jun 2015 11:43:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 803F1205E3 for ; Mon, 22 Jun 2015 11:43:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 62830205E2 for ; Mon, 22 Jun 2015 11:43:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756109AbbFVLnk (ORCPT ); Mon, 22 Jun 2015 07:43:40 -0400 Received: from mail-lb0-f182.google.com ([209.85.217.182]:36728 "EHLO mail-lb0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754609AbbFVLng (ORCPT ); Mon, 22 Jun 2015 07:43:36 -0400 Received: by lbbpo10 with SMTP id po10so7255616lbb.3 for ; Mon, 22 Jun 2015 04:43:35 -0700 (PDT) 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=NprPZ77DqQdqtmw+H75iaef9b0k/8jdZgOADjQzOOOo=; b=batNq1/gxj5qbwQAkMykUyvyCSW7Lr1A0NJf/bUOhJiOnhoVy1iXCGkj2ii7916zDD u9ebeo9j8Y3pxbBKsoJDddkvG8O+HFgEAZpvdfNzuFvONzaNP2nEhPUlLm+rwW5HCllF yQkfcnGvCb9yyf3zyqhz597WWTqywLV0hGjik= 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=NprPZ77DqQdqtmw+H75iaef9b0k/8jdZgOADjQzOOOo=; b=WqcmdQuvVyZTvmhj0RQaI8MtN1S6ufCQxKtiZii3y4X3VMlgYk3/BJonFLdfg4mvF8 9kpYuL+N49/Ddz9bMMpE5Q3KR6TFsut8CeOG45vWFxlimK5sZqOuG44l4grsIxSlVzxE edxNKHLRvU0MZOI9IbfAEyplGiYfTwPiOkfl+dIwl6DJmSDxiGHvQPAA9KbdoiJfKj8k GjJtSkjg4Tl9xWJmL246t81eSMrWOnST8NOa0MX85jk8ZzlbxOy+HZc5b82a5KelLEeU gQ6gUXs6EAHjQIKdauggl8FV28WIipU4QHy+rrUs6ceayRbgL1mT0l4sXYMLaSIWPpKd 8HxA== X-Gm-Message-State: ALoCoQmXzCCknNRcvvZy9Q8tk1ntGGnuusl19eoiYGxXPUvLcxQUyEmOWStfrFcMlQNLkOHgbtadqdMBZUCJ8RWRvA6aRCZ6RmFBj60zJfUbtOYR26QR8oruJI7blbjoWvTQT+hCuPaRq+HsphG9+iAZnJWSgvOO5gQwKvglDkyNiXPD6L81SRzpN1aWVSab7Qpw3beLUGwe X-Received: by 10.112.30.133 with SMTP id s5mr30174155lbh.31.1434973415300; Mon, 22 Jun 2015 04:43:35 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id cq1sm2442725lad.18.2015.06.22.04.43.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Jun 2015 04:43:34 -0700 (PDT) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: ath9k-devel@venema.h4ckr.net, nbd@openwrt.org, sujith@msujith.org, Janusz Dziedzic Subject: [PATCH 3/3] ath9k: advertise p2p dev support when chanctx Date: Mon, 22 Jun 2015 13:43:05 +0200 Message-Id: <1434973385-15865-4-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434973385-15865-1-git-send-email-janusz.dziedzic@tieto.com> References: <1434973385-15865-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=-8.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 Advertise p2p device support when ath9k loaded with use_chanctx=1. This will fix problem, when first interface is an AP and next we would like to run p2p_find. Before p2p find (scan phase) failed with EOPNOTSUPP. Signed-off-by: Janusz Dziedzic --- drivers/net/wireless/ath/ath9k/init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index f8d11ef..7da1a17 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -736,13 +736,14 @@ static const struct ieee80211_iface_limit if_limits_multi[] = { BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO) }, { .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) }, + { .max = 1, .types = BIT(NL80211_IFTYPE_P2P_DEVICE) }, }; static const struct ieee80211_iface_combination if_comb_multi[] = { { .limits = if_limits_multi, .n_limits = ARRAY_SIZE(if_limits_multi), - .max_interfaces = 2, + .max_interfaces = 3, .num_different_channels = 2, .beacon_int_infra_match = true, }, @@ -855,6 +856,9 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) BIT(NL80211_IFTYPE_MESH_POINT) | BIT(NL80211_IFTYPE_WDS); + if (ath9k_is_chanctx_enabled()) + hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_P2P_DEVICE); + hw->wiphy->iface_combinations = if_comb; hw->wiphy->n_iface_combinations = ARRAY_SIZE(if_comb); }