From patchwork Sun Aug 26 08:12:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1374581 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 405343FCAE for ; Sun, 26 Aug 2012 08:13:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752058Ab2HZINW (ORCPT ); Sun, 26 Aug 2012 04:13:22 -0400 Received: from contumacia.investici.org ([178.255.144.35]:35071 "EHLO contumacia.investici.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230Ab2HZINL (ORCPT ); Sun, 26 Aug 2012 04:13:11 -0400 Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id AD582E8704; Sun, 26 Aug 2012 08:13:08 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 contumacia.investici.org AD582E8704 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1345968790; bh=cyVKFUG1fos8u4uMapS4lpHaixmfk/1boQ9Dh9+W+i8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=abSAXBy/vft7khA0il9zbsI1a7y/i/dmK5sMpi5vRizlLhy4MiQJfmKvmqG/83rq7 cH5OGHCxV0XM5OXttmNjuExcg6K41F9oFxnT/MhobGkC5ydnncFJl5W+dT3weqZIpo 6KGfT2tjQbClIdkQ8alCcYZ5Xev1IvvIQKk1Tk3c= From: Antonio Quartulli To: "Luis R. Rodriguez" , Sujith Manoharan Cc: ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org, Antonio Quartulli Subject: [PATCH 2/2] ath9k_htc: advertise allowed VIFs combination Date: Sun, 26 Aug 2012 10:12:53 +0200 Message-Id: <1345968773-17166-2-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1345968773-17166-1-git-send-email-ordex@autistici.org> References: <1345968773-17166-1-git-send-email-ordex@autistici.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This driver now advertises its allowed VIFs combination to the mac80211 sublayer. Signed-off-by: Antonio Quartulli --- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index a035a38..59965e2 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c @@ -689,6 +689,19 @@ err_hw: return ret; } +static const struct ieee80211_iface_limit if_limits[] = { + { .max = ATH9K_HTC_MAX_VIF, .types = BIT(NL80211_IFTYPE_STATION) }, + { .max = ATH9K_HTC_MAX_BCN_VIF, .types = BIT(NL80211_IFTYPE_AP) }, + { .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) }, +}; + +static const struct ieee80211_iface_combination if_comb = { + .limits = if_limits, + .n_limits = ARRAY_SIZE(if_limits), + .max_interfaces = ATH9K_HTC_MAX_VIF, + .num_different_channels = 1, +}; + static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv, struct ieee80211_hw *hw) { @@ -711,6 +724,9 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv, BIT(NL80211_IFTYPE_P2P_GO) | BIT(NL80211_IFTYPE_P2P_CLIENT); + hw->wiphy->iface_combinations = &if_comb; + hw->wiphy->n_iface_combinations = 1; + hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN |