wifi: check the driver reports any encryption caps with nl80211 (bgo #673717)

Some drivers, such as ipw2200 doesn't report any encryption with newer kernels.
See also https://bugs.launchpad.net/ubuntu/+source/linux/+bug/973241
This commit is contained in:
Mathieu Trudel-Lapierre 2012-04-12 12:01:28 +02:00 committed by Jiří Klimeš
parent 8a2267ab6b
commit de3353d58c

View file

@ -650,6 +650,9 @@ static int nl80211_wiphy_info_handler (struct nl_msg *msg, void *arg)
info->caps |= NM_WIFI_DEVICE_CAP_CIPHER_CCMP |
NM_WIFI_DEVICE_CAP_RSN;
break;
default:
nm_log_err (LOGD_HW | LOGD_WIFI, "Don't know the meaning of NL80211_ATTR_CIPHER_SUITES %#8.8x.", ciphers[i]);
break;
}
}
}
@ -735,6 +738,13 @@ wifi_nl80211_init (const char *iface, int ifindex)
goto error;
}
if (device_info.caps == 0) {
nm_log_err (LOGD_HW | LOGD_WIFI,
"(%s): driver doesn't report support of any encryption",
nl80211->parent.iface);
goto error;
}
nl80211->freqs = device_info.freqs;
nl80211->num_freqs = device_info.num_freqs;
nl80211->parent.can_scan_ssid = device_info.can_scan_ssid;