New on the list, first question

Dan Williams dcbw at redhat.com
Mon Nov 5 11:54:57 EST 2007


On Mon, 2007-11-05 at 17:19 +0100, Cyril HAENEL wrote:
> Dan,
> 
> This morning I looked in detail.
> It seems that the kernel I use doesn't need a lot of thing to accept
> the last libertas driver. I deleted all lines which cause error, until
> the compilation was OK.
> The driver just need :
> 
> DECLARE_MAC_BUF()
> set_freezable()
> 
> And one field is missing in the "ethtool_ops" structure :
> get_sset_count
> 
> I prefer to not switch to the 2.6.24-rc1 kernel, thus I have 2
> solutions : backport the driver to my kernel (2.6.19.3) or add the 2

If you are using 2.6.19 I believe you'll also need to ensure that
skb->dev is set before eth_type_trans() in libertas_upload_rx_packet(),
otherwise you'll panic.  In later kernels (I think 2.6.22 and later)
eth_type_trans() sets skb->dev for you.

void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb)
{
	lbs_deb_rx("skb->data %p\n", skb->data);

	if (priv->adapter->monitormode != WLAN_MONITOR_OFF) {
		skb->protocol = eth_type_trans(skb, priv->rtap_net_dev);
+		skb->dev = priv->rtap_net_dev;
	} else {
-		if (priv->mesh_dev && IS_MESH_FRAME(skb))
+		if (priv->mesh_dev && IS_MESH_FRAME(skb)) {
			skb->protocol = eth_type_trans(skb, priv->mesh_dev);
+			skb->dev = priv->mesh_dev;
-		else
+		} else {
			skb->protocol = eth_type_trans(skb, priv->dev);
+			skb->dev = priv->dev;
+		}
	}
	skb->ip_summed = CHECKSUM_UNNECESSARY;
	netif_rx(skb);
}

Dan

>  or 3 thing which are missing in my kernel (DECLARE_MAC_BUF,
> set_freezable, get_sset_count).
> 
> I think the easiest is to backport the driver to my kernel ?
> 
> Regards,
> Cyril
> 
> 
> 
> Dan Williams a écrit : 
> > On Sun, 2007-11-04 at 20:53 +0100, Cyril HAENEL wrote:
> >   
> > > Hi all,
> > > 
> > > I work on an embedded project (blackfin arch), which use a marvell 8385 
> > > wifi module (CF interface).
> > > Some month ago I dowloaded the libertas driver tree, but I stopped to 
> > > work on the project, no enough time...
> > > 
> > > Yesterday I worked on the project again, and I have succesfully compiled 
> > > the driver as a module, loaded it in the kernel, loaded the firmware, 
> > > and eth0 appeared.
> > > But now I want to continue to work with the last driver version, because 
> > > it seem there is patch to appply to have the driver working without 
> > > crashes on the blackfin arch.
> > > 
> > > My problem is that I can't found the solution to download the last 
> > > driver. When I use git, I get a complete kernel, but without the last 
> > > version of the libertas driver, because there is just the usb support.
> > > 
> > > Someone can explain me how to get the last libertas driver sources ?
> > >     
> > 
> > We're fully merged now, so I'd suggest using 2.6.24-rc1 sources.
> > Backports to 2.6.19 and more recent aren't really that hard, and consist
> > mainly of (from memory):
> > 
> > 1) class_dev changes in main.c
> > 2) setting skb->dev in the RX path for < 2.6.22 in rx.c
> > 3) replace DECLARE_MACBUF or whatever it is with MAC_ARG/MAC_FMT from
> > ieee80211.h (a few places)
> > 4) set_freezable() is new with 2.6.23 or something (main.c)
> > 5) possibly add in the defs for radiotap flags
> > 
> > It shouldn't be more than 50 LoC change to backport to 2.6.19 even.
> > Earlier than that, I don't know.  It shouldn't be too hard to look at
> > the git diffs and figure out what needs changing, if you have specific
> > issues I can try to go back and dig up some bits.
> > 
> > Dan
> > 
> > 
> > 
> > _______________________________________________
> > libertas-dev mailing list
> > libertas-dev at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/libertas-dev
> > 
> > 
> >   
> 
> -- 
> 
> Cyril Haenel
> Registered Linux User #332632




More information about the libertas-dev mailing list