linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: lrodriguez@atheros.com, linux-wireless@vger.kernel.org,
	mcgrof@infradead.org
Subject: Re: [PATCH 6/8] compat-wireless: Add warning if wext is deactivated
Date: Sun, 12 Sep 2010 22:35:11 +0200	[thread overview]
Message-ID: <4C8D397F.4000608@hauke-m.de> (raw)
In-Reply-To: <aaefd6f9a498968940884abef19c81bf@localhost>

On 12.09.2010 22:20, Johannes Berg wrote:
> 
> On Sat, 11 Sep 2010 18:18:31 +0200, Hauke Mehrtens <hauke@hauke-m.de>
> wrote:
>> ++#ifdef CONFIG_WIRELESS_EXT
>>  +		if (!dev->wireless_handlers)
>>  +			dev->wireless_handlers = &cfg80211_wext_handler;
>> ++#else
>> ++		printk(KERN_WARNING "cfg80211: wext will not work because "
>> ++			"kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools "
>> ++			"using wext interface like iwconfig will not work.\n");
>> ++#endif
> 
> This could use printk_once :-)

Yes that will be better. I will resend a new patch.

> Also, if the kernel you're compiling against is new enough and was built
> with cfg80211, this isn't necessary, but the normal code could be used
> (which I believe this patch currently removes, rather than ifdeffing it)

Using the normal code does not work because the kernel accesses the wext
handler through struct wiphy which is shipped with compat-wireless.
struct wiphy used in e.g. kernel 2.6.33 is different from the struct
used in compat-wireless. The wext attribute is at a different position
and the kernel would dereference a wrong pointer or something else.

Hauke

  reply	other threads:[~2010-09-12 20:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-11 16:18 [PATCH 0/8 v2] compat-wireless: ath9kl and compat_autoconf.h fixes Hauke Mehrtens
2010-09-11 16:18 ` Hauke Mehrtens
2010-09-11 16:18 ` [PATCH 1/8] compat-wireless: handle depending on something build as module Hauke Mehrtens
2010-09-11 16:18 ` [PATCH 2/8] compat-wireless: make atk6kl build with older kernels Hauke Mehrtens
2010-09-11 16:18 ` [PATCH 3/8] compat-wireless: fix for CONFIG_WIRELESS_EXT=n Hauke Mehrtens
2010-09-11 16:18 ` [PATCH 4/8] compat-wireless: build if kernel does not have mac80211 Hauke Mehrtens
2010-09-11 16:18 ` [PATCH 5/8] compat-wireless: add conditions form config into compat_autoconf.h Hauke Mehrtens
2010-09-11 16:18 ` [PATCH 6/8] compat-wireless: Add warning if wext is deactivated Hauke Mehrtens
2010-09-12 20:20   ` Johannes Berg
2010-09-12 20:35     ` Hauke Mehrtens [this message]
2010-09-12 21:09       ` Hauke Mehrtens
2010-10-02 16:55         ` [PATCH] compat-wireless: introduce driver-select group for atlxx Walter Goldens
     [not found]           ` <362796.1111.qm@web56806.mail.re3.yahoo.com>
2010-10-05 19:11             ` Luis R. Rodriguez
2010-10-05 19:14           ` Luis R. Rodriguez
2010-09-12 21:11       ` [PATCH 6/8 v2] compat-wireless: Add warning if wext is deactivated Hauke Mehrtens
2010-09-11 16:18 ` [PATCH 7/8] compat-wireless: remove special handling for CONFIG_CFG80211_WEXT Hauke Mehrtens
2010-09-11 16:18 ` [PATCH 8/8] compat-wireless: add brcm80211 driver Hauke Mehrtens
2010-09-12 17:16   ` Gábor Stefanik
2010-09-12 17:29     ` Michael Büsch
2010-09-12 17:36       ` Gábor Stefanik
2010-09-12 21:34         ` Luis R. Rodriguez
2010-09-14  4:18           ` Henry Ptasinski
2010-09-13 18:27 ` [PATCH 0/8 v2] compat-wireless: ath9kl and compat_autoconf.h fixes Luis R. Rodriguez

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=4C8D397F.4000608@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lrodriguez@atheros.com \
    --cc=mcgrof@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).