# Need to run disable_hw_scan=1 to use wlan0 [solved]

## alienjon

The computer is a Toshiba Satellite A305 laptop with a Intel Corporation PRO/Wireless 3945ABG Network Connection wireless device (that's the lspci output)  I followed some wiki's and forums and was able to configure the kernel appropriately, but it still was not working.  I was, however, able to find a hack to get it to work.  I found that if I run my wlan0 init script and then run the following code, it can connect to my router and, subsequently, the internet:

```
modprobe -r iwl3945

modprobe iwl3945 disable_hw_scan=1
```

Apparently, by disabling hardware scanning, it'll work just fine, but a) I don't know if there's a way to specify this every time the module loads (right now I have it in a small script I run whenever I start the computer) or better yet if b) there is a way to disable this in the kernel (or as the module is built).Last edited by alienjon on Tue Jul 15, 2008 10:18 pm; edited 1 time in total

----------

## codergeek42

If it's built into your kernel statically, you can add it as a boot-time parameter such as 'iwl3945.disable_hw_scan=1'. (This would be appended to your "kernel /bzImage-version" line in your Grub config file.)

----------

## alienjon

naw, it's a module (unless I'm misinterpreting what you mean by 'static')

----------

## codergeek42

 *alienjon wrote:*   

> naw, it's a module (unless I'm misinterpreting what you mean by 'static')

 OOOH. I think I see what you're saying. 

If you want to add this as a permanent option for the module, you can use the /etc/modprobe.conf file.

```
# /etc/modprobe.conf

options  iwl3945  disable_hw_scan=1
```

Its syntax for the options is very similar to that of modprobe directly, and is explained in the modprobe.conf(5) man page if you're further interested:

```
$ man modprobe.conf
```

This will cause these options to be used every time the module is loaded, without having to explicitly run "modprobe iwl3945 disable_hw_scan=1 other_option=foo" etc.  :Smile: 

----------

## swimmer

Hmm - I don't trust that solution completely since I read this on the top of /etc/modprobe.conf

```
### This file is automatically generated by update-modules

#

# Please do not edit this file directly. If you want to change or add

# anything please take a look at the files in /etc/modprobe.d and read

# the manpage for update-modules(8).
```

I'd suggest creating a file iwl3945 in /etc/modprobe.d/ with the line codergeek42 suggested ...

Sorry codergeek42  :Wink: 

Greetz

swimmer

----------

## codergeek42

 *swimmer wrote:*   

> [...] creating a file iwl3945 in /etc/modprobe.d/ with the line codergeek42 suggested ...
> 
> Sorry codergeek42 

 Heh; That's my "not used Gentoo in 2+ years" solution, so I appreciate your correction. Thanks.  :Smile: 

----------

## alienjon

I just added that line to /etc/modules.d/iwl3945 and upon rebooting I had the exact same problem (and again, reloading the module fixes it).  Interestingly, though, is that I now see that line in the /etc/modules.conf file.  I'm guessing that the modules.conf file loads the options from the modules.d sub-files.  But now, I'm wondering, if the problem lays in that the module needs to be reloaded anyway for it to work?

----------

## swimmer

*** /me crashes his head against the table ***

I should have told you that you have to run 

```
update-modules
```

 after that :-/

Sorry about that  :Sad: 

swimmer

----------

## alienjon

Thanks  :Smile: 

I actually just finished rebooting after working on another problem and noticed that it's working fine now (actually, it was a second reboot, so I'm not sure why it didn't work the first time, but oh well, it's good now)  Thanks for the help  :Smile: 

----------

## swimmer

Glad to hear that it works now  :Very Happy: 

----------

