From patchwork Tue Dec 10 15:20:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Markowski X-Patchwork-Id: 3318951 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 19D2A9F38F for ; Tue, 10 Dec 2013 15:21:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC6F7201BF for ; Tue, 10 Dec 2013 15:21:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 814CC20219 for ; Tue, 10 Dec 2013 15:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753910Ab3LJPUu (ORCPT ); Tue, 10 Dec 2013 10:20:50 -0500 Received: from mail-ea0-f181.google.com ([209.85.215.181]:52585 "EHLO mail-ea0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754028Ab3LJPUq (ORCPT ); Tue, 10 Dec 2013 10:20:46 -0500 Received: by mail-ea0-f181.google.com with SMTP id m10so2300158eaj.26 for ; Tue, 10 Dec 2013 07:20:45 -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=OWPd8en+O98QSSAhkyQyUKMIjtRZlZKPhdw6adykyeE=; b=tBtspZMDfeYxaCMiqKcRFy3jWiTAunAJwgdHVP1Ou9+fqEVXdnqWzd65hVHAopC3H8 aQwRErlWXwK5cr34Tlq8ju4kdpyxub1cWA4ZWYhQppN2XjtlSOT4CXOSzmMXryuWupso d/FIRcYGsvao/ceTHxb2W6phzxPac8C1CtqrI= 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=OWPd8en+O98QSSAhkyQyUKMIjtRZlZKPhdw6adykyeE=; b=Ioam9xHhrOv7EUg8E5bpGNHu0gtxcvEnwxCmzJ7r5kzVfVJRqRcA9qDNfjBIXwuf93 8beM5VhtmMuSRLDVEJtubjVh0cPrWc6YoRzvID6nty6th90FQZdxT1/tiPyyXmXGU9rn GLj2XL8Qhio5DCMiyANPGvYhXSHVaNGsepHfA+Q4lu2UGPWwUlPNPYUvtwY0ucLMv9lK iQUF9x9Yj3msCLSfKbVANCeVxePFuSEQYHdI/5m8CAHOVRgNCNa/Q1mGZZR2FOjGEJ7Y W77sMwPZmJ/ef5ah0vB/8pRLoYANuYIDMk6epRf6dbfSpSsZxN0PtyBDDppWiCcyYzH0 sqGA== X-Gm-Message-State: ALoCoQk25vcdVuQ/xUwyHOkhMehTXvhnDN8CfaakOnCh8lmF+T6wP2fXSaeEbwCXLynmoXOMygwFregsBEb8eq65x3bmh0UtsqhIovlK6etjsRmNg095pnA= X-Received: by 10.15.26.200 with SMTP id n48mr18899791eeu.46.1386688845114; Tue, 10 Dec 2013 07:20:45 -0800 (PST) Received: from uw000975.eu.tieto.com. ([91.198.246.10]) by mx.google.com with ESMTPSA id z42sm42367416eeo.17.2013.12.10.07.20.43 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Dec 2013 07:20:44 -0800 (PST) From: Bartosz Markowski To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Bartosz Markowski Subject: [PATCH 2/2] ath10k: introduce NO_P2P fw feature flag Date: Tue, 10 Dec 2013 16:20:40 +0100 Message-Id: <1386688840-12181-2-git-send-email-bartosz.markowski@tieto.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1386688840-12181-1-git-send-email-bartosz.markowski@tieto.com> References: <1386688840-12181-1-git-send-email-bartosz.markowski@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.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 Not each ath10k FW track supports P2P (10.X for instance does not) This new firmware feature flag allows to turn off P2P interface type. Signed-off-by: Bartosz Markowski --- drivers/net/wireless/ath/ath10k/core.h | 3 +++ drivers/net/wireless/ath/ath10k/mac.c | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 79726e0..035cbf6 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -306,6 +306,9 @@ enum ath10k_fw_features { /* firmware support tx frame management over WMI, otherwise it's HTT */ ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX = 2, + /* Firmware does not support P2P */ + ATH10K_FW_FEATURE_NO_P2P = 3, + /* keep last */ ATH10K_FW_FEATURE_COUNT, }; diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 35952a4..cdc24d8 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3673,9 +3673,12 @@ int ath10k_mac_register(struct ath10k *ar) ar->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC) | - BIT(NL80211_IFTYPE_AP) | - BIT(NL80211_IFTYPE_P2P_CLIENT) | - BIT(NL80211_IFTYPE_P2P_GO); + BIT(NL80211_IFTYPE_AP); + + if (!test_bit(ATH10K_FW_FEATURE_NO_P2P, ar->fw_features)) + ar->hw->wiphy->interface_modes |= + BIT(NL80211_IFTYPE_P2P_CLIENT) | + BIT(NL80211_IFTYPE_P2P_GO); ar->hw->flags = IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_SUPPORTS_PS |