aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mac80211_hwsim.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index fb787df01666..4c9336cee817 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1721,6 +1721,24 @@ static void hwsim_exit_netlink(void)
1721 "unregister family %i\n", ret); 1721 "unregister family %i\n", ret);
1722} 1722}
1723 1723
1724static const struct ieee80211_iface_limit hwsim_if_limits[] = {
1725 { .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) },
1726 { .max = 2048, .types = BIT(NL80211_IFTYPE_STATION) |
1727 BIT(NL80211_IFTYPE_P2P_CLIENT) |
1728#ifdef CONFIG_MAC80211_MESH
1729 BIT(NL80211_IFTYPE_MESH_POINT) |
1730#endif
1731 BIT(NL80211_IFTYPE_AP) |
1732 BIT(NL80211_IFTYPE_P2P_GO) },
1733};
1734
1735static const struct ieee80211_iface_combination hwsim_if_comb = {
1736 .limits = hwsim_if_limits,
1737 .n_limits = ARRAY_SIZE(hwsim_if_limits),
1738 .max_interfaces = 2048,
1739 .num_different_channels = 1,
1740};
1741
1724static int __init init_mac80211_hwsim(void) 1742static int __init init_mac80211_hwsim(void)
1725{ 1743{
1726 int i, err = 0; 1744 int i, err = 0;
@@ -1782,6 +1800,9 @@ static int __init init_mac80211_hwsim(void)
1782 hw->wiphy->n_addresses = 2; 1800 hw->wiphy->n_addresses = 2;
1783 hw->wiphy->addresses = data->addresses; 1801 hw->wiphy->addresses = data->addresses;
1784 1802
1803 hw->wiphy->iface_combinations = &hwsim_if_comb;
1804 hw->wiphy->n_iface_combinations = 1;
1805
1785 if (fake_hw_scan) { 1806 if (fake_hw_scan) {
1786 hw->wiphy->max_scan_ssids = 255; 1807 hw->wiphy->max_scan_ssids = 255;
1787 hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN; 1808 hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN;