Skip to contentSkip to conversation

ath5k: add possible wiphy interface combinations

PATCH Superseded Felix Fietkau 2 participants 4 messages Apr 16, 2012 Atheros ATH5K wireless driver

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath5k: add possible wiphy interface combinations

---
 drivers/net/wireless/ath/ath5k/base.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath5k/base.c +16 -0
index 3007bba..2e385f5 100644
@@ -2415,6 +2415,19 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
 * Initialization routines *
 \*************************/
 
+static const struct ieee80211_iface_limit if_limits[] = {
+	{ .max = 256,	.types = BIT(NL80211_IFTYPE_STATION) },
+	{ .max = 4,	.types = BIT(NL80211_IFTYPE_AP) |
+				 BIT(NL80211_IFTYPE_MESH_POINT) },
+};
+
+static const struct ieee80211_iface_combination if_comb = {
+	.limits = if_limits,
+	.n_limits = ARRAY_SIZE(if_limits),
+	.max_interfaces = 256,
+	.num_different_channels = 1,
+};
+
 int __devinit
 ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)
 {
@@ -2436,6 +2449,9 @@ ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)
 		BIT(NL80211_IFTYPE_ADHOC) |
 		BIT(NL80211_IFTYPE_MESH_POINT);
 
+	hw->wiphy->iface_combinations = &if_comb;
+	hw->wiphy->n_iface_combinations = 1;
+
 	/* SW support for IBSS_RSN is provided by mac80211 */
 	hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
 
Signature · 1 line
1.7.3.2
#1 lore raw
Quoted 10 lines · Felix Fietkau
---
  drivers/net/wireless/ath/ath5k/base.c |   16 ++++++++++++++++
  1 files changed, 16 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath5k/base.c +0 -0
index 3007bba..2e385f5 100644

drivers/net/wireless/ath/ath5k/base.c ath5k_tx_complete_poll_work(struct work_struct *work) · line 2422

Quoted 8 lines
drivers/net/wireless/ath/ath5k/base.c +5 -0
@@ -2415,6 +2415,19 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
  * Initialization routines *
  \*************************/
 
+static const struct ieee80211_iface_limit if_limits[] = {
+	{ .max = 256,	.types = BIT(NL80211_IFTYPE_STATION) },
+	{ .max = 4,	.types = BIT(NL80211_IFTYPE_AP) |
+				 BIT(NL80211_IFTYPE_MESH_POINT) },
+};

The station max is just an arbitrary number or is 256 really the max it can handle? At least on ath9k, more are supported, but I haven't tested ath5k lately....

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#2 lore raw
Quoted 14 lines · Ben Greear
Quoted 13 lines · Felix Fietkau
---
  drivers/net/wireless/ath/ath5k/base.c |   16 ++++++++++++++++
  1 files changed, 16 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath5k/base.c +0 -0
index 3007bba..2e385f5 100644
@@ -2415,6 +2415,19 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
  * Initialization routines *
  \*************************/
 
Quoted 9 lines

drivers/net/wireless/ath/ath5k/base.c ath5k_tx_complete_poll_work(struct work_struct *work) · line 2422

Quoted 5 lines
drivers/net/wireless/ath/ath5k/base.c +5 -0
+static const struct ieee80211_iface_limit if_limits[] = {
+	{ .max = 256,	.types = BIT(NL80211_IFTYPE_STATION) },
+	{ .max = 4,	.types = BIT(NL80211_IFTYPE_AP) |
+				 BIT(NL80211_IFTYPE_MESH_POINT) },
+};

The station max is just an arbitrary number or is 256 really the max it can handle? At least on ath9k, more are supported, but I haven't tested ath5k lately....

It is an arbitrary number.

- Felix

#3 lore raw
Quoted 24 lines · Felix Fietkau
Quoted 14 lines · Ben Greear
Quoted 13 lines · Felix Fietkau
---
   drivers/net/wireless/ath/ath5k/base.c |   16 ++++++++++++++++
   1 files changed, 16 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath5k/base.c +0 -0
index 3007bba..2e385f5 100644
@@ -2415,6 +2415,19 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
   * Initialization routines *
   \*************************/
 
Quoted 9 lines

drivers/net/wireless/ath/ath5k/base.c ath5k_tx_complete_poll_work(struct work_struct *work) · line 2422

Quoted 5 lines
drivers/net/wireless/ath/ath5k/base.c +5 -0
+static const struct ieee80211_iface_limit if_limits[] = {
+	{ .max = 256,	.types = BIT(NL80211_IFTYPE_STATION) },
+	{ .max = 4,	.types = BIT(NL80211_IFTYPE_AP) |
+				 BIT(NL80211_IFTYPE_MESH_POINT) },
+};

The station max is just an arbitrary number or is 256 really the max it can handle? At least on ath9k, more are supported, but I haven't tested ath5k lately....

Quoted 1 line

It is an arbitrary number.

I think the actual max for a channel (AP?) is somewhere around 2000, so maybe make it 2048 just to make sure we are not adding artificial limitations?

Same with ath9k.

Thanks,
Ben

Quoted 2 lines

- Felix

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com