ath9k/ath5k: fix driver load issues with mesh support compiled out
authorFelix Fietkau <nbd@openwrt.org>
Tue, 17 Apr 2012 00:05:41 +0000 (00:05 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 17 Apr 2012 00:05:41 +0000 (00:05 +0000)
SVN-Revision: 31326

package/mac80211/patches/300-pending_work.patch
package/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch
package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch
package/mac80211/patches/502-ath9k_ahb_init.patch
package/mac80211/patches/540-ath9k_extra_leds.patch

index 9afe20e8c300f46b0bb2474f7c5f2cb815058b13..23b992d350bd6fff0507c3fe64f13830c14b4f3f 100644 (file)
                return;
  
        ewma_add(&ah->ah_beacon_rssi_avg, rssi);
-@@ -2416,6 +2416,19 @@ ath5k_tx_complete_poll_work(struct work_
+@@ -2416,6 +2416,22 @@ ath5k_tx_complete_poll_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) },
++      { .max = 2048,  .types = BIT(NL80211_IFTYPE_STATION) },
++      { .max = 4,     .types =
++#ifdef CONFIG_MAC80211_MESH
++                               BIT(NL80211_IFTYPE_MESH_POINT) |
++#endif
++                               BIT(NL80211_IFTYPE_AP) },
 +};
 +
 +static const struct ieee80211_iface_combination if_comb = {
 +      .limits = if_limits,
 +      .n_limits = ARRAY_SIZE(if_limits),
-+      .max_interfaces = 256,
++      .max_interfaces = 2048,
 +      .num_different_channels = 1,
 +};
 +
  int __devinit
  ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)
  {
-@@ -2437,6 +2450,9 @@ ath5k_init_ah(struct ath5k_hw *ah, const
+@@ -2437,6 +2453,9 @@ ath5k_init_ah(struct ath5k_hw *ah, const
                BIT(NL80211_IFTYPE_ADHOC) |
                BIT(NL80211_IFTYPE_MESH_POINT);
  
        WLAN_STA_BLOCK_BA,
 --- a/drivers/net/wireless/ath/ath9k/init.c
 +++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -647,6 +647,21 @@ void ath9k_reload_chainmask_settings(str
+@@ -647,6 +647,24 @@ void ath9k_reload_chainmask_settings(str
                setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_5GHZ].ht_cap);
  }
  
 +static const struct ieee80211_iface_limit if_limits[] = {
-+      { .max = 256,   .types = BIT(NL80211_IFTYPE_STATION) |
++      { .max = 2048,  .types = BIT(NL80211_IFTYPE_STATION) |
 +                               BIT(NL80211_IFTYPE_P2P_CLIENT) |
 +                               BIT(NL80211_IFTYPE_WDS) },
-+      { .max = 8,     .types = BIT(NL80211_IFTYPE_AP) |
-+                               BIT(NL80211_IFTYPE_P2P_GO) |
-+                               BIT(NL80211_IFTYPE_MESH_POINT) },
++      { .max = 8,     .types =
++#ifdef CONFIG_MAC80211_MESH
++                               BIT(NL80211_IFTYPE_MESH_POINT) |
++#endif
++                               BIT(NL80211_IFTYPE_AP) |
++                               BIT(NL80211_IFTYPE_P2P_GO) },
 +};
 +
 +static const struct ieee80211_iface_combination if_comb = {
 +      .limits = if_limits,
 +      .n_limits = ARRAY_SIZE(if_limits),
-+      .max_interfaces = 256,
++      .max_interfaces = 2048,
 +      .num_different_channels = 1,
 +};
  
  void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
  {
-@@ -676,6 +691,9 @@ void ath9k_set_hw_capab(struct ath_softc
+@@ -676,6 +694,9 @@ void ath9k_set_hw_capab(struct ath_softc
                BIT(NL80211_IFTYPE_ADHOC) |
                BIT(NL80211_IFTYPE_MESH_POINT);
  
index 6e9e5ef8733adf1411bd8d1662f1e3eb9aca29a2..d23edd3b842bb9cd97fb6298cf503ab759247141 100644 (file)
                if (sc->nbcnvifs >= ATH_BCBUF) {
 --- a/drivers/net/wireless/ath/ath9k/init.c
 +++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -653,6 +653,7 @@ static const struct ieee80211_iface_limi
-                                BIT(NL80211_IFTYPE_WDS) },
-       { .max = 8,     .types = BIT(NL80211_IFTYPE_AP) |
-                                BIT(NL80211_IFTYPE_P2P_GO) |
+@@ -655,6 +655,7 @@ static const struct ieee80211_iface_limi
+ #ifdef CONFIG_MAC80211_MESH
+                                BIT(NL80211_IFTYPE_MESH_POINT) |
+ #endif
 +                               BIT(NL80211_IFTYPE_ADHOC) |
-                                BIT(NL80211_IFTYPE_MESH_POINT) },
+                                BIT(NL80211_IFTYPE_AP) |
+                                BIT(NL80211_IFTYPE_P2P_GO) },
  };
index 410e6bca1b49b6681d2f2c7eb7be07e3ee5bf835..ab8d6dcfef305ca4d476b6ec0449bdccc6091f10 100644 (file)
                intval /= ATH_BCBUF;    /* staggered multi-bss beacons */
                if (intval < 15)
                        ATH5K_WARN(ah, "intval %u is too low, min 15\n",
-@@ -2419,6 +2419,7 @@ ath5k_tx_complete_poll_work(struct work_
- static const struct ieee80211_iface_limit if_limits[] = {
-       { .max = 256,   .types = BIT(NL80211_IFTYPE_STATION) },
-       { .max = 4,     .types = BIT(NL80211_IFTYPE_AP) |
+@@ -2422,6 +2422,7 @@ static const struct ieee80211_iface_limi
+ #ifdef CONFIG_MAC80211_MESH
+                                BIT(NL80211_IFTYPE_MESH_POINT) |
+ #endif
 +                               BIT(NL80211_IFTYPE_ADHOC) |
-                                BIT(NL80211_IFTYPE_MESH_POINT) },
+                                BIT(NL80211_IFTYPE_AP) },
  };
  
index 4681b2936cf75f7f2c3568e4c8f86c2a4696647c..78bd237b52e54da70cdf3a2a3410ab51d3c900dc 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/init.c
 +++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -901,23 +901,23 @@ static int __init ath9k_init(void)
+@@ -904,23 +904,23 @@ static int __init ath9k_init(void)
                goto err_out;
        }
  
index 13b9d18840c35fee3a170e8e1c74c45598ce413b..6ba952c83fa2a17cb2e8585ad3432cd0c373be98 100644 (file)
  
 --- a/drivers/net/wireless/ath/ath9k/init.c
 +++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -778,7 +778,7 @@ int ath9k_init_device(u16 devid, struct 
+@@ -781,7 +781,7 @@ int ath9k_init_device(u16 devid, struct 
  
  #ifdef CONFIG_MAC80211_LEDS
        /* must be initialized before ieee80211_register_hw */