# madwifi-ng + hardened-sources-3.0.4-r4 fails to emerge

## richard.scott

Hi,

I've just upgraded my kernel to hardened-sources-3.0.4-r4 and now madwifi-ng fails to emerge with the following:

```
# tail -n 25 /var/tmp/portage/net-wireless/madwifi-ng-0.9.4.4165.20110816/temp/build.log 

/var/tmp/portage/net-wireless/madwifi-ng-0.9.4.4165.20110816/work/madwifi-0.9.4-r4165-20110816/net80211/ieee80211_linux.c:802:3: error: assignment of read-only location '*fileops'

/var/tmp/portage/net-wireless/madwifi-ng-0.9.4.4165.20110816/work/madwifi-0.9.4-r4165-20110816/net80211/ieee80211_linux.c:804:3: error: assignment of read-only location '*fileops'

/var/tmp/portage/net-wireless/madwifi-ng-0.9.4.4165.20110816/work/madwifi-0.9.4-r4165-20110816/net80211/ieee80211_linux.c:806:3: error: assignment of read-only location '*fileops'

/var/tmp/portage/net-wireless/madwifi-ng-0.9.4.4165.20110816/work/madwifi-0.9.4-r4165-20110816/net80211/ieee80211_linux.c:808:3: error: assignment of read-only location '*fileops'

make[2]: *** [/var/tmp/portage/net-wireless/madwifi-ng-0.9.4.4165.20110816/work/madwifi-0.9.4-r4165-20110816/net80211/ieee80211_linux.o] Error 1

make[2]: *** Waiting for unfinished jobs....

make[1]: *** [_module_/var/tmp/portage/net-wireless/madwifi-ng-0.9.4.4165.20110816/work/madwifi-0.9.4-r4165-20110816/net80211] Error 2

make[1]: Leaving directory `/usr/src/linux-3.0.4-hardened-r4'

make: *** [all] Error 2

emake failed

 * ERROR: net-wireless/madwifi-ng-0.9.4.4165.20110816 failed (compile phase):

 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=  KERNELPATH=/lib/modules/3.0.4-hardened-r4/build all

 * 

 * Call stack:

 *     ebuild.sh, line   56:  Called src_compile

 *   environment, line 3489:  Called linux-mod_src_compile

 *   environment, line 2669:  Called die

 * The specific snippet of code:

 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                               CROSS_COMPILE=${CHOST}-                             LDFLAGS=\"$(get_abi_LDFLAGS)\"                                           ${BUILD_FIXES}                                          ${BUILD_PARAMS}             ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";

 * 

 * If you need support, post the output of 'emerge --info =net-wireless/madwifi-ng-0.9.4.4165.20110816',

 * the complete build log and the output of 'emerge -pqv =net-wireless/madwifi-ng-0.9.4.4165.20110816'.

 * The complete build log is located at '/var/tmp/portage/net-wireless/madwifi-ng-0.9.4.4165.20110816/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/madwifi-ng-0.9.4.4165.20110816/temp/environment'.

 * S: '/var/tmp/portage/net-wireless/madwifi-ng-0.9.4.4165.20110816/work/madwifi-0.9.4-r4165-20110816'

```

Has anyone else seen this?

Rich

----------

## depontius

What kind of wifi do you have?

On my previous laptop I used madwifi for the AR1512. (or something like that)  But somewhere like 2 years ago in-kernel support for that wifi chipset was added, using the ath5k driver.  I moved to the in-kernel drivers, removed madwifi, and never looked back.  My current laptop uses a different wifi chipset.

Check to see if your wifi chipset is supported in-kernel.

----------

## richard.scott

I have this:

```
# lspci | grep Ath

00:08.0 Ethernet controller: Atheros Communications Inc. Atheros AR5001X+ Wireless Network Adapter (rev 01)
```

I'll look into using the Ath5K module.

Thanks for the tip.

Rich

----------

## depontius

You might be out of luck.  From /usr/src/linux/drivers/net/wireless/ath/ath5k/ath5k.h :

```
/* PCI IDs */

#define PCI_DEVICE_ID_ATHEROS_AR5210      0x0007 /* AR5210 */

#define PCI_DEVICE_ID_ATHEROS_AR5311      0x0011 /* AR5311 */

#define PCI_DEVICE_ID_ATHEROS_AR5211      0x0012 /* AR5211 */

#define PCI_DEVICE_ID_ATHEROS_AR5212      0x0013 /* AR5212 */

#define PCI_DEVICE_ID_3COM_3CRDAG675      0x0013 /* 3CRDAG675 (Atheros AR5212) */

#define PCI_DEVICE_ID_3COM_2_3CRPAG175      0x0013 /* 3CRPAG175 (Atheros AR5212) */

#define PCI_DEVICE_ID_ATHEROS_AR5210_AP      0x0207 /* AR5210 (Early) */

#define PCI_DEVICE_ID_ATHEROS_AR5212_IBM   0x1014 /* AR5212 (IBM MiniPCI) */

#define PCI_DEVICE_ID_ATHEROS_AR5210_DEFAULT   0x1107 /* AR5210 (no eeprom) */

#define PCI_DEVICE_ID_ATHEROS_AR5212_DEFAULT   0x1113 /* AR5212 (no eeprom) */

#define PCI_DEVICE_ID_ATHEROS_AR5211_DEFAULT   0x1112 /* AR5211 (no eeprom) */

#define PCI_DEVICE_ID_ATHEROS_AR5212_FPGA   0xf013 /* AR5212 (emulation board) */

#define PCI_DEVICE_ID_ATHEROS_AR5211_LEGACY   0xff12 /* AR5211 (emulation board) */

#define PCI_DEVICE_ID_ATHEROS_AR5211_FPGA11B   0xf11b /* AR5211 (emulation board) */

#define PCI_DEVICE_ID_ATHEROS_AR5312_REV2   0x0052 /* AR5312 WMAC (AP31) */

#define PCI_DEVICE_ID_ATHEROS_AR5312_REV7   0x0057 /* AR5312 WMAC (AP30-040) */

#define PCI_DEVICE_ID_ATHEROS_AR5312_REV8   0x0058 /* AR5312 WMAC (AP43-030) */

#define PCI_DEVICE_ID_ATHEROS_AR5212_0014   0x0014 /* AR5212 compatible */

#define PCI_DEVICE_ID_ATHEROS_AR5212_0015   0x0015 /* AR5212 compatible */

#define PCI_DEVICE_ID_ATHEROS_AR5212_0016   0x0016 /* AR5212 compatible */

#define PCI_DEVICE_ID_ATHEROS_AR5212_0017   0x0017 /* AR5212 compatible */

#define PCI_DEVICE_ID_ATHEROS_AR5212_0018   0x0018 /* AR5212 compatible */

#define PCI_DEVICE_ID_ATHEROS_AR5212_0019   0x0019 /* AR5212 compatible */

#define PCI_DEVICE_ID_ATHEROS_AR2413      0x001a /* AR2413 (Griffin-lite) */

#define PCI_DEVICE_ID_ATHEROS_AR5413      0x001b /* AR5413 (Eagle) */

#define PCI_DEVICE_ID_ATHEROS_AR5424      0x001c /* AR5424 (Condor PCI-E) */

#define PCI_DEVICE_ID_ATHEROS_AR5416      0x0023 /* AR5416 */

#define PCI_DEVICE_ID_ATHEROS_AR5418      0x0024 /* AR5418 */
```

----------

## richard.scott

 *depontius wrote:*   

> You might be out of luck.  From /usr/src/linux/drivers/net/wireless/ath/ath5k/ath5k.h :
> 
> 

 

Ah.. a handy list... and yes I'm out of luck.

Looks like i'll have to hunt round for a new PCI card  :Sad: 

Rich

----------

## Gusar

Marketing name doesn't matter, the pci-id does. Check that with "lscpi -nn" and compare with the list again. I'd be surprised if this device isn't covered by ath5k.

----------

## cach0rr0

 *Gusar wrote:*   

> Marketing name doesn't matter, the pci-id does. Check that with "lscpi -nn" and compare with the list again. I'd be surprised if this device isn't covered by ath5k.

 

it is.

----------

