aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-08-27 07:26:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-27 13:27:07 -0400
commitc0692b8fe29fb4d4dad33487aabf3ed7e1e880c0 (patch)
tree39c0c74c2270a285e1a0cfc7958ced7368cf28a6 /include
parent3ffc2a905b1faae4c0fe39d66f0752c3a4cbb3c7 (diff)
cfg80211: allow changing port control protocol
Some vendor specified mechanisms for 802.1X-style functionality use a different protocol than EAP (even if EAP is vendor-extensible). Allow setting the ethertype for the protocol when a driver has support for this. The default if unspecified is EAP, of course. Note: This is suitable only for station mode, not for AP implementation. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h16
-rw-r--r--include/net/cfg80211.h24
2 files changed, 32 insertions, 8 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index ec1690da7845..31603e8b5581 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -295,7 +295,9 @@
295 * auth and assoc steps. For this, you need to specify the SSID in a 295 * auth and assoc steps. For this, you need to specify the SSID in a
296 * %NL80211_ATTR_SSID attribute, and can optionally specify the association 296 * %NL80211_ATTR_SSID attribute, and can optionally specify the association
297 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC, 297 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC,
298 * %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_CONTROL_PORT. 298 * %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
299 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
300 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
299 * It is also sent as an event, with the BSSID and response IEs when the 301 * It is also sent as an event, with the BSSID and response IEs when the
300 * connection is established or failed to be established. This can be 302 * connection is established or failed to be established. This can be
301 * determined by the STATUS_CODE attribute. 303 * determined by the STATUS_CODE attribute.
@@ -686,6 +688,15 @@ enum nl80211_commands {
686 * request, the driver will assume that the port is unauthorized until 688 * request, the driver will assume that the port is unauthorized until
687 * authorized by user space. Otherwise, port is marked authorized by 689 * authorized by user space. Otherwise, port is marked authorized by
688 * default in station mode. 690 * default in station mode.
691 * @NL80211_ATTR_CONTROL_PORT_ETHERTYPE: A 16-bit value indicating the
692 * ethertype that will be used for key negotiation. It can be
693 * specified with the associate and connect commands. If it is not
694 * specified, the value defaults to 0x888E (PAE, 802.1X). This
695 * attribute is also used as a flag in the wiphy information to
696 * indicate that protocols other than PAE are supported.
697 * @NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT: When included along with
698 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, indicates that the custom
699 * ethertype frames used for key negotiation must not be encrypted.
689 * 700 *
690 * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. 701 * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver.
691 * We recommend using nested, driver-specific attributes within this. 702 * We recommend using nested, driver-specific attributes within this.
@@ -951,6 +962,9 @@ enum nl80211_attrs {
951 NL80211_ATTR_RX_FRAME_TYPES, 962 NL80211_ATTR_RX_FRAME_TYPES,
952 NL80211_ATTR_FRAME_TYPE, 963 NL80211_ATTR_FRAME_TYPE,
953 964
965 NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
966 NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT,
967
954 /* add attributes here, update the policy in nl80211.c */ 968 /* add attributes here, update the policy in nl80211.c */
955 969
956 __NL80211_ATTR_AFTER_LAST, 970 __NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f2740537b5d6..4c8c727d0cca 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -763,6 +763,10 @@ const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie);
763 * sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is 763 * sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is
764 * required to assume that the port is unauthorized until authorized by 764 * required to assume that the port is unauthorized until authorized by
765 * user space. Otherwise, port is marked authorized by default. 765 * user space. Otherwise, port is marked authorized by default.
766 * @control_port_ethertype: the control port protocol that should be
767 * allowed through even on unauthorized ports
768 * @control_port_no_encrypt: TRUE to prevent encryption of control port
769 * protocol frames.
766 */ 770 */
767struct cfg80211_crypto_settings { 771struct cfg80211_crypto_settings {
768 u32 wpa_versions; 772 u32 wpa_versions;
@@ -772,6 +776,8 @@ struct cfg80211_crypto_settings {
772 int n_akm_suites; 776 int n_akm_suites;
773 u32 akm_suites[NL80211_MAX_NR_AKM_SUITES]; 777 u32 akm_suites[NL80211_MAX_NR_AKM_SUITES];
774 bool control_port; 778 bool control_port;
779 __be16 control_port_ethertype;
780 bool control_port_no_encrypt;
775}; 781};
776 782
777/** 783/**
@@ -1293,15 +1299,19 @@ struct cfg80211_ops {
1293 * @WIPHY_FLAG_4ADDR_AP: supports 4addr mode even on AP (with a single station 1299 * @WIPHY_FLAG_4ADDR_AP: supports 4addr mode even on AP (with a single station
1294 * on a VLAN interface) 1300 * on a VLAN interface)
1295 * @WIPHY_FLAG_4ADDR_STATION: supports 4addr mode even as a station 1301 * @WIPHY_FLAG_4ADDR_STATION: supports 4addr mode even as a station
1302 * @WIPHY_FLAG_CONTROL_PORT_PROTOCOL: This device supports setting the
1303 * control port protocol ethertype. The device also honours the
1304 * control_port_no_encrypt flag.
1296 */ 1305 */
1297enum wiphy_flags { 1306enum wiphy_flags {
1298 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), 1307 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
1299 WIPHY_FLAG_STRICT_REGULATORY = BIT(1), 1308 WIPHY_FLAG_STRICT_REGULATORY = BIT(1),
1300 WIPHY_FLAG_DISABLE_BEACON_HINTS = BIT(2), 1309 WIPHY_FLAG_DISABLE_BEACON_HINTS = BIT(2),
1301 WIPHY_FLAG_NETNS_OK = BIT(3), 1310 WIPHY_FLAG_NETNS_OK = BIT(3),
1302 WIPHY_FLAG_PS_ON_BY_DEFAULT = BIT(4), 1311 WIPHY_FLAG_PS_ON_BY_DEFAULT = BIT(4),
1303 WIPHY_FLAG_4ADDR_AP = BIT(5), 1312 WIPHY_FLAG_4ADDR_AP = BIT(5),
1304 WIPHY_FLAG_4ADDR_STATION = BIT(6), 1313 WIPHY_FLAG_4ADDR_STATION = BIT(6),
1314 WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7),
1305}; 1315};
1306 1316
1307struct mac_address { 1317struct mac_address {