# Broadcom-sta-5.60.48.36 kernel 2.6.33-rc8 fails

## jetboo

Hi i am trying to emerge my BCM4322 wireless driver on my laptop but i fot the fallowing

```

>>> Emerging (1 of 1) net-wireless/broadcom-sta-5.60.48.36

!!! SELinux module not found. Please verify that it was installed.

!!! SELinux module not found. Please verify that it was installed.

 * hybrid-portsrc-x86_32-v5.60.48.36.tar.gz RMD160 SHA1 SHA256 size ;-) ...  [ ok ]

 * checking ebuild checksums ;-) ...                                     [ ok ]

 * checking auxfile checksums ;-) ...                                    [ ok ]

 * checking miscfile checksums ;-) ...                                   [ ok ]

You should enable -g (or higher) for debugging!

 * CPV:  net-wireless/broadcom-sta-5.60.48.36

 * REPO: gentoo

 * USE:  elibc_glibc kernel_linux selinux userland_GNU x86

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/2.6.33-rc8/build

 * Found sources for kernel version:

 *     2.6.33-rc8

 * Checking for suitable kernel configuration options...

 *   CONFIG_WIRELESS_EXT:    is not set when it should be.

 *   CONFIG_WEXT_PRIV:    is not set when it should be.

 * Please check to make sure these options are set correctly.:

 *   Incorrect kernel configuration options
```

any help ?

----------

## d2_racing

Yes, you need to enable that inside your kernel :

```

CONFIG_WIRELESS_EXT

CONFIG_WEXT_PRIV

```

Double check your wireless config and recompile your kernel and reboot.

----------

## jetboo

i do not have these two options in my kernel

----------

## d2_racing

Make sure that you enable that one : 

```

CONFIG_WLAN_80211

```

----------

## d2_racing

You need to enable that section first :

```

Networking Section

     [*]   Wireless  ---> 

          <M>   Improved wireless configuration API

           -*-   Wireless extensions

           [*]     Wireless extensions sysfs files (NEW)          

          <*>   Common routines for IEEE802.11 drivers    

          <M>   Generic IEEE 802.11 Networking Stack (mac80211)

```

----------

## jetboo

Thx it's fixed now  :Smile: 

----------

## zuboskal14

It's not work for me & gentoo-sources-2.6.33 & Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)

#emerge broacom-sta

```
 * Checking for suitable kernel configuration options...

 *   CONFIG_WIRELESS_EXT:        is not set when it should be.

 *   CONFIG_WEXT_PRIV:   is not set when it should be.

 * Please check to make sure these options are set correctly.

 * Failure to do so may cause unexpected problems.

 * Once you have satisfied these options, please try merging

 * this package again.

 * ERROR: net-wireless/broadcom-sta-5.60.48.36 failed:

 *   Incorrect kernel configuration options
```

```
$ cat .config | grep WIRELESS

CONFIG_WIRELESS=y

# CONFIG_WIRELESS_OLD_REGULATORY is not set

CONFIG_WIRELESS_EXT_SYSFS=y

$ cat .config | grep WEXT

ONFIG_WEXT_CORE=y

CONFIG_WEXT_PROC=y

CONFIG_CFG80211_WEXT=y
```

If I try set <M> CONFIG_MAC80211 then # emerge broadcom-sta

```
 * Checking for suitable kernel configuration options...                                                                                                                                        

 *   CONFIG_WIRELESS_EXT:        is not set when it should be.                                                                                                                                  

 *   CONFIG_WEXT_PRIV:   is not set when it should be.                                                                                                                                          

 *   CONFIG_MAC80211:    should not be set. But it is.                                                                                                                                          

 * Please check to make sure these options are set correctly.
```

what's wrong?

----------

## d2_racing

Hi, can you post this :

```

# cd /usr/src/linux

# cat .config | grep -i CONFIG_WIRELESS_EXT

# cat .config | grep -i CONFIG_WEXT_PRIV

# cat .config | grep -i CONFIG_MAC80211

```

----------

## zuboskal14

```
cd /usr/src/linux

zs14@hppb /usr/src/linux $ cat .config | grep -i CONFIG_WIRELESS_EXT

CONFIG_WIRELESS_EXT_SYSFS=y

zs14@hppb /usr/src/linux $ cat .config | grep -i CONFIG_WEXT_PRIV

zs14@hppb /usr/src/linux $ cat .config | grep -i CONFIG_MAC80211

# CONFIG_MAC80211 is not set

# CONFIG_MAC80211_RC_DEFAULT_PID is not set

# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set

```

----------

## cach0rr0

the build message tells you the problem

 *Quote:*   

> 
> 
> *   CONFIG_WIRELESS_EXT:    is not set when it should be. 
> 
>  *   CONFIG_WEXT_PRIV:    is not set when it should be. 
> ...

 

The ebuild checks to make sure you have all of these enabled:

```

LIB80211 

WIRELESS_EXT 

CFG80211_WEXT 

WEXT_PRIV

```

If you are missing any of these, the build will fail. 

You will need to rebuild your kernel. 

```

cd /usr/src/linux

make menuconfig

```

once you're in menuconfig, hit the forward slash (/) to search, and type

"CONFIG_WIRELESS_EXT"

This will show you how to navigate to CONFIG_WIRELESS_EXT

```

Symbol: WIRELESS_EXT [=y]

  │ Prompt: Wireless extensions

  │   Defined at net/wireless/Kconfig:97

  │   Depends on: NET [=y] && WIRELESS [=y] 

  │   Location:

  │     -> Networking support (NET [=y])

  │       -> Wireless (WIRELESS [=y])

```

So that tells you that you need to go under "Networking Support", and put a [*] on the item labeled "Wireless extensions"

Do the same for CONFIG_WEXT_PRIV

Then exit menuconfig, "make && make modules_install", and install your new kernel as per usual.

----------

## d2_racing

After compiling your kernel, install it, reboot your box and retry to compile the package that broadcom package.

----------

## Schmidor

hi, 

i have the same problem. Network & Wireless are active, but these two options simple don't show up. 

Maybe there are some hidden dependencies or blockers for this options?

http://pastebin.com/E2jX8UtK

----------

## cach0rr0

 *Schmidor wrote:*   

> hi, 
> 
> i have the same problem. Network & Wireless are active, but these two options simple don't show up. 
> 
> Maybe there are some hidden dependencies or blockers for this options?
> ...

 

You are on 2.6.33, so you will need these four:

```

LIB80211 

WIRELESS_EXT 

CFG80211_WEXT 

WEXT_PRIV

```

1 == "Common routines for IEEE802.11 drivers"

2 == unlabeled. see below

3 == "cfg80211 wireless extensions compatibility"

4 == unlabeled, see below

Select 1 and 3 first. 

2 and 4 don't look to be accessible through menuconfig. Why the hell this is the case, I do not know, but it's blindingly stupid. ANYWAY, in order to get these selected, you'll need to select this (it should be the 4th or 5th one down under "Wireless LAN")

(cheers to Schmidor for finding this other method. I had PRISM54 here previously, which works to get the ebuild to finish, but neglects inclusion of some crypto stuff, so as he found HOSTAP would be a better choice - https://bugs.gentoo.org/show_bug.cgi?id=306189)

```

Symbol: HOSTAP [=m]

  │ Prompt: IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)

  │   Defined at drivers/net/wireless/hostap/Kconfig:1

  │   Depends on: NETDEVICES [=y] && WLAN [=y]

  │   Location:

  │     -> Device Drivers

  │       -> Network device support (NETDEVICES [=y])

  │         -> Wireless LAN (WLAN [=y])

  │   Selects: WIRELESS_EXT [=n] && WEXT_SPY [=n] && WEXT_PRIV [=n] && CRYPTO [=y] && a bunch of other stuff you need

```

This will autoselect 2 & 4. It will also select the other bits you need for an encrypted connection (e.g. TKIP)

exit menuconfig, save, build and install your new kernel, and you should be able to emerge broadcom-sta (note you should reboot into your new kernel before trying to use broadcom-sta driver)

Note that you should make sure the following are NOT selected:

```

MAC80211

B43

SSB

```

1 == "Generic IEEE 802.11 Networking Stack (mac80211)"

2 == "Broadcom 43xx wireless support (mac80211 stack)"

3 == "Sonics Silicon Backplane support"

The ebuild will complain loudly if you have these selected, and you should fully expect problems if any of those 3 are selected. 

hope that helps.

----------

## cach0rr0

 *d2_racing wrote:*   

> You need to enable that section first :
> 
> ```
> 
> Networking Section
> ...

 

just one small thing to mention - for broadcom-sta, you should not have mac80211 enabled (the bottom one there that you have ticked as a module)

If you have it as a module, you should blacklist it. 

CONFIG_CHECK has further details

```

CONFIG_CHECK="~!B43 ~!SSB"

        if kernel_is ge 2 6 33; then

                #CONFIG_CHECK="${CONFIG_CHECK} LIB80211 CFG80211_WEXT WEXT_PRIV ~!MAC80211"

                CONFIG_CHECK="${CONFIG_CHECK} LIB80211 WIRELESS_EXT CFG80211_WEXT WEXT_PRIV ~!MAC80211"

        elif kernel_is ge 2 6 31; then

                CONFIG_CHECK="${CONFIG_CHECK} LIB80211 WIRELESS_EXT ~!MAC80211"

        elif kernel_is ge 2 6 29; then

                CONFIG_CHECK="${CONFIG_CHECK} LIB80211 WIRELESS_EXT ~!MAC80211 COMPAT_NET_DEV_OPS"

        else

                CONFIG_CHECK="${CONFIG_CHECK} IEEE80211 IEEE80211_CRYPT_TKIP"

        fi

```

(note the ~tilde means the build will not fail, but will yell loudly if the merge is done without fixing the setting)

Translated, that means that your kernel settings should be as such for the following versions:

2.6.33 or better:

```

B43=N

SSB=N

LIB80211=M

WIRELESS_EXT=Y

CFG80211_WEXT=M

WEXT_PRIV=Y

MAC80211=N

```

2.6.31 - 2.6.32

```

B43=N

SSB=N

LIB80211=M

WIRELESS_EXT=Y

MAC80211=N

```

2.6.29 - 2.6.30

```

B43=N

SSB=N

LIB80211=M

WIRELESS_EXT=Y

MAC80211=N

COMPAT_NET_DEV_OPS=Y

```

2.6.22 - 2.6.28

```

B43=N

SSB=N

IEEE80211=M 

IEEE80211_CRYPT_TKIP=M

```

And of course the ebuild simply will not work if your kernel is earlier than 2.6.22  :Smile: 

NOTE:  as mentioned in another post in this thread, CONFIG_HOSTAP should be selected as well in order for this to work properly. CONFIG_CHECK does not account for this.

----------

## Schmidor

A few minutes ago i red the bug about Broadcom-sta  and WPA TKIP i had also with 2.6.32 and noticed how the "selects" feature works (i.e. updating selected modules first when leaving the config menu, what confused me before).  Selecting HOSTAP also selects these modules and building the driver works now.

Thank you

----------

## cach0rr0

 *Schmidor wrote:*   

> A few minutes ago i red the bug about Broadcom-sta  and WPA TKIP i had also with 2.6.32 and noticed how the "selects" feature works (i.e. updating selected modules first when leaving the config menu, what confused me before).  Selecting HOSTAP also selects these modules and building the driver works now.
> 
> Thank you

 

yeah, that's....ridiculous that you have to select that. I will update my post accordingly though, in case others stumble upon this thread.. That's a much safer option. 

I do also find it dumb that the broadcom-sta ebuild doesn't check for this, but the last time I submitted a bug+patch that fixed CONFIG_CHECK it was spit back in my face and reverted with no further discussion, so...I'm not opening any more bugs

If I did they'd just say "no, what about users that only want to connect to open or WEP networks? We shouldn't force them to enable this, that's not the gentoo way!"  :Smile: 

----------

## hirakendu

Thanks for all the help  :Smile: .

----------

## beandog

 *cach0rr0 wrote:*   

>  *Schmidor wrote:*   A few minutes ago i red the bug about Broadcom-sta  and WPA TKIP i had also with 2.6.32 and noticed how the "selects" feature works (i.e. updating selected modules first when leaving the config menu, what confused me before).  Selecting HOSTAP also selects these modules and building the driver works now.
> 
> Thank you 
> 
> yeah, that's....ridiculous that you have to select that. I will update my post accordingly though, in case others stumble upon this thread.. That's a much safer option. 
> ...

 

I'm gonna be maintaining the ebuilds now, so please, file bugs.  :Smile: 

----------

## d2_racing

Thanks beandog, I hope that cach0rr0 and Pappy_Mcfae will send you all the bugs that they found lately.

----------

## beandog

I've been talking to Pappy, we're looking at getting an official Gentoo doc online.  :Smile:   Woo woo!

----------

## d2_racing

Nice  :Smile: 

----------

