Changes between Version 15 and Version 16 of HowTo/bssidFix


Ignore:
Timestamp:
Aug 28, 2006, 9:45:06 PM (18 years ago)
Author:
einar
Comment:

Change required to madwifi-0.9.2 driver.

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/bssidFix

    v15 v16  
    6262
    6363These instructions should be fairly similar for future version of madwifi. Look for where a node picks what bssid it wants to use (usually in create_ibss or similar), and then find that function where the node determines that it's in adhoc mode.
     64
     65
     66== madwifi.0.9.2 hack ==
     67
     68In case you're using a more recent madwifi driver, the following might help.
     69Assuming you've unpacked madwifi-0.9.2.tar.gz in your home directory, the file is:
     70{{{
     71~/madwifi-0.9.2/net80211/ieee80211_node.c
     72}}}
     73The change is roughly on line 305; before:
     74
     75{{{
     76   if (vap->iv_opmode == IEEE80211_M_IBSS) {
     77                vap->iv_flags |= IEEE80211_F_SIBSS;
     78                ni->ni_capinfo |= IEEE80211_CAPINFO_IBSS;       /* XXX */
     79                if (vap->iv_flags & IEEE80211_F_DESBSSID)
     80                        IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_des_bssid);
     81                else
     82                        ni->ni_bssid[0] |= 0x02;        /* local bit for IBSS */
     83        }
     84}}}
     85
     86After:
     87
     88{{{
     89    if (vap->iv_opmode == IEEE80211_M_IBSS) {
     90                int i;
     91                vap->iv_flags |= IEEE80211_F_SIBSS;
     92                ni->ni_capinfo |= IEEE80211_CAPINFO_IBSS;       /* XXX */
     93                if (vap->iv_flags & IEEE80211_F_DESBSSID)
     94                        IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_des_bssid);
     95                else
     96                        ni->ni_bssid[0] |= 0x02;        /* local bit for IBSS */
     97                for(i=0; i<IEEE80211_ADDR_LEN;i++){
     98                    ni->ni_bssid[i] = ni->ni_essid[i % ni->ni_esslen];
     99                }
     100        }
     101}}}
     102
     103then simply make and copy the new modules as above.
     104