2009-11-25 09:37:16     Where is "net_device_ops" when building Libertas 8686 GSPI

Document created by Aaronwu Employee on Aug 19, 2013
Version 1Show Document
  • View in full screen mode

2009-11-25 09:37:16     Where is "net_device_ops" when building Libertas 8686 GSPI

David Kasper (UNITED STATES)

Message: 82744   

 

I am trying to demonstrate wireless Marvell 8686 functionality via GSPI interface using the libertas driver source (blackfin-kernel-2.6 tree) that Andrey posted on cozybit.com.  During the build of this tree it experiences a compiler error as it cannot find the definition of "struct net_device_ops."  I performed a search but cannot find any .h files that define this struct.  Does anybody know how to fix this problem or where I can find more information.  I am trying to patch my baseline 2009R1 working kernel with this code.  Any help is appreciated.

 

- David Kasper

 

  CC [M]  drivers/net/usb/usbnet.o

  CC [M]  drivers/net/wireless/libertas/main.o

drivers/net/wireless/libertas/main.c:1159: error: variable âlbs_netdev_opsâ has initializer but incomplete type

drivers/net/wireless/libertas/main.c:1160: error: unknown field ândo_openâ specified in initializer

drivers/net/wireless/libertas/main.c:1160: warning: excess elements in struct initializer

drivers/net/wireless/libertas/main.c:1160: warning: (near initialization for âlbs_netdev_opsâ)

drivers/net/wireless/libertas/main.c:1161: error: unknown field ândo_stopâ specified in initializer

d

QuoteReplyEditDelete

 

 

2009-11-25 12:54:16     Re: Where is "net_device_ops" when building Libertas 8686 GSPI

Mike Frysinger (UNITED STATES)

Message: 82751   

 

a simple grep gives you the answer:

grep net_device_ops include/linux/*

include/linux/com20020.h:extern const struct net_device_ops com20020_netdev_ops;

include/linux/netdevice.h:struct net_device_ops {

include/linux/netdevice.h:      const struct net_device_ops *netdev_ops;

QuoteReplyEditDelete

 

 

2009-11-25 13:57:52     Re: Where is "net_device_ops" when building Libertas 8686 GSPI

David Kasper (UNITED STATES)

Message: 82755   

 

Mike,

 

Maybe I have an older kernel.  Which version did you grep; was it 2009R1-RC6 from the downloads or SVN?

 

Thanks,

 

Dave

QuoteReplyEditDelete

 

 

2009-11-25 15:03:05     Re: Where is "net_device_ops" when building Libertas 8686 GSPI

Mike Frysinger (UNITED STATES)

Message: 82757   

 

reading the history of netdevice.h shows that net_device_ops was added after 2.6.28

QuoteReplyEditDelete

 

 

2009-11-28 01:02:33     Re: Where is "net_device_ops" when building Libertas 8686 GSPI

David Kasper (UNITED STATES)

Message: 82825   

 

Does anybody know the procedure for getting libertas working via GSPI?  I downloaded SVN sources, updated ezkit.c in mach-bf548/boards (libertas_spi_platform_data & etc.) and added firmware to romfs/lib/firmware.  At this point do I simply perform the following from the shell (note I was going to work on hot plugging later):

 

>modprobe libertas <CR>

 

>modprobe libertas_spi <CR>

 

I need to review the code regarding the following error but wanted to know if I had performed the correct steps:

 

root:/> modprobe libertas

lib80211: common routines for IEEE802.11 drivers

root:/> modprobe libertas_spi

libertas_spi: Libertas SPI driver

libertas: Can't read bus mode register.

libertas_spi: probe of spi1.1 failed with error -5

root:/>

 

Thanks,

 

David Kasper

QuoteReplyEditDelete

 

 

2009-11-30 22:53:25     Re: Where is "net_device_ops" when building Libertas 8686 GSPI

Cliff Cai (CHINA)

Message: 82901   

 

David,

 

the error happened when tried to read out the value of a register that was just written out.

 

Since it was the first bus operation,obviously,the spi bus didn't work properly.

 

errno 5 means I/O error,So, would you please have a look at your spi singals.

 

 

 

Cliff

QuoteReplyEditDelete

 

 

2010-03-30 23:26:30     Re: Where is "net_device_ops" when building Libertas 8686 GSPI

Gordon Yu (TAIWAN)

Message: 87878   

 

Hi David

 

I get the same error message.

 

root:/> modprobe libertas_spi

libertas_spi: Libertas SPI driver

libertas: Can't read bus mode register.

libertas_spi: probe of spi0.3 failed with error -5

 

How are you debug it ?

 

What spi I/O error ?

 

Please teach me.

 

Thank you very much.

 

 

 

Gordon

Attachments

    Outcomes