Date: Mon, 31 Jul 2006 03:08:54 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 102822 for review Message-ID: <200607310308.k6V38scp051688@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102822 Change 102822 by sam@sam_ebb on 2006/07/31 03:08:01 make it compile; still needs scanning support Affected files ... .. //depot/projects/wifi/sys/dev/ral/rt2560.c#2 edit .. //depot/projects/wifi/sys/dev/ral/rt2560var.h#2 edit .. //depot/projects/wifi/sys/dev/ral/rt2661.c#2 edit .. //depot/projects/wifi/sys/dev/ral/rt2661var.h#2 edit Differences ... ==== //depot/projects/wifi/sys/dev/ral/rt2560.c#2 (text) ==== @@ -88,7 +88,6 @@ static struct ieee80211_node *rt2560_node_alloc( struct ieee80211_node_table *); static int rt2560_media_change(struct ifnet *); -static void rt2560_next_scan(void *); static void rt2560_iter_func(void *, struct ieee80211_node *); static void rt2560_update_rssadapt(void *); static int rt2560_newstate(struct ieee80211com *, @@ -204,7 +203,6 @@ mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE); - callout_init(&sc->scan_ch, debug_mpsafenet ? CALLOUT_MPSAFE : 0); callout_init(&sc->rssadapt_ch, CALLOUT_MPSAFE); /* retrieve RT2560 rev. no */ @@ -384,7 +382,6 @@ struct ifnet *ifp = ic->ic_ifp; rt2560_stop(sc); - callout_stop(&sc->scan_ch); callout_stop(&sc->rssadapt_ch); bpfdetach(ifp); @@ -760,20 +757,6 @@ } /* - * This function is called periodically (every 200ms) during scanning to - * switch from one channel to another. - */ -static void -rt2560_next_scan(void *arg) -{ - struct rt2560_softc *sc = arg; - struct ieee80211com *ic = &sc->sc_ic; - - if (ic->ic_state == IEEE80211_S_SCAN) - ieee80211_next_scan(ic); -} - -/* * This function is called for each node present in the node station table. */ static void @@ -812,7 +795,6 @@ int error = 0; ostate = ic->ic_state; - callout_stop(&sc->scan_ch); switch (nstate) { case IEEE80211_S_INIT: @@ -829,8 +811,6 @@ case IEEE80211_S_SCAN: rt2560_set_chan(sc, ic->ic_curchan); - callout_reset(&sc->scan_ch, (sc->dwelltime * hz) / 1000, - rt2560_next_scan, sc); break; case IEEE80211_S_AUTH: @@ -1253,7 +1233,7 @@ (struct ieee80211_frame_min *)wh); /* send the frame to the 802.11 layer */ - ieee80211_input(ic, m, ni, desc->rssi, 0); + ieee80211_input(ic, m, ni, desc->rssi, 0, 0); /* give rssi to the rate adatation algorithm */ rn = (struct rt2560_node *)ni; @@ -2088,7 +2068,6 @@ rt2560_watchdog(struct ifnet *ifp) { struct rt2560_softc *sc = ifp->if_softc; - struct ieee80211com *ic = &sc->sc_ic; RAL_LOCK(sc); @@ -2105,8 +2084,6 @@ ifp->if_timer = 1; } - ieee80211_watchdog(ic); - RAL_UNLOCK(sc); } ==== //depot/projects/wifi/sys/dev/ral/rt2560var.h#2 (text) ==== @@ -108,7 +108,6 @@ struct mtx sc_mtx; - struct callout scan_ch; struct callout rssadapt_ch; int sc_tx_timer; ==== //depot/projects/wifi/sys/dev/ral/rt2661.c#2 (text) ==== @@ -90,7 +90,6 @@ static struct ieee80211_node *rt2661_node_alloc( struct ieee80211_node_table *); static int rt2661_media_change(struct ifnet *); -static void rt2661_next_scan(void *); static int rt2661_newstate(struct ieee80211com *, enum ieee80211_state, int); static uint16_t rt2661_eeprom_read(struct rt2661_softc *, uint8_t); @@ -207,7 +206,6 @@ mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE); - callout_init(&sc->scan_ch, debug_mpsafenet ? CALLOUT_MPSAFE : 0); callout_init(&sc->rssadapt_ch, CALLOUT_MPSAFE); /* wait for NIC to initialize */ @@ -405,7 +403,6 @@ struct ifnet *ifp = ic->ic_ifp; rt2661_stop(sc); - callout_stop(&sc->scan_ch); callout_stop(&sc->rssadapt_ch); bpfdetach(ifp); @@ -775,20 +772,6 @@ } /* - * This function is called periodically (every 200ms) during scanning to - * switch from one channel to another. - */ -static void -rt2661_next_scan(void *arg) -{ - struct rt2661_softc *sc = arg; - struct ieee80211com *ic = &sc->sc_ic; - - if (ic->ic_state == IEEE80211_S_SCAN) - ieee80211_next_scan(ic); -} - -/* * This function is called for each node present in the node station table. */ static void @@ -827,7 +810,6 @@ int error = 0; ostate = ic->ic_state; - callout_stop(&sc->scan_ch); switch (nstate) { case IEEE80211_S_INIT: @@ -842,8 +824,6 @@ case IEEE80211_S_SCAN: rt2661_set_chan(sc, ic->ic_curchan); - callout_reset(&sc->scan_ch, (sc->dwelltime * hz) / 1000, - rt2661_next_scan, sc); break; case IEEE80211_S_AUTH: @@ -1160,7 +1140,7 @@ (struct ieee80211_frame_min *)wh); /* send the frame to the 802.11 layer */ - ieee80211_input(ic, m, ni, desc->rssi, 0); + ieee80211_input(ic, m, ni, desc->rssi, 0, 0); /* give rssi to the rate adatation algorithm */ rn = (struct rt2661_node *)ni; @@ -1861,7 +1841,6 @@ rt2661_watchdog(struct ifnet *ifp) { struct rt2661_softc *sc = ifp->if_softc; - struct ieee80211com *ic = &sc->sc_ic; RAL_LOCK(sc); @@ -1878,8 +1857,6 @@ ifp->if_timer = 1; } - ieee80211_watchdog(ic); - RAL_UNLOCK(sc); } ==== //depot/projects/wifi/sys/dev/ral/rt2661var.h#2 (text) ==== @@ -101,7 +101,6 @@ struct mtx sc_mtx; - struct callout scan_ch; struct callout rssadapt_ch; int sc_tx_timer;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607310308.k6V38scp051688>