Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: src/drivers/driver_nl80211.c

Issue 5840004: nl80211: Set cipher suites when using user space SME (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/hostap.git@0.9.130.B
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | wpa_supplicant/sme.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Driver interaction with Linux nl80211/cfg80211 2 * Driver interaction with Linux nl80211/cfg80211
3 * Copyright (c) 2002-2010, Jouni Malinen <j@w1.fi> 3 * Copyright (c) 2002-2010, Jouni Malinen <j@w1.fi>
4 * Copyright (c) 2003-2004, Instant802 Networks, Inc. 4 * Copyright (c) 2003-2004, Instant802 Networks, Inc.
5 * Copyright (c) 2005-2006, Devicescape Software, Inc. 5 * Copyright (c) 2005-2006, Devicescape Software, Inc.
6 * Copyright (c) 2007, Johannes Berg <johannes@sipsolutions.net> 6 * Copyright (c) 2007, Johannes Berg <johannes@sipsolutions.net>
7 * Copyright (c) 2009-2010, Atheros Communications 7 * Copyright (c) 2009-2010, Atheros Communications
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
(...skipping 4075 matching lines...) Expand 10 before | Expand all | Expand 10 after
4086 if (params->ssid_len > sizeof(drv->ssid)) 4086 if (params->ssid_len > sizeof(drv->ssid))
4087 goto nla_put_failure; 4087 goto nla_put_failure;
4088 os_memcpy(drv->ssid, params->ssid, params->ssid_len); 4088 os_memcpy(drv->ssid, params->ssid, params->ssid_len);
4089 drv->ssid_len = params->ssid_len; 4089 drv->ssid_len = params->ssid_len;
4090 } 4090 }
4091 wpa_hexdump(MSG_DEBUG, " * IEs", params->wpa_ie, params->wpa_ie_len); 4091 wpa_hexdump(MSG_DEBUG, " * IEs", params->wpa_ie, params->wpa_ie_len);
4092 if (params->wpa_ie) 4092 if (params->wpa_ie)
4093 NLA_PUT(msg, NL80211_ATTR_IE, params->wpa_ie_len, 4093 NLA_PUT(msg, NL80211_ATTR_IE, params->wpa_ie_len,
4094 params->wpa_ie); 4094 params->wpa_ie);
4095 4095
4096 if (params->pairwise_suite != CIPHER_NONE) {
4097 int cipher;
4098
4099 switch (params->pairwise_suite) {
4100 case CIPHER_WEP40:
4101 cipher = WLAN_CIPHER_SUITE_WEP40;
4102 break;
4103 case CIPHER_WEP104:
4104 cipher = WLAN_CIPHER_SUITE_WEP104;
4105 break;
4106 case CIPHER_CCMP:
4107 cipher = WLAN_CIPHER_SUITE_CCMP;
4108 break;
4109 case CIPHER_TKIP:
4110 default:
4111 cipher = WLAN_CIPHER_SUITE_TKIP;
4112 break;
4113 }
4114 wpa_printf(MSG_DEBUG, " * pairwise=0x%x\n", cipher);
4115 NLA_PUT_U32(msg, NL80211_ATTR_CIPHER_SUITES_PAIRWISE, cipher);
4116 }
4117
4118 if (params->group_suite != CIPHER_NONE) {
4119 int cipher;
4120
4121 switch (params->group_suite) {
4122 case CIPHER_WEP40:
4123 cipher = WLAN_CIPHER_SUITE_WEP40;
4124 break;
4125 case CIPHER_WEP104:
4126 cipher = WLAN_CIPHER_SUITE_WEP104;
4127 break;
4128 case CIPHER_CCMP:
4129 cipher = WLAN_CIPHER_SUITE_CCMP;
4130 break;
4131 case CIPHER_TKIP:
4132 default:
4133 cipher = WLAN_CIPHER_SUITE_TKIP;
4134 break;
4135 }
4136 wpa_printf(MSG_DEBUG, " * group=0x%x\n", cipher);
4137 NLA_PUT_U32(msg, NL80211_ATTR_CIPHER_SUITE_GROUP, cipher);
4138 }
4139
4096 #ifdef CONFIG_IEEE80211W 4140 #ifdef CONFIG_IEEE80211W
4097 if (params->mgmt_frame_protection == MGMT_FRAME_PROTECTION_REQUIRED) 4141 if (params->mgmt_frame_protection == MGMT_FRAME_PROTECTION_REQUIRED)
4098 NLA_PUT_U32(msg, NL80211_ATTR_USE_MFP, NL80211_MFP_REQUIRED); 4142 NLA_PUT_U32(msg, NL80211_ATTR_USE_MFP, NL80211_MFP_REQUIRED);
4099 #endif /* CONFIG_IEEE80211W */ 4143 #endif /* CONFIG_IEEE80211W */
4100 4144
4101 NLA_PUT_FLAG(msg, NL80211_ATTR_CONTROL_PORT); 4145 NLA_PUT_FLAG(msg, NL80211_ATTR_CONTROL_PORT);
4102 4146
4103 if (params->prev_bssid) { 4147 if (params->prev_bssid) {
4104 wpa_printf(MSG_DEBUG, " * prev_bssid=" MACSTR, 4148 wpa_printf(MSG_DEBUG, " * prev_bssid=" MACSTR,
4105 MAC2STR(params->prev_bssid)); 4149 MAC2STR(params->prev_bssid));
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
5548 wpa_driver_nl80211_cancel_remain_on_channel, 5592 wpa_driver_nl80211_cancel_remain_on_channel,
5549 .probe_req_report = wpa_driver_nl80211_probe_req_report, 5593 .probe_req_report = wpa_driver_nl80211_probe_req_report,
5550 .disable_11b_rates = wpa_driver_nl80211_disable_11b_rates, 5594 .disable_11b_rates = wpa_driver_nl80211_disable_11b_rates,
5551 .deinit_ap = wpa_driver_nl80211_deinit_ap, 5595 .deinit_ap = wpa_driver_nl80211_deinit_ap,
5552 .resume = wpa_driver_nl80211_resume, 5596 .resume = wpa_driver_nl80211_resume,
5553 .send_ft_action = nl80211_send_ft_action, 5597 .send_ft_action = nl80211_send_ft_action,
5554 .connection_monitor = nl80211_connection_monitor, 5598 .connection_monitor = nl80211_connection_monitor,
5555 .connection_poll = nl80211_connection_poll, 5599 .connection_poll = nl80211_connection_poll,
5556 .send_frame = nl80211_send_frame, 5600 .send_frame = nl80211_send_frame,
5557 }; 5601 };
OLDNEW
« no previous file with comments | « no previous file | wpa_supplicant/sme.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698