From patchwork Tue Jun 16 05:53:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raja Mani X-Patchwork-Id: 6613591 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 B0ABCC0020 for ; Tue, 16 Jun 2015 05:55:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8A3C207AF for ; Tue, 16 Jun 2015 05:55:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E604E20768 for ; Tue, 16 Jun 2015 05:55:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752631AbbFPFz1 (ORCPT ); Tue, 16 Jun 2015 01:55:27 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:9167 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753646AbbFPFz0 (ORCPT ); Tue, 16 Jun 2015 01:55:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1434434127; x=1465970127; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=QTZw7fJlqTZ1DTuUJgrNpNrBR7d92lKBDCB5MHYZVAk=; b=Nk3XiiwWgSTUFBNCZWwGhy/gvWH8AGrlnC/C7I95hrp3RWNPPLnO79Qy NkndnCtqzdZOkGRrw1eaVPcgHxH5MfVRtq7uzqq5yScYZFAgEDrW67AOl ZCN+bWT1UNmnYn1cWKXux7AibkejdaHgQq6H2nAp8nmaWfDvOxfXVq88x s=; X-IronPort-AV: E=McAfee;i="5700,7163,7833"; a="123438583" Received: from ironmsg01-lv.qualcomm.com ([10.47.202.180]) by wolverine01.qualcomm.com with ESMTP; 15 Jun 2015 22:55:27 -0700 X-IronPort-AV: E=Sophos;i="5.13,623,1427785200"; d="scan'208";a="33345254" Received: from nasanexm02d.na.qualcomm.com ([10.85.0.44]) by ironmsg01-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 15 Jun 2015 22:55:25 -0700 Received: from aphydexm01a.ap.qualcomm.com (10.252.127.10) by NASANEXM02D.na.qualcomm.com (10.85.0.44) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Mon, 15 Jun 2015 22:55:24 -0700 Received: from 10.80.81.91 (10.80.80.8) by aphydexm01a.ap.qualcomm.com (10.252.127.10) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Tue, 16 Jun 2015 11:25:15 +0530 Received: by 10.80.81.91 (sSMTP sendmail emulation); Tue, 16 Jun 2015 11:25:07 +0530 From: Raja Mani To: CC: , Raja Mani Subject: [PATCH 6/8] ath10k: advertise 10.4 fw ap and sta iface combination to mac80211 Date: Tue, 16 Jun 2015 11:23:13 +0530 Message-ID: <1434433995-8451-7-git-send-email-rmani@qti.qualcomm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1434433995-8451-1-git-send-email-rmani@qti.qualcomm.com> References: <1434433995-8451-1-git-send-email-rmani@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To aphydexm01a.ap.qualcomm.com (10.252.127.10) 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.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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 10.4 fw supports upto 16 interface in ap mode and 1 interface in station mode, overall total interfaces supported are 16 interfaces. Populate this limit in wiphy->iface_combinations. Signed-off-by: Raja Mani --- drivers/net/wireless/ath/ath10k/mac.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 187e524..3c5d2b0 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6620,6 +6620,33 @@ static struct ieee80211_iface_combination ath10k_tlv_qcs_if_comb[] = { }, }; +static const struct ieee80211_iface_limit ath10k_10_4_if_limits[] = { + { + .max = 1, + .types = BIT(NL80211_IFTYPE_STATION), + }, + { + .max = 16, + .types = BIT(NL80211_IFTYPE_AP) + }, +}; + +static const struct ieee80211_iface_combination ath10k_10_4_if_comb[] = { + { + .limits = ath10k_10_4_if_limits, + .n_limits = ARRAY_SIZE(ath10k_10_4_if_limits), + .max_interfaces = 16, + .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) { struct ieee80211_sta_vht_cap vht_cap = {0}; @@ -6942,6 +6969,9 @@ int ath10k_mac_register(struct ath10k *ar) ARRAY_SIZE(ath10k_10x_if_comb); break; case ATH10K_FW_WMI_OP_VERSION_10_4: + ar->hw->wiphy->iface_combinations = ath10k_10_4_if_comb; + ar->hw->wiphy->n_iface_combinations = + ARRAY_SIZE(ath10k_10_4_if_comb); break; case ATH10K_FW_WMI_OP_VERSION_UNSET: case ATH10K_FW_WMI_OP_VERSION_MAX: