d23edd3b842bb9cd97fb6298cf503ab759247141
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 410-ath9k_allow_adhoc_and_ap.patch
1 --- a/drivers/net/wireless/ath/ath9k/main.c
2 +++ b/drivers/net/wireless/ath/ath9k/main.c
3 @@ -1445,15 +1445,6 @@ static int ath9k_add_interface(struct ie
4 }
5 }
6
7 - if ((ah->opmode == NL80211_IFTYPE_ADHOC) ||
8 - ((vif->type == NL80211_IFTYPE_ADHOC) &&
9 - sc->nvifs > 0)) {
10 - ath_err(common, "Cannot create ADHOC interface when other"
11 - " interfaces already exist.\n");
12 - ret = -EINVAL;
13 - goto out;
14 - }
15 -
16 ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type);
17
18 sc->nvifs++;
19 @@ -1478,15 +1469,6 @@ static int ath9k_change_interface(struct
20 mutex_lock(&sc->mutex);
21 ath9k_ps_wakeup(sc);
22
23 - /* See if new interface type is valid. */
24 - if ((new_type == NL80211_IFTYPE_ADHOC) &&
25 - (sc->nvifs > 1)) {
26 - ath_err(common, "When using ADHOC, it must be the only"
27 - " interface.\n");
28 - ret = -EINVAL;
29 - goto out;
30 - }
31 -
32 if (ath9k_uses_beacons(new_type) &&
33 !ath9k_uses_beacons(vif->type)) {
34 if (sc->nbcnvifs >= ATH_BCBUF) {
35 --- a/drivers/net/wireless/ath/ath9k/init.c
36 +++ b/drivers/net/wireless/ath/ath9k/init.c
37 @@ -655,6 +655,7 @@ static const struct ieee80211_iface_limi
38 #ifdef CONFIG_MAC80211_MESH
39 BIT(NL80211_IFTYPE_MESH_POINT) |
40 #endif
41 + BIT(NL80211_IFTYPE_ADHOC) |
42 BIT(NL80211_IFTYPE_AP) |
43 BIT(NL80211_IFTYPE_P2P_GO) },
44 };