X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/d2111ac59acae341d3d527464974f5835b0c8707..f251f740878af188b1f27d19ec921efa6c577349:/package/madwifi/patches/351-scanlist.patch diff --git a/package/madwifi/patches/351-scanlist.patch b/package/madwifi/patches/351-scanlist.patch index 87ef5a97c..c11f28e39 100644 --- a/package/madwifi/patches/351-scanlist.patch +++ b/package/madwifi/patches/351-scanlist.patch @@ -1,8 +1,6 @@ -Index: madwifi-trunk-r3314/net80211/ieee80211_scan_sta.c -=================================================================== ---- madwifi-trunk-r3314.orig/net80211/ieee80211_scan_sta.c 2008-06-01 03:41:58.000000000 +0200 -+++ madwifi-trunk-r3314/net80211/ieee80211_scan_sta.c 2008-06-01 03:42:18.000000000 +0200 -@@ -317,147 +317,6 @@ +--- a/net80211/ieee80211_scan_sta.c ++++ b/net80211/ieee80211_scan_sta.c +@@ -317,147 +317,6 @@ found: #undef ISPROBE } @@ -150,7 +148,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_sta.c /* * Start a station-mode scan by populating the channel list. */ -@@ -466,81 +325,14 @@ +@@ -466,81 +325,14 @@ sta_start(struct ieee80211_scan_state *s { struct ieee80211com *ic = vap->iv_ic; struct sta_table *st = ss->ss_priv; @@ -234,7 +232,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_sta.c /* XXX tunables */ /* * The scanner will stay on station for ss_maxdwell ms (using a -@@ -749,17 +541,7 @@ +@@ -749,17 +541,7 @@ match_bss(struct ieee80211vap *vap, fail = 0; if (isclr(ic->ic_chan_active, ieee80211_chan2ieee(ic, se->se_chan))) fail |= 0x01; @@ -253,7 +251,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_sta.c if (vap->iv_opmode == IEEE80211_M_IBSS) { if ((se->se_capinfo & IEEE80211_CAPINFO_IBSS) == 0) fail |= 0x02; -@@ -1168,78 +950,6 @@ +@@ -1168,78 +950,6 @@ static const struct ieee80211_scanner st .scan_default = ieee80211_sta_join, }; @@ -332,7 +330,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_sta.c /* * Select a channel to start an adhoc network on. -@@ -1405,7 +1115,7 @@ +@@ -1405,7 +1115,7 @@ static const struct ieee80211_scanner ad .scan_name = "default", .scan_attach = sta_attach, .scan_detach = sta_detach, @@ -341,11 +339,9 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_sta.c .scan_restart = sta_restart, .scan_cancel = sta_cancel, .scan_end = adhoc_pick_bss, -Index: madwifi-trunk-r3314/net80211/ieee80211.c -=================================================================== ---- madwifi-trunk-r3314.orig/net80211/ieee80211.c 2008-06-01 03:41:58.000000000 +0200 -+++ madwifi-trunk-r3314/net80211/ieee80211.c 2008-06-01 03:42:18.000000000 +0200 -@@ -278,6 +278,11 @@ +--- a/net80211/ieee80211.c ++++ b/net80211/ieee80211.c +@@ -278,6 +278,11 @@ ieee80211_ifattach(struct ieee80211com * ("channel with bogus ieee number %u", c->ic_ieee)); setbit(ic->ic_chan_avail, c->ic_ieee); @@ -357,11 +353,20 @@ Index: madwifi-trunk-r3314/net80211/ieee80211.c /* Identify mode capabilities. */ if (IEEE80211_IS_CHAN_A(c)) ic->ic_modecaps |= 1 << IEEE80211_MODE_11A; -Index: madwifi-trunk-r3314/net80211/_ieee80211.h -=================================================================== ---- madwifi-trunk-r3314.orig/net80211/_ieee80211.h 2008-06-01 03:41:58.000000000 +0200 -+++ madwifi-trunk-r3314/net80211/_ieee80211.h 2008-06-01 03:42:18.000000000 +0200 -@@ -132,6 +132,11 @@ +@@ -1447,10 +1452,6 @@ ieee80211_media_change(struct net_device + vap->iv_fixed_rate = newrate; /* fixed TX rate */ + error = -ENETRESET; + } +- if (vap->iv_des_mode != newmode) { +- vap->iv_des_mode = newmode; /* desired PHY mode */ +- error = -ENETRESET; +- } + return error; + } + EXPORT_SYMBOL(ieee80211_media_change); +--- a/net80211/_ieee80211.h ++++ b/net80211/_ieee80211.h +@@ -132,6 +132,11 @@ enum ieee80211_scanmode { IEEE80211_SCAN_FIRST = 2, /* take first suitable candidate */ }; @@ -373,7 +378,7 @@ Index: madwifi-trunk-r3314/net80211/_ieee80211.h /* * Channels are specified by frequency and attributes. */ -@@ -142,6 +147,7 @@ +@@ -142,6 +147,7 @@ struct ieee80211_channel { int8_t ic_maxregpower; /* maximum regulatory tx power in dBm */ int8_t ic_maxpower; /* maximum tx power in dBm */ int8_t ic_minpower; /* minimum tx power in dBm */ @@ -381,11 +386,9 @@ Index: madwifi-trunk-r3314/net80211/_ieee80211.h }; #define IEEE80211_CHAN_MAX 255 -Index: madwifi-trunk-r3314/net80211/ieee80211_ioctl.h -=================================================================== ---- madwifi-trunk-r3314.orig/net80211/ieee80211_ioctl.h 2008-06-01 03:41:58.000000000 +0200 -+++ madwifi-trunk-r3314/net80211/ieee80211_ioctl.h 2008-06-01 03:42:18.000000000 +0200 -@@ -555,6 +555,7 @@ +--- a/net80211/ieee80211_ioctl.h ++++ b/net80211/ieee80211_ioctl.h +@@ -555,6 +555,7 @@ struct ieee80211req_scan_result { #define IEEE80211_IOCTL_WDSADDMAC (SIOCIWFIRSTPRIV+26) #define IEEE80211_IOCTL_WDSDELMAC (SIOCIWFIRSTPRIV+28) #define IEEE80211_IOCTL_KICKMAC (SIOCIWFIRSTPRIV+30) @@ -393,11 +396,21 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_ioctl.h enum { IEEE80211_WMMPARAMS_CWMIN = 1, -Index: madwifi-trunk-r3314/net80211/ieee80211_scan_ap.c -=================================================================== ---- madwifi-trunk-r3314.orig/net80211/ieee80211_scan_ap.c 2008-06-01 03:41:58.000000000 +0200 -+++ madwifi-trunk-r3314/net80211/ieee80211_scan_ap.c 2008-06-01 03:42:18.000000000 +0200 -@@ -129,131 +129,7 @@ +--- a/net80211/ieee80211_scan_ap.c ++++ b/net80211/ieee80211_scan_ap.c +@@ -105,11 +105,6 @@ struct scan_entry { + }; + + struct ap_state { +- unsigned int as_vap_desired_mode; /* Used for channel selection, +- * vap->iv_des_mode */ +- unsigned int as_required_mode; /* Used for channel selection, +- * filtered version of +- * as_vap_desired_mode */ + int as_maxrssi[IEEE80211_CHAN_MAX]; /* Used for channel selection */ + + /* These fields are just for scan caching for returning responses to +@@ -129,131 +124,7 @@ struct ap_state { static int ap_flush(struct ieee80211_scan_state *); static void action_tasklet(IEEE80211_TQUEUE_ARG); @@ -529,7 +542,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_ap.c /* * Attach prior to any scanning work. -@@ -327,29 +203,6 @@ +@@ -327,29 +198,6 @@ saveie(u_int8_t **iep, const u_int8_t *i ieee80211_saveie(iep, ie); } @@ -559,7 +572,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_ap.c /* * Start an ap scan by populating the channel list. */ -@@ -358,8 +211,6 @@ +@@ -358,90 +206,15 @@ ap_start(struct ieee80211_scan_state *ss { struct ap_state *as = ss->ss_priv; struct ieee80211com *ic = NULL; @@ -568,10 +581,11 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_ap.c int i; unsigned int mode = 0; -@@ -368,80 +219,8 @@ + SCAN_AP_LOCK_IRQ(as); + ic = vap->iv_ic; /* Determine mode flags to match, or leave zero for auto mode */ - as->as_vap_desired_mode = vap->iv_des_mode; - as->as_required_mode = 0; +- as->as_vap_desired_mode = vap->iv_des_mode; +- as->as_required_mode = 0; - if (as->as_vap_desired_mode != IEEE80211_MODE_AUTO) { - as->as_required_mode = chanflags[as->as_vap_desired_mode]; - if ((vap->iv_ath_cap & IEEE80211_ATHC_TURBOP) && @@ -584,7 +598,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_ap.c - } - } - -- ss->ss_last = 0; + ss->ss_last = 0; - /* Use the table of ordered channels to construct the list - * of channels for scanning. Any channels in the ordered - * list not in the master list will be discarded. */ @@ -619,8 +633,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_ap.c - /* XR is not supported on turbo channels */ - if (IEEE80211_IS_CHAN_TURBO(c) && vap->iv_flags & IEEE80211_F_XR) - continue; -+ ieee80211_scan_add_channels(ic, ss, vap->iv_des_mode); - +- - /* Dynamic channels are scanned in base mode */ - if (!as->as_required_mode && !IEEE80211_IS_CHAN_ST(c)) - continue; @@ -640,7 +653,8 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_ap.c - /* Make sure the channel is active */ - if ((c == NULL) || isclr(ic->ic_chan_active, c->ic_ieee)) - continue; -- ++ ieee80211_scan_add_channels(ic, ss, vap->iv_des_mode); + - /* Don't overrun */ - if (ss->ss_last >= IEEE80211_SCAN_MAX) - break; @@ -650,7 +664,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_ap.c ss->ss_next = 0; /* XXX tunables */ ss->ss_mindwell = msecs_to_jiffies(200); /* 200ms */ -@@ -759,13 +538,6 @@ +@@ -761,18 +534,6 @@ pick_channel(struct ieee80211_scan_state if (IEEE80211_IS_CHAN_RADAR(c->chan)) continue; @@ -661,14 +675,17 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan_ap.c - (as->as_vap_desired_mode != IEEE80211_MODE_TURBO_STATIC_A)) - continue; - - /* Verify mode matches any fixed mode specified */ - if((c->chan->ic_flags & as->as_required_mode) != - as->as_required_mode) -Index: madwifi-trunk-r3314/net80211/ieee80211_scan.c -=================================================================== ---- madwifi-trunk-r3314.orig/net80211/ieee80211_scan.c 2008-06-01 03:41:58.000000000 +0200 -+++ madwifi-trunk-r3314/net80211/ieee80211_scan.c 2008-06-01 03:42:18.000000000 +0200 -@@ -958,6 +958,79 @@ +- /* Verify mode matches any fixed mode specified */ +- if((c->chan->ic_flags & as->as_required_mode) != +- as->as_required_mode) +- continue; +- + if ((ic->ic_bsschan != NULL) && + (ic->ic_bsschan != IEEE80211_CHAN_ANYC)) { + +--- a/net80211/ieee80211_scan.c ++++ b/net80211/ieee80211_scan.c +@@ -958,6 +958,80 @@ ieee80211_scan_flush(struct ieee80211com } } @@ -743,16 +760,15 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan.c + ss->ss_chans[ss->ss_last++] = c; + } +} ++EXPORT_SYMBOL(ieee80211_scan_add_channels); + + /* * Execute radar channel change. This is called when a radar/dfs * signal is detected. AP mode only. Return 1 on success, 0 on -Index: madwifi-trunk-r3314/net80211/ieee80211_scan.h -=================================================================== ---- madwifi-trunk-r3314.orig/net80211/ieee80211_scan.h 2008-06-01 03:41:58.000000000 +0200 -+++ madwifi-trunk-r3314/net80211/ieee80211_scan.h 2008-06-01 03:42:18.000000000 +0200 -@@ -219,4 +219,7 @@ +--- a/net80211/ieee80211_scan.h ++++ b/net80211/ieee80211_scan.h +@@ -219,4 +219,7 @@ void ieee80211_scanner_register(enum iee void ieee80211_scanner_unregister(enum ieee80211_opmode, const struct ieee80211_scanner *); void ieee80211_scanner_unregister_all(const struct ieee80211_scanner *); @@ -760,11 +776,9 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_scan.h + struct ieee80211_scan_state *ss, + enum ieee80211_phymode mode); #endif /* _NET80211_IEEE80211_SCAN_H_ */ -Index: madwifi-trunk-r3314/net80211/ieee80211_wireless.c -=================================================================== ---- madwifi-trunk-r3314.orig/net80211/ieee80211_wireless.c 2008-06-01 03:41:58.000000000 +0200 -+++ madwifi-trunk-r3314/net80211/ieee80211_wireless.c 2008-06-01 03:42:53.000000000 +0200 -@@ -3873,6 +3873,106 @@ +--- a/net80211/ieee80211_wireless.c ++++ b/net80211/ieee80211_wireless.c +@@ -3873,6 +3873,106 @@ ieee80211_ioctl_kickmac(struct net_devic return ieee80211_ioctl_setmlme(dev, info, w, (char *)&mlme); } @@ -871,7 +885,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_wireless.c static int ieee80211_ioctl_addmac(struct net_device *dev, struct iw_request_info *info, void *w, char *extra) -@@ -5656,6 +5756,8 @@ +@@ -5656,6 +5756,8 @@ static const struct iw_priv_args ieee802 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "minrate"}, {IEEE80211_PARAM_MINRATE, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_minrate"}, @@ -880,7 +894,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_wireless.c #ifdef ATH_REVERSE_ENGINEERING /* -@@ -5753,6 +5855,7 @@ +@@ -5753,6 +5855,7 @@ static const iw_handler ieee80211_priv_h set_priv(IEEE80211_IOCTL_WDSADDMAC, ieee80211_ioctl_wdsmac), set_priv(IEEE80211_IOCTL_WDSDELMAC, ieee80211_ioctl_wdsdelmac), set_priv(IEEE80211_IOCTL_KICKMAC, ieee80211_ioctl_kickmac),