2010-09-11 16:18:56

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 0/8 v2] compat-wireless: ath9kl and compat_autoconf.h fixes

This series contains some fixes for the ath6kl driver, the
compat_autoconf.h file now contains most of the conditions from
config.mk and some fixes for CONFIG_WIRELESS_EXT=n were added.

This patch series was build tested with kernel 2.6.24 to 2.6.37.
It was build tested with kernel config:
* CONFIG_WIRELESS_EXT=n + CONFIG_CFG80211_WEXT=n
* CONFIG_WIRELESS_EXT=n + CONFIG_CFG80211_WEXT=y
* CONFIG_WIRELESS_EXT=y + CONFIG_CFG80211_WEXT=n
* CONFIG_WIRELESS_EXT=y + CONFIG_CFG80211_WEXT=y

v1 -> v2:
* split "add conditions form config into compat_autoconf.h"
* reorder patches
* add brcm80211 driver

Hauke Mehrtens (8):
compat-wireless: handle depending on something build as module
compat-wireless: make atk6kl build with older kernels
compat-wireless: fix for CONFIG_WIRELESS_EXT=n
compat-wireless: build if kernel does not have mac80211
compat-wireless: add conditions form config into compat_autoconf.h
compat-wireless: Add warning if wext is deactivated
compat-wireless: remove special handling for CONFIG_CFG80211_WEXT
compat-wireless: add brcm80211 driver

Makefile | 1 +
config.mk | 139 ++++++++++++++------------
patches/10-add-wext-handlers-to-netdev.patch | 8 ++-
patches/33-autoconf.patch | 15 +++
patches/34-backport-bin_attribute.patch | 47 +++++++++
patches/35-backport-brcm80211-Makefile.patch | 11 ++
scripts/admin-update.sh | 1 +
scripts/gen-compat-autoconf.sh | 8 +-
8 files changed, 161 insertions(+), 69 deletions(-)
create mode 100644 patches/33-autoconf.patch
create mode 100644 patches/34-backport-bin_attribute.patch
create mode 100644 patches/35-backport-brcm80211-Makefile.patch



2010-09-11 16:19:05

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 4/8] compat-wireless: build if kernel does not have mac80211

In kernel 2.6.31 the attributes do_not_encrypt and requeue were removed
from struct sk_buff so we do not need mac80211 to be build while the
kernel was build for nwer kernels.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
config.mk | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/config.mk b/config.mk
index 1498573..8b0038c 100644
--- a/config.mk
+++ b/config.mk
@@ -52,9 +52,11 @@ endif
#
# skb->requeue
#
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -ge 27 && echo yes),yes)
+# In kernel 2.6.32 both attributes were removed.
+#
+ifeq ($(shell test $(KERNEL_SUBLEVEL) -ge 27 -a $(KERNEL_SUBLEVEL) -le 31 && echo yes),yes)
ifeq ($(CONFIG_MAC80211),)
-$(error "ERROR: Your >=2.6.27 kernel has CONFIG_MAC80211 disabled, you should have it CONFIG_MAC80211=m if you want to use this thing.")
+$(error "ERROR: Your >=2.6.27 and <= 2.6.31 kernel has CONFIG_MAC80211 disabled, you should have it CONFIG_MAC80211=m if you want to use this thing.")
endif
endif

--
1.7.0.4


2010-09-12 20:21:00

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 6/8] compat-wireless: Add warning if wext is deactivated


On Sat, 11 Sep 2010 18:18:31 +0200, Hauke Mehrtens <[email protected]>
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 :-)

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)

johannes

2010-09-11 16:18:56

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 0/8 v2] compat-wireless: ath9kl and compat_autoconf.h fixes

This series contains some fixes for the ath6kl driver, the
compat_autoconf.h file now contains most of the conditions from
config.mk and some fixes for CONFIG_WIRELESS_EXT=n were added.

This patch series was build tested with kernel 2.6.24 to 2.6.37.
It was build tested with kernel config:
* CONFIG_WIRELESS_EXT=n + CONFIG_CFG80211_WEXT=n
* CONFIG_WIRELESS_EXT=n + CONFIG_CFG80211_WEXT=y
* CONFIG_WIRELESS_EXT=y + CONFIG_CFG80211_WEXT=n
* CONFIG_WIRELESS_EXT=y + CONFIG_CFG80211_WEXT=y

v1 -> v2:
* split "add conditions form config into compat_autoconf.h"
* reorder patches
* add brcm80211 driver

Hauke Mehrtens (8):
compat-wireless: handle depending on something build as module
compat-wireless: make atk6kl build with older kernels
compat-wireless: fix for CONFIG_WIRELESS_EXT=n
compat-wireless: build if kernel does not have mac80211
compat-wireless: add conditions form config into compat_autoconf.h
compat-wireless: Add warning if wext is deactivated
compat-wireless: remove special handling for CONFIG_CFG80211_WEXT
compat-wireless: add brcm80211 driver

Makefile | 1 +
config.mk | 139 ++++++++++++++------------
patches/10-add-wext-handlers-to-netdev.patch | 8 ++-
patches/33-autoconf.patch | 15 +++
patches/34-backport-bin_attribute.patch | 47 +++++++++
patches/35-backport-brcm80211-Makefile.patch | 11 ++
scripts/admin-update.sh | 1 +
scripts/gen-compat-autoconf.sh | 8 +-
8 files changed, 161 insertions(+), 69 deletions(-)
create mode 100644 patches/33-autoconf.patch
create mode 100644 patches/34-backport-bin_attribute.patch
create mode 100644 patches/35-backport-brcm80211-Makefile.patch


2010-09-12 21:09:49

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 6/8] compat-wireless: Add warning if wext is deactivated

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 <[email protected]>
---
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


2010-09-12 17:37:00

by Gábor Stefanik

[permalink] [raw]
Subject: Re: [PATCH 8/8] compat-wireless: add brcm80211 driver

On Sun, Sep 12, 2010 at 7:29 PM, Michael B?sch <[email protected]> wrote:
> On Sun, 2010-09-12 at 19:16 +0200, G?bor Stefanik wrote:
>> Umm... do we accept staging drivers in compat-wireless?
>
> Why shouldn't we accept them in compat?
>
> --
> Greetings Michael.
>
>

Dunno, just given the general hostility of the wireless team towards
staging drivers.

--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

2010-09-12 21:34:37

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH 8/8] compat-wireless: add brcm80211 driver

On Sun, Sep 12, 2010 at 10:36 AM, Gábor Stefanik
<[email protected]> wrote:
> On Sun, Sep 12, 2010 at 7:29 PM, Michael Büsch <[email protected]> wrote:
>> On Sun, 2010-09-12 at 19:16 +0200, Gábor Stefanik wrote:
>>> Umm... do we accept staging drivers in compat-wireless?
>>
>> Why shouldn't we accept them in compat?
>>
>> --
>> Greetings Michael.
>>
>>
>
> Dunno, just given the general hostility of the wireless team towards
> staging drivers.

The idea is to enable users, so I'll gladly accept them, thanks
haukes, I'll apply after first reviewing your other series.

Luis

2010-09-11 16:19:01

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 2/8] compat-wireless: make atk6kl build with older kernels

Now it will be build for kernel < 2.6.28. CONFIG_STAGING was introduced
with that kernel version.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
config.mk | 2 -
patches/33-autoconf.patch | 15 ++++++++++
patches/34-backport-bin_attribute.patch | 47 +++++++++++++++++++++++++++++++
3 files changed, 62 insertions(+), 2 deletions(-)
create mode 100644 patches/33-autoconf.patch
create mode 100644 patches/34-backport-bin_attribute.patch

diff --git a/config.mk b/config.mk
index 3c6d416..458de29 100644
--- a/config.mk
+++ b/config.mk
@@ -490,7 +490,6 @@ CONFIG_BT_HCIBTSDIO=m
CONFIG_BT_MRVL_SDIO=m

ifneq ($(CONFIG_COMPAT_STAGING),)
-ifdef CONFIG_COMPAT_KERNEL_32
CONFIG_ATH6KL_CFG80211=y
CONFIG_ATH6KL_DEBUG=y
# CONFIG_ATH6KL_DISABLE_TARGET_DBGLOGS is not set
@@ -502,7 +501,6 @@ CONFIG_ATH6KL_ENABLE_TARGET_DEBUG_PRINTS=y
# CONFIG_ATH6KL_SKIP_ABI_VERSION_CHECK is not set
CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER=y
CONFIG_ATH6K_LEGACY=m
-endif #CONFIG_COMPAT_KERNEL_32
endif


diff --git a/patches/33-autoconf.patch b/patches/33-autoconf.patch
new file mode 100644
index 0000000..5d767fd
--- /dev/null
+++ b/patches/33-autoconf.patch
@@ -0,0 +1,15 @@
+--- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
++++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
+@@ -27,7 +27,12 @@
+ #include <linux/version.h>
+
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+ #include <generated/autoconf.h>
++#else
++#include <linux/autoconf.h>
++#endif
++#include <linux/compat_autoconf.h>
+ #include <linux/init.h>
+ #include <linux/kernel.h>
+ #include <linux/sched.h>
diff --git a/patches/34-backport-bin_attribute.patch b/patches/34-backport-bin_attribute.patch
new file mode 100644
index 0000000..ce53635
--- /dev/null
+++ b/patches/34-backport-bin_attribute.patch
@@ -0,0 +1,47 @@
+--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
++++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+@@ -334,12 +334,20 @@ static void ar6000_refill_amsdu_rxbufs(A
+ static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar);
+
+ static ssize_t
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34))
+ ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj,
++#else
++ar6000_sysfs_bmi_read(struct kobject *kobj,
++#endif
+ struct bin_attribute *bin_attr,
+ char *buf, loff_t pos, size_t count);
+
+ static ssize_t
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34))
+ ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj,
++#else
++ar6000_sysfs_bmi_write(struct kobject *kobj,
++#endif
+ struct bin_attribute *bin_attr,
+ char *buf, loff_t pos, size_t count);
+
+@@ -799,7 +807,11 @@ static struct bin_attribute bmi_attr = {
+ };
+
+ static ssize_t
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34))
+ ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj,
++#else
++ar6000_sysfs_bmi_read(struct kobject *kobj,
++#endif
+ struct bin_attribute *bin_attr,
+ char *buf, loff_t pos, size_t count)
+ {
+@@ -826,7 +838,11 @@ ar6000_sysfs_bmi_read(struct file *fp, s
+ }
+
+ static ssize_t
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34))
+ ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj,
++#else
++ar6000_sysfs_bmi_write(struct kobject *kobj,
++#endif
+ struct bin_attribute *bin_attr,
+ char *buf, loff_t pos, size_t count)
+ {
--
1.7.0.4


2010-09-11 16:19:11

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 6/8] compat-wireless: Add warning if wext is deactivated

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 <[email protected]>
---
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


2010-09-11 16:19:15

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 8/8] compat-wireless: add brcm80211 driver

This driver was compile tested on kernel 2.6.29 to 2.6.36.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
Makefile | 1 +
config.mk | 4 ++++
patches/35-backport-brcm80211-Makefile.patch | 11 +++++++++++
scripts/admin-update.sh | 1 +
4 files changed, 17 insertions(+), 0 deletions(-)
create mode 100644 patches/35-backport-brcm80211-Makefile.patch

diff --git a/Makefile b/Makefile
index b590ca2..61adb0d 100644
--- a/Makefile
+++ b/Makefile
@@ -39,6 +39,7 @@ obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/

ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
obj-$(CONFIG_COMPAT_STAGING) += drivers/staging/ath6kl/
+obj-$(CONFIG_COMPAT_STAGING) += drivers/staging/brcm80211/
endif


diff --git a/config.mk b/config.mk
index f2c62ed..b61c318 100644
--- a/config.mk
+++ b/config.mk
@@ -513,6 +513,10 @@ CONFIG_ATH6KL_ENABLE_TARGET_DEBUG_PRINTS=y
# CONFIG_ATH6KL_SKIP_ABI_VERSION_CHECK is not set
CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER=y
CONFIG_ATH6K_LEGACY=m
+
+CONFIG_BRCM80211=m
+CONFIG_BRCM80211_PCI=y
+
endif #CONFIG_WIRELESS_EXT
endif #CONFIG_MMC

diff --git a/patches/35-backport-brcm80211-Makefile.patch b/patches/35-backport-brcm80211-Makefile.patch
new file mode 100644
index 0000000..2a94756
--- /dev/null
+++ b/patches/35-backport-brcm80211-Makefile.patch
@@ -0,0 +1,11 @@
+--- a/drivers/staging/brcm80211/Makefile
++++ b/drivers/staging/brcm80211/Makefile
+@@ -15,7 +15,7 @@
+ # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-EXTRA_CFLAGS := -DBCMDBG -DWLC_HIGH -DSTA -DWME -DWL11N -DDBAND -DBCMDMA32 -DBCMNVRAMR -Idrivers/staging/brcm80211/sys -Idrivers/staging/brcm80211/phy -Idrivers/staging/brcm80211/util -Idrivers/staging/brcm80211/include -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes
++EXTRA_CFLAGS := -DBCMDBG -DWLC_HIGH -DSTA -DWME -DWL11N -DDBAND -DBCMDMA32 -DBCMNVRAMR -I$(obj)/sys -I$(obj)/phy -I$(obj)/util -I$(obj)/include -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes
+
+ PCI_CFLAGS := -DWLC_LOW
+
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index e000faf..6ef281d 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -212,6 +212,7 @@ DRIVERS="$DRIVERS drivers/net/wireless/orinoco"

# Staging drivers
STAGING_DRIVERS="drivers/staging/ath6kl"
+STAGING_DRIVERS="$STAGING_DRIVERS drivers/staging/brcm80211"

# Ethernet drivers
DRIVERS="$DRIVERS drivers/net/atl1c"
--
1.7.0.4


2010-09-11 16:19:13

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 7/8] compat-wireless: remove special handling for CONFIG_CFG80211_WEXT

The special handling for CONFIG_CFG80211_WEXT is not needed any more,
because it is only activated when CONFIG_WIRELESS_EXT is also set.
Enabling this condition only for kernel <= 2.6.32 was wrong. In compat-
wireless we are able to deactivate CONFIG_WIRELESS_EXT for every
kernel. For activating it we need CONFIG_WIRELESS_EXT on every kernel.
If kernel <= 2.6.31 was build with cfg80211 support CONFIG_WIRELESS_EXT
was also selected, so it was activated in most cases for that kernel
versions. But it is possible to build compat-wireless without having
cfg80211 while building the kernel and that caused problems in the past.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
config.mk | 20 ++++++++------------
scripts/gen-compat-autoconf.sh | 4 ----
2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/config.mk b/config.mk
index 464a769..f2c62ed 100644
--- a/config.mk
+++ b/config.mk
@@ -183,19 +183,15 @@ CONFIG_BT_HCIBTUART=m
endif #CONFIG_PCMCIA


-# CONFIG_CFG80211_WEXT will be resepected for
-# future kernels but for older kenrels we need
-# to enable it against the the old CONFIG_WIRELESS_EXT.
-# By using a space here we prevent scripts/gen-compat-autoconf.sh
-# from defining CONFIG_CFG80211_WEXT through its grep sweep for ^CONFIG
-# options, instead its handled specially there based on kernel revision.
-# using this logic: if you are on older kernel and have CONFIG_WIRELESS_EXT
-# defined we'll define it.
-#
-# For newer kernels we'll just respect your own kernel's
-# autoconf.h
+# We need CONFIG_WIRELESS_EXT for CONFIG_CFG80211_WEXT for every kernel
+# version. The new way CONFIG_CFG80211_WEXT is called from the kernel
+# does not work with compat-wireless because it calls some callback
+# function on struct wiphy. This struct is shipped with compat-wireless
+# and changes from kernel version to version. We are using the
+# wireless_handlers attribute which will be activated by
+# CONFIG_WIRELESS_EXT.
ifdef CONFIG_WIRELESS_EXT
- CONFIG_CFG80211_WEXT=y
+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
diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
index 62aa890..9f6e6d2 100755
--- a/scripts/gen-compat-autoconf.sh
+++ b/scripts/gen-compat-autoconf.sh
@@ -195,10 +195,6 @@ if [ -f $KLIB_BUILD/Makefile ]; then
echo CONFIG_NETDEVICES_MULTIQUEUE >> $MULT_DEP_FILE
define_config_multiple_deps CONFIG_MAC80211_QOS y $ALL_DEPS
rm -f $MULT_DEP_FILE
- # Kernels >= 2.6.32 can disable WEXT :D
- if [ $SUBLEVEL -le 32 ]; then
- define_config_dep CONFIG_CFG80211_WEXT 1 CONFIG_WIRELESS_EXT
- fi
fi
fi
echo "#endif /* COMPAT_AUTOCONF_INCLUDED */"
--
1.7.0.4


2010-09-12 17:16:37

by Gábor Stefanik

[permalink] [raw]
Subject: Re: [PATCH 8/8] compat-wireless: add brcm80211 driver

Umm... do we accept staging drivers in compat-wireless?

On Sat, Sep 11, 2010 at 6:18 PM, Hauke Mehrtens <[email protected]> wrote:
> This driver was compile tested on kernel 2.6.29 to 2.6.36.
>
> Signed-off-by: Hauke Mehrtens <[email protected]>
> ---
> ?Makefile ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ?1 +
> ?config.mk ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?4 ++++
> ?patches/35-backport-brcm80211-Makefile.patch | ? 11 +++++++++++
> ?scripts/admin-update.sh ? ? ? ? ? ? ? ? ? ? ?| ? ?1 +
> ?4 files changed, 17 insertions(+), 0 deletions(-)
> ?create mode 100644 patches/35-backport-brcm80211-Makefile.patch
>
> diff --git a/Makefile b/Makefile
> index b590ca2..61adb0d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -39,6 +39,7 @@ obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
>
> ?ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
> ?obj-$(CONFIG_COMPAT_STAGING) += drivers/staging/ath6kl/
> +obj-$(CONFIG_COMPAT_STAGING) += drivers/staging/brcm80211/
> ?endif
>
>
> diff --git a/config.mk b/config.mk
> index f2c62ed..b61c318 100644
> --- a/config.mk
> +++ b/config.mk
> @@ -513,6 +513,10 @@ CONFIG_ATH6KL_ENABLE_TARGET_DEBUG_PRINTS=y
> ?# CONFIG_ATH6KL_SKIP_ABI_VERSION_CHECK is not set
> ?CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER=y
> ?CONFIG_ATH6K_LEGACY=m
> +
> +CONFIG_BRCM80211=m
> +CONFIG_BRCM80211_PCI=y
> +
> ?endif #CONFIG_WIRELESS_EXT
> ?endif #CONFIG_MMC
>
> diff --git a/patches/35-backport-brcm80211-Makefile.patch b/patches/35-backport-brcm80211-Makefile.patch
> new file mode 100644
> index 0000000..2a94756
> --- /dev/null
> +++ b/patches/35-backport-brcm80211-Makefile.patch
> @@ -0,0 +1,11 @@
> +--- a/drivers/staging/brcm80211/Makefile
> ++++ b/drivers/staging/brcm80211/Makefile
> +@@ -15,7 +15,7 @@
> + # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
> + # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> +
> +-EXTRA_CFLAGS := -DBCMDBG -DWLC_HIGH -DSTA -DWME -DWL11N -DDBAND -DBCMDMA32 -DBCMNVRAMR -Idrivers/staging/brcm80211/sys -Idrivers/staging/brcm80211/phy -Idrivers/staging/brcm80211/util -Idrivers/staging/brcm80211/include -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes
> ++EXTRA_CFLAGS := -DBCMDBG -DWLC_HIGH -DSTA -DWME -DWL11N -DDBAND -DBCMDMA32 -DBCMNVRAMR -I$(obj)/sys -I$(obj)/phy -I$(obj)/util -I$(obj)/include -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes
> +
> + PCI_CFLAGS := -DWLC_LOW
> +
> diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
> index e000faf..6ef281d 100755
> --- a/scripts/admin-update.sh
> +++ b/scripts/admin-update.sh
> @@ -212,6 +212,7 @@ DRIVERS="$DRIVERS drivers/net/wireless/orinoco"
>
> ?# Staging drivers
> ?STAGING_DRIVERS="drivers/staging/ath6kl"
> +STAGING_DRIVERS="$STAGING_DRIVERS drivers/staging/brcm80211"
>
> ?# Ethernet drivers
> ?DRIVERS="$DRIVERS drivers/net/atl1c"
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>



--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

2010-09-11 16:19:05

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 3/8] compat-wireless: fix for CONFIG_WIRELESS_EXT=n

Some modules need CONFIG_WIRELESS_EXT to be set. They should not be
build if CONFIG_WIRELESS_EXT was not set.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
config.mk | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/config.mk b/config.mk
index 458de29..1498573 100644
--- a/config.mk
+++ b/config.mk
@@ -248,11 +248,13 @@ CONFIG_B43LEGACY_LEDS=y
CONFIG_B43LEGACY_DMA=y
CONFIG_B43LEGACY_PIO=y

+ifdef CONFIG_WIRELESS_EXT
+ifdef CONFIG_WEXT_SPY
+ifdef CONFIG_WEXT_PRIV
# The Intel ipws
CONFIG_LIBIPW=m
# CONFIG_LIBIPW_DEBUG=y

-
CONFIG_IPW2100=m
CONFIG_IPW2100_MONITOR=y
# CONFIG_IPW2100_DEBUG=y
@@ -274,6 +276,9 @@ CONFIG_IPW2200_QOS=y
# it on via sysfs:
#
# % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
+endif #CONFIG_WEXT_PRIV
+endif #CONFIG_WEXT_SPY
+endif #CONFIG_WIRELESS_EXT

ifneq ($(CONFIG_SSB),)
# Sonics Silicon Backplane
@@ -331,6 +336,9 @@ else #CONFIG_COMPAT_KERNEL_27
CONFIG_ATL1C=m
endif #CONFIG_COMPAT_KERNEL_27

+ifdef CONFIG_WIRELESS_EXT
+ifdef CONFIG_WEXT_SPY
+ifdef CONFIG_WEXT_PRIV
CONFIG_HERMES=m
CONFIG_HERMES_CACHE_FW_ON_INIT=y
ifneq ($(CONFIG_PPC_PMAC),)
@@ -344,6 +352,9 @@ ifneq ($(CONFIG_PCMCIA),)
CONFIG_PCMCIA_HERMES=m
CONFIG_PCMCIA_SPECTRUM=m
endif
+endif #CONFIG_WEXT_PRIV
+endif #CONFIG_WEXT_SPY
+endif #CONFIG_WIRELESS_EXT

endif
## end of PCI
@@ -490,6 +501,7 @@ CONFIG_BT_HCIBTSDIO=m
CONFIG_BT_MRVL_SDIO=m

ifneq ($(CONFIG_COMPAT_STAGING),)
+ifdef CONFIG_WIRELESS_EXT
CONFIG_ATH6KL_CFG80211=y
CONFIG_ATH6KL_DEBUG=y
# CONFIG_ATH6KL_DISABLE_TARGET_DBGLOGS is not set
@@ -501,6 +513,7 @@ CONFIG_ATH6KL_ENABLE_TARGET_DEBUG_PRINTS=y
# CONFIG_ATH6KL_SKIP_ABI_VERSION_CHECK is not set
CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER=y
CONFIG_ATH6K_LEGACY=m
+endif #CONFIG_WIRELESS_EXT
endif


--
1.7.0.4


2010-09-12 17:29:48

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH 8/8] compat-wireless: add brcm80211 driver

On Sun, 2010-09-12 at 19:16 +0200, Gábor Stefanik wrote:
> Umm... do we accept staging drivers in compat-wireless?

Why shouldn't we accept them in compat?

--
Greetings Michael.


2010-09-12 21:11:52

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 6/8 v2] compat-wireless: Add warning if wext is deactivated

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 <[email protected]>

v2: use printk_once
---
config.mk | 2 ++
patches/10-add-wext-handlers-to-netdev.patch | 9 ++++++++-
2 files changed, 10 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..f0df259 100644
--- a/patches/10-add-wext-handlers-to-netdev.patch
+++ b/patches/10-add-wext-handlers-to-netdev.patch
@@ -29,12 +29,19 @@ 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,15 @@ 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_once(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


2010-09-13 18:28:13

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH 0/8 v2] compat-wireless: ath9kl and compat_autoconf.h fixes

On Sat, Sep 11, 2010 at 9:18 AM, Hauke Mehrtens <[email protected]> wrote:
> This series contains some fixes for the ath6kl driver, the
> compat_autoconf.h file now contains most of the conditions from
> config.mk and some fixes for CONFIG_WIRELESS_EXT=n were added.
>
> This patch series was build tested with kernel 2.6.24 to 2.6.37.
> It was build tested with kernel config:
>  * CONFIG_WIRELESS_EXT=n + CONFIG_CFG80211_WEXT=n
>  * CONFIG_WIRELESS_EXT=n + CONFIG_CFG80211_WEXT=y
>  * CONFIG_WIRELESS_EXT=y + CONFIG_CFG80211_WEXT=n
>  * CONFIG_WIRELESS_EXT=y + CONFIG_CFG80211_WEXT=y
>
> v1 -> v2:
>  * split "add conditions form config into compat_autoconf.h"
>  * reorder patches
>  * add brcm80211 driver
>
> Hauke Mehrtens (8):
>  compat-wireless: handle depending on something build as module
>  compat-wireless: make atk6kl build with older kernels
>  compat-wireless: fix for CONFIG_WIRELESS_EXT=n
>  compat-wireless: build if kernel does not have mac80211
>  compat-wireless: add conditions form config into compat_autoconf.h
>  compat-wireless: Add warning if wext is deactivated
>  compat-wireless: remove special handling for CONFIG_CFG80211_WEXT
>  compat-wireless: add brcm80211 driver
>
>  Makefile                                     |    1 +
>  config.mk                                    |  139 ++++++++++++++------------
>  patches/10-add-wext-handlers-to-netdev.patch |    8 ++-
>  patches/33-autoconf.patch                    |   15 +++
>  patches/34-backport-bin_attribute.patch      |   47 +++++++++
>  patches/35-backport-brcm80211-Makefile.patch |   11 ++
>  scripts/admin-update.sh                      |    1 +
>  scripts/gen-compat-autoconf.sh               |    8 +-
>  8 files changed, 161 insertions(+), 69 deletions(-)
>  create mode 100644 patches/33-autoconf.patch
>  create mode 100644 patches/34-backport-bin_attribute.patch
>  create mode 100644 patches/35-backport-brcm80211-Makefile.patch

Great stuff, this makes life so much easier, thanks a lot for all this
work! Applied and pushed out. Think it'll get sucked in, in time for
the next tarball.

Luis

2010-09-12 20:35:19

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: [PATCH 6/8] compat-wireless: Add warning if wext is deactivated

On 12.09.2010 22:20, Johannes Berg wrote:
>
> On Sat, 11 Sep 2010 18:18:31 +0200, Hauke Mehrtens <[email protected]>
> 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

2010-09-11 16:18:59

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 1/8] compat-wireless: handle depending on something build as module

If something was build as module in the kernel it is named
CONFIG_..._MODULE in autoconf.h. We have to check for bouth the name
with and wothout _MODULE at the end.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
scripts/gen-compat-autoconf.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
index 5d38ea1..62aa890 100755
--- a/scripts/gen-compat-autoconf.sh
+++ b/scripts/gen-compat-autoconf.sh
@@ -148,11 +148,11 @@ kernel_version_req $OLDEST_KERNEL_SUPPORTED
for i in $(egrep '^CONFIG_|^ifdef CONFIG_|^ifndef CONFIG_|^endif #CONFIG_|^else #CONFIG_' $COMPAT_CONFIG | sed 's/ /+/'); do
case $i in
'ifdef+CONFIG_'* )
- echo "#$i" | sed 's/+/ /' | sed 's/\(ifdef CONFIG_COMPAT_KERNEL_\)\([0-9]*\)/if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,\2))/'
+ echo "#$i" | sed -e 's/+/ /' -e 's/\(ifdef CONFIG_COMPAT_KERNEL_\)\([0-9]*\)/if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,\2))/' -e 's/\(#ifdef \)\(CONFIG_[^:space:]*\)/#if defined(\2) || defined(\2_MODULE)/'
continue
;;
'ifndef+CONFIG_'* )
- echo "#$i" | sed 's/+/ /' | sed 's/\(ifndef CONFIG_COMPAT_KERNEL_\)\([0-9]*\)/if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,\2))/'
+ echo "#$i" | sed -e 's/+/ /' -e 's/\(ifndef CONFIG_COMPAT_KERNEL_\)\([0-9]*\)/if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,\2))/' -e 's/\(#ifndef \)\(CONFIG_[^:space:]*\)/#if !defined(\2) && !defined(\2_MODULE)/'
continue
;;
'else+#CONFIG_'* | 'endif+#CONFIG_'* )
--
1.7.0.4


2010-09-11 16:19:09

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 5/8] compat-wireless: add conditions form config into compat_autoconf.h

We do not have to use "ifneq ($(CONFIG_...),)", "ifdef CONFIG_..." will
also work. It does not matter if it was set to m or y.
Now this can be added into compat_autoconf.h without changing the script.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
config.mk | 86 ++++++++++++++++++++++++++++++------------------------------
1 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/config.mk b/config.mk
index 8b0038c..b7ef1ce 100644
--- a/config.mk
+++ b/config.mk
@@ -102,9 +102,9 @@ endif
endif #CONFIG_COMPAT_KERNEL_27

ifdef CONFIG_COMPAT_KERNEL_33
-ifneq ($(CONFIG_FW_LOADER),)
+ifdef CONFIG_FW_LOADER
CONFIG_COMPAT_FIRMWARE_CLASS=m
-endif
+endif #CONFIG_FW_LOADER
endif #CONFIG_COMPAT_KERNEL_33


@@ -161,9 +161,9 @@ CONFIG_BT_BNEP=m
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
# CONFIG_BT_CMTP depends on ISDN_CAPI
-ifneq ($(CONFIG_ISDN_CAPI),)
+ifdef CONFIG_ISDN_CAPI
CONFIG_BT_CMTP=m
-endif
+endif #CONFIG_ISDN_CAPI
CONFIG_BT_HIDP=m

CONFIG_BT_HCIUART=M
@@ -175,12 +175,12 @@ CONFIG_BT_HCIUART_LL=y
CONFIG_BT_HCIVHCI=m
CONFIG_BT_MRVL=m

-ifneq ($(CONFIG_PCMCIA),)
+ifdef CONFIG_PCMCIA
CONFIG_BT_HCIDTL1=m
CONFIG_BT_HCIBT3C=m
CONFIG_BT_HCIBLUECARD=m
CONFIG_BT_HCIBTUART=m
-endif
+endif #CONFIG_PCMCIA


# CONFIG_CFG80211_WEXT will be resepected for
@@ -194,19 +194,19 @@ endif
#
# For newer kernels we'll just respect your own kernel's
# autoconf.h
-ifneq ($(CONFIG_WIRELESS_EXT),)
+ifdef CONFIG_WIRELESS_EXT
CONFIG_CFG80211_WEXT=y
-endif
+endif #CONFIG_WIRELESS_EXT

ifneq ($(CONFIG_STAGING),)
-CONFIG_COMPAT_STAGING=m
+ CONFIG_COMPAT_STAGING=m
endif

# mac80211 test driver
CONFIG_MAC80211_HWSIM=m

# PCI Drivers
-ifneq ($(CONFIG_PCI),)
+ifdef CONFIG_PCI

CONFIG_ATH5K=m
# CONFIG_ATH5K_DEBUG=y
@@ -233,9 +233,9 @@ CONFIG_IWL3945=m
CONFIG_B43=m
CONFIG_B43_HWRNG=y
CONFIG_B43_PCI_AUTOSELECT=y
-ifneq ($(CONFIG_PCMCIA),)
+ifdef CONFIG_PCMCIA
CONFIG_B43_PCMCIA=y
-endif
+endif #CONFIG_PCMCIA
CONFIG_B43_LEDS=y
CONFIG_B43_PHY_LP=y
CONFIG_B43_NPHY=y
@@ -282,7 +282,7 @@ endif #CONFIG_WEXT_PRIV
endif #CONFIG_WEXT_SPY
endif #CONFIG_WIRELESS_EXT

-ifneq ($(CONFIG_SSB),)
+ifdef CONFIG_SSB
# Sonics Silicon Backplane
CONFIG_SSB_SPROM=y
# CONFIG_SSB_DEBUG=y
@@ -290,12 +290,12 @@ CONFIG_SSB_SPROM=y
CONFIG_SSB_BLOCKIO=y
CONFIG_SSB_PCIHOST=y
CONFIG_SSB_B43_PCI_BRIDGE=y
-ifneq ($(CONFIG_PCMCIA),)
+ifdef CONFIG_PCMCIA
CONFIG_SSB_PCMCIAHOST=y
-endif
+endif #CONFIG_PCMCIA
# CONFIG_SSB_DEBUG=y
CONFIG_SSB_DRIVER_PCICORE=y
-endif
+endif #CONFIG_SSB

CONFIG_P54_PCI=m

@@ -309,22 +309,22 @@ CONFIG_ADM8211=m
CONFIG_RT2X00_LIB_PCI=m
CONFIG_RT2400PCI=m
CONFIG_RT2500PCI=m
-ifneq ($(CONFIG_CRC_CCITT),)
+ifdef CONFIG_CRC_CCITT
CONFIG_RT2800PCI=m
CONFIG_RT2800PCI_PCI=y
# CONFIG_RT2800PCI_RT30XX=y
# CONFIG_RT2800PCI_RT35XX=y
# CONFIG_RT2800PCI_SOC=y
-endif
+endif #CONFIG_CRC_CCITT
NEED_RT2X00=y

# Two rt2x00 drivers require firmware: rt61pci and rt73usb. They depend on
# CRC to check the firmware. We check here first for the PCI
# driver as we're in the PCI section.
-ifneq ($(CONFIG_CRC_ITU_T),)
+ifdef CONFIG_CRC_ITU_T
CONFIG_RT61PCI=m
NEED_RT2X00_FIRMWARE=y
-endif
+endif #CONFIG_CRC_ITU_T

CONFIG_MWL8K=m

@@ -343,25 +343,25 @@ ifdef CONFIG_WEXT_SPY
ifdef CONFIG_WEXT_PRIV
CONFIG_HERMES=m
CONFIG_HERMES_CACHE_FW_ON_INIT=y
-ifneq ($(CONFIG_PPC_PMAC),)
+ifdef CONFIG_PPC_PMAC
CONFIG_APPLE_AIRPORT=m
-endif
+endif #CONFIG_PPC_PMAC
CONFIG_PLX_HERMES=m
CONFIG_TMD_HERMES=m
CONFIG_NORTEL_HERMES=m
CONFIG_PCI_HERMES=m
-ifneq ($(CONFIG_PCMCIA),)
+ifdef CONFIG_PCMCIA
CONFIG_PCMCIA_HERMES=m
CONFIG_PCMCIA_SPECTRUM=m
-endif
+endif #CONFIG_PCMCIA
endif #CONFIG_WEXT_PRIV
endif #CONFIG_WEXT_SPY
endif #CONFIG_WIRELESS_EXT

-endif
+endif #CONFIG_PCI
## end of PCI

-ifneq ($(CONFIG_PCMCIA),)
+ifdef CONFIG_PCMCIA

ifdef CONFIG_COMPAT_KERNEL_27
CONFIG_LIBERTAS=n
@@ -371,14 +371,14 @@ CONFIG_LIBERTAS_CS=m
NEED_LIBERTAS=y
endif #CONFIG_COMPAT_KERNEL_27

-endif
+endif #CONFIG_PCMCIA
## end of PCMCIA

# This is required for some cards
CONFIG_EEPROM_93CX6=m

# USB Drivers
-ifneq ($(CONFIG_USB),)
+ifdef CONFIG_USB
CONFIG_ZD1211RW=m
# CONFIG_ZD1211RW_DEBUG=y

@@ -420,19 +420,19 @@ CONFIG_ATH9K_HTC=m

# RT2500USB does not require firmware
CONFIG_RT2500USB=m
-ifneq ($(CONFIG_CRC_CCITT),)
+ifdef CONFIG_CRC_CCITT
CONFIG_RT2800USB=m
CONFIG_RT2800USB_RT30XX=y
CONFIG_RT2800USB_RT35XX=y
CONFIG_RT2800USB_UNKNOWN=y
-endif
+endif #CONFIG_CRC_CCITT
CONFIG_RT2X00_LIB_USB=m
NEED_RT2X00=y
# RT73USB requires firmware
-ifneq ($(CONFIG_CRC_ITU_T),)
+ifdef CONFIG_CRC_ITU_T
CONFIG_RT73USB=m
NEED_RT2X00_FIRMWARE=y
-endif
+endif #CONFIG_CRC_ITU_T

ifdef CONFIG_COMPAT_KERNEL_27
CONFIG_LIBERTAS_THINFIRM_USB=n
@@ -452,15 +452,15 @@ CONFIG_BT_HCIBPA10X=m
CONFIG_BT_HCIBFUSB=m
CONFIG_BT_ATH3K=m

-endif # end of USB driver list
+endif #CONFIG_USB end of USB driver list

-ifneq ($(CONFIG_SPI_MASTER),)
+ifdef CONFIG_SPI_MASTER
ifndef CONFIG_COMPAT_KERNEL_25

-ifneq ($(CONFIG_CRC7),)
+ifdef CONFIG_CRC7
CONFIG_WL1251_SPI=m
CONFIG_WL1271_SPI=m
-endif
+endif #CONFIG_CRC7
CONFIG_P54_SPI=m

ifdef CONFIG_COMPAT_KERNEL_27
@@ -472,21 +472,21 @@ NEED_LIBERTAS=y
endif #CONFIG_COMPAT_KERNEL_27

endif #CONFIG_COMPAT_KERNEL_25
-endif # end of SPI driver list
+endif #CONFIG_SPI_MASTER end of SPI driver list

-ifneq ($(CONFIG_MMC),)
+ifdef CONFIG_MMC

CONFIG_SSB_SDIOHOST=y
CONFIG_B43_SDIO=y

-ifneq ($(CONFIG_CRC7),)
+ifdef CONFIG_CRC7
CONFIG_WL1251_SDIO=m

ifndef CONFIG_COMPAT_KERNEL_32
CONFIG_WL1271_SDIO=m
endif #CONFIG_COMPAT_KERNEL_32

-endif
+endif #CONFIG_CRC7

ifdef CONFIG_COMPAT_KERNEL_27
CONFIG_LIBERTAS_SDIO=n
@@ -516,7 +516,7 @@ CONFIG_ATH6KL_ENABLE_TARGET_DEBUG_PRINTS=y
CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER=y
CONFIG_ATH6K_LEGACY=m
endif #CONFIG_WIRELESS_EXT
-endif
+endif #CONFIG_MMC


endif # end of SDIO driver list
@@ -551,10 +551,10 @@ CONFIG_ATH_COMMON=m
# CONFIG_ATH_DEBUG=y

CONFIG_WL12XX=y
-ifneq ($(CONFIG_CRC7),)
+ifdef CONFIG_CRC7
CONFIG_WL1251=m
CONFIG_WL1271=m
-endif
+endif #CONFIG_CRC7

ifdef CONFIG_COMPAT_KERNEL_27
CONFIG_LIBERTAS=n
--
1.7.0.4


2010-09-14 04:18:24

by Henry Ptasinski

[permalink] [raw]
Subject: Re: [PATCH 8/8] compat-wireless: add brcm80211 driver

On 09/12/2010 02:34 PM, Luis R. Rodriguez wrote:
> On Sun, Sep 12, 2010 at 10:36 AM, Gábor Stefanik
> <[email protected]> wrote:
>> On Sun, Sep 12, 2010 at 7:29 PM, Michael Büsch<[email protected]> wrote:
>>> On Sun, 2010-09-12 at 19:16 +0200, Gábor Stefanik wrote:
>>>> Umm... do we accept staging drivers in compat-wireless?
>>>
>>> Why shouldn't we accept them in compat?
>>>
>>> --
>>> Greetings Michael.
>>>
>>>
>>
>> Dunno, just given the general hostility of the wireless team towards
>> staging drivers.
>
> The idea is to enable users, so I'll gladly accept them, thanks
> haukes, I'll apply after first reviewing your other series.
>

I was going to try and figure out the compat-wireless changes needed to
enable brcm80211 myself, so the quick contribution on this is much
appreciated by me if nobody else.

- Henry




2010-10-02 16:55:52

by Walter Goldens

[permalink] [raw]
Subject: [PATCH] compat-wireless: introduce driver-select group for atlxx

In this patch:
- fixed a description typo
- changed yellow to purple color in bash as it hurts the eye/hard to read in white background (gnome)
- placed "atl1 atl2 atl1e atl1c" on one line to preserve user space and visibility, this is after all a _wireless_ compat
- introduced "atlxx" group for atlx(x) Ethernet devices in "BLUE" for distinguishability
- sorted all module groups together

Signed-off-by: Walter Goldens <[email protected]>
---

--- a/scripts/driver-select
+++ b/scripts/driver-select
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 2009 Luis R. Rodriguez <[email protected]>
#
-# This this to select your compat-wireless driver and
+# This script allows you to select your compat-wireless driver and
# reduce compilation time.

DRIVERS_MAKEFILE="drivers/net/wireless/Makefile"
@@ -42,7 +42,7 @@ fi

# b43 needs some more work for driver-select, the SSB stuff, plus
# what if you update b44 but not b43? It will bust.
-SUPPORTED_ETH_DRIVERS="atl1 atl2 atl1e atl1c"
+SUPPORTED_ETH_DRIVERS=""

function usage {
echo -e "${GREEN}Usage${NORMAL}: ${CYAN}$0${NORMAL} [ ${PURPLE}<driver-name>${NORMAL} | ${PURPLE}<driver-group-name>${NORMAL} | ${GREEN}restore${NORMAL} ]"
@@ -53,7 +53,7 @@ function usage {
echo -e "\t${PURPLE}${i}${NORMAL}"
done

- echo -e "\nSupported Ethernet drivers:"
+ echo -e "\nSupported Ethernet drivers: < ${PURPLE}atl1 atl2 atl1e atl1c${NORMAL} >"
for i in $SUPPORTED_ETH_DRIVERS; do
echo -e "\t${PURPLE}${i}${NORMAL}"
done
@@ -66,6 +66,8 @@ function usage {
echo -e "\t${CYAN}iwlwifi${NORMAL} < ${PURPLE} iwl3945 iwlagn ${NORMAL}>"
echo -e "\t${CYAN}rtl818x${NORMAL} < ${PURPLE} rtl8180 rtl8187 ${NORMAL}>"
echo -e "\t${CYAN}wl12xx${NORMAL} < ${PURPLE} wl1251 (SPI and SDIO) wl1271 ${NORMAL}>"
+
+ echo -e "\t${BLUE}atlxx${NORMAL} < ${PURPLE} atl1 atl2 atl1e atl1c ${NORMAL}>"

echo -e "Restoring compat-wireless:"
echo -e "\t${GREEN}restore${NORMAL}: you can use this option to restore compat-wireless to the original state"
@@ -265,7 +267,7 @@ fi

if [[ ! -f built-in.o ]]; then
if [[ "$1" != "restore" ]]; then
- echo -e "${YELLOW}Processing new driver-select request...${NORMAL}"
+ echo -e "${PURPLE}Processing new driver-select request...${NORMAL}"
fi
fi

@@ -279,9 +281,9 @@ fi
# we'll be trying to leave drivers on Makefiles which are not
# already there from a previous run.
if [ -f built-in.o ]; then
- echo -e "${YELLOW}Old build found, going to clean this up first...${NORMAL}"
+ echo -e "${PURPLE}Old build found, going to clean this up first...${NORMAL}"
make clean
- echo -e "${YELLOW}Restoring Makefiles...${NORMAL}"
+ echo -e "${PURPLE}Restoring Makefiles...${NORMAL}"
./$0 restore
fi

@@ -289,6 +291,7 @@ case $1 in
restore)
restore_compat
;;
+# Group drivers
atheros)
select_drivers CONFIG_ATH_COMMON \
CONFIG_ZD1211RW
@@ -316,6 +319,12 @@ case $1 in
disable_staging
disable_var_01
;;
+ rtl818x)
+ select_drivers CONFIG_RTL8180 CONFIG_RTL8187
+ disable_staging
+ disable_var_02
+ ;;
+# Singular modules
ath5k)
disable_staging
disable_bt_usb_ethernet_var
@@ -353,11 +362,6 @@ case $1 in
disable_ath6kl
select_driver CONFIG_NOTHING
;;
- rtl818x)
- select_drivers CONFIG_RTL8180 CONFIG_RTL8187
- disable_staging
- disable_var_02
- ;;
zd1211rw)
select_driver CONFIG_ZD1211RW
disable_staging
@@ -375,6 +379,7 @@ case $1 in
disable_staging
disable_var_02
;;
+# Ethernet drivers
atl1)
enable_only_ethernet
echo -e "obj-\$(CONFIG_ATL1) += atlx/" > $DRIVERS_NET
@@ -391,6 +396,11 @@ case $1 in
enable_only_ethernet
echo -e "obj-\$(CONFIG_ATL1C) += atl1c/" > $DRIVERS_NET
;;
+ atlxx)
+ select_drivers CONFIG_ATL1 CONFIG_ATL2 CONFIG_ATL1E CONFIG_ATL1C
+ enable_only_ethernet
+ disable_b44
+ ;;
*)
echo "Unsupported driver"
exit





2010-10-05 19:14:48

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] compat-wireless: introduce driver-select group for atlxx

On Sat, Oct 2, 2010 at 9:55 AM, Walter Goldens <[email protected]> wrote:
> In this patch:
> - fixed a description typo
> - changed yellow to purple color in bash as it hurts the eye/hard to read in white background (gnome)
> - placed "atl1 atl2 atl1e atl1c" on one line to preserve user space and visibility, this is after all a _wireless_ compat
> - introduced "atlxx" group for atlx(x) Ethernet devices in "BLUE" for distinguishability
> - sorted all module groups together
>
> Signed-off-by: Walter Goldens <[email protected]>

Applied, thanks!

Luis