From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from na3sys009aog113.obsmtp.com ([74.125.149.209]:51819 "HELO na3sys009aog113.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754983Ab2ECHXX (ORCPT ); Thu, 3 May 2012 03:23:23 -0400 From: Bing Zhao To: linux-wireless@vger.kernel.org Cc: "John W. Linville" , Avinash Patil , Yogesh Powar , Kiran Divekar , Amitkumar Karwar , Stone Piao , Frank Huang , Bing Zhao , harvey yang Subject: [PATCH 04/18] mwifiex: multi-interface support for mwifiex Date: Thu, 3 May 2012 00:22:26 -0700 Message-Id: <1336029760-22565-5-git-send-email-bzhao@marvell.com> (sfid-20120503_092326_014188_65C71AA1) In-Reply-To: <1336029760-22565-1-git-send-email-bzhao@marvell.com> References: <1336029760-22565-1-git-send-email-bzhao@marvell.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Avinash Patil mwifiex supports STA and AP interfaces which use same phy. Indicate this to cfg80211. Signed-off-by: Avinash Patil Signed-off-by: Yogesh Ashok Powar Signed-off-by: Bing Zhao --- drivers/net/wireless/mwifiex/cfg80211.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 55513b6..26a706a 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -20,6 +20,23 @@ #include "cfg80211.h" #include "main.h" +static const struct ieee80211_iface_limit mwifiex_ap_sta_limits[] = { + { + .max = 1, .types = BIT(NL80211_IFTYPE_STATION), + }, + { + .max = 1, .types = BIT(NL80211_IFTYPE_AP), + }, +}; + +static const struct ieee80211_iface_combination mwifiex_iface_comb_ap_sta = { + .limits = mwifiex_ap_sta_limits, + .num_different_channels = 1, + .n_limits = ARRAY_SIZE(mwifiex_ap_sta_limits), + .max_interfaces = MWIFIEX_MAX_BSS_NUM, + .beacon_int_infra_match = true, +}; + /* * This function maps the nl802.11 channel type into driver channel type. * @@ -1505,6 +1522,9 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter) else wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; + wiphy->iface_combinations = &mwifiex_iface_comb_ap_sta; + wiphy->n_iface_combinations = 1; + /* Initialize cipher suits */ wiphy->cipher_suites = mwifiex_cipher_suites; wiphy->n_cipher_suites = ARRAY_SIZE(mwifiex_cipher_suites); -- 1.7.0.2