diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-08-25 14:51:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-25 14:51:42 -0400 |
commit | e569aa78ba01f7f66e016a4d57310fd041524d17 (patch) | |
tree | eaedc03d42ee2bf6200fc07b080a99bad103def3 /include | |
parent | 4562487a00445eab96311365ba15c41dc4d043cd (diff) | |
parent | 268bae0b6879f238ba57f5f801958d1254e136f7 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
drivers/net/wireless/libertas/if_sdio.c
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 2 | ||||
-rw-r--r-- | include/linux/nl80211.h | 150 | ||||
-rw-r--r-- | include/linux/ssb/ssb_regs.h | 1 | ||||
-rw-r--r-- | include/net/cfg80211.h | 179 | ||||
-rw-r--r-- | include/net/mac80211.h | 60 |
5 files changed, 317 insertions, 75 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 59962dbc2758..0cf9448a32c4 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2171,6 +2171,8 @@ extern void dev_seq_stop(struct seq_file *seq, void *v); | |||
2171 | extern int netdev_class_create_file(struct class_attribute *class_attr); | 2171 | extern int netdev_class_create_file(struct class_attribute *class_attr); |
2172 | extern void netdev_class_remove_file(struct class_attribute *class_attr); | 2172 | extern void netdev_class_remove_file(struct class_attribute *class_attr); |
2173 | 2173 | ||
2174 | extern struct kobj_ns_type_operations net_ns_type_operations; | ||
2175 | |||
2174 | extern char *netdev_drivername(const struct net_device *dev, char *buffer, int len); | 2176 | extern char *netdev_drivername(const struct net_device *dev, char *buffer, int len); |
2175 | 2177 | ||
2176 | extern void linkwatch_run_queue(void); | 2178 | extern void linkwatch_run_queue(void); |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 2c8701687336..ec1690da7845 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -40,6 +40,43 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * DOC: Frame transmission/registration support | ||
44 | * | ||
45 | * Frame transmission and registration support exists to allow userspace | ||
46 | * management entities such as wpa_supplicant react to management frames | ||
47 | * that are not being handled by the kernel. This includes, for example, | ||
48 | * certain classes of action frames that cannot be handled in the kernel | ||
49 | * for various reasons. | ||
50 | * | ||
51 | * Frame registration is done on a per-interface basis and registrations | ||
52 | * cannot be removed other than by closing the socket. It is possible to | ||
53 | * specify a registration filter to register, for example, only for a | ||
54 | * certain type of action frame. In particular with action frames, those | ||
55 | * that userspace registers for will not be returned as unhandled by the | ||
56 | * driver, so that the registered application has to take responsibility | ||
57 | * for doing that. | ||
58 | * | ||
59 | * The type of frame that can be registered for is also dependent on the | ||
60 | * driver and interface type. The frame types are advertised in wiphy | ||
61 | * attributes so applications know what to expect. | ||
62 | * | ||
63 | * NOTE: When an interface changes type while registrations are active, | ||
64 | * these registrations are ignored until the interface type is | ||
65 | * changed again. This means that changing the interface type can | ||
66 | * lead to a situation that couldn't otherwise be produced, but | ||
67 | * any such registrations will be dormant in the sense that they | ||
68 | * will not be serviced, i.e. they will not receive any frames. | ||
69 | * | ||
70 | * Frame transmission allows userspace to send for example the required | ||
71 | * responses to action frames. It is subject to some sanity checking, | ||
72 | * but many frames can be transmitted. When a frame was transmitted, its | ||
73 | * status is indicated to the sending socket. | ||
74 | * | ||
75 | * For more technical details, see the corresponding command descriptions | ||
76 | * below. | ||
77 | */ | ||
78 | |||
79 | /** | ||
43 | * enum nl80211_commands - supported nl80211 commands | 80 | * enum nl80211_commands - supported nl80211 commands |
44 | * | 81 | * |
45 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors | 82 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors |
@@ -301,16 +338,20 @@ | |||
301 | * rate selection. %NL80211_ATTR_IFINDEX is used to specify the interface | 338 | * rate selection. %NL80211_ATTR_IFINDEX is used to specify the interface |
302 | * and @NL80211_ATTR_TX_RATES the set of allowed rates. | 339 | * and @NL80211_ATTR_TX_RATES the set of allowed rates. |
303 | * | 340 | * |
304 | * @NL80211_CMD_REGISTER_ACTION: Register for receiving certain action frames | 341 | * @NL80211_CMD_REGISTER_FRAME: Register for receiving certain mgmt frames |
305 | * (via @NL80211_CMD_ACTION) for processing in userspace. This command | 342 | * (via @NL80211_CMD_FRAME) for processing in userspace. This command |
306 | * requires an interface index and a match attribute containing the first | 343 | * requires an interface index, a frame type attribute (optional for |
307 | * few bytes of the frame that should match, e.g. a single byte for only | 344 | * backward compatibility reasons, if not given assumes action frames) |
308 | * a category match or four bytes for vendor frames including the OUI. | 345 | * and a match attribute containing the first few bytes of the frame |
309 | * The registration cannot be dropped, but is removed automatically | 346 | * that should match, e.g. a single byte for only a category match or |
310 | * when the netlink socket is closed. Multiple registrations can be made. | 347 | * four bytes for vendor frames including the OUI. The registration |
311 | * @NL80211_CMD_ACTION: Action frame TX request and RX notification. This | 348 | * cannot be dropped, but is removed automatically when the netlink |
312 | * command is used both as a request to transmit an Action frame and as an | 349 | * socket is closed. Multiple registrations can be made. |
313 | * event indicating reception of an Action frame that was not processed in | 350 | * @NL80211_CMD_REGISTER_ACTION: Alias for @NL80211_CMD_REGISTER_FRAME for |
351 | * backward compatibility | ||
352 | * @NL80211_CMD_FRAME: Management frame TX request and RX notification. This | ||
353 | * command is used both as a request to transmit a management frame and | ||
354 | * as an event indicating reception of a frame that was not processed in | ||
314 | * kernel code, but is for us (i.e., which may need to be processed in a | 355 | * kernel code, but is for us (i.e., which may need to be processed in a |
315 | * user space application). %NL80211_ATTR_FRAME is used to specify the | 356 | * user space application). %NL80211_ATTR_FRAME is used to specify the |
316 | * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and | 357 | * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and |
@@ -320,11 +361,14 @@ | |||
320 | * operational channel). When called, this operation returns a cookie | 361 | * operational channel). When called, this operation returns a cookie |
321 | * (%NL80211_ATTR_COOKIE) that will be included with the TX status event | 362 | * (%NL80211_ATTR_COOKIE) that will be included with the TX status event |
322 | * pertaining to the TX request. | 363 | * pertaining to the TX request. |
323 | * @NL80211_CMD_ACTION_TX_STATUS: Report TX status of an Action frame | 364 | * @NL80211_CMD_ACTION: Alias for @NL80211_CMD_FRAME for backward compatibility. |
324 | * transmitted with %NL80211_CMD_ACTION. %NL80211_ATTR_COOKIE identifies | 365 | * @NL80211_CMD_FRAME_TX_STATUS: Report TX status of a management frame |
366 | * transmitted with %NL80211_CMD_FRAME. %NL80211_ATTR_COOKIE identifies | ||
325 | * the TX command and %NL80211_ATTR_FRAME includes the contents of the | 367 | * the TX command and %NL80211_ATTR_FRAME includes the contents of the |
326 | * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged | 368 | * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged |
327 | * the frame. | 369 | * the frame. |
370 | * @NL80211_CMD_ACTION_TX_STATUS: Alias for @NL80211_CMD_FRAME_TX_STATUS for | ||
371 | * backward compatibility. | ||
328 | * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command | 372 | * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command |
329 | * is used to configure connection quality monitoring notification trigger | 373 | * is used to configure connection quality monitoring notification trigger |
330 | * levels. | 374 | * levels. |
@@ -429,9 +473,12 @@ enum nl80211_commands { | |||
429 | 473 | ||
430 | NL80211_CMD_SET_TX_BITRATE_MASK, | 474 | NL80211_CMD_SET_TX_BITRATE_MASK, |
431 | 475 | ||
432 | NL80211_CMD_REGISTER_ACTION, | 476 | NL80211_CMD_REGISTER_FRAME, |
433 | NL80211_CMD_ACTION, | 477 | NL80211_CMD_REGISTER_ACTION = NL80211_CMD_REGISTER_FRAME, |
434 | NL80211_CMD_ACTION_TX_STATUS, | 478 | NL80211_CMD_FRAME, |
479 | NL80211_CMD_ACTION = NL80211_CMD_FRAME, | ||
480 | NL80211_CMD_FRAME_TX_STATUS, | ||
481 | NL80211_CMD_ACTION_TX_STATUS = NL80211_CMD_FRAME_TX_STATUS, | ||
435 | 482 | ||
436 | NL80211_CMD_SET_POWER_SAVE, | 483 | NL80211_CMD_SET_POWER_SAVE, |
437 | NL80211_CMD_GET_POWER_SAVE, | 484 | NL80211_CMD_GET_POWER_SAVE, |
@@ -708,7 +755,16 @@ enum nl80211_commands { | |||
708 | * is used with %NL80211_CMD_SET_TX_BITRATE_MASK. | 755 | * is used with %NL80211_CMD_SET_TX_BITRATE_MASK. |
709 | * | 756 | * |
710 | * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain | 757 | * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain |
711 | * at least one byte, currently used with @NL80211_CMD_REGISTER_ACTION. | 758 | * at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME. |
759 | * @NL80211_ATTR_FRAME_TYPE: A u16 indicating the frame type/subtype for the | ||
760 | * @NL80211_CMD_REGISTER_FRAME command. | ||
761 | * @NL80211_ATTR_TX_FRAME_TYPES: wiphy capability attribute, which is a | ||
762 | * nested attribute of %NL80211_ATTR_FRAME_TYPE attributes, containing | ||
763 | * information about which frame types can be transmitted with | ||
764 | * %NL80211_CMD_FRAME. | ||
765 | * @NL80211_ATTR_RX_FRAME_TYPES: wiphy capability attribute, which is a | ||
766 | * nested attribute of %NL80211_ATTR_FRAME_TYPE attributes, containing | ||
767 | * information about which frame types can be registered for RX. | ||
712 | * | 768 | * |
713 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was | 769 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was |
714 | * acknowledged by the recipient. | 770 | * acknowledged by the recipient. |
@@ -891,6 +947,10 @@ enum nl80211_attrs { | |||
891 | NL80211_ATTR_WIPHY_TX_POWER_SETTING, | 947 | NL80211_ATTR_WIPHY_TX_POWER_SETTING, |
892 | NL80211_ATTR_WIPHY_TX_POWER_LEVEL, | 948 | NL80211_ATTR_WIPHY_TX_POWER_LEVEL, |
893 | 949 | ||
950 | NL80211_ATTR_TX_FRAME_TYPES, | ||
951 | NL80211_ATTR_RX_FRAME_TYPES, | ||
952 | NL80211_ATTR_FRAME_TYPE, | ||
953 | |||
894 | /* add attributes here, update the policy in nl80211.c */ | 954 | /* add attributes here, update the policy in nl80211.c */ |
895 | 955 | ||
896 | __NL80211_ATTR_AFTER_LAST, | 956 | __NL80211_ATTR_AFTER_LAST, |
@@ -947,7 +1007,7 @@ enum nl80211_attrs { | |||
947 | * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames | 1007 | * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames |
948 | * @NL80211_IFTYPE_MESH_POINT: mesh point | 1008 | * @NL80211_IFTYPE_MESH_POINT: mesh point |
949 | * @NL80211_IFTYPE_MAX: highest interface type number currently defined | 1009 | * @NL80211_IFTYPE_MAX: highest interface type number currently defined |
950 | * @__NL80211_IFTYPE_AFTER_LAST: internal use | 1010 | * @NUM_NL80211_IFTYPES: number of defined interface types |
951 | * | 1011 | * |
952 | * These values are used with the %NL80211_ATTR_IFTYPE | 1012 | * These values are used with the %NL80211_ATTR_IFTYPE |
953 | * to set the type of an interface. | 1013 | * to set the type of an interface. |
@@ -964,8 +1024,8 @@ enum nl80211_iftype { | |||
964 | NL80211_IFTYPE_MESH_POINT, | 1024 | NL80211_IFTYPE_MESH_POINT, |
965 | 1025 | ||
966 | /* keep last */ | 1026 | /* keep last */ |
967 | __NL80211_IFTYPE_AFTER_LAST, | 1027 | NUM_NL80211_IFTYPES, |
968 | NL80211_IFTYPE_MAX = __NL80211_IFTYPE_AFTER_LAST - 1 | 1028 | NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1 |
969 | }; | 1029 | }; |
970 | 1030 | ||
971 | /** | 1031 | /** |
@@ -974,11 +1034,14 @@ enum nl80211_iftype { | |||
974 | * Station flags. When a station is added to an AP interface, it is | 1034 | * Station flags. When a station is added to an AP interface, it is |
975 | * assumed to be already associated (and hence authenticated.) | 1035 | * assumed to be already associated (and hence authenticated.) |
976 | * | 1036 | * |
1037 | * @__NL80211_STA_FLAG_INVALID: attribute number 0 is reserved | ||
977 | * @NL80211_STA_FLAG_AUTHORIZED: station is authorized (802.1X) | 1038 | * @NL80211_STA_FLAG_AUTHORIZED: station is authorized (802.1X) |
978 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames | 1039 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames |
979 | * with short barker preamble | 1040 | * with short barker preamble |
980 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | 1041 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
981 | * @NL80211_STA_FLAG_MFP: station uses management frame protection | 1042 | * @NL80211_STA_FLAG_MFP: station uses management frame protection |
1043 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined | ||
1044 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use | ||
982 | */ | 1045 | */ |
983 | enum nl80211_sta_flags { | 1046 | enum nl80211_sta_flags { |
984 | __NL80211_STA_FLAG_INVALID, | 1047 | __NL80211_STA_FLAG_INVALID, |
@@ -1091,14 +1154,17 @@ enum nl80211_mpath_flags { | |||
1091 | * information about a mesh path. | 1154 | * information about a mesh path. |
1092 | * | 1155 | * |
1093 | * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved | 1156 | * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved |
1094 | * @NL80211_ATTR_MPATH_FRAME_QLEN: number of queued frames for this destination | 1157 | * @NL80211_MPATH_INFO_FRAME_QLEN: number of queued frames for this destination |
1095 | * @NL80211_ATTR_MPATH_SN: destination sequence number | 1158 | * @NL80211_MPATH_INFO_SN: destination sequence number |
1096 | * @NL80211_ATTR_MPATH_METRIC: metric (cost) of this mesh path | 1159 | * @NL80211_MPATH_INFO_METRIC: metric (cost) of this mesh path |
1097 | * @NL80211_ATTR_MPATH_EXPTIME: expiration time for the path, in msec from now | 1160 | * @NL80211_MPATH_INFO_EXPTIME: expiration time for the path, in msec from now |
1098 | * @NL80211_ATTR_MPATH_FLAGS: mesh path flags, enumerated in | 1161 | * @NL80211_MPATH_INFO_FLAGS: mesh path flags, enumerated in |
1099 | * &enum nl80211_mpath_flags; | 1162 | * &enum nl80211_mpath_flags; |
1100 | * @NL80211_ATTR_MPATH_DISCOVERY_TIMEOUT: total path discovery timeout, in msec | 1163 | * @NL80211_MPATH_INFO_DISCOVERY_TIMEOUT: total path discovery timeout, in msec |
1101 | * @NL80211_ATTR_MPATH_DISCOVERY_RETRIES: mesh path discovery retries | 1164 | * @NL80211_MPATH_INFO_DISCOVERY_RETRIES: mesh path discovery retries |
1165 | * @NL80211_MPATH_INFO_MAX: highest mesh path information attribute number | ||
1166 | * currently defind | ||
1167 | * @__NL80211_MPATH_INFO_AFTER_LAST: internal use | ||
1102 | */ | 1168 | */ |
1103 | enum nl80211_mpath_info { | 1169 | enum nl80211_mpath_info { |
1104 | __NL80211_MPATH_INFO_INVALID, | 1170 | __NL80211_MPATH_INFO_INVALID, |
@@ -1127,6 +1193,8 @@ enum nl80211_mpath_info { | |||
1127 | * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE | 1193 | * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE |
1128 | * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n | 1194 | * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n |
1129 | * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n | 1195 | * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n |
1196 | * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined | ||
1197 | * @__NL80211_BAND_ATTR_AFTER_LAST: internal use | ||
1130 | */ | 1198 | */ |
1131 | enum nl80211_band_attr { | 1199 | enum nl80211_band_attr { |
1132 | __NL80211_BAND_ATTR_INVALID, | 1200 | __NL80211_BAND_ATTR_INVALID, |
@@ -1147,6 +1215,7 @@ enum nl80211_band_attr { | |||
1147 | 1215 | ||
1148 | /** | 1216 | /** |
1149 | * enum nl80211_frequency_attr - frequency attributes | 1217 | * enum nl80211_frequency_attr - frequency attributes |
1218 | * @__NL80211_FREQUENCY_ATTR_INVALID: attribute number 0 is reserved | ||
1150 | * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz | 1219 | * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz |
1151 | * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current | 1220 | * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current |
1152 | * regulatory domain. | 1221 | * regulatory domain. |
@@ -1158,6 +1227,9 @@ enum nl80211_band_attr { | |||
1158 | * on this channel in current regulatory domain. | 1227 | * on this channel in current regulatory domain. |
1159 | * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm | 1228 | * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm |
1160 | * (100 * dBm). | 1229 | * (100 * dBm). |
1230 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number | ||
1231 | * currently defined | ||
1232 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use | ||
1161 | */ | 1233 | */ |
1162 | enum nl80211_frequency_attr { | 1234 | enum nl80211_frequency_attr { |
1163 | __NL80211_FREQUENCY_ATTR_INVALID, | 1235 | __NL80211_FREQUENCY_ATTR_INVALID, |
@@ -1177,9 +1249,13 @@ enum nl80211_frequency_attr { | |||
1177 | 1249 | ||
1178 | /** | 1250 | /** |
1179 | * enum nl80211_bitrate_attr - bitrate attributes | 1251 | * enum nl80211_bitrate_attr - bitrate attributes |
1252 | * @__NL80211_BITRATE_ATTR_INVALID: attribute number 0 is reserved | ||
1180 | * @NL80211_BITRATE_ATTR_RATE: Bitrate in units of 100 kbps | 1253 | * @NL80211_BITRATE_ATTR_RATE: Bitrate in units of 100 kbps |
1181 | * @NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE: Short preamble supported | 1254 | * @NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE: Short preamble supported |
1182 | * in 2.4 GHz band. | 1255 | * in 2.4 GHz band. |
1256 | * @NL80211_BITRATE_ATTR_MAX: highest bitrate attribute number | ||
1257 | * currently defined | ||
1258 | * @__NL80211_BITRATE_ATTR_AFTER_LAST: internal use | ||
1183 | */ | 1259 | */ |
1184 | enum nl80211_bitrate_attr { | 1260 | enum nl80211_bitrate_attr { |
1185 | __NL80211_BITRATE_ATTR_INVALID, | 1261 | __NL80211_BITRATE_ATTR_INVALID, |
@@ -1235,6 +1311,7 @@ enum nl80211_reg_type { | |||
1235 | 1311 | ||
1236 | /** | 1312 | /** |
1237 | * enum nl80211_reg_rule_attr - regulatory rule attributes | 1313 | * enum nl80211_reg_rule_attr - regulatory rule attributes |
1314 | * @__NL80211_REG_RULE_ATTR_INVALID: attribute number 0 is reserved | ||
1238 | * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional | 1315 | * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional |
1239 | * considerations for a given frequency range. These are the | 1316 | * considerations for a given frequency range. These are the |
1240 | * &enum nl80211_reg_rule_flags. | 1317 | * &enum nl80211_reg_rule_flags. |
@@ -1251,6 +1328,9 @@ enum nl80211_reg_type { | |||
1251 | * If you don't have one then don't send this. | 1328 | * If you don't have one then don't send this. |
1252 | * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for | 1329 | * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for |
1253 | * a given frequency range. The value is in mBm (100 * dBm). | 1330 | * a given frequency range. The value is in mBm (100 * dBm). |
1331 | * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number | ||
1332 | * currently defined | ||
1333 | * @__NL80211_REG_RULE_ATTR_AFTER_LAST: internal use | ||
1254 | */ | 1334 | */ |
1255 | enum nl80211_reg_rule_attr { | 1335 | enum nl80211_reg_rule_attr { |
1256 | __NL80211_REG_RULE_ATTR_INVALID, | 1336 | __NL80211_REG_RULE_ATTR_INVALID, |
@@ -1302,6 +1382,9 @@ enum nl80211_reg_rule_flags { | |||
1302 | * @__NL80211_SURVEY_INFO_INVALID: attribute number 0 is reserved | 1382 | * @__NL80211_SURVEY_INFO_INVALID: attribute number 0 is reserved |
1303 | * @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel | 1383 | * @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel |
1304 | * @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm) | 1384 | * @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm) |
1385 | * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number | ||
1386 | * currently defined | ||
1387 | * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use | ||
1305 | */ | 1388 | */ |
1306 | enum nl80211_survey_info { | 1389 | enum nl80211_survey_info { |
1307 | __NL80211_SURVEY_INFO_INVALID, | 1390 | __NL80211_SURVEY_INFO_INVALID, |
@@ -1466,6 +1549,7 @@ enum nl80211_channel_type { | |||
1466 | * enum nl80211_bss - netlink attributes for a BSS | 1549 | * enum nl80211_bss - netlink attributes for a BSS |
1467 | * | 1550 | * |
1468 | * @__NL80211_BSS_INVALID: invalid | 1551 | * @__NL80211_BSS_INVALID: invalid |
1552 | * @NL80211_BSS_BSSID: BSSID of the BSS (6 octets) | ||
1469 | * @NL80211_BSS_FREQUENCY: frequency in MHz (u32) | 1553 | * @NL80211_BSS_FREQUENCY: frequency in MHz (u32) |
1470 | * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64) | 1554 | * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64) |
1471 | * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) | 1555 | * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) |
@@ -1509,6 +1593,12 @@ enum nl80211_bss { | |||
1509 | 1593 | ||
1510 | /** | 1594 | /** |
1511 | * enum nl80211_bss_status - BSS "status" | 1595 | * enum nl80211_bss_status - BSS "status" |
1596 | * @NL80211_BSS_STATUS_AUTHENTICATED: Authenticated with this BSS. | ||
1597 | * @NL80211_BSS_STATUS_ASSOCIATED: Associated with this BSS. | ||
1598 | * @NL80211_BSS_STATUS_IBSS_JOINED: Joined to this IBSS. | ||
1599 | * | ||
1600 | * The BSS status is a BSS attribute in scan dumps, which | ||
1601 | * indicates the status the interface has wrt. this BSS. | ||
1512 | */ | 1602 | */ |
1513 | enum nl80211_bss_status { | 1603 | enum nl80211_bss_status { |
1514 | NL80211_BSS_STATUS_AUTHENTICATED, | 1604 | NL80211_BSS_STATUS_AUTHENTICATED, |
@@ -1619,8 +1709,8 @@ enum nl80211_tx_rate_attributes { | |||
1619 | 1709 | ||
1620 | /** | 1710 | /** |
1621 | * enum nl80211_band - Frequency band | 1711 | * enum nl80211_band - Frequency band |
1622 | * @NL80211_BAND_2GHZ - 2.4 GHz ISM band | 1712 | * @NL80211_BAND_2GHZ: 2.4 GHz ISM band |
1623 | * @NL80211_BAND_5GHZ - around 5 GHz band (4.9 - 5.7 GHz) | 1713 | * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz) |
1624 | */ | 1714 | */ |
1625 | enum nl80211_band { | 1715 | enum nl80211_band { |
1626 | NL80211_BAND_2GHZ, | 1716 | NL80211_BAND_2GHZ, |
@@ -1658,9 +1748,9 @@ enum nl80211_attr_cqm { | |||
1658 | 1748 | ||
1659 | /** | 1749 | /** |
1660 | * enum nl80211_cqm_rssi_threshold_event - RSSI threshold event | 1750 | * enum nl80211_cqm_rssi_threshold_event - RSSI threshold event |
1661 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW - The RSSI level is lower than the | 1751 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW: The RSSI level is lower than the |
1662 | * configured threshold | 1752 | * configured threshold |
1663 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH - The RSSI is higher than the | 1753 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the |
1664 | * configured threshold | 1754 | * configured threshold |
1665 | */ | 1755 | */ |
1666 | enum nl80211_cqm_rssi_threshold_event { | 1756 | enum nl80211_cqm_rssi_threshold_event { |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index a6d5225b9275..11daf9c140e7 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
@@ -97,6 +97,7 @@ | |||
97 | #define SSB_TMSLOW_RESET 0x00000001 /* Reset */ | 97 | #define SSB_TMSLOW_RESET 0x00000001 /* Reset */ |
98 | #define SSB_TMSLOW_REJECT_22 0x00000002 /* Reject (Backplane rev 2.2) */ | 98 | #define SSB_TMSLOW_REJECT_22 0x00000002 /* Reject (Backplane rev 2.2) */ |
99 | #define SSB_TMSLOW_REJECT_23 0x00000004 /* Reject (Backplane rev 2.3) */ | 99 | #define SSB_TMSLOW_REJECT_23 0x00000004 /* Reject (Backplane rev 2.3) */ |
100 | #define SSB_TMSLOW_PHYCLK 0x00000010 /* MAC PHY Clock Control Enable */ | ||
100 | #define SSB_TMSLOW_CLOCK 0x00010000 /* Clock Enable */ | 101 | #define SSB_TMSLOW_CLOCK 0x00010000 /* Clock Enable */ |
101 | #define SSB_TMSLOW_FGC 0x00020000 /* Force Gated Clocks On */ | 102 | #define SSB_TMSLOW_FGC 0x00020000 /* Force Gated Clocks On */ |
102 | #define SSB_TMSLOW_PE 0x40000000 /* Power Management Enable */ | 103 | #define SSB_TMSLOW_PE 0x40000000 /* Power Management Enable */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 2fd06c60ffbb..f2740537b5d6 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -25,6 +25,43 @@ | |||
25 | #include <linux/wireless.h> | 25 | #include <linux/wireless.h> |
26 | 26 | ||
27 | 27 | ||
28 | /** | ||
29 | * DOC: Introduction | ||
30 | * | ||
31 | * cfg80211 is the configuration API for 802.11 devices in Linux. It bridges | ||
32 | * userspace and drivers, and offers some utility functionality associated | ||
33 | * with 802.11. cfg80211 must, directly or indirectly via mac80211, be used | ||
34 | * by all modern wireless drivers in Linux, so that they offer a consistent | ||
35 | * API through nl80211. For backward compatibility, cfg80211 also offers | ||
36 | * wireless extensions to userspace, but hides them from drivers completely. | ||
37 | * | ||
38 | * Additionally, cfg80211 contains code to help enforce regulatory spectrum | ||
39 | * use restrictions. | ||
40 | */ | ||
41 | |||
42 | |||
43 | /** | ||
44 | * DOC: Device registration | ||
45 | * | ||
46 | * In order for a driver to use cfg80211, it must register the hardware device | ||
47 | * with cfg80211. This happens through a number of hardware capability structs | ||
48 | * described below. | ||
49 | * | ||
50 | * The fundamental structure for each device is the 'wiphy', of which each | ||
51 | * instance describes a physical wireless device connected to the system. Each | ||
52 | * such wiphy can have zero, one, or many virtual interfaces associated with | ||
53 | * it, which need to be identified as such by pointing the network interface's | ||
54 | * @ieee80211_ptr pointer to a &struct wireless_dev which further describes | ||
55 | * the wireless part of the interface, normally this struct is embedded in the | ||
56 | * network interface's private data area. Drivers can optionally allow creating | ||
57 | * or destroying virtual interfaces on the fly, but without at least one or the | ||
58 | * ability to create some the wireless device isn't useful. | ||
59 | * | ||
60 | * Each wiphy structure contains device capability information, and also has | ||
61 | * a pointer to the various operations the driver offers. The definitions and | ||
62 | * structures here describe these capabilities in detail. | ||
63 | */ | ||
64 | |||
28 | /* | 65 | /* |
29 | * wireless hardware capability structures | 66 | * wireless hardware capability structures |
30 | */ | 67 | */ |
@@ -205,6 +242,21 @@ struct ieee80211_supported_band { | |||
205 | */ | 242 | */ |
206 | 243 | ||
207 | /** | 244 | /** |
245 | * DOC: Actions and configuration | ||
246 | * | ||
247 | * Each wireless device and each virtual interface offer a set of configuration | ||
248 | * operations and other actions that are invoked by userspace. Each of these | ||
249 | * actions is described in the operations structure, and the parameters these | ||
250 | * operations use are described separately. | ||
251 | * | ||
252 | * Additionally, some operations are asynchronous and expect to get status | ||
253 | * information via some functions that drivers need to call. | ||
254 | * | ||
255 | * Scanning and BSS list handling with its associated functionality is described | ||
256 | * in a separate chapter. | ||
257 | */ | ||
258 | |||
259 | /** | ||
208 | * struct vif_params - describes virtual interface parameters | 260 | * struct vif_params - describes virtual interface parameters |
209 | * @mesh_id: mesh ID to use | 261 | * @mesh_id: mesh ID to use |
210 | * @mesh_id_len: length of the mesh ID | 262 | * @mesh_id_len: length of the mesh ID |
@@ -570,8 +622,28 @@ struct ieee80211_txq_params { | |||
570 | /* from net/wireless.h */ | 622 | /* from net/wireless.h */ |
571 | struct wiphy; | 623 | struct wiphy; |
572 | 624 | ||
573 | /* from net/ieee80211.h */ | 625 | /** |
574 | struct ieee80211_channel; | 626 | * DOC: Scanning and BSS list handling |
627 | * | ||
628 | * The scanning process itself is fairly simple, but cfg80211 offers quite | ||
629 | * a bit of helper functionality. To start a scan, the scan operation will | ||
630 | * be invoked with a scan definition. This scan definition contains the | ||
631 | * channels to scan, and the SSIDs to send probe requests for (including the | ||
632 | * wildcard, if desired). A passive scan is indicated by having no SSIDs to | ||
633 | * probe. Additionally, a scan request may contain extra information elements | ||
634 | * that should be added to the probe request. The IEs are guaranteed to be | ||
635 | * well-formed, and will not exceed the maximum length the driver advertised | ||
636 | * in the wiphy structure. | ||
637 | * | ||
638 | * When scanning finds a BSS, cfg80211 needs to be notified of that, because | ||
639 | * it is responsible for maintaining the BSS list; the driver should not | ||
640 | * maintain a list itself. For this notification, various functions exist. | ||
641 | * | ||
642 | * Since drivers do not maintain a BSS list, there are also a number of | ||
643 | * functions to search for a BSS and obtain information about it from the | ||
644 | * BSS structure cfg80211 maintains. The BSS list is also made available | ||
645 | * to userspace. | ||
646 | */ | ||
575 | 647 | ||
576 | /** | 648 | /** |
577 | * struct cfg80211_ssid - SSID description | 649 | * struct cfg80211_ssid - SSID description |
@@ -1020,7 +1092,7 @@ struct cfg80211_pmksa { | |||
1020 | * @cancel_remain_on_channel: Cancel an on-going remain-on-channel operation. | 1092 | * @cancel_remain_on_channel: Cancel an on-going remain-on-channel operation. |
1021 | * This allows the operation to be terminated prior to timeout based on | 1093 | * This allows the operation to be terminated prior to timeout based on |
1022 | * the duration value. | 1094 | * the duration value. |
1023 | * @action: Transmit an action frame | 1095 | * @mgmt_tx: Transmit a management frame |
1024 | * | 1096 | * |
1025 | * @testmode_cmd: run a test mode command | 1097 | * @testmode_cmd: run a test mode command |
1026 | * | 1098 | * |
@@ -1172,7 +1244,7 @@ struct cfg80211_ops { | |||
1172 | struct net_device *dev, | 1244 | struct net_device *dev, |
1173 | u64 cookie); | 1245 | u64 cookie); |
1174 | 1246 | ||
1175 | int (*action)(struct wiphy *wiphy, struct net_device *dev, | 1247 | int (*mgmt_tx)(struct wiphy *wiphy, struct net_device *dev, |
1176 | struct ieee80211_channel *chan, | 1248 | struct ieee80211_channel *chan, |
1177 | enum nl80211_channel_type channel_type, | 1249 | enum nl80211_channel_type channel_type, |
1178 | bool channel_type_valid, | 1250 | bool channel_type_valid, |
@@ -1236,6 +1308,10 @@ struct mac_address { | |||
1236 | u8 addr[ETH_ALEN]; | 1308 | u8 addr[ETH_ALEN]; |
1237 | }; | 1309 | }; |
1238 | 1310 | ||
1311 | struct ieee80211_txrx_stypes { | ||
1312 | u16 tx, rx; | ||
1313 | }; | ||
1314 | |||
1239 | /** | 1315 | /** |
1240 | * struct wiphy - wireless hardware description | 1316 | * struct wiphy - wireless hardware description |
1241 | * @reg_notifier: the driver's regulatory notification callback | 1317 | * @reg_notifier: the driver's regulatory notification callback |
@@ -1286,6 +1362,10 @@ struct mac_address { | |||
1286 | * @privid: a pointer that drivers can use to identify if an arbitrary | 1362 | * @privid: a pointer that drivers can use to identify if an arbitrary |
1287 | * wiphy is theirs, e.g. in global notifiers | 1363 | * wiphy is theirs, e.g. in global notifiers |
1288 | * @bands: information about bands/channels supported by this device | 1364 | * @bands: information about bands/channels supported by this device |
1365 | * | ||
1366 | * @mgmt_stypes: bitmasks of frame subtypes that can be subscribed to or | ||
1367 | * transmitted through nl80211, points to an array indexed by interface | ||
1368 | * type | ||
1289 | */ | 1369 | */ |
1290 | struct wiphy { | 1370 | struct wiphy { |
1291 | /* assign these fields before you register the wiphy */ | 1371 | /* assign these fields before you register the wiphy */ |
@@ -1294,9 +1374,12 @@ struct wiphy { | |||
1294 | u8 perm_addr[ETH_ALEN]; | 1374 | u8 perm_addr[ETH_ALEN]; |
1295 | u8 addr_mask[ETH_ALEN]; | 1375 | u8 addr_mask[ETH_ALEN]; |
1296 | 1376 | ||
1297 | u16 n_addresses; | ||
1298 | struct mac_address *addresses; | 1377 | struct mac_address *addresses; |
1299 | 1378 | ||
1379 | const struct ieee80211_txrx_stypes *mgmt_stypes; | ||
1380 | |||
1381 | u16 n_addresses; | ||
1382 | |||
1300 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ | 1383 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ |
1301 | u16 interface_modes; | 1384 | u16 interface_modes; |
1302 | 1385 | ||
@@ -1492,8 +1575,8 @@ struct cfg80211_cached_keys; | |||
1492 | * set by driver (if supported) on add_interface BEFORE registering the | 1575 | * set by driver (if supported) on add_interface BEFORE registering the |
1493 | * netdev and may otherwise be used by driver read-only, will be update | 1576 | * netdev and may otherwise be used by driver read-only, will be update |
1494 | * by cfg80211 on change_interface | 1577 | * by cfg80211 on change_interface |
1495 | * @action_registrations: list of registrations for action frames | 1578 | * @mgmt_registrations: list of registrations for management frames |
1496 | * @action_registrations_lock: lock for the list | 1579 | * @mgmt_registrations_lock: lock for the list |
1497 | * @mtx: mutex used to lock data in this struct | 1580 | * @mtx: mutex used to lock data in this struct |
1498 | * @cleanup_work: work struct used for cleanup that can't be done directly | 1581 | * @cleanup_work: work struct used for cleanup that can't be done directly |
1499 | */ | 1582 | */ |
@@ -1505,8 +1588,8 @@ struct wireless_dev { | |||
1505 | struct list_head list; | 1588 | struct list_head list; |
1506 | struct net_device *netdev; | 1589 | struct net_device *netdev; |
1507 | 1590 | ||
1508 | struct list_head action_registrations; | 1591 | struct list_head mgmt_registrations; |
1509 | spinlock_t action_registrations_lock; | 1592 | spinlock_t mgmt_registrations_lock; |
1510 | 1593 | ||
1511 | struct mutex mtx; | 1594 | struct mutex mtx; |
1512 | 1595 | ||
@@ -1563,8 +1646,10 @@ static inline void *wdev_priv(struct wireless_dev *wdev) | |||
1563 | return wiphy_priv(wdev->wiphy); | 1646 | return wiphy_priv(wdev->wiphy); |
1564 | } | 1647 | } |
1565 | 1648 | ||
1566 | /* | 1649 | /** |
1567 | * Utility functions | 1650 | * DOC: Utility functions |
1651 | * | ||
1652 | * cfg80211 offers a number of utility functions that can be useful. | ||
1568 | */ | 1653 | */ |
1569 | 1654 | ||
1570 | /** | 1655 | /** |
@@ -1715,7 +1800,15 @@ unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); | |||
1715 | * ieee80211_hdrlen - get header length in bytes from frame control | 1800 | * ieee80211_hdrlen - get header length in bytes from frame control |
1716 | * @fc: frame control field in little-endian format | 1801 | * @fc: frame control field in little-endian format |
1717 | */ | 1802 | */ |
1718 | unsigned int ieee80211_hdrlen(__le16 fc); | 1803 | unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc); |
1804 | |||
1805 | /** | ||
1806 | * DOC: Data path helpers | ||
1807 | * | ||
1808 | * In addition to generic utilities, cfg80211 also offers | ||
1809 | * functions that help implement the data path for devices | ||
1810 | * that do not do the 802.11/802.3 conversion on the device. | ||
1811 | */ | ||
1719 | 1812 | ||
1720 | /** | 1813 | /** |
1721 | * ieee80211_data_to_8023 - convert an 802.11 data frame to 802.3 | 1814 | * ieee80211_data_to_8023 - convert an 802.11 data frame to 802.3 |
@@ -1777,8 +1870,10 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb); | |||
1777 | */ | 1870 | */ |
1778 | const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len); | 1871 | const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len); |
1779 | 1872 | ||
1780 | /* | 1873 | /** |
1781 | * Regulatory helper functions for wiphys | 1874 | * DOC: Regulatory enforcement infrastructure |
1875 | * | ||
1876 | * TODO | ||
1782 | */ | 1877 | */ |
1783 | 1878 | ||
1784 | /** | 1879 | /** |
@@ -2181,6 +2276,20 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, | |||
2181 | void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp); | 2276 | void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp); |
2182 | 2277 | ||
2183 | /** | 2278 | /** |
2279 | * DOC: RFkill integration | ||
2280 | * | ||
2281 | * RFkill integration in cfg80211 is almost invisible to drivers, | ||
2282 | * as cfg80211 automatically registers an rfkill instance for each | ||
2283 | * wireless device it knows about. Soft kill is also translated | ||
2284 | * into disconnecting and turning all interfaces off, drivers are | ||
2285 | * expected to turn off the device when all interfaces are down. | ||
2286 | * | ||
2287 | * However, devices may have a hard RFkill line, in which case they | ||
2288 | * also need to interact with the rfkill subsystem, via cfg80211. | ||
2289 | * They can do this with a few helper functions documented here. | ||
2290 | */ | ||
2291 | |||
2292 | /** | ||
2184 | * wiphy_rfkill_set_hw_state - notify cfg80211 about hw block state | 2293 | * wiphy_rfkill_set_hw_state - notify cfg80211 about hw block state |
2185 | * @wiphy: the wiphy | 2294 | * @wiphy: the wiphy |
2186 | * @blocked: block status | 2295 | * @blocked: block status |
@@ -2201,6 +2310,17 @@ void wiphy_rfkill_stop_polling(struct wiphy *wiphy); | |||
2201 | 2310 | ||
2202 | #ifdef CONFIG_NL80211_TESTMODE | 2311 | #ifdef CONFIG_NL80211_TESTMODE |
2203 | /** | 2312 | /** |
2313 | * DOC: Test mode | ||
2314 | * | ||
2315 | * Test mode is a set of utility functions to allow drivers to | ||
2316 | * interact with driver-specific tools to aid, for instance, | ||
2317 | * factory programming. | ||
2318 | * | ||
2319 | * This chapter describes how drivers interact with it, for more | ||
2320 | * information see the nl80211 book's chapter on it. | ||
2321 | */ | ||
2322 | |||
2323 | /** | ||
2204 | * cfg80211_testmode_alloc_reply_skb - allocate testmode reply | 2324 | * cfg80211_testmode_alloc_reply_skb - allocate testmode reply |
2205 | * @wiphy: the wiphy | 2325 | * @wiphy: the wiphy |
2206 | * @approxlen: an upper bound of the length of the data that will | 2326 | * @approxlen: an upper bound of the length of the data that will |
@@ -2373,38 +2493,39 @@ void cfg80211_new_sta(struct net_device *dev, const u8 *mac_addr, | |||
2373 | struct station_info *sinfo, gfp_t gfp); | 2493 | struct station_info *sinfo, gfp_t gfp); |
2374 | 2494 | ||
2375 | /** | 2495 | /** |
2376 | * cfg80211_rx_action - notification of received, unprocessed Action frame | 2496 | * cfg80211_rx_mgmt - notification of received, unprocessed management frame |
2377 | * @dev: network device | 2497 | * @dev: network device |
2378 | * @freq: Frequency on which the frame was received in MHz | 2498 | * @freq: Frequency on which the frame was received in MHz |
2379 | * @buf: Action frame (header + body) | 2499 | * @buf: Management frame (header + body) |
2380 | * @len: length of the frame data | 2500 | * @len: length of the frame data |
2381 | * @gfp: context flags | 2501 | * @gfp: context flags |
2382 | * Returns %true if a user space application is responsible for rejecting the | 2502 | * |
2383 | * unrecognized Action frame; %false if no such application is registered | 2503 | * Returns %true if a user space application has registered for this frame. |
2384 | * (i.e., the driver is responsible for rejecting the unrecognized Action | 2504 | * For action frames, that makes it responsible for rejecting unrecognized |
2385 | * frame) | 2505 | * action frames; %false otherwise, in which case for action frames the |
2506 | * driver is responsible for rejecting the frame. | ||
2386 | * | 2507 | * |
2387 | * This function is called whenever an Action frame is received for a station | 2508 | * This function is called whenever an Action frame is received for a station |
2388 | * mode interface, but is not processed in kernel. | 2509 | * mode interface, but is not processed in kernel. |
2389 | */ | 2510 | */ |
2390 | bool cfg80211_rx_action(struct net_device *dev, int freq, const u8 *buf, | 2511 | bool cfg80211_rx_mgmt(struct net_device *dev, int freq, const u8 *buf, |
2391 | size_t len, gfp_t gfp); | 2512 | size_t len, gfp_t gfp); |
2392 | 2513 | ||
2393 | /** | 2514 | /** |
2394 | * cfg80211_action_tx_status - notification of TX status for Action frame | 2515 | * cfg80211_mgmt_tx_status - notification of TX status for management frame |
2395 | * @dev: network device | 2516 | * @dev: network device |
2396 | * @cookie: Cookie returned by cfg80211_ops::action() | 2517 | * @cookie: Cookie returned by cfg80211_ops::mgmt_tx() |
2397 | * @buf: Action frame (header + body) | 2518 | * @buf: Management frame (header + body) |
2398 | * @len: length of the frame data | 2519 | * @len: length of the frame data |
2399 | * @ack: Whether frame was acknowledged | 2520 | * @ack: Whether frame was acknowledged |
2400 | * @gfp: context flags | 2521 | * @gfp: context flags |
2401 | * | 2522 | * |
2402 | * This function is called whenever an Action frame was requested to be | 2523 | * This function is called whenever a management frame was requested to be |
2403 | * transmitted with cfg80211_ops::action() to report the TX status of the | 2524 | * transmitted with cfg80211_ops::mgmt_tx() to report the TX status of the |
2404 | * transmission attempt. | 2525 | * transmission attempt. |
2405 | */ | 2526 | */ |
2406 | void cfg80211_action_tx_status(struct net_device *dev, u64 cookie, | 2527 | void cfg80211_mgmt_tx_status(struct net_device *dev, u64 cookie, |
2407 | const u8 *buf, size_t len, bool ack, gfp_t gfp); | 2528 | const u8 *buf, size_t len, bool ack, gfp_t gfp); |
2408 | 2529 | ||
2409 | 2530 | ||
2410 | /** | 2531 | /** |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index b0787a1dea90..2a1811366076 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -149,6 +149,7 @@ struct ieee80211_low_level_stats { | |||
149 | * @BSS_CHANGED_ARP_FILTER: Hardware ARP filter address list or state changed. | 149 | * @BSS_CHANGED_ARP_FILTER: Hardware ARP filter address list or state changed. |
150 | * @BSS_CHANGED_QOS: QoS for this association was enabled/disabled. Note | 150 | * @BSS_CHANGED_QOS: QoS for this association was enabled/disabled. Note |
151 | * that it is only ever disabled for station mode. | 151 | * that it is only ever disabled for station mode. |
152 | * @BSS_CHANGED_IDLE: Idle changed for this BSS/interface. | ||
152 | */ | 153 | */ |
153 | enum ieee80211_bss_change { | 154 | enum ieee80211_bss_change { |
154 | BSS_CHANGED_ASSOC = 1<<0, | 155 | BSS_CHANGED_ASSOC = 1<<0, |
@@ -165,6 +166,7 @@ enum ieee80211_bss_change { | |||
165 | BSS_CHANGED_IBSS = 1<<11, | 166 | BSS_CHANGED_IBSS = 1<<11, |
166 | BSS_CHANGED_ARP_FILTER = 1<<12, | 167 | BSS_CHANGED_ARP_FILTER = 1<<12, |
167 | BSS_CHANGED_QOS = 1<<13, | 168 | BSS_CHANGED_QOS = 1<<13, |
169 | BSS_CHANGED_IDLE = 1<<14, | ||
168 | 170 | ||
169 | /* when adding here, make sure to change ieee80211_reconfig */ | 171 | /* when adding here, make sure to change ieee80211_reconfig */ |
170 | }; | 172 | }; |
@@ -223,6 +225,9 @@ enum ieee80211_bss_change { | |||
223 | * hardware must not perform any ARP filtering. Note, that the filter will | 225 | * hardware must not perform any ARP filtering. Note, that the filter will |
224 | * be enabled also in promiscuous mode. | 226 | * be enabled also in promiscuous mode. |
225 | * @qos: This is a QoS-enabled BSS. | 227 | * @qos: This is a QoS-enabled BSS. |
228 | * @idle: This interface is idle. There's also a global idle flag in the | ||
229 | * hardware config which may be more appropriate depending on what | ||
230 | * your driver/device needs to do. | ||
226 | */ | 231 | */ |
227 | struct ieee80211_bss_conf { | 232 | struct ieee80211_bss_conf { |
228 | const u8 *bssid; | 233 | const u8 *bssid; |
@@ -247,6 +252,7 @@ struct ieee80211_bss_conf { | |||
247 | u8 arp_addr_cnt; | 252 | u8 arp_addr_cnt; |
248 | bool arp_filter_enabled; | 253 | bool arp_filter_enabled; |
249 | bool qos; | 254 | bool qos; |
255 | bool idle; | ||
250 | }; | 256 | }; |
251 | 257 | ||
252 | /** | 258 | /** |
@@ -783,20 +789,6 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif) | |||
783 | } | 789 | } |
784 | 790 | ||
785 | /** | 791 | /** |
786 | * enum ieee80211_key_alg - key algorithm | ||
787 | * @ALG_WEP: WEP40 or WEP104 | ||
788 | * @ALG_TKIP: TKIP | ||
789 | * @ALG_CCMP: CCMP (AES) | ||
790 | * @ALG_AES_CMAC: AES-128-CMAC | ||
791 | */ | ||
792 | enum ieee80211_key_alg { | ||
793 | ALG_WEP, | ||
794 | ALG_TKIP, | ||
795 | ALG_CCMP, | ||
796 | ALG_AES_CMAC, | ||
797 | }; | ||
798 | |||
799 | /** | ||
800 | * enum ieee80211_key_flags - key flags | 792 | * enum ieee80211_key_flags - key flags |
801 | * | 793 | * |
802 | * These flags are used for communication about keys between the driver | 794 | * These flags are used for communication about keys between the driver |
@@ -833,7 +825,7 @@ enum ieee80211_key_flags { | |||
833 | * @hw_key_idx: To be set by the driver, this is the key index the driver | 825 | * @hw_key_idx: To be set by the driver, this is the key index the driver |
834 | * wants to be given when a frame is transmitted and needs to be | 826 | * wants to be given when a frame is transmitted and needs to be |
835 | * encrypted in hardware. | 827 | * encrypted in hardware. |
836 | * @alg: The key algorithm. | 828 | * @cipher: The key's cipher suite selector. |
837 | * @flags: key flags, see &enum ieee80211_key_flags. | 829 | * @flags: key flags, see &enum ieee80211_key_flags. |
838 | * @keyidx: the key index (0-3) | 830 | * @keyidx: the key index (0-3) |
839 | * @keylen: key material length | 831 | * @keylen: key material length |
@@ -846,7 +838,7 @@ enum ieee80211_key_flags { | |||
846 | * @iv_len: The IV length for this key type | 838 | * @iv_len: The IV length for this key type |
847 | */ | 839 | */ |
848 | struct ieee80211_key_conf { | 840 | struct ieee80211_key_conf { |
849 | enum ieee80211_key_alg alg; | 841 | u32 cipher; |
850 | u8 icv_len; | 842 | u8 icv_len; |
851 | u8 iv_len; | 843 | u8 iv_len; |
852 | u8 hw_key_idx; | 844 | u8 hw_key_idx; |
@@ -1102,6 +1094,10 @@ enum ieee80211_hw_flags { | |||
1102 | * | 1094 | * |
1103 | * @max_rates: maximum number of alternate rate retry stages | 1095 | * @max_rates: maximum number of alternate rate retry stages |
1104 | * @max_rate_tries: maximum number of tries for each stage | 1096 | * @max_rate_tries: maximum number of tries for each stage |
1097 | * | ||
1098 | * @napi_weight: weight used for NAPI polling. You must specify an | ||
1099 | * appropriate value here if a napi_poll operation is provided | ||
1100 | * by your driver. | ||
1105 | */ | 1101 | */ |
1106 | struct ieee80211_hw { | 1102 | struct ieee80211_hw { |
1107 | struct ieee80211_conf conf; | 1103 | struct ieee80211_conf conf; |
@@ -1113,6 +1109,7 @@ struct ieee80211_hw { | |||
1113 | int channel_change_time; | 1109 | int channel_change_time; |
1114 | int vif_data_size; | 1110 | int vif_data_size; |
1115 | int sta_data_size; | 1111 | int sta_data_size; |
1112 | int napi_weight; | ||
1116 | u16 queues; | 1113 | u16 queues; |
1117 | u16 max_listen_interval; | 1114 | u16 max_listen_interval; |
1118 | s8 max_signal; | 1115 | s8 max_signal; |
@@ -1687,6 +1684,8 @@ enum ieee80211_ampdu_mlme_action { | |||
1687 | * switch operation for CSAs received from the AP may implement this | 1684 | * switch operation for CSAs received from the AP may implement this |
1688 | * callback. They must then call ieee80211_chswitch_done() to indicate | 1685 | * callback. They must then call ieee80211_chswitch_done() to indicate |
1689 | * completion of the channel switch. | 1686 | * completion of the channel switch. |
1687 | * | ||
1688 | * @napi_poll: Poll Rx queue for incoming data frames. | ||
1690 | */ | 1689 | */ |
1691 | struct ieee80211_ops { | 1690 | struct ieee80211_ops { |
1692 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 1691 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
@@ -1752,6 +1751,7 @@ struct ieee80211_ops { | |||
1752 | void (*flush)(struct ieee80211_hw *hw, bool drop); | 1751 | void (*flush)(struct ieee80211_hw *hw, bool drop); |
1753 | void (*channel_switch)(struct ieee80211_hw *hw, | 1752 | void (*channel_switch)(struct ieee80211_hw *hw, |
1754 | struct ieee80211_channel_switch *ch_switch); | 1753 | struct ieee80211_channel_switch *ch_switch); |
1754 | int (*napi_poll)(struct ieee80211_hw *hw, int budget); | ||
1755 | }; | 1755 | }; |
1756 | 1756 | ||
1757 | /** | 1757 | /** |
@@ -1897,6 +1897,22 @@ void ieee80211_free_hw(struct ieee80211_hw *hw); | |||
1897 | */ | 1897 | */ |
1898 | void ieee80211_restart_hw(struct ieee80211_hw *hw); | 1898 | void ieee80211_restart_hw(struct ieee80211_hw *hw); |
1899 | 1899 | ||
1900 | /** ieee80211_napi_schedule - schedule NAPI poll | ||
1901 | * | ||
1902 | * Use this function to schedule NAPI polling on a device. | ||
1903 | * | ||
1904 | * @hw: the hardware to start polling | ||
1905 | */ | ||
1906 | void ieee80211_napi_schedule(struct ieee80211_hw *hw); | ||
1907 | |||
1908 | /** ieee80211_napi_complete - complete NAPI polling | ||
1909 | * | ||
1910 | * Use this function to finish NAPI polling on a device. | ||
1911 | * | ||
1912 | * @hw: the hardware to stop polling | ||
1913 | */ | ||
1914 | void ieee80211_napi_complete(struct ieee80211_hw *hw); | ||
1915 | |||
1900 | /** | 1916 | /** |
1901 | * ieee80211_rx - receive frame | 1917 | * ieee80211_rx - receive frame |
1902 | * | 1918 | * |
@@ -2518,6 +2534,18 @@ void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif, | |||
2518 | */ | 2534 | */ |
2519 | void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success); | 2535 | void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success); |
2520 | 2536 | ||
2537 | /** | ||
2538 | * ieee80211_request_smps - request SM PS transition | ||
2539 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
2540 | * @smps_mode: new SM PS mode | ||
2541 | * | ||
2542 | * This allows the driver to request an SM PS transition in managed | ||
2543 | * mode. This is useful when the driver has more information than | ||
2544 | * the stack about possible interference, for example by bluetooth. | ||
2545 | */ | ||
2546 | void ieee80211_request_smps(struct ieee80211_vif *vif, | ||
2547 | enum ieee80211_smps_mode smps_mode); | ||
2548 | |||
2521 | /* Rate control API */ | 2549 | /* Rate control API */ |
2522 | 2550 | ||
2523 | /** | 2551 | /** |