# wpa_supplicant.conf that uses the  nl80211?

## dman777

I just did a new Gentoo install on my new laptop. Using the wiki doc for wifi, I copied over the wpa_supplicant from /usr/share/* to /etc/wpa_supplicant. 

wpa_supplicant did not like the default config and errored out. 

Does anyone have wpa_supplicant.conf  that uses the  nl80211? Not sure how to make it use the nl80211 driver and it defaults to WEXT. 

Also, I start wpa_supplicant with the SysVinit script.

----------

## prozprcek

You can use the -D switch eg. 

```
wpa_supplicant -Dnl80211 -i<interface> 
```

From wpa_supplicant(8)

 *Quote:*   

> 
> 
> -D driver
> 
> Driver to use (can be multiple drivers: nl80211,wext).
> ...

 

----------

## dman777

No, where in the wpa_supplicant.conf do I tell it to use a driver? I am not starting this from command line, but from the init script.

----------

## prozprcek

AFAIK there isn't such an option, at least I wasn't able to find anything in wpa_supplicant.conf(5).

But even if you invoke wpa_supplicant trough script you can pass it -Dnl80211.

----------

## charles17

 *dman777 wrote:*   

> I just did a new Gentoo install on my new laptop. Using the wiki doc for wifi, I copied over the wpa_supplicant from /usr/share/* to /etc/wpa_supplicant. 
> 
> wpa_supplicant did not like the default config and errored out. 
> 
> Does anyone have wpa_supplicant.conf  that uses the  nl80211? Not sure how to make it use the nl80211 driver and it defaults to WEXT. 

 See https://wiki.gentoo.org/wiki/Wpa_supplicant#Global

 *dman777 wrote:*   

> Also, I start wpa_supplicant with the SysVinit script.

 You mean /etc/init.d/wpa_supplicant start?

Then make sure  /etc/net.* scripts are not running or better, do not even exist.  It's all described in the wiki article.  One setup for netifrc, another for dhcpcd.  Do not mix them!!!

----------

## khayyam

 *dman777 wrote:*   

> No, where in the wpa_supplicant.conf do I tell it to use a driver? I am not starting this from command line, but from the init script.

 

dman777 ... use the supplied "openrc" config:

```
wpa_supplicant_args="-Dnl80211"
```

or, if you were using netifrc, you could do the following:

```
wpa_supplicant_wlan0="-Dnl80211"
```

Note, you might also want to pass '-qq' and so suppress debugging (at least for normal use).

best ... khay

----------

## Ant P.

wpa_supplicant should already default to nl80211, unless you've gone out of your way to edit the order the drivers are listed (in wpa_supplicant -h).

----------

## khayyam

 *Ant P. wrote:*   

> wpa_supplicant should already default to nl80211, unless you've gone out of your way to edit the order the drivers are listed (in wpa_supplicant -h).

 

Ant P. ... those (in 'wpa_supplicant -h') seem to be hardcoded, I build wpa_supplicant without DRIVER_WEXT and DRIVER_WIRED yet they are listed as 'drivers'. Otherwise, you're probably right, but I'm not 100% sure, as I don't know how/if wpa_supplicant detects if a link is wired, or has wireless extentions, etc.

You could/can do the following: '-Dnl80211,wext' ... which suggests it falling back, and I would expect that nl80211 be the first it try when no '-D<driver>' is provided, at least given WEXT depreciation. Still, it probably doesn't hurt to be explict, and I wonder if the OP isn't seeing something that is perhaps caused by a misconfigured CFG80211/NL80211, or if in fact nl80211 is in use regardless.

best ... khay

----------

