mirror of
https://github.com/adulau/aha.git
synced 2025-01-01 13:46:24 +00:00
rndis_wlan: convert mic failure wireless event to cfg80211
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
3334943cef
commit
a0f9ce2ac3
1 changed files with 17 additions and 15 deletions
|
@ -2720,9 +2720,10 @@ static void rndis_wlan_auth_indication(struct usbnet *usbdev,
|
||||||
{
|
{
|
||||||
u8 *buf;
|
u8 *buf;
|
||||||
const char *type;
|
const char *type;
|
||||||
int flags, buflen;
|
int flags, buflen, key_id;
|
||||||
bool pairwise_error, group_error;
|
bool pairwise_error, group_error;
|
||||||
struct ndis_80211_auth_request *auth_req;
|
struct ndis_80211_auth_request *auth_req;
|
||||||
|
enum nl80211_key_type key_type;
|
||||||
|
|
||||||
/* must have at least one array entry */
|
/* must have at least one array entry */
|
||||||
if (len < offsetof(struct ndis_80211_status_indication, u) +
|
if (len < offsetof(struct ndis_80211_status_indication, u) +
|
||||||
|
@ -2758,23 +2759,24 @@ static void rndis_wlan_auth_indication(struct usbnet *usbdev,
|
||||||
devinfo(usbdev, "authentication indication: %s (0x%08x)", type,
|
devinfo(usbdev, "authentication indication: %s (0x%08x)", type,
|
||||||
le32_to_cpu(auth_req->flags));
|
le32_to_cpu(auth_req->flags));
|
||||||
|
|
||||||
if (pairwise_error || group_error) {
|
if (pairwise_error) {
|
||||||
union iwreq_data wrqu;
|
key_type = NL80211_KEYTYPE_PAIRWISE;
|
||||||
struct iw_michaelmicfailure micfailure;
|
key_id = -1;
|
||||||
|
|
||||||
memset(&micfailure, 0, sizeof(micfailure));
|
cfg80211_michael_mic_failure(usbdev->net,
|
||||||
if (pairwise_error)
|
auth_req->bssid,
|
||||||
micfailure.flags |= IW_MICFAILURE_PAIRWISE;
|
key_type, key_id, NULL,
|
||||||
if (group_error)
|
GFP_KERNEL);
|
||||||
micfailure.flags |= IW_MICFAILURE_GROUP;
|
}
|
||||||
|
|
||||||
memcpy(micfailure.src_addr.sa_data, auth_req->bssid,
|
if (group_error) {
|
||||||
ETH_ALEN);
|
key_type = NL80211_KEYTYPE_GROUP;
|
||||||
|
key_id = -1;
|
||||||
|
|
||||||
memset(&wrqu, 0, sizeof(wrqu));
|
cfg80211_michael_mic_failure(usbdev->net,
|
||||||
wrqu.data.length = sizeof(micfailure);
|
auth_req->bssid,
|
||||||
wireless_send_event(usbdev->net, IWEVMICHAELMICFAILURE,
|
key_type, key_id, NULL,
|
||||||
&wrqu, (u8 *)&micfailure);
|
GFP_KERNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
buflen -= le32_to_cpu(auth_req->length);
|
buflen -= le32_to_cpu(auth_req->length);
|
||||||
|
|
Loading…
Reference in a new issue