From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Zhang Yanfei-B21500 <B21500@freescale.com>
Cc: Jinsung Lee <ljs@netsys.kaist.ac.kr>,
ath9k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org
Subject: Re: [ath9k-devel] can ath9k run on linux 2.6.25
Date: Fri, 12 Feb 2010 17:28:48 -0800 [thread overview]
Message-ID: <43e72e891002121728k6f623d9egc2146b8ca09a9fd2@mail.gmail.com> (raw)
In-Reply-To: <25E8B46727291E4EB5A1CB88CBC4284E0100A872@zmy16exm21.fsl.freescale.net>
On Wed, Feb 10, 2010 at 7:03 PM, Zhang Yanfei-B21500
<B21500@freescale.com> wrote:
> Hi Luis
>
> I am porting the compat-wireless-2.6.32-3 to my powerpc platform
> with 2.6.25 kernel. After disable the LED marco in config.mk i have
> compile it sucess. but when i load it , it show below error messages,
> anyone can help on this?
> the kernel modules manually load order is below: am i right ?
> 1. rfkill_backport
> 2. cfg_802.11
> 3. mac80211
> 4. ath
> 5. ath9k
> #insmod rfkill_backport.ko
> rfkill_backport: Unknown symbol dev_set_name
> insmod: cannot insert 'rfkill_backport.ko': unknown symbol in module
> (-1): No such file or directory
>
> i found that the compat-2.6.26 have the dev_set_name function, but
> compat-2.6.25 don't have this.
That is the point, so the way the compat-2.6.x files work is that say
you are on 2.6.25 it means you need backport work for 2.6.26, 2.6.27,
2.6.28, 2.6.29, 2.6.30, 2.6.31, 2.6.32 and 2.6.33.
So you get compiled the respective objects for each kernel and these
get linked into a compat module.
dev_set_name() was added as of the 2.6.26 kernel so having it defined
for kernels >= 2.6.25 is correct, and it is also exported.
Only thing I can think of is perhaps rfkill doesn't have the compat.h
header included? I'll check in a while.
> In new kernel(2.6.29) it's is device/base/core.c, then i try to copy
> the function into my 2.6.25 kernel.
> but it loss the 'kobject_set_name_vargs', here is the compile
> information.
> $drivers/base/core.c: In function 'dev_set_name':
> $drivers/base/core.c:880: error: implicit declaration of function
> 'kobject_set_name_vargs'
Senthil backported this on compat-2.6.26.c, there are two different
ways to backport this, one for kernels >= 2.6.25 which is at the top
and then for kernels older, at the bottom:
/* 2.6.24 does not have the struct kobject with a name */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25))
/**
* kobject_set_name_vargs - Set the name of an kobject
* @kobj: struct kobject to set the name of
* @fmt: format string used to build the name
* @vargs: vargs to format the string.
*/
static
int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
va_list vargs)
{
const char *old_name = kobj->name;
char *s;
if (kobj->name && !fmt)
return 0;
kobj->name = kvasprintf(GFP_KERNEL, fmt, vargs);
if (!kobj->name)
return -ENOMEM;
/* ewww... some of these buggers have '/' in the name ... */
while ((s = strchr(kobj->name, '/')))
s[0] = '!';
kfree(old_name);
return 0;
}
#else
static
int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
va_list vargs)
{
struct device *dev;
unsigned int len;
va_list aq;
dev = container_of(kobj, struct device, kobj);
va_copy(aq, vargs);
len = vsnprintf(NULL, 0, fmt, aq);
va_end(aq);
len = len < BUS_ID_SIZE ? (len + 1) : BUS_ID_SIZE;
vsnprintf(dev->bus_id, len, fmt, vargs);
return 0;
}
#endif
Luis
next prev parent reply other threads:[~2010-02-13 1:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-06 14:38 [PATCH] ath9k: fix keycache leak in split tkip case tom.leiming
2010-02-08 9:20 ` [ath9k-devel] can ath9k run on linux 2.6.25 Zhang Yanfei-B21500
2010-02-08 18:01 ` Luis R. Rodriguez
2010-02-09 6:10 ` Jinsung Lee
2010-02-09 6:16 ` Luis R. Rodriguez
[not found] ` <25E8B46727291E4EB5A1CB88CBC4284E0100A779@zmy16exm21.fsl.freescale.net>
2010-02-09 17:10 ` Luis R. Rodriguez
2010-02-11 3:03 ` Zhang Yanfei-B21500
2010-02-13 1:28 ` Luis R. Rodriguez [this message]
2010-02-08 21:38 ` [PATCH] ath9k: fix keycache leak in split tkip case Luis R. Rodriguez
2010-02-09 1:36 ` Ming Lei
2010-02-09 7:51 ` Johannes Berg
2010-02-09 14:30 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43e72e891002121728k6f623d9egc2146b8ca09a9fd2@mail.gmail.com \
--to=lrodriguez@atheros.com \
--cc=B21500@freescale.com \
--cc=ath9k-devel@venema.h4ckr.net \
--cc=linux-wireless@vger.kernel.org \
--cc=ljs@netsys.kaist.ac.kr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox