Kernel missing something? or another problem?

Live forum:


11-11-2011 01:58:10

I am not sure if this post may breach your rules as I guess it is heavily distribution specific. At least the rt2x00 driver source I am working with does came from the samsung git, not your own. But in all honesty I have run out of idea's and could use few pointers.

I am trying to compile a USB driver module for use with USB OTG on a mobile phone. Specifically the device is a DLINK DWL-G122 rev B1 and the long term goal is a working 'montor mode'. I have done this several times in the past prior to git repositories, on x86 architecture using the rt2570 driver, which I note from this forum is no longer supported. I was drawn here by an article that someone wrote in your wiki about integrating that driver into a git repository. Unfortnately that link is dead. So that path now seems dead to me? unless someone could point me to a similar article or happens to have retained a copy of that article?

I have successfully set up an ubuntu VM and I know it and the cross compiler is configured correctly and i have the correct sources for my target device (samsung sources for an sgs2) as I have been able to compile and insert a simpler module (ntfs.ko) in the same kernel compile. I have made modules rt2x00lib.ko and rt2x00usb.ko (as well as mac80211 and cfg80211 as I wasn't sure if these were required or not?)

Unfortunately these modules will not insert, I think this indicates missing functionality in the installed kernel? rather than a actual driver issue? but searches of the errors in the dmesg logs have given me nothing that I can pin down as the missing elements or even a decent troubelshooting methodology. So I am struggling to know where to go from here. Hence coming to the people with the most experience of this driver.

I have been hoping to build this entirely as modules and not flash an entirely new kernel to the phone if possible, but I am beginning to think that is not going to be possible.

I am not asking for someone to do this for me simply some pointers on what I should be looking at based on the following dmesg information, or even poi -

[quotes6p2x65z]dmesg details after insmod rt2x00lib.ko
[62229.840566] rt2x00lib Unknown symbol ieee80211_register_hw (err 0)
[62229.840782] rt2x00lib Unknown symbol ieee80211_get_hdrlen_from_skb (err 0)
[62229.840990] rt2x00lib Unknown symbol ieee80211_wake_queue (err 0)
[62229.841242] rt2x00lib Unknown symbol ieee80211_tx_status_irqsafe (err 0)
[62229.841448] rt2x00lib Unknown symbol wiphy_rfkill_set_hw_state (err 0)
[62229.848976] rt2x00lib Unknown symbol ieee80211_queue_delayed_work (err 0)
[62229.849192] rt2x00lib Unknown symbol wiphy_rfkill_stop_polling (err 0)
[62229.849401] rt2x00lib Unknown symbol ieee80211_ctstoself_get (err 0)
[62229.849842] rt2x00lib Unknown symbol ieee80211_wake_queues (err 0)
[62229.850050] rt2x00lib Unknown symbol ieee80211_iterate_active_interfaces (err 0)
[62229.850421] rt2x00lib Unknown symbol ieee80211_stop_queue (err 0)
[62229.850628] rt2x00lib Unknown symbol ieee80211_stop_queues (err 0)
[62229.850936] rt2x00lib Unknown symbol wiphy_rfkill_start_polling (err 0)
[62229.851151] rt2x00lib Unknown symbol ieee80211_iterate_active_interfaces_atomic (err 0)
[62229.851401] rt2x00lib Unknown symbol ieee80211_channel_to_frequency (err 0)
[62229.851609] rt2x00lib Unknown symbol ieee80211_unregister_hw (err 0)
[62229.851944] rt2x00lib Unknown symbol ieee80211_beacon_get_tim (err 0)
[62229.852155] rt2x00lib Unknown symbol ieee80211_rts_get (err 0)
[62229.852363] rt2x00lib Unknown symbol ieee80211_queue_work (err 0)
[62229.852626] rt2x00lib Unknown symbol ieee80211_rx_irqsafe (err 0)

dmesg details after insmod rt2x00usb.ko
[62048.690148] rt2x00usb Unknown symbol rt2x00lib_suspend (err 0)
[62048.691412] rt2x00usb Unknown symbol rt2x00lib_probe_dev (err 0)
[62048.714537] rt2x00usb Unknown symbol ieee80211_free_hw (err 0)
[62048.714854] rt2x00usb Unknown symbol ieee80211_alloc_hw (err 0)
[62048.715497] rt2x00usb Unknown symbol rt2x00lib_rxdone (err 0)
[62048.716353] rt2x00usb Unknown symbol rt2x00lib_remove_dev (err 0)
[62048.716669] rt2x00usb Unknown symbol rt2x00lib_txdone (err 0)
[62048.717310] rt2x00usb Unknown symbol rt2x00queue_get_queue (err 0)
[62048.718017] rt2x00usb Unknown symbol rt2x00lib_resume (err 0)

dmesg of successful insmod ntfs.ko (from the same kernel compile)
[62686.357508] NTFS driver 2.1.29 [Flags R/W MODULE].
[62686.580413] mmc_do_discard_ops(475) receive discard start(3442648), len(32)

Is it simply that I am going to have to take the plunge and install the full kernel build with these modules or is there more to it than that?

Any help or insights, or pointers to similar projects, anyone can offer me would be greatly appreciated.

Thank you in advance for your attention.


11-11-2011 20:40:12

You just need to load a few more modules, rt2x00lib depends upon mac80211, mac8211 depends upon cfg80211 and cfg80211 depends upon rfkill. There are also some dependencies on kernel crypto libraries but last time I checked (a LONG time ago) they needed to be compiled into the kernel for everything to work and most kernels do include them.


11-11-2011 20:54:54

RFKILL is the one I missed ) had the others ) and of course thats the top of the lot oh well back to my compiler.


12-11-2011 09:42:16

hmm oddly rfkill is in the kernel by default the next one in the list cfg80211

the dmesg on that is -

[quote1d1iv1qb][140146.246732] cfg80211 disagrees about version of symbol wireless_send_event
[140146.246751] cfg80211 Unknown symbol wireless_send_event (err -22)[/quote1d1iv1qb]
this is so frustrating I know I am close now


17-11-2011 12:00:14

Hi guys,

Still stuck with this RFKILL issue, I have tried various different options in CFG80211 config nothing makes any difference and I have tried builiding RFKILL as a module but the kernel build fails completely so that route is not open. In researching these issues I came across Wireless compat and RFKILL_backport but these look more dated, does anyone here thinks those might help if I can integrate them to the kernel build?

The lines from my last .config includes the following lines for CFG80211 & RFKILL -

[code1zm9imsm]# CONFIG_AF_RXRPC is not set
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_REG_DEBUG is not set
# CONFIG_CFG80211_DEFAULT_PS is not set
# CONFIG_CFG80211_DEBUGFS is not set
# CONFIG_LIB80211 is not set
# CONFIG_MAC80211 is not set

# Some wireless drivers require a rate control algorithm
# CONFIG_WIMAX is not set
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set[/code1zm9imsm]

Obviously the other options (lib & mac etc) will need to be enabled to finally get the driver working but I'd like to get past this cfg80211 issue first. since I have already successfully built and inserted the lib80211.

Any further help anyone can offer me in this regard would be useful at this point


17-11-2011 22:48:21

ok I have been able successfully compile cfg80211.ko

by setting

[code24zgt1oj]# CONFIG_CFG80211_WEXT is not set

is this element required to use the rt2x00usb.ko driver?

compiled this way all the other modules insert I have compiled and inserted every driver I can think of that would be remotely related