ralink has missing firmware: was (Wireless must bee kept alive by simultaneous pings)

Joe Talbott josepht at cstone.net
Fri Jun 4 17:44:02 PDT 2010


On Thu, Jun 03, 2010 at 06:15:10PM +1000, elekktretterr at exemail.com.au wrote:
> > On Tue, Jun 01, 2010 at 09:54:02PM +1000, elekktretterr at exemail.com.au
> > wrote:
> >> > IIRC I believe I committed the firmware, but apparently the ralfw
> >> device
> >> > isn't being properly setup.
> >> >
> >>
> >> Can you please fix this? Thanks
> >
> > Can you test this patch which should include the firmware?
> >
> > Thanks,
> > Joe
> >
> 
> I get
> 
> config ZZZ
> Warning: device "ralfw" is unknown

This patch seems to have fixed this error as well as a panic Petr
reported.  There is still an issue with the ral/wlan device not
connecting even with this patch.  I'm looking into it though any help
is greatly appreciated.

Joe
diff --git a/sys/conf/files b/sys/conf/files
index 18fe2fb..6f6c14b 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -405,6 +405,49 @@ dev/netif/acx/acx111.c	optional acx
 dev/netif/ral/if_ral_pci.c	optional ral
 dev/netif/ral/rt2560.c		optional ral
 dev/netif/ral/rt2661.c		optional ral
+#rt2561fw.c	optional rt2561fw ralfw			\
+rt2561fw.c	optional ralfw			\
+	compile-with	"/usr/bin/awk -f $S/tools/fw_stub.awk rt2561.fw:rt2561fw -mrt2561 -c${.TARGET}" \
+	no-implicit-rule before-depend local				\
+	clean		"rt2561fw.c"
+rt2561fw.fwo	optional ralfw			\
+	dependency	"rt2561.fw"					\
+	compile-with	"${LD} -b binary -d -warn-common -r -d -o ${.TARGET} rt2561.fw" \
+	no-implicit-rule						\
+	clean		"rt2561fw.fwo"
+rt2561.fw	optional ralfw			\
+	dependency	".PHONY"					\
+	compile-with	"uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2561.fw.uu" \
+	no-obj no-implicit-rule						\
+	clean		"rt2561.fw"
+rt2561sfw.c	optional ralfw		\
+	compile-with	"/usr/bin/awk -f $S/tools/fw_stub.awk rt2561s.fw:rt2561sfw -mrt2561s -c${.TARGET}" \
+	no-implicit-rule before-depend local				\
+	clean		"rt2561sfw.c"
+rt2561sfw.fwo	optional ralfw		\
+	dependency	"rt2561s.fw"					\
+	compile-with	"${LD} -b binary -d -warn-common -r -d -o ${.TARGET} rt2561s.fw" \
+	no-implicit-rule						\
+	clean		"rt2561sfw.fwo"
+rt2561s.fw	optional ralfw		\
+	dependency	".PHONY"					\
+	compile-with	"uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2561s.fw.uu"	\
+	no-obj no-implicit-rule						\
+	clean		"rt2561s.fw"
+rt2661fw.c	optional ralfw			\
+	compile-with	"/usr/bin/awk -f $S/tools/fw_stub.awk rt2661.fw:rt2661fw -mrt2661 -c${.TARGET}" \
+	no-implicit-rule before-depend local				\
+	clean		"rt2661fw.c"
+rt2661fw.fwo	optional ralfw			\
+	dependency	"rt2661.fw"					\
+	compile-with	"${LD} -b binary -d -warn-common -r -d -o ${.TARGET} rt2661.fw" \
+	no-implicit-rule						\
+	clean		"rt2661fw.fwo"
+rt2661.fw	optional ralfw			\
+	dependency	".PHONY"					\
+	compile-with	"uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2661.fw.uu"	\
+	no-obj no-implicit-rule						\
+	clean		"rt2661.fw"
 dev/netif/rum/if_rum.c		optional rum
 dev/netif/ural/if_ural.c	optional ural
 dev/netif/lge/if_lge.c	optional lge
diff --git a/sys/dev/netif/ral/rt2560.c b/sys/dev/netif/ral/rt2560.c
index 72fcc6f..bb24705 100644
--- a/sys/dev/netif/ral/rt2560.c
+++ b/sys/dev/netif/ral/rt2560.c
@@ -1574,7 +1574,7 @@ rt2560_tx_mgt(struct rt2560_softc *sc, struct mbuf *m0,
 	}
 
 	error = bus_dmamap_load_mbuf_segment(sc->prioq.data_dmat, data->map, m0,
-	    segs, 1, &nsegs, 0);
+	    segs, 1, &nsegs, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		device_printf(sc->sc_dev, "could not map mbuf (error %d)\n",
 		    error);
@@ -1676,7 +1676,7 @@ rt2560_sendprot(struct rt2560_softc *sc,
 	data = &sc->txq.data[sc->txq.cur_encrypt];
 
 	error = bus_dmamap_load_mbuf_segment(sc->txq.data_dmat, data->map,
-	    mprot, segs, 1, &nsegs, 0);
+	    mprot, segs, 1, &nsegs, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		device_printf(sc->sc_dev,
 		    "could not map mbuf (error %d)\n", error);
@@ -1739,7 +1739,7 @@ rt2560_tx_raw(struct rt2560_softc *sc, struct mbuf *m0,
 	}
 
 	error = bus_dmamap_load_mbuf_segment(sc->prioq.data_dmat, data->map, m0,
-	    segs, 1, &nsegs, 0);
+	    segs, 1, &nsegs, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		device_printf(sc->sc_dev, "could not map mbuf (error %d)\n",
 		    error);
@@ -1844,7 +1844,7 @@ rt2560_tx_data(struct rt2560_softc *sc, struct mbuf *m0,
 	desc = &sc->txq.desc[sc->txq.cur_encrypt];
 
 	error = bus_dmamap_load_mbuf_segment(sc->txq.data_dmat, data->map, m0,
-	    segs, 1, &nsegs, 0);
+	    segs, 1, &nsegs, BUS_DMA_NOWAIT);
 	if (error != 0 && error != EFBIG) {
 		device_printf(sc->sc_dev, "could not map mbuf (error %d)\n",
 		    error);
@@ -1862,7 +1862,7 @@ rt2560_tx_data(struct rt2560_softc *sc, struct mbuf *m0,
 		m0 = mnew;
 
 		error = bus_dmamap_load_mbuf_segment(sc->txq.data_dmat, data->map,
-		    m0, segs, 1, &nsegs, 0);
+		    m0, segs, 1, &nsegs, BUS_DMA_NOWAIT);
 		if (error != 0) {
 			device_printf(sc->sc_dev,
 			    "could not map mbuf (error %d)\n", error);
diff --git a/sys/dev/netif/ral/rt2661.c b/sys/dev/netif/ral/rt2661.c
index 5e0216a..71802c7 100644
--- a/sys/dev/netif/ral/rt2661.c
+++ b/sys/dev/netif/ral/rt2661.c
@@ -1335,7 +1335,7 @@ rt2661_tx_mgt(struct rt2661_softc *sc, struct mbuf *m0,
 	}
 
 	error = bus_dmamap_load_mbuf_segment(sc->mgtq.data_dmat, data->map, m0,
-	    segs, 1, &nsegs, 0);
+	    segs, 1, &nsegs, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		device_printf(sc->sc_dev, "could not map mbuf (error %d)\n",
 		    error);
@@ -1436,7 +1436,7 @@ rt2661_sendprot(struct rt2661_softc *sc, int ac,
 	desc = &txq->desc[txq->cur];
 
 	error = bus_dmamap_load_mbuf_segment(txq->data_dmat, data->map, mprot, segs,
-	    1, &nsegs, 0);
+	    1, &nsegs, BUS_DMA_NOWAIT);
 	if (error != 0) {
 		device_printf(sc->sc_dev,
 		    "could not map mbuf (error %d)\n", error);
@@ -1534,7 +1534,7 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m0,
 	desc = &txq->desc[txq->cur];
 
 	error = bus_dmamap_load_mbuf_segment(txq->data_dmat, data->map, m0, segs,
-	    1, &nsegs, 0);
+	    1, &nsegs, BUS_DMA_NOWAIT);
 	if (error != 0 && error != EFBIG) {
 		device_printf(sc->sc_dev, "could not map mbuf (error %d)\n",
 		    error);
@@ -1552,7 +1552,7 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m0,
 		m0 = mnew;
 
 		error = bus_dmamap_load_mbuf_segment(txq->data_dmat, data->map, m0,
-		    segs, 1, &nsegs, 0);
+		    segs, 1, &nsegs, BUS_DMA_NOWAIT);
 		if (error != 0) {
 			device_printf(sc->sc_dev,
 			    "could not map mbuf (error %d)\n", error);




More information about the Kernel mailing list