From patchwork Tue Dec 10 15:20:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Markowski X-Patchwork-Id: 3318941 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 323489F1F0 for ; Tue, 10 Dec 2013 15:21:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 815162021C for ; Tue, 10 Dec 2013 15:20:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE5AB2020F for ; Tue, 10 Dec 2013 15:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754196Ab3LJPUt (ORCPT ); Tue, 10 Dec 2013 10:20:49 -0500 Received: from mail-ea0-f174.google.com ([209.85.215.174]:38957 "EHLO mail-ea0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753910Ab3LJPUo (ORCPT ); Tue, 10 Dec 2013 10:20:44 -0500 Received: by mail-ea0-f174.google.com with SMTP id b10so2306129eae.19 for ; Tue, 10 Dec 2013 07:20:43 -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; bh=JpxYPRHA1zF1ntYE4TSWLwFY3eCoFpyw52m5j52xD0g=; b=4eUedrjAPSnBjiJDblzjx2JNbMpR8I8ooD1iViRFnT5gvjAWUqYkk3ksTDuA19ap24 zoVPoKigKSnOkTLLLcAlI9Yztz9DwRdDCjEvWUSr1CqgjVUw/l9Ai94gyXDGJp/jbbpi Qmjz8akJmXF1K+vVcnGnrTSbDLT0B/tFIulpY= 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=JpxYPRHA1zF1ntYE4TSWLwFY3eCoFpyw52m5j52xD0g=; b=YHj/aKQG0rgGEXhGMVaURR+oK3NEMkO10J0jjrYfzgUg6X2JaQ9ZpbprW0YjrcH+Nn n0Q40nRWkLdbZUHEna5SIU9CVvKuLlUVULML4ZFaqEkP+01l9jb28hjW+NVrycLmH6E9 SB0ATmacFDuLHr3J8Lpet9rUolBdoLvDgxQ2/RifJC1CYIxmkmDedvUrkAMbYMp4v19L oMDRV65n0AUihjWW8emfkbg35X3Te6GlfBCYYfC3tgVSRpT+Tc2IYy/TO+AgmBo6Nq1W EEPfp5J3g4wh3pI6sMNQrZ0UbxLmpt0OkGGrkeHzowGgrdWS8ZDFeEl/kVOE9/jyCewz WqVA== X-Gm-Message-State: ALoCoQlKme4utllHvTxgo/e4+rAzY06wIejX6diHK1zhHM929Zn/4bjDX/JXXYUjdnsYoq4sdjCAcTRZEX7R9ERTO1VT/454iceHgbvPFxUR1QzBaNxHMGM= X-Received: by 10.15.82.8 with SMTP id z8mr19056237eey.25.1386688843749; Tue, 10 Dec 2013 07:20:43 -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.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Dec 2013 07:20:43 -0800 (PST) From: Bartosz Markowski To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Bartosz Markowski Subject: [PATCH 1/2] ath10k: split the if_limits and if_comb Date: Tue, 10 Dec 2013 16:20:39 +0100 Message-Id: <1386688840-12181-1-git-send-email-bartosz.markowski@tieto.com> X-Mailer: git-send-email 1.7.10 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 Split the interface limits and inteface combination, to reflect the 10.X capabilites (no P2P, no STA and 8 VAP). Signed-off-by: Bartosz Markowski --- drivers/net/wireless/ath/ath10k/mac.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index ce9ef349..35952a4 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3464,14 +3464,12 @@ static const struct ieee80211_iface_limit ath10k_if_limits[] = { }, }; -#ifdef CONFIG_ATH10K_DFS_CERTIFIED -static const struct ieee80211_iface_limit ath10k_if_dfs_limits[] = { +static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = { { .max = 8, .types = BIT(NL80211_IFTYPE_AP) }, }; -#endif static const struct ieee80211_iface_combination ath10k_if_comb[] = { { @@ -3481,19 +3479,22 @@ static const struct ieee80211_iface_combination ath10k_if_comb[] = { .num_different_channels = 1, .beacon_int_infra_match = true, }, -#ifdef CONFIG_ATH10K_DFS_CERTIFIED +}; + +static const struct ieee80211_iface_combination ath10k_10x_if_comb[] = { { - .limits = ath10k_if_dfs_limits, - .n_limits = ARRAY_SIZE(ath10k_if_dfs_limits), + .limits = ath10k_10x_if_limits, + .n_limits = ARRAY_SIZE(ath10k_10x_if_limits), .max_interfaces = 8, .num_different_channels = 1, .beacon_int_infra_match = true, +#ifdef CONFIG_ATH10K_DFS_CERTIFIED .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | BIT(NL80211_CHAN_WIDTH_20) | BIT(NL80211_CHAN_WIDTH_40) | BIT(NL80211_CHAN_WIDTH_80), - } #endif + }, }; static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar) @@ -3717,8 +3718,15 @@ int ath10k_mac_register(struct ath10k *ar) */ ar->hw->queues = 4; - ar->hw->wiphy->iface_combinations = ath10k_if_comb; - ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ath10k_if_comb); + if (!test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) { + + ar->hw->wiphy->iface_combinations = ath10k_if_comb; + ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ath10k_if_comb); + + } else { + ar->hw->wiphy->iface_combinations = ath10k_10x_if_comb; + ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ath10k_10x_if_comb); + } ar->hw->netdev_features = NETIF_F_HW_CSUM;