| 1 |
diff -u'rbNF^function' madwifi-ng-r1645-20060615/net80211/ieee80211.h madwifi-ng-r1645-patched/net80211/ieee80211.h |
|---|
| 2 |
--- madwifi-ng-r1645-20060615/net80211/ieee80211.h 2006-06-09 22:41:19.000000000 +0200 |
|---|
| 3 |
+++ madwifi-ng-r1645-patched/net80211/ieee80211.h 2006-06-23 12:25:47.000000000 +0200 |
|---|
| 4 |
@@ -667,6 +667,11 @@ |
|---|
| 5 |
IEEE80211_ELEMID_ERP = 42, |
|---|
| 6 |
IEEE80211_ELEMID_RSN = 48, |
|---|
| 7 |
IEEE80211_ELEMID_XRATES = 50, |
|---|
| 8 |
+ |
|---|
| 9 |
+ /* proprietary elements used by Agere chipsets (grep in ieee80211_input.c) */ |
|---|
| 10 |
+ IEEE80211_ELEMID_AGERE1 = 128, |
|---|
| 11 |
+ IEEE80211_ELEMID_AGERE2 = 129, |
|---|
| 12 |
+ |
|---|
| 13 |
IEEE80211_ELEMID_TPC = 150, |
|---|
| 14 |
IEEE80211_ELEMID_CCKM = 156, |
|---|
| 15 |
IEEE80211_ELEMID_VENDOR = 221, /* vendor private */ |
|---|
| 16 |
diff -u'rbNF^function' madwifi-ng-r1645-20060615/net80211/ieee80211_input.c madwifi-ng-r1645-patched/net80211/ieee80211_input.c |
|---|
| 17 |
--- madwifi-ng-r1645-20060615/net80211/ieee80211_input.c 2006-06-10 04:17:05.000000000 +0200 |
|---|
| 18 |
+++ madwifi-ng-r1645-patched/net80211/ieee80211_input.c 2006-06-23 12:24:35.000000000 +0200 |
|---|
| 19 |
@@ -2302,6 +2302,16 @@ |
|---|
| 20 |
scan.chan = scan.bchan; |
|---|
| 21 |
|
|---|
| 22 |
while (frm < efrm) { |
|---|
| 23 |
+ /* Fix for broken Agere chipsets. See |
|---|
| 24 |
+ IEEE80211_FC0_SUBTYPE_ASSOC_RESP arround line 3103. */ |
|---|
| 25 |
+ |
|---|
| 26 |
+ if ((*frm == IEEE80211_ELEMID_AGERE1) || |
|---|
| 27 |
+ (*frm == IEEE80211_ELEMID_AGERE2)) { |
|---|
| 28 |
+ printk("*hack* Agere-element in beacon found\n"); |
|---|
| 29 |
+ frm = efrm; |
|---|
| 30 |
+ continue; |
|---|
| 31 |
+ } |
|---|
| 32 |
+ |
|---|
| 33 |
IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1]); |
|---|
| 34 |
switch (*frm) { |
|---|
| 35 |
case IEEE80211_ELEMID_SSID: |
|---|
| 36 |
@@ -3079,6 +3089,23 @@ |
|---|
| 37 |
|
|---|
| 38 |
rates = xrates = wme = NULL; |
|---|
| 39 |
while (frm < efrm) { |
|---|
| 40 |
+ /* Fix for broken Agere chipsets: the reported element |
|---|
| 41 |
+ length of the proprietary elements 128 and 129 is |
|---|
| 42 |
+ sometimes wrong (depending on the AP-firmware). |
|---|
| 43 |
+ We must not discard such frames since then association |
|---|
| 44 |
+ would be impossible with those APs. */ |
|---|
| 45 |
+ |
|---|
| 46 |
+ if ((*frm == IEEE80211_ELEMID_AGERE1) || |
|---|
| 47 |
+ (*frm == IEEE80211_ELEMID_AGERE2)) { |
|---|
| 48 |
+ /* Skip rest of the frame if a proprietary |
|---|
| 49 |
+ Agere-element is found, since we can not |
|---|
| 50 |
+ rely on the given element length and thus |
|---|
| 51 |
+ we don't know where the next element starts. */ |
|---|
| 52 |
+ printk("*hack* Agere-element in (re)association response found\n"); |
|---|
| 53 |
+ frm = efrm; |
|---|
| 54 |
+ continue; |
|---|
| 55 |
+ } |
|---|
| 56 |
+ |
|---|
| 57 |
IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1]); |
|---|
| 58 |
switch (*frm) { |
|---|
| 59 |
case IEEE80211_ELEMID_RATES: |
|---|