# Disabling Wireless-N

## cessman4life

I was having problems connecting wirelessly with my laptop where there was either no connection or it was just ridiculously slow. By disabling wireless-N and leaving modes B/G enabled I have it working like a champ. The problem is I have to disable wireless-N everytime the machine reboots. Is there a startup script I can run to have it disabled on boot? I found out how to disable the driver from another post https://forums.gentoo.org/viewtopic-t-881681-start-0.html:

```

rmmod iwlagn 

modprobe iwlagn 11n_disable=1

```

----------

## Logicien

Hello,

you can, as example, create /etc/modprobe.d/iwlagn.conf and write in

```
options iwlagn 11n_disable=1
```

Then the option should be activated any time the module iwlagn is loaded. You can verify if the parameter is at 1 by

```
cat /sys/module/iwlagn/parameters/11n_disable
```

Note, if the iwlagn is compiled hard in the kernel, you need to pass at boot time to the kernel the parameter

```
iwlagn.11n_disable=1
```

If it is compiled as a module and you use an initrd, it can be needed to integrate the /etc/modprobe.d/iwlagn.conf file in the initrd if the module is loaded before the real root filesystem is accessed by the kernel.

Personnaly, I put all my modules parameters in /etc/modprobe.d/modprobe.conf who do not exist by default after Gentoo installation. I check if every module option I change from default already exist and his value with the command

```
modprobe -c | less
```

It is important that the same option with a different value do not overwrite my change. If it is, the files in /etc/modprobe.d/ need to be edited to remove the opposite option from the one I add. I have been force to use this option with one AGN wireless AP (Access Point). The bandwidth speed increased a lot after that. Most of the time for me, this option do not change anything else than disable 11n functionality.

----------

## cessman4life

I tried that and 

```
cat /sys/module/iwlagn/parameters/11n_disable
```

returns 

```
0
```

instead of 1

When I reboot the wireless does not connect so I assume N is still enabled.

----------

## cach0rr0

you might have to do the module parameter bit in /etc/conf.d/modules in order for it to persist on reboot

not sure if that (old?) path still works now that everything is baselayout-2/openrc

----------

