linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: lrodriguez@atheros.com
Cc: linux-wireless@vger.kernel.org, mcgrof@infradead.org,
	Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 6/8] compat-wireless: Add warning if wext is deactivated
Date: Sat, 11 Sep 2010 18:18:31 +0200	[thread overview]
Message-ID: <1284221913-22455-8-git-send-email-hauke@hauke-m.de> (raw)
In-Reply-To: <1284221913-22455-1-git-send-email-hauke@hauke-m.de>

Add a build warning if CONFIG_CFG80211_WEXT can not be activated.

wireless_handlers is only avaliable if the kernel was build with
CONFIG_WIRELESS_EXT. Add a kernel log warning if CONFIG_CFG80211_WEXT
is activated but we do not have CONFIG_WIRELESS_EXT, so we ware unable
to attach the wireless_handlers for wext.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 config.mk                                    |    2 ++
 patches/10-add-wext-handlers-to-netdev.patch |    8 +++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/config.mk b/config.mk
index b7ef1ce..464a769 100644
--- a/config.mk
+++ b/config.mk
@@ -196,6 +196,8 @@ endif #CONFIG_PCMCIA
 # autoconf.h
 ifdef CONFIG_WIRELESS_EXT
  CONFIG_CFG80211_WEXT=y
+else #CONFIG_CFG80211_WEXT
+$(warning "WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m.")
 endif #CONFIG_WIRELESS_EXT
 
 ifneq ($(CONFIG_STAGING),)
diff --git a/patches/10-add-wext-handlers-to-netdev.patch b/patches/10-add-wext-handlers-to-netdev.patch
index 8a5c6e5..7f31c73 100644
--- a/patches/10-add-wext-handlers-to-netdev.patch
+++ b/patches/10-add-wext-handlers-to-netdev.patch
@@ -29,12 +29,18 @@ CONFIG_WIRELESS_EXT in compat-wireless.
  	device_initialize(&rdev->wiphy.dev);
  	rdev->wiphy.dev.class = &ieee80211_class;
  	rdev->wiphy.dev.platform_data = rdev;
-@@ -712,6 +708,8 @@ static int cfg80211_netdev_notifier_call
+@@ -712,6 +708,14 @@ static int cfg80211_netdev_notifier_call
  		wdev->sme_state = CFG80211_SME_IDLE;
  		mutex_unlock(&rdev->devlist_mtx);
  #ifdef CONFIG_CFG80211_WEXT
++#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
  		wdev->wext.default_key = -1;
  		wdev->wext.default_mgmt_key = -1;
  		wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC;
-- 
1.7.0.4


  parent reply	other threads:[~2010-09-11 16:19 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 ` Hauke Mehrtens [this message]
2010-09-12 20:20   ` [PATCH 6/8] compat-wireless: Add warning if wext is deactivated Johannes Berg
2010-09-12 20:35     ` Hauke Mehrtens
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=1284221913-22455-8-git-send-email-hauke@hauke-m.de \
    --to=hauke@hauke-m.de \
    --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).