diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2011-11-19 06:04:21 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-21 16:22:08 -0500 |
commit | 1c70687536575bcc96ae88b69154ca62dbdac7c1 (patch) | |
tree | 6a3965c65556d4a53e81bbd38267e65c2bdfd3a9 /drivers | |
parent | 30fd90731d45eab2f4f51e622e522075c90a0d59 (diff) |
rndis_wlan: add reporting of PMKSA candidate events
Convert old WEXT reporting to use new cfg80211_pmksa_candidate_notify().
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 08c85af003fd..56514d951ffd 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -244,6 +244,10 @@ enum ndis_80211_power_mode { | |||
244 | NDIS_80211_POWER_MODE_FAST_PSP, | 244 | NDIS_80211_POWER_MODE_FAST_PSP, |
245 | }; | 245 | }; |
246 | 246 | ||
247 | enum ndis_80211_pmkid_cand_list_flag_bits { | ||
248 | NDIS_80211_PMKID_CAND_PREAUTH = cpu_to_le32(1 << 0) | ||
249 | }; | ||
250 | |||
247 | struct ndis_80211_auth_request { | 251 | struct ndis_80211_auth_request { |
248 | __le32 length; | 252 | __le32 length; |
249 | u8 bssid[6]; | 253 | u8 bssid[6]; |
@@ -3022,25 +3026,13 @@ static void rndis_wlan_pmkid_cand_list_indication(struct usbnet *usbdev, | |||
3022 | for (i = 0; i < le32_to_cpu(cand_list->num_candidates); i++) { | 3026 | for (i = 0; i < le32_to_cpu(cand_list->num_candidates); i++) { |
3023 | struct ndis_80211_pmkid_candidate *cand = | 3027 | struct ndis_80211_pmkid_candidate *cand = |
3024 | &cand_list->candidate_list[i]; | 3028 | &cand_list->candidate_list[i]; |
3029 | bool preauth = !!(cand->flags & NDIS_80211_PMKID_CAND_PREAUTH); | ||
3025 | 3030 | ||
3026 | netdev_dbg(usbdev->net, "cand[%i]: flags: 0x%08x, bssid: %pM\n", | 3031 | netdev_dbg(usbdev->net, "cand[%i]: flags: 0x%08x, preauth: %d, bssid: %pM\n", |
3027 | i, le32_to_cpu(cand->flags), cand->bssid); | 3032 | i, le32_to_cpu(cand->flags), preauth, cand->bssid); |
3028 | |||
3029 | #if 0 | ||
3030 | struct iw_pmkid_cand pcand; | ||
3031 | union iwreq_data wrqu; | ||
3032 | 3033 | ||
3033 | memset(&pcand, 0, sizeof(pcand)); | 3034 | cfg80211_pmksa_candidate_notify(usbdev->net, i, cand->bssid, |
3034 | if (le32_to_cpu(cand->flags) & 0x01) | 3035 | preauth, GFP_ATOMIC); |
3035 | pcand.flags |= IW_PMKID_CAND_PREAUTH; | ||
3036 | pcand.index = i; | ||
3037 | memcpy(pcand.bssid.sa_data, cand->bssid, ETH_ALEN); | ||
3038 | |||
3039 | memset(&wrqu, 0, sizeof(wrqu)); | ||
3040 | wrqu.data.length = sizeof(pcand); | ||
3041 | wireless_send_event(usbdev->net, IWEVPMKIDCAND, &wrqu, | ||
3042 | (u8 *)&pcand); | ||
3043 | #endif | ||
3044 | } | 3036 | } |
3045 | } | 3037 | } |
3046 | 3038 | ||