| 16 | | Here's a patch of what needs to get done for madwifi-0.9.3.1. This has been added as part of [wiki:Documentation/SupportedImages/baseline-2.2.ndz baseline-2.2.ndz]: |
| 17 | | |
| 18 | | {{{ |
| 19 | | diff -Naur madwifi-0.9.3.1/net80211/ieee80211_node.c madwifi-0.9.3.1-ibss/net80211/ieee80211_node.c |
| 20 | | --- madwifi-0.9.3.1/net80211/ieee80211_node.c 2007-05-23 04:43:05.000000000 -0400 |
| 21 | | +++ madwifi-0.9.3.1-ibss/net80211/ieee80211_node.c 2007-07-03 17:17:45.000000000 -0400 |
| 22 | | @@ -53,6 +53,15 @@ |
| 23 | | #include <net80211/ieee80211_var.h> |
| 24 | | #include <net80211/if_athproto.h> |
| 25 | | |
| 26 | | +static int ibss_grid = 1; |
| 27 | | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,52)) |
| 28 | | +MODULE_PARM(ibss_grid, "i"); |
| 29 | | +#else |
| 30 | | +#include <linux/moduleparam.h> |
| 31 | | +module_param(ibss_grid, int, 0600); |
| 32 | | +#endif |
| 33 | | +MODULE_PARM_DESC(ibss_grid, "IBSS hack based on SSID for large networks"); |
| 34 | | + |
| 35 | | /* |
| 36 | | * Association id's are managed with a bit vector. |
| 37 | | */ |
| 38 | | @@ -301,8 +310,25 @@ |
| 39 | | ni->ni_capinfo |= IEEE80211_CAPINFO_IBSS; /* XXX */ |
| 40 | | if (vap->iv_flags & IEEE80211_F_DESBSSID) |
| 41 | | IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_des_bssid); |
| 42 | | - else |
| 43 | | - ni->ni_bssid[0] |= 0x02; /* local bit for IBSS */ |
| 44 | | + else { |
| 45 | | + /* XXX: If we're on a large network then hash the SSID |
| 46 | | + * instead of the MAC address to generate the BSSID. |
| 47 | | + * This ensures that nodes with identical SSIDs end |
| 48 | | + * up with identical BSSIDs, regardless of any |
| 49 | | + * timing bugs. We might be able to fix this for good |
| 50 | | + * elsewhere */ |
| 51 | | + if(ibss_grid) { |
| 52 | | + int i; |
| 53 | | + printk(KERN_INFO "net80211: IBSS BSSID " |
| 54 | | + "generation based on hash of SSID - " |
| 55 | | + "temporary fix for large networks\n"); |
| 56 | | + for(i=0; i<IEEE80211_ADDR_LEN;i++) |
| 57 | | + ni->ni_bssid[i] = ni->ni_essid[i % |
| 58 | | + ni->ni_esslen]; |
| 59 | | + } |
| 60 | | + else |
| 61 | | + ni->ni_bssid[0] |= 0x02;/* local bit for IBSS */ |
| 62 | | + } |
| 63 | | } else if (vap->iv_opmode == IEEE80211_M_AHDEMO) { |
| 64 | | if (vap->iv_flags & IEEE80211_F_DESBSSID) |
| 65 | | IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_des_bssid); |
| 66 | | }}} |
| | 16 | Attached is a patch of what needs to get done for madwifi-0.9.3.1. This has been added as part of [wiki:Documentation/SupportedImages/baseline-2.2.ndz baseline-2.2.ndz] and [wiki:Documentation/SupportedImages/baseline-2.3.ndz baseline-2.3.ndz] |