ath9k: add a regdomain code used on newer ubiquiti networks devices
[openwrt.git] / package / mac80211 / patches / 411-ath5k_allow_adhoc_and_ap.patch
1 --- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
2 +++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
3 @@ -95,13 +95,8 @@ ath5k_add_interface(struct ieee80211_hw
4 goto end;
5 }
6
7 - /* Don't allow other interfaces if one ad-hoc is configured.
8 - * TODO: Fix the problems with ad-hoc and multiple other interfaces.
9 - * We would need to operate the HW in ad-hoc mode to allow TSF updates
10 - * for the IBSS, but this breaks with additional AP or STA interfaces
11 - * at the moment. */
12 - if (sc->num_adhoc_vifs ||
13 - (sc->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) {
14 + /* Don't allow more than one ad-hoc interface */
15 + if (sc->num_adhoc_vifs && vif->type == NL80211_IFTYPE_ADHOC) {
16 ATH5K_ERR(sc, "Only one single ad-hoc interface is allowed.\n");
17 ret = -ELNRNG;
18 goto end;
19 --- a/drivers/net/wireless/ath/ath5k/base.c
20 +++ b/drivers/net/wireless/ath/ath5k/base.c
21 @@ -1883,7 +1883,7 @@ ath5k_beacon_send(struct ath5k_softc *sc
22 sc->bmisscount = 0;
23 }
24
25 - if ((sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) ||
26 + if ((sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs + sc->num_adhoc_vifs > 1) ||
27 sc->opmode == NL80211_IFTYPE_MESH_POINT) {
28 u64 tsf = ath5k_hw_get_tsf64(ah);
29 u32 tsftu = TSF_TO_TU(tsf);
30 @@ -1961,7 +1961,7 @@ ath5k_beacon_update_timers(struct ath5k_
31 u64 hw_tsf;
32
33 intval = sc->bintval & AR5K_BEACON_PERIOD;
34 - if (sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs > 1) {
35 + if (sc->opmode == NL80211_IFTYPE_AP && sc->num_ap_vifs + sc->num_adhoc_vifs > 1) {
36 intval /= ATH_BCBUF; /* staggered multi-bss beacons */
37 if (intval < 15)
38 ATH5K_WARN(sc, "intval %u is too low, min 15\n",
This page took 0.043108 seconds and 5 git commands to generate.