410-ath9k_allow_adhoc_and_ap.patch 957 B

12345678910111213141516171819202122232425262728293031323334
  1. --- a/drivers/net/wireless/ath/ath9k/main.c
  2. +++ b/drivers/net/wireless/ath/ath9k/main.c
  3. @@ -1482,15 +1482,6 @@ static int ath9k_add_interface(struct ie
  4. }
  5. }
  6. - if ((ah->opmode == NL80211_IFTYPE_ADHOC) ||
  7. - ((vif->type == NL80211_IFTYPE_ADHOC) &&
  8. - sc->nvifs > 0)) {
  9. - ath_err(common, "Cannot create ADHOC interface when other"
  10. - " interfaces already exist.\n");
  11. - ret = -EINVAL;
  12. - goto out;
  13. - }
  14. -
  15. ath_dbg(common, ATH_DBG_CONFIG,
  16. "Attach a VIF of type: %d\n", vif->type);
  17. @@ -1516,15 +1507,6 @@ static int ath9k_change_interface(struct
  18. mutex_lock(&sc->mutex);
  19. ath9k_ps_wakeup(sc);
  20. - /* See if new interface type is valid. */
  21. - if ((new_type == NL80211_IFTYPE_ADHOC) &&
  22. - (sc->nvifs > 1)) {
  23. - ath_err(common, "When using ADHOC, it must be the only"
  24. - " interface.\n");
  25. - ret = -EINVAL;
  26. - goto out;
  27. - }
  28. -
  29. if (ath9k_uses_beacons(new_type) &&
  30. !ath9k_uses_beacons(vif->type)) {
  31. if (sc->nbcnvifs >= ATH_BCBUF) {