madwifi: add fragmentation fix from #4817
[openwrt.git] / package / madwifi / patches / 105-ratectl_attach.patch
1 --- a/net80211/ieee80211_rate.c
2 +++ b/net80211/ieee80211_rate.c
3 @@ -100,8 +100,18 @@ struct ath_ratectrl *ieee80211_rate_atta
4 ieee80211_load_module(buf);
5
6 if (!ratectls[id].attach) {
7 - printk(KERN_ERR "Error loading module \"%s\"\n", buf);
8 - return NULL;
9 + /* pick the first available rate control module */
10 + printk(KERN_INFO "Rate control module \"%s\" not available\n", buf);
11 + for (id = 0; id < IEEE80211_RATE_MAX; id++) {
12 + if (ratectls[id].attach)
13 + break;
14 + }
15 + if (!ratectls[id].attach) {
16 + printk(KERN_ERR "No rate control module available");
17 + return NULL;
18 + } else {
19 + printk(KERN_INFO "Using \"%s\" instead.\n", module_names[id]);
20 + }
21 }
22
23 ctl = ratectls[id].attach(sc);
This page took 0.039768 seconds and 5 git commands to generate.