[rt2x00-users] Unknown Symbol!

Ivo Van Doorn ivdoorn at gmail.com
Tue Jul 20 03:06:01 AEST 2010


On Mon, Jul 19, 2010 at 6:57 PM, Mohammad Abdelhadi <mo.jaser at gmail.com> wrote:
>
>
> On Mon, Jul 19, 2010 at 7:55 PM, Ivo Van Doorn <ivdoorn at gmail.com> wrote:
>>
>> On Mon, Jul 19, 2010 at 6:50 PM, Mohammad Abdelhadi <moh.jaser at ieee.org>
>> wrote:
>> >
>> >
>> > On Mon, Jul 19, 2010 at 7:45 PM, Ivo Van Doorn <ivdoorn at gmail.com>
>> > wrote:
>> >>
>> >> On Mon, Jul 19, 2010 at 6:37 PM, Mohammad Abdelhadi
>> >> <moh.jaser at ieee.org>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Mon, Jul 19, 2010 at 7:32 PM, Ivo Van Doorn <ivdoorn at gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Mon, Jul 19, 2010 at 6:29 PM, Mohammad Abdelhadi
>> >> >> <moh.jaser at ieee.org>
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> > On Mon, Jul 19, 2010 at 7:20 PM, Ivo Van Doorn <ivdoorn at gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> On Mon, Jul 19, 2010 at 6:13 PM, Mohammad Abdelhadi
>> >> >> >> <moh.jaser at ieee.org>
>> >> >> >> wrote:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > On Sun, Jul 18, 2010 at 8:03 PM, Ivo Van Doorn
>> >> >> >> > <ivdoorn at gmail.com>
>> >> >> >> > wrote:
>> >> >> >> >>
>> >> >> >> >> Hi,
>> >> >> >> >> > On Sun, Jul 18, 2010 at 7:45 PM, Ivo Van Doorn
>> >> >> >> >> > <ivdoorn at gmail.com>
>> >> >> >> >> > wrote:
>> >> >> >> >> >>
>> >> >> >> >> >> > I am trying to call the function ( EnqueueChSwAnn ) which
>> >> >> >> >> >> > is
>> >> >> >> >> >> > written
>> >> >> >> >> >> > in
>> >> >> >> >> >> > the
>> >> >> >> >> >> > file ~/common/spectrum.c. I am trying to call it from my
>> >> >> >> >> >> > code
>> >> >> >> >> >> > that
>> >> >> >> >> >> > is
>> >> >> >> >> >> > written in different module in ~/common/rtmp_init.c. But,
>> >> >> >> >> >> > when
>> >> >> >> >> >> > I
>> >> >> >> >> >> > do
>> >> >> >> >> >> > (modprobe rt3572sta), i always get " Unknown Symbol :
>> >> >> >> >> >> > EnqueueChSwAnn.
>> >> >> >> >> >> > I
>> >> >> >> >> >> > also
>> >> >> >> >> >> > tried to call it using function pointers method, but that
>> >> >> >> >> >> > also
>> >> >> >> >> >> > didn't
>> >> >> >> >> >> > work!
>> >> >> >> >> >> > (I am using 2010_06_25_RT3572_Linux_STA_v2.4.0.0 driver).
>> >> >> >> >>
>> >> >> >> >> All functions which you want to be available in different
>> >> >> >> >> modules
>> >> >> >> >> must
>> >> >> >> >> never
>> >> >> >> >> be staticly defined. Secondly the symbol must be exported to
>> >> >> >> >> be
>> >> >> >> >> available.
>> >> >> >> >> In the kernel there is a macro which handles it for you:
>> >> >> >> >> EXPORT_SYMBOL
>> >> >> >> >>
>> >> >> >> >> To export a function called EnqueueChSwAnn you have to add:
>> >> >> >> >>
>> >> >> >> >> EXPORT_SYMBOL(EnqueueChSwAnn);
>> >> >> >> >>
>> >> >> >> >> in the ralink module.
>> >> >> >> >>
>> >> >> >> >> Ivo
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > Hi Ivo,
>> >> >> >> >
>> >> >> >> > Thanks for your kindest reply, well I did export the symbol
>> >> >> >> > after
>> >> >> >> > I
>> >> >> >> > made
>> >> >> >> > sure that the function is not staticly defined but
>> >> >> >> > unfortunately
>> >> >> >> > this
>> >> >> >> > way
>> >> >> >> > didn't work, I even tried to call that function using a
>> >> >> >> > function
>> >> >> >> > pointer
>> >> >> >> > but
>> >> >> >> > that didn't work too. So, do you have any further ideas about
>> >> >> >> > how
>> >> >> >> > to
>> >> >> >> > solve
>> >> >> >> > this case?
>> >> >> >> >
>> >> >> >> > Thank you in advance...
>> >> >> >>
>> >> >> >> How are you compiling your module?
>> >> >> >> Check the Ralink Makefile to see how to compile against the
>> >> >> >> kernel
>> >> >> >> (and its modules).
>> >> >> >>
>> >> >> >> Ivo
>> >> >> >
>> >> >> > Hi,
>> >> >> >
>> >> >> > Could you please explain how is that related to my issue? Sorry
>> >> >> > but,
>> >> >> > I
>> >> >> > didn't get you!
>> >> >> > The driver I work on is in /usr/src/
>> >> >> > so I do:
>> >> >> > - make
>> >> >> > -make install
>> >> >> > -modprobe rt3572sta
>> >> >> > and I get the Unknown symbol when I do the modprobe.
>> >> >>
>> >> >> This is your make step for rt3572, but how are you compiling the
>> >> >> file containing your new function which uses the symbol?
>> >> >>
>> >> >> Ivo
>> >> >
>> >> >
>> >> > Hi,
>> >> >
>> >> > Well, I don't compile it individually, I just do 'make' to compile
>> >> > the
>> >> > driver and its modules as one package.
>> >>
>> >> Then I don't understand what you are doing.
>> >> You have created your own module which depends on the rt3572sta?
>> >> so how are you compiling your own code? If you use 'make', then how
>> >> does your Makefile look like?
>> >>
>> >> Ivo
>> >
>> > Hi,
>> > Well, I didn't create any new model, I just added some code lines in one
>> > of
>> > the driver's modules, one of that code is  that function!
>> > If you want I could send you the Makefile?
>>
>> Oh but then you don't need that whole EXPORT_SYMBOL thing.
>> Have you tried declaring the function you need in a header?
>>
>> Ivo
>
> Hi,
>
> Well, it is already declared! and I included that header file in my module.
> But, no result!

Can you post the patch of the exact changes you made?

Ivo




More information about the users mailing list