>>>>> "Denis" == Denis Shaposhnikov <dsh_at_neva.vlink.ru> writes: Denis> System: FreeBSD localhost.my.domain 7.0-CURRENT FreeBSD Denis> 7.0-CURRENT #0: Fri Aug 12 22:53:24 MSD 2005 Denis> dsh_at_localhost.my.domain:/var/FreeBSD/obj/var/FreeBSD/src/sys/WIZARD Denis> i386 and Denis> Can't get working ipw(4) association in adhoc mode with Denis> FreeBSD's ipw. Before, I'vi been using ipw-1.7.1 from damien's Denis> site but can't use it now because API change. This patch fixes adhoc's ipw(4) on my system (version see above). I've made it from ipw-freebsd-1.7.1 which works fine before API change. --- sys/dev/ipw/if_ipw.c.orig Fri Aug 12 17:10:10 2005 +++ sys/dev/ipw/if_ipw.c Sat Aug 13 22:35:29 2005 _at__at_ -825,23 +825,26 _at__at_ { struct ifnet *ifp = ic->ic_ifp; struct ipw_softc *sc = ifp->if_softc; - struct ieee80211_node *ni; - uint8_t macaddr[IEEE80211_ADDR_LEN]; + struct ieee80211_node *ni = ic->ic_bss; uint32_t len; + uint8_t val; switch (nstate) { case IEEE80211_S_RUN: - DELAY(200); /* firmware needs a short delay here */ + len = IEEE80211_NWID_LEN; + ipw_read_table2(sc, IPW_INFO_CURRENT_SSID, ni->ni_essid, &len); + ni->ni_esslen = len; - len = IEEE80211_ADDR_LEN; - ipw_read_table2(sc, IPW_INFO_CURRENT_BSSID, macaddr, &len); + val = ipw_read_table1(sc, IPW_INFO_CURRENT_CHANNEL); + ni->ni_chan = &ic->ic_channels[val]; + + DELAY(1000); /* firmware needs a short delay here */ - ni = ieee80211_find_node(&ic->ic_scan, macaddr); - if (ni == NULL) - break; + len = IEEE80211_ADDR_LEN; + ipw_read_table2(sc, IPW_INFO_CURRENT_BSSID, ni->ni_bssid, &len); + IEEE80211_ADDR_COPY(ni->ni_macaddr, ni->ni_bssid); ieee80211_ref_node(ni); - ieee80211_sta_join(ic, ni); ieee80211_node_authorize(ni); if (ic->ic_opmode == IEEE80211_M_STA) -- DSS5-RIPE DSS-RIPN 2:550/5068_at_fidonet 2:550/5069_at_fidonet mailto:dsh_at_vlink.ru http://neva.vlink.ru/~dsh/Received on Sat Aug 13 2005 - 17:03:55 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:41 UTC