From patchwork Tue Jul 21 09:11:40 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: 6833581 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 6B145C05AC for ; Tue, 21 Jul 2015 09:12:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97D1A205EC for ; Tue, 21 Jul 2015 09:12:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 128ED205EB for ; Tue, 21 Jul 2015 09:12:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753074AbbGUJMg (ORCPT ); Tue, 21 Jul 2015 05:12:36 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:36747 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752670AbbGUJMf (ORCPT ); Tue, 21 Jul 2015 05:12:35 -0400 Received: by lbbqi7 with SMTP id qi7so31047234lbb.3 for ; Tue, 21 Jul 2015 02:12:33 -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; bh=bwPqd4eCMnM8RXwHeFy4jp06CJTRUtYDUaki7aOa/ns=; b=kNMf8SphqeZTHmhWwNw+hEB924+znp3/NVPGXs3HSIlOsx8Qd2qTr+Ha5ogiBRVe1Y YXfYF3xy96eLL+VG/4xjcbx9nAbtNRkNpRTXvzvwsKWFAOR0GFg4iv7SUKyptUqikm8S EhImZnJuZLdSA4/aYI3va43DlrMCquGLrpXr4= 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; bh=bwPqd4eCMnM8RXwHeFy4jp06CJTRUtYDUaki7aOa/ns=; b=QcxAHIPGyH8GyNVfac568PFV1N3Axh7aZaXWVNfvU6FOf1Dg4JbV6FTo/FScJLJV5A HBNx4cmn10OHT+gzTItvDDwSt8lnu45EJztKb9Jq391jwE0IwiBpxHavDHtSJ6p2xwtt FtV0Crnj7EzogZIFjXTgcM+gzzPSN+Mr6rXmM36v7xbpH/a5N3UaIYNsOOlJ4Jp9TLZr L/IsVIHK7DBhljIZbgkuE2UqBDll3QBb/rYeTupet5XXuhhvSN4ko1u9p8/pzxIcDxgl 3aubNuA1Kx69BxjqADz6/Np6bKZMC8yRNvBap1qma+2oPqTasL3Rd6bWkSd2yZSg7pPA L1rg== X-Gm-Message-State: ALoCoQlfmaXSAtCL0XxbczeGuCjs4lHWp6YISmRWKxOARMyVfJbCOBZeh96sImqY9uvaQa1hF+k+vOXAEKxO8BPYgQa2/zdQ1IVVtGv7Qoygv8bf1/F3Py/z7pY5FWWiM+KPw+0wkIxioW902g3Eu6FoAYatzhli1ez97zH4odGMHmKuVZ+NKAi6m0XXNcYH9XKWvtT4S9X4 X-Received: by 10.152.87.165 with SMTP id az5mr31800189lab.8.1437469953289; Tue, 21 Jul 2015 02:12:33 -0700 (PDT) Received: from localhost.localdomain (apn-37-7-180-144.dynamic.gprs.plus.pl. [37.7.180.144]) by smtp.gmail.com with ESMTPSA id r4sm5862088lag.46.2015.07.21.02.12.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Jul 2015 02:12:31 -0700 (PDT) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: ath9k-devel@lists.ath9k.org, nbd@openwrt.org, sujith@msujith.org, Janusz Dziedzic Subject: [PATCH v3 1/4] ath9k: advertise p2p dev support when chanctx Date: Tue, 21 Jul 2015 11:11:40 +0200 Message-Id: <1437469903-32362-1-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 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.0 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index eff0e53..89a457d 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,10 @@ 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); }