Try fallback drivers if global init for preferred drivers fails
Driver global init was considered a hard failure. Thus if, for example, you used the Broadcom STA driver and didn't have nl80211 or cfg80211 loaded into the kernel, and specified a driver value of "nl80211,wext", the nl80211 driver's global init would fail with the following message: nl80211: 'nl80211' generic netlink not found Failed to initialize driver 'nl80211' but since global init was a hard failure, creating the supplicant interface would fail and the WEXT driver would not be tried. Give other drivers a chance instead. Signed-hostap: Dan Williams <dcbw@redhat.com> intended-for: hostap-1
This commit is contained in:
parent
4bb70bd80d
commit
0f4668ceac
1 changed files with 5 additions and 2 deletions
|
@ -1944,8 +1944,11 @@ static int wpa_supplicant_set_driver(struct wpa_supplicant *wpa_s,
|
||||||
for (i = 0; wpa_drivers[i]; i++) {
|
for (i = 0; wpa_drivers[i]; i++) {
|
||||||
if (os_strlen(wpa_drivers[i]->name) == len &&
|
if (os_strlen(wpa_drivers[i]->name) == len &&
|
||||||
os_strncmp(driver, wpa_drivers[i]->name, len) ==
|
os_strncmp(driver, wpa_drivers[i]->name, len) ==
|
||||||
0)
|
0) {
|
||||||
return select_driver(wpa_s, i);
|
/* First driver that succeeds wins */
|
||||||
|
if (select_driver(wpa_s, i) == 0)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
driver = pos + 1;
|
driver = pos + 1;
|
||||||
|
|
Loading…
Reference in a new issue