X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/d7b870eaa3e8ef4245023415766fd607abd3f44a..580a413385ed8640fb90d5b7dcdf6443df2502da:/package/madwifi/patches/421-channel_handling.patch diff --git a/package/madwifi/patches/421-channel_handling.patch b/package/madwifi/patches/421-channel_handling.patch index 69d96cba0..2a8ec27ce 100644 --- a/package/madwifi/patches/421-channel_handling.patch +++ b/package/madwifi/patches/421-channel_handling.patch @@ -8,7 +8,7 @@ static void ath_updateslot(struct net_device *); static int ath_beaconq_setup(struct ath_softc *); static int ath_beacon_alloc(struct ath_softc *, struct ieee80211_node *); -@@ -240,7 +239,7 @@ static void ath_setup_stationkey(struct +@@ -240,7 +239,7 @@ static void ath_setup_stationkey(struct static void ath_setup_stationwepkey(struct ieee80211_node *); static void ath_setup_keycacheslot(struct ath_softc *, struct ieee80211_node *); static void ath_newassoc(struct ieee80211_node *, int); @@ -263,7 +263,7 @@ ath_rate_setup(dev, mode); ath_setcurmode(sc, mode); -@@ -10124,8 +10142,7 @@ ath_newassoc(struct ieee80211_node *ni, +@@ -10124,8 +10142,7 @@ ath_newassoc(struct ieee80211_node *ni, } static int @@ -273,7 +273,7 @@ { struct ath_softc *sc = dev->priv; struct ieee80211com *ic = &sc->sc_ic; -@@ -10139,17 +10156,31 @@ ath_getchannels(struct net_device *dev, +@@ -10139,17 +10156,31 @@ ath_getchannels(struct net_device *dev, EPRINTF(sc, "Insufficient memory for channel table!\n"); return -ENOMEM; } @@ -674,7 +674,7 @@ .procname = "rp", .mode = 0200, .proc_handler = ath_sysctl_halparam, -@@ -11669,13 +11801,6 @@ static ctl_table ath_static_sysctls[] = +@@ -11669,13 +11801,6 @@ static ctl_table ath_static_sysctls[] = }, #endif { .ctl_name = CTL_AUTO, @@ -688,7 +688,7 @@ .procname = "maxvaps", .mode = 0444, .data = &ath_maxvaps, -@@ -11683,13 +11808,6 @@ static ctl_table ath_static_sysctls[] = +@@ -11683,13 +11808,6 @@ static ctl_table ath_static_sysctls[] = .proc_handler = proc_dointvec }, { .ctl_name = CTL_AUTO, @@ -853,7 +853,7 @@ } /* Initialize candidate channels to all available */ memcpy(ic->ic_chan_active, ic->ic_chan_avail, -@@ -311,11 +296,58 @@ ieee80211_ifattach(struct ieee80211com * +@@ -311,11 +296,59 @@ ieee80211_ifattach(struct ieee80211com * * When 11g is supported, force the rate set to * include basic rates suitable for a mixed b/g bss. */ @@ -866,6 +866,7 @@ + if (init) + return; + ++ ifmedia_removeall(&ic->ic_media); + ieee80211_media_setup(ic, &ic->ic_media, ic->ic_caps, NULL, NULL); + ieee80211com_media_status(ic->ic_dev, &imr); + ifmedia_set(&ic->ic_media, imr.ifm_active); @@ -913,7 +914,7 @@ /* Setup initial channel settings */ ic->ic_bsschan = IEEE80211_CHAN_ANYC; /* Arbitrarily pick the first channel */ -@@ -327,6 +359,7 @@ ieee80211_ifattach(struct ieee80211com * +@@ -327,6 +360,7 @@ ieee80211_ifattach(struct ieee80211com * /* Enable WME by default, if we're capable. */ if (ic->ic_caps & IEEE80211_C_WME) ic->ic_flags |= IEEE80211_F_WME; @@ -921,7 +922,7 @@ (void) ieee80211_setmode(ic, ic->ic_curmode); /* Store default beacon interval, as nec. */ -@@ -763,7 +796,8 @@ ieee80211_media_setup(struct ieee80211co +@@ -763,7 +797,8 @@ ieee80211_media_setup(struct ieee80211co struct ieee80211_rateset allrates; /* Fill in media characteristics. */ @@ -931,7 +932,7 @@ maxrate = 0; memset(&allrates, 0, sizeof(allrates)); -@@ -793,7 +827,7 @@ ieee80211_media_setup(struct ieee80211co +@@ -793,7 +828,7 @@ ieee80211_media_setup(struct ieee80211co ADD(media, IFM_AUTO, mopt | IFM_IEEE80211_WDS); if (mode == IEEE80211_MODE_AUTO) continue; @@ -940,7 +941,7 @@ for (i = 0; i < rs->rs_nrates; i++) { rate = rs->rs_rates[i]; -@@ -1207,7 +1241,7 @@ ieee80211_announce(struct ieee80211com * +@@ -1207,7 +1242,7 @@ ieee80211_announce(struct ieee80211com * if ((ic->ic_modecaps & (1 << mode)) == 0) continue; if_printf(dev, "%s rates: ", ieee80211_phymode_name[mode]); @@ -949,7 +950,7 @@ for (i = 0; i < rs->rs_nrates; i++) { rate = rs->rs_rates[i]; mword = ieee80211_rate2media(ic, rate, mode); -@@ -1417,7 +1451,7 @@ ieee80211com_media_change(struct net_dev +@@ -1417,7 +1452,7 @@ ieee80211com_media_change(struct net_dev * now so drivers have a consistent state. */ KASSERT(vap->iv_bss != NULL, ("no bss node")); @@ -958,7 +959,7 @@ } error = -ENETRESET; } -@@ -1435,7 +1469,7 @@ findrate(struct ieee80211com *ic, enum i +@@ -1435,7 +1470,7 @@ findrate(struct ieee80211com *ic, enum i { #define IEEERATE(_ic,_m,_i) \ ((_ic)->ic_sup_rates[_m].rs_rates[_i] & IEEE80211_RATE_VAL) @@ -967,7 +968,7 @@ for (i = 0; i < nrates; i++) if (IEEERATE(ic, mode, i) == rate) return i; -@@ -1877,11 +1911,6 @@ ieee80211_build_countryie(struct ieee802 +@@ -1877,11 +1912,6 @@ ieee80211_build_countryie(struct ieee802 if (ieee80211_chan2mode(c) != curmode_noturbo) continue; @@ -979,7 +980,7 @@ if (*cur_runlen == 0) { (*cur_runlen)++; *cur_pow = c->ic_maxregpower; -@@ -1915,7 +1944,7 @@ void +@@ -1915,7 +1945,7 @@ void ieee80211_build_sc_ie(struct ieee80211com *ic) { struct ieee80211_ie_sc *ie = &ic->ic_sc_ie; @@ -999,7 +1000,7 @@ u_int16_t ic_modecaps; /* set of mode capabilities */ u_int16_t ic_curmode; /* current mode */ u_int16_t ic_lintval; /* beacon interval */ -@@ -715,6 +713,7 @@ MALLOC_DECLARE(M_80211_VAP); +@@ -714,6 +712,7 @@ MALLOC_DECLARE(M_80211_VAP); int ieee80211_ifattach(struct ieee80211com *); void ieee80211_ifdetach(struct ieee80211com *); @@ -1007,7 +1008,7 @@ int ieee80211_vap_setup(struct ieee80211com *, struct net_device *, const char *, int, int, struct ieee80211vap *); int ieee80211_vap_attach(struct ieee80211vap *, ifm_change_cb_t, ifm_stat_cb_t); -@@ -794,6 +793,23 @@ ieee80211_anyhdrspace(struct ieee80211co +@@ -793,6 +792,23 @@ ieee80211_anyhdrspace(struct ieee80211co return size; } @@ -1108,7 +1109,7 @@ nrs = &ni->ni_rates; fixedrate = IEEE80211_FIXED_RATE_NONE; for (i = 0; i < nrs->rs_nrates;) { -@@ -1407,6 +1407,7 @@ ieee80211_new_state(struct ieee80211vap +@@ -1407,6 +1407,7 @@ ieee80211_new_state(struct ieee80211vap IEEE80211_VAPS_UNLOCK_IRQ(ic); return rc; } @@ -1183,7 +1184,7 @@ if ((ic->ic_flags & IEEE80211_F_USEPROT) && --- a/net80211/ieee80211_wireless.c +++ b/net80211/ieee80211_wireless.c -@@ -2133,7 +2133,7 @@ ieee80211_ioctl_setmode(struct net_devic +@@ -2142,7 +2142,7 @@ ieee80211_ioctl_setmode(struct net_devic vap->iv_des_mode = mode; if (IS_UP_AUTO(vap)) @@ -1192,7 +1193,7 @@ retv = 0; } -@@ -4081,46 +4081,60 @@ ieee80211_ioctl_getchanlist(struct net_d +@@ -4090,46 +4090,60 @@ ieee80211_ioctl_getchanlist(struct net_d return 0; } @@ -1293,7 +1294,7 @@ return best; } -@@ -609,6 +611,7 @@ ap_end(struct ieee80211_scan_state *ss, +@@ -609,6 +611,7 @@ ap_end(struct ieee80211_scan_state *ss, res = 1; /* Do NOT restart scan */ } else { struct ieee80211_scan_entry se; @@ -1301,7 +1302,7 @@ /* XXX: notify all VAPs? */ /* if this is a dynamic turbo frequency , start with normal * mode first */ -@@ -623,6 +626,11 @@ ap_end(struct ieee80211_scan_state *ss, +@@ -623,6 +626,11 @@ ap_end(struct ieee80211_scan_state *ss, return 0; } }