mac80211: update to wireless-testing 2011-11-01
[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 @@ -83,13 +83,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 (ah->num_adhoc_vifs ||
13 - (ah->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) {
14 + /* Don't allow more than one ad-hoc interface */
15 + if (ah->num_adhoc_vifs && vif->type == NL80211_IFTYPE_ADHOC) {
16 ATH5K_ERR(ah, "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 @@ -1860,7 +1860,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
22 ah->bmisscount = 0;
23 }
24
25 - if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs > 1) ||
26 + if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs + ah->num_adhoc_vifs > 1) ||
27 ah->opmode == NL80211_IFTYPE_MESH_POINT) {
28 u64 tsf = ath5k_hw_get_tsf64(ah);
29 u32 tsftu = TSF_TO_TU(tsf);
30 @@ -1945,7 +1945,7 @@ ath5k_beacon_update_timers(struct ath5k_
31 u64 hw_tsf;
32
33 intval = ah->bintval & AR5K_BEACON_PERIOD;
34 - if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs > 1) {
35 + if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs + ah->num_adhoc_vifs > 1) {
36 intval /= ATH_BCBUF; /* staggered multi-bss beacons */
37 if (intval < 15)
38 ATH5K_WARN(ah, "intval %u is too low, min 15\n",
This page took 0.03966 seconds and 5 git commands to generate.