huge madwifi update (work in progress, disabled by default, compiles but breaks at...
[openwrt.git] / package / madwifi / patches-r3776 / 303-bssid_alloc.patch
1 Index: madwifi-trunk-r3776/ath/if_ath.c
2 ===================================================================
3 --- madwifi-trunk-r3776.orig/ath/if_ath.c 2008-07-17 01:49:58.000000000 +0200
4 +++ madwifi-trunk-r3776/ath/if_ath.c 2008-07-17 01:57:39.000000000 +0200
5 @@ -1333,7 +1333,7 @@
6 /* Use RadioTAP interface type for monitor mode. */
7 dev->type = ARPHRD_IEEE80211_RADIOTAP;
8
9 - if (flags & IEEE80211_CLONE_BSSID) {
10 + if (!(flags & IEEE80211_CLONE_BSSID)) {
11 if (sc->sc_hasbmask) {
12 struct ieee80211vap *v;
13 uint64_t id_mask = 0;
14 @@ -1347,11 +1347,12 @@
15 TAILQ_FOREACH(v, &ic->ic_vaps, iv_next)
16 id_mask |= (1 << ATH_GET_VAP_ID(v->iv_myaddr));
17
18 - for (id = 1; id < ath_maxvaps; id++) {
19 + for (id = 0; id < ath_maxvaps; id++) {
20 /* Get the first available slot. */
21 if ((id_mask & (1 << id)) == 0) {
22 ATH_SET_VAP_BSSID(vap->iv_myaddr, id);
23 ATH_SET_VAP_BSSID(vap->iv_bssid, id);
24 + sc->sc_bclast = id;
25 break;
26 }
27 }
28 @@ -1359,7 +1360,12 @@
29 EPRINTF(sc, "Unique BSSID requested on HW that does"
30 "does not support the necessary features.");
31 }
32 + } else {
33 + /* share the BSSID of the last created VAP */
34 + ATH_SET_VAP_BSSID(vap->iv_myaddr, sc->sc_bclast);
35 + ATH_SET_VAP_BSSID(vap->iv_bssid, sc->sc_bclast);
36 }
37 +
38 avp->av_bslot = -1;
39 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
40 atomic_set(&avp->av_beacon_alloc, 0);
41 Index: madwifi-trunk-r3776/ath/if_athvar.h
42 ===================================================================
43 --- madwifi-trunk-r3776.orig/ath/if_athvar.h 2008-07-17 01:27:21.000000000 +0200
44 +++ madwifi-trunk-r3776/ath/if_athvar.h 2008-07-17 01:57:15.000000000 +0200
45 @@ -802,7 +802,7 @@
46 } sc_updateslot; /* slot time update fsm */
47 int sc_slotupdate; /* slot to next advance fsm */
48 struct ieee80211vap **sc_bslot; /* beacon xmit slots */
49 - int sc_bnext; /* next slot for beacon xmit */
50 + int sc_bclast; /* last used slot for beacon xmit */
51
52 int sc_beacon_cal; /* use beacon timer for calibration */
53 long unsigned int sc_calinterval_sec; /* current interval for calibration (in seconds) */
This page took 0.05001 seconds and 5 git commands to generate.