Date: Wed, 28 Feb 2007 12:32:38 GMT From: Sepherosa Ziehau <sephe@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 115163 for review Message-ID: <200702281232.l1SCWcMD030847@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=115163 Change 115163 by sephe@sephe_zealot:sam_wifi on 2007/02/28 12:31:47 Add sc_newstate_arg to ural_softc, through it we can pass ieee80211_new_state() 'arg' along following code path: ural_newstate()->ural_task()->ieee80211_newstate() 'arg' is quite important to let ieee80211_newstate() make correct decision during certain state changes, e.g. RUN->AUTH Reviewed-by: sam@ Affected files ... .. //depot/projects/wifi/sys/dev/usb/if_ural.c#16 edit .. //depot/projects/wifi/sys/dev/usb/if_uralvar.h#8 edit Differences ... ==== //depot/projects/wifi/sys/dev/usb/if_ural.c#16 (text+ko) ==== @@ -733,13 +733,14 @@ } static void -ural_task(void *arg) +ural_task(void *xarg) { - struct ural_softc *sc = arg; + struct ural_softc *sc = xarg; struct ieee80211com *ic = &sc->sc_ic; enum ieee80211_state ostate; struct ieee80211_node *ni; struct mbuf *m; + int arg = sc->sc_newstate_arg; ostate = ic->ic_state; @@ -799,7 +800,7 @@ } RAL_UNLOCK(sc); - sc->sc_newstate(ic, sc->sc_state, -1); + sc->sc_newstate(ic, sc->sc_state, arg); } static void @@ -836,6 +837,7 @@ /* do it in a process context */ sc->sc_state = nstate; + sc->sc_newstate_arg = arg; usb_add_task(sc->sc_udev, &sc->sc_task, USB_TASKQ_DRIVER); return 0; ==== //depot/projects/wifi/sys/dev/usb/if_uralvar.h#8 (text+ko) ==== @@ -103,6 +103,7 @@ usbd_pipe_handle sc_tx_pipeh; enum ieee80211_state sc_state; + int sc_newstate_arg; int sc_scan_action; /* should be an enum */ struct usb_task sc_task; struct usb_task sc_scantask;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702281232.l1SCWcMD030847>