netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Loop detected  - calling function from different modules
@ 2006-08-30 20:58 Frank Schneider
  2006-08-30 21:26 ` Stephen Hemminger
  2006-08-31  7:17 ` Johannes Berg
  0 siblings, 2 replies; 9+ messages in thread
From: Frank Schneider @ 2006-08-30 20:58 UTC (permalink / raw)
  To: netdev


hi all,

I am writing/customizing a network(wlan pc card) device driver for Linux 
kernel 2.6.12
Think about I have two modules e.g. ath_pci and wlan module.
I can call a function from a   .c file which is implemented in a  .c file in 
wlan module by using EXPORT_SYMBOL macro..

and i need to do same in reverse way, i.e. call a function from wlan module 
that is implemented in ath_pci module.

I did the same way and its making but when I do  make install its showing 
following error:

WARNING: Loop detected: /lib/modules/2.6.12/net/ath_pci.ko needs wlan.ko 
which needs ath_pci.ko again!

Please anybody tell how can I do this, any clue , please ?

thanx in advance

n.b. this question may consider as very naive since I am not good yet in 
kernel hacking.. !!!!

regards,
/Frank

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Loop detected  - calling function from different modules
  2006-08-30 20:58 Loop detected - calling function from different modules Frank Schneider
@ 2006-08-30 21:26 ` Stephen Hemminger
  2006-09-03  9:02   ` Frank Schneider
  2006-08-31  7:17 ` Johannes Berg
  1 sibling, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2006-08-30 21:26 UTC (permalink / raw)
  To: Frank Schneider; +Cc: netdev

On Wed, 30 Aug 2006 22:58:17 +0200
"Frank Schneider" <twodipu@hotmail.com> wrote:

> 
> hi all,
> 
> I am writing/customizing a network(wlan pc card) device driver for Linux 
> kernel 2.6.12
> Think about I have two modules e.g. ath_pci and wlan module.
> I can call a function from a   .c file which is implemented in a  .c file in 
> wlan module by using EXPORT_SYMBOL macro..
> 
> and i need to do same in reverse way, i.e. call a function from wlan module 
> that is implemented in ath_pci module.
> 
> I did the same way and its making but when I do  make install its showing 
> following error:
> 
> WARNING: Loop detected: /lib/modules/2.6.12/net/ath_pci.ko needs wlan.ko 
> which needs ath_pci.ko again!
> 
> Please anybody tell how can I do this, any clue , please ?
> 
> thanx in advance
> 
> n.b. this question may consider as very naive since I am not good yet in 
> kernel hacking.. !!!!
> 
> regards,
> /Frank

Where are these open source drivers so the wireless developers can help?

-- 
Stephen Hemminger <shemminger@osdl.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Loop detected  - calling function from different modules
  2006-08-30 20:58 Loop detected - calling function from different modules Frank Schneider
  2006-08-30 21:26 ` Stephen Hemminger
@ 2006-08-31  7:17 ` Johannes Berg
  2006-08-31  9:53   ` Frank Schneider
  1 sibling, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2006-08-31  7:17 UTC (permalink / raw)
  To: Frank Schneider; +Cc: netdev

On Wed, 2006-08-30 at 22:58 +0200, Frank Schneider wrote:

> and i need to do same in reverse way, i.e. call a function from wlan module 
> that is implemented in ath_pci module.

No, you don't. Period. Either wlan provides services to ath_pci, or they
should be one module. Besides, why don't you port atheros drivers to
d80211 instead? And how about showing code? :)

johannes

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Loop detected - calling function from different modules
  2006-08-31  7:17 ` Johannes Berg
@ 2006-08-31  9:53   ` Frank Schneider
  2006-08-31  9:57     ` Johannes Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Frank Schneider @ 2006-08-31  9:53 UTC (permalink / raw)
  To: johannes; +Cc: netdev


Dear Johannes,

To port ath_pci to wlan(d80211) module and make it “one” module – might be a 
possible solution. But you know, ath_pci has some dependency and some binary 
crap(HAL)
More over, I need only an signal (e.g. by calling a funciton) in the ath_pci 
module when a data frame is sending out from the card(as AP)
We know struct net_device has a member pointer to a method called
hard_start_xmit that initiates the transmission through the device.
Wlan module already assigned a function ("ieee80211_hardstart" ) to this 
pointer
hard_start_xmit. It uses dev_queue_xmit() to transmit outgoing data frame 
from
AP.
Is it possible to assign another function in different module, e.g.
ath_pci I need to call this function when transmit data frame, but in 
practice,
this function will not send any data frame, e.g. won’t use dev_queue_xmit.

Or is any other way to get an indication in ath_pci module that an outgoing 
data
frame is gonna send out?

Any suggestions to do that please ?

regards,
Frank



>From: Johannes Berg <johannes@sipsolutions.net>
>On Wed, 2006-08-30 at 22:58 +0200, Frank Schneider wrote:
>
> > and i need to do same in reverse way, i.e. call a function from wlan 
>module
> > that is implemented in ath_pci module.
>
>No, you don't. Period. Either wlan provides services to ath_pci, or they
>should be one module. Besides, why don't you port atheros drivers to
>d80211 instead? And how about showing code? :)
>
>johannes
>-
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Loop detected - calling function from different modules
  2006-08-31  9:53   ` Frank Schneider
@ 2006-08-31  9:57     ` Johannes Berg
  2006-08-31 11:10       ` Frank Schneider
  2006-09-03 11:20       ` Frank Schneider
  0 siblings, 2 replies; 9+ messages in thread
From: Johannes Berg @ 2006-08-31  9:57 UTC (permalink / raw)
  To: Frank Schneider; +Cc: netdev

Frank,


> Any suggestions to do that please ?

d80211 has a hardware definition struct that is registered by the driver
and contains a callback that is called for each frame. This is the
direction you should take as well:

   hard_start_xmit (generic code)
calls
   hardware_xmit (your module code, e.g. in a struct wlan_device)

johannes

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Loop detected - calling function from different modules
  2006-08-31  9:57     ` Johannes Berg
@ 2006-08-31 11:10       ` Frank Schneider
  2006-09-03 11:20       ` Frank Schneider
  1 sibling, 0 replies; 9+ messages in thread
From: Frank Schneider @ 2006-08-31 11:10 UTC (permalink / raw)
  To: johannes; +Cc: netdev


Dear Johannes,

I just got an idea, may be not usefull,  but I am gonna try:

If I assign a function which is implemented in ath_pci module to
hard_start_xmit
and do  my little work and call  the actual function to xmit data frame in 
wlan module.
that I can do..
accordingly I will pass the concern structure sk_buff that contain data 
frame..
that will serve my purpose as well as normal data frame is suppose to send 
out from the device, AP.

can I do it ?
I will let you know, if I success...

/Frank



>From: Johannes Berg <johannes@sipsolutions.net>
>
> > Any suggestions to do that please ?
>
>d80211 has a hardware definition struct that is registered by the driver
>and contains a callback that is called for each frame. This is the
>direction you should take as well:
>
>    hard_start_xmit (generic code)
>calls
>    hardware_xmit (your module code, e.g. in a struct wlan_device)
>
>johannes
>-
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Loop detected - calling function from different modules
  2006-08-30 21:26 ` Stephen Hemminger
@ 2006-09-03  9:02   ` Frank Schneider
  0 siblings, 0 replies; 9+ messages in thread
From: Frank Schneider @ 2006-09-03  9:02 UTC (permalink / raw)
  To: shemminger; +Cc: netdev


hi Stephen,

you can check these:

  http://bcm43xx.berlios.de/
http://madwifi.org/

R
/frank


>From: Stephen Hemminger <shemminger@osdl.org>
>To: "Frank Schneider" <twodipu@hotmail.com>
>CC: netdev@vger.kernel.org
>Subject: Re: Loop detected  - calling function from different modules
>Date: Wed, 30 Aug 2006 14:26:07 -0700
>
>On Wed, 30 Aug 2006 22:58:17 +0200
>"Frank Schneider" <twodipu@hotmail.com> wrote:
>
> >
> > hi all,
> >
> > I am writing/customizing a network(wlan pc card) device driver for Linux
> > kernel 2.6.12
> > Think about I have two modules e.g. ath_pci and wlan module.
> > I can call a function from a   .c file which is implemented in a  .c 
>file in
> > wlan module by using EXPORT_SYMBOL macro..
> >
> > and i need to do same in reverse way, i.e. call a function from wlan 
>module
> > that is implemented in ath_pci module.
> >
> > I did the same way and its making but when I do  make install its 
>showing
> > following error:
> >
> > WARNING: Loop detected: /lib/modules/2.6.12/net/ath_pci.ko needs wlan.ko
> > which needs ath_pci.ko again!
> >
> > Please anybody tell how can I do this, any clue , please ?
> >
> > thanx in advance
> >
> > n.b. this question may consider as very naive since I am not good yet in
> > kernel hacking.. !!!!
> >
> > regards,
> > /Frank
>
>Where are these open source drivers so the wireless developers can help?
>
>--
>Stephen Hemminger <shemminger@osdl.org>

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


-- 
VGER BF report: U 0.864812

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Loop detected - calling function from different modules
  2006-08-31  9:57     ` Johannes Berg
  2006-08-31 11:10       ` Frank Schneider
@ 2006-09-03 11:20       ` Frank Schneider
  2006-09-04  7:07         ` Johannes Berg
  1 sibling, 1 reply; 9+ messages in thread
From: Frank Schneider @ 2006-09-03 11:20 UTC (permalink / raw)
  To: johannes; +Cc: netdev, madwifi-devel


hi Johannes,

as I told you I have done...
actually it was certainly nothing to do, I just assigned a my_function to 
the pointer of
hard_start_xmit  and i implemented my_function in ath_pci module  done my 
work
and then call the actuall function, which is exported btw, in wlan module 
which is sending data frame using  dev_queue_xmit(). and its working 
perfect..
but I just wonder one thing: in ath_pci module  net_device  *dev  is ath0 
interface
on the other hand wlan module  *dev is wifi0  interface (e.g.)
still is working well.

could anyone please give me a hints how  dev_queue_xmit() is using tx data 
queue (HAL_TX_QUEUE_DATA) to transmit data queue.
actually I want to use data queue for sending beacon frame, ofcourse not 
real implementation
but for an experiment, a research purpose..

R
/Frank




>From: Johannes Berg <johannes@sipsolutions.net>
>To: Frank Schneider <twodipu@hotmail.com>
>CC: netdev@vger.kernel.org
>Subject: Re: Loop detected - calling function from different modules
>Date: Thu, 31 Aug 2006 11:57:46 +0200
>
>Frank,
>
>
> > Any suggestions to do that please ?
>
>d80211 has a hardware definition struct that is registered by the driver
>and contains a callback that is called for each frame. This is the
>direction you should take as well:
>
>    hard_start_xmit (generic code)
>calls
>    hardware_xmit (your module code, e.g. in a struct wlan_device)
>
>johannes
>-
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Loop detected - calling function from different modules
  2006-09-03 11:20       ` Frank Schneider
@ 2006-09-04  7:07         ` Johannes Berg
  0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2006-09-04  7:07 UTC (permalink / raw)
  To: Frank Schneider; +Cc: netdev, madwifi-devel

Frank,

> could anyone please give me a hints how  dev_queue_xmit() is using tx data 
> queue (HAL_TX_QUEUE_DATA) to transmit data queue.
> actually I want to use data queue for sending beacon frame, ofcourse not 
> real implementation
> but for an experiment, a research purpose..

It's probably *far* easier for you to buy a Broadcom wireless card and
use it with bcm43xx-d80211.

I can't help you more with ath stuff, nor with your programming model
which is fundamentally broken.

johannes

-- 
VGER BF report: U 0.83072

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-09-04  7:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-30 20:58 Loop detected - calling function from different modules Frank Schneider
2006-08-30 21:26 ` Stephen Hemminger
2006-09-03  9:02   ` Frank Schneider
2006-08-31  7:17 ` Johannes Berg
2006-08-31  9:53   ` Frank Schneider
2006-08-31  9:57     ` Johannes Berg
2006-08-31 11:10       ` Frank Schneider
2006-09-03 11:20       ` Frank Schneider
2006-09-04  7:07         ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).