diff options
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 212 |
1 files changed, 133 insertions, 79 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index f78fa19a07b0..1b9830ebe6c6 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -281,9 +281,13 @@ struct ieee80211_supported_band { | |||
281 | /** | 281 | /** |
282 | * struct vif_params - describes virtual interface parameters | 282 | * struct vif_params - describes virtual interface parameters |
283 | * @use_4addr: use 4-address frames | 283 | * @use_4addr: use 4-address frames |
284 | * @macaddr: address to use for this virtual interface. This will only | ||
285 | * be used for non-netdevice interfaces. If this parameter is set | ||
286 | * to zero address the driver may determine the address as needed. | ||
284 | */ | 287 | */ |
285 | struct vif_params { | 288 | struct vif_params { |
286 | int use_4addr; | 289 | int use_4addr; |
290 | u8 macaddr[ETH_ALEN]; | ||
287 | }; | 291 | }; |
288 | 292 | ||
289 | /** | 293 | /** |
@@ -326,7 +330,7 @@ struct cfg80211_chan_def { | |||
326 | * cfg80211_get_chandef_type - return old channel type from chandef | 330 | * cfg80211_get_chandef_type - return old channel type from chandef |
327 | * @chandef: the channel definition | 331 | * @chandef: the channel definition |
328 | * | 332 | * |
329 | * Returns the old channel type (NOHT, HT20, HT40+/-) from a given | 333 | * Return: The old channel type (NOHT, HT20, HT40+/-) from a given |
330 | * chandef, which must have a bandwidth allowing this conversion. | 334 | * chandef, which must have a bandwidth allowing this conversion. |
331 | */ | 335 | */ |
332 | static inline enum nl80211_channel_type | 336 | static inline enum nl80211_channel_type |
@@ -364,7 +368,7 @@ void cfg80211_chandef_create(struct cfg80211_chan_def *chandef, | |||
364 | * @chandef1: first channel definition | 368 | * @chandef1: first channel definition |
365 | * @chandef2: second channel definition | 369 | * @chandef2: second channel definition |
366 | * | 370 | * |
367 | * Returns %true if the channels defined by the channel definitions are | 371 | * Return: %true if the channels defined by the channel definitions are |
368 | * identical, %false otherwise. | 372 | * identical, %false otherwise. |
369 | */ | 373 | */ |
370 | static inline bool | 374 | static inline bool |
@@ -382,7 +386,7 @@ cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1, | |||
382 | * @chandef1: first channel definition | 386 | * @chandef1: first channel definition |
383 | * @chandef2: second channel definition | 387 | * @chandef2: second channel definition |
384 | * | 388 | * |
385 | * Returns %NULL if the given channel definitions are incompatible, | 389 | * Return: %NULL if the given channel definitions are incompatible, |
386 | * chandef1 or chandef2 otherwise. | 390 | * chandef1 or chandef2 otherwise. |
387 | */ | 391 | */ |
388 | const struct cfg80211_chan_def * | 392 | const struct cfg80211_chan_def * |
@@ -392,6 +396,7 @@ cfg80211_chandef_compatible(const struct cfg80211_chan_def *chandef1, | |||
392 | /** | 396 | /** |
393 | * cfg80211_chandef_valid - check if a channel definition is valid | 397 | * cfg80211_chandef_valid - check if a channel definition is valid |
394 | * @chandef: the channel definition to check | 398 | * @chandef: the channel definition to check |
399 | * Return: %true if the channel definition is valid. %false otherwise. | ||
395 | */ | 400 | */ |
396 | bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef); | 401 | bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef); |
397 | 402 | ||
@@ -399,7 +404,8 @@ bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef); | |||
399 | * cfg80211_chandef_usable - check if secondary channels can be used | 404 | * cfg80211_chandef_usable - check if secondary channels can be used |
400 | * @wiphy: the wiphy to validate against | 405 | * @wiphy: the wiphy to validate against |
401 | * @chandef: the channel definition to check | 406 | * @chandef: the channel definition to check |
402 | * @prohibited_flags: the regulatory chanenl flags that must not be set | 407 | * @prohibited_flags: the regulatory channel flags that must not be set |
408 | * Return: %true if secondary channels are usable. %false otherwise. | ||
403 | */ | 409 | */ |
404 | bool cfg80211_chandef_usable(struct wiphy *wiphy, | 410 | bool cfg80211_chandef_usable(struct wiphy *wiphy, |
405 | const struct cfg80211_chan_def *chandef, | 411 | const struct cfg80211_chan_def *chandef, |
@@ -608,6 +614,8 @@ enum station_parameters_apply_mask { | |||
608 | * @sta_modify_mask: bitmap indicating which parameters changed | 614 | * @sta_modify_mask: bitmap indicating which parameters changed |
609 | * (for those that don't have a natural "no change" value), | 615 | * (for those that don't have a natural "no change" value), |
610 | * see &enum station_parameters_apply_mask | 616 | * see &enum station_parameters_apply_mask |
617 | * @local_pm: local link-specific mesh power save mode (no change when set | ||
618 | * to unknown) | ||
611 | */ | 619 | */ |
612 | struct station_parameters { | 620 | struct station_parameters { |
613 | u8 *supported_rates; | 621 | u8 *supported_rates; |
@@ -623,6 +631,7 @@ struct station_parameters { | |||
623 | struct ieee80211_vht_cap *vht_capa; | 631 | struct ieee80211_vht_cap *vht_capa; |
624 | u8 uapsd_queues; | 632 | u8 uapsd_queues; |
625 | u8 max_sp; | 633 | u8 max_sp; |
634 | enum nl80211_mesh_power_mode local_pm; | ||
626 | }; | 635 | }; |
627 | 636 | ||
628 | /** | 637 | /** |
@@ -653,6 +662,9 @@ struct station_parameters { | |||
653 | * @STATION_INFO_STA_FLAGS: @sta_flags filled | 662 | * @STATION_INFO_STA_FLAGS: @sta_flags filled |
654 | * @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled | 663 | * @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled |
655 | * @STATION_INFO_T_OFFSET: @t_offset filled | 664 | * @STATION_INFO_T_OFFSET: @t_offset filled |
665 | * @STATION_INFO_LOCAL_PM: @local_pm filled | ||
666 | * @STATION_INFO_PEER_PM: @peer_pm filled | ||
667 | * @STATION_INFO_NONPEER_PM: @nonpeer_pm filled | ||
656 | */ | 668 | */ |
657 | enum station_info_flags { | 669 | enum station_info_flags { |
658 | STATION_INFO_INACTIVE_TIME = 1<<0, | 670 | STATION_INFO_INACTIVE_TIME = 1<<0, |
@@ -676,6 +688,9 @@ enum station_info_flags { | |||
676 | STATION_INFO_STA_FLAGS = 1<<18, | 688 | STATION_INFO_STA_FLAGS = 1<<18, |
677 | STATION_INFO_BEACON_LOSS_COUNT = 1<<19, | 689 | STATION_INFO_BEACON_LOSS_COUNT = 1<<19, |
678 | STATION_INFO_T_OFFSET = 1<<20, | 690 | STATION_INFO_T_OFFSET = 1<<20, |
691 | STATION_INFO_LOCAL_PM = 1<<21, | ||
692 | STATION_INFO_PEER_PM = 1<<22, | ||
693 | STATION_INFO_NONPEER_PM = 1<<23, | ||
679 | }; | 694 | }; |
680 | 695 | ||
681 | /** | 696 | /** |
@@ -789,6 +804,9 @@ struct sta_bss_parameters { | |||
789 | * @sta_flags: station flags mask & values | 804 | * @sta_flags: station flags mask & values |
790 | * @beacon_loss_count: Number of times beacon loss event has triggered. | 805 | * @beacon_loss_count: Number of times beacon loss event has triggered. |
791 | * @t_offset: Time offset of the station relative to this host. | 806 | * @t_offset: Time offset of the station relative to this host. |
807 | * @local_pm: local mesh STA power save mode | ||
808 | * @peer_pm: peer mesh STA power save mode | ||
809 | * @nonpeer_pm: non-peer mesh STA power save mode | ||
792 | */ | 810 | */ |
793 | struct station_info { | 811 | struct station_info { |
794 | u32 filled; | 812 | u32 filled; |
@@ -818,6 +836,9 @@ struct station_info { | |||
818 | 836 | ||
819 | u32 beacon_loss_count; | 837 | u32 beacon_loss_count; |
820 | s64 t_offset; | 838 | s64 t_offset; |
839 | enum nl80211_mesh_power_mode local_pm; | ||
840 | enum nl80211_mesh_power_mode peer_pm; | ||
841 | enum nl80211_mesh_power_mode nonpeer_pm; | ||
821 | 842 | ||
822 | /* | 843 | /* |
823 | * Note: Add a new enum station_info_flags value for each new field and | 844 | * Note: Add a new enum station_info_flags value for each new field and |
@@ -993,6 +1014,10 @@ struct bss_parameters { | |||
993 | * @dot11MeshHWMPconfirmationInterval: The minimum interval of time (in TUs) | 1014 | * @dot11MeshHWMPconfirmationInterval: The minimum interval of time (in TUs) |
994 | * during which a mesh STA can send only one Action frame containing | 1015 | * during which a mesh STA can send only one Action frame containing |
995 | * a PREQ element for root path confirmation. | 1016 | * a PREQ element for root path confirmation. |
1017 | * @power_mode: The default mesh power save mode which will be the initial | ||
1018 | * setting for new peer links. | ||
1019 | * @dot11MeshAwakeWindowDuration: The duration in TUs the STA will remain awake | ||
1020 | * after transmitting its beacon. | ||
996 | */ | 1021 | */ |
997 | struct mesh_config { | 1022 | struct mesh_config { |
998 | u16 dot11MeshRetryTimeout; | 1023 | u16 dot11MeshRetryTimeout; |
@@ -1020,6 +1045,8 @@ struct mesh_config { | |||
1020 | u32 dot11MeshHWMPactivePathToRootTimeout; | 1045 | u32 dot11MeshHWMPactivePathToRootTimeout; |
1021 | u16 dot11MeshHWMProotInterval; | 1046 | u16 dot11MeshHWMProotInterval; |
1022 | u16 dot11MeshHWMPconfirmationInterval; | 1047 | u16 dot11MeshHWMPconfirmationInterval; |
1048 | enum nl80211_mesh_power_mode power_mode; | ||
1049 | u16 dot11MeshAwakeWindowDuration; | ||
1023 | }; | 1050 | }; |
1024 | 1051 | ||
1025 | /** | 1052 | /** |
@@ -1034,6 +1061,8 @@ struct mesh_config { | |||
1034 | * @ie_len: length of vendor information elements | 1061 | * @ie_len: length of vendor information elements |
1035 | * @is_authenticated: this mesh requires authentication | 1062 | * @is_authenticated: this mesh requires authentication |
1036 | * @is_secure: this mesh uses security | 1063 | * @is_secure: this mesh uses security |
1064 | * @dtim_period: DTIM period to use | ||
1065 | * @beacon_interval: beacon interval to use | ||
1037 | * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a] | 1066 | * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a] |
1038 | * | 1067 | * |
1039 | * These parameters are fixed when the mesh is created. | 1068 | * These parameters are fixed when the mesh is created. |
@@ -1049,6 +1078,8 @@ struct mesh_setup { | |||
1049 | u8 ie_len; | 1078 | u8 ie_len; |
1050 | bool is_authenticated; | 1079 | bool is_authenticated; |
1051 | bool is_secure; | 1080 | bool is_secure; |
1081 | u8 dtim_period; | ||
1082 | u16 beacon_interval; | ||
1052 | int mcast_rate[IEEE80211_NUM_BANDS]; | 1083 | int mcast_rate[IEEE80211_NUM_BANDS]; |
1053 | }; | 1084 | }; |
1054 | 1085 | ||
@@ -1256,7 +1287,7 @@ struct cfg80211_bss { | |||
1256 | 1287 | ||
1257 | u8 bssid[ETH_ALEN]; | 1288 | u8 bssid[ETH_ALEN]; |
1258 | 1289 | ||
1259 | u8 priv[0] __attribute__((__aligned__(sizeof(void *)))); | 1290 | u8 priv[0] __aligned(sizeof(void *)); |
1260 | }; | 1291 | }; |
1261 | 1292 | ||
1262 | /** | 1293 | /** |
@@ -1266,7 +1297,7 @@ struct cfg80211_bss { | |||
1266 | * | 1297 | * |
1267 | * Note that the return value is an RCU-protected pointer, so | 1298 | * Note that the return value is an RCU-protected pointer, so |
1268 | * rcu_read_lock() must be held when calling this function. | 1299 | * rcu_read_lock() must be held when calling this function. |
1269 | * Returns %NULL if not found. | 1300 | * Return: %NULL if not found. |
1270 | */ | 1301 | */ |
1271 | const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie); | 1302 | const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie); |
1272 | 1303 | ||
@@ -1434,6 +1465,7 @@ struct cfg80211_ibss_params { | |||
1434 | * @ie: IEs for association request | 1465 | * @ie: IEs for association request |
1435 | * @ie_len: Length of assoc_ie in octets | 1466 | * @ie_len: Length of assoc_ie in octets |
1436 | * @privacy: indicates whether privacy-enabled APs should be used | 1467 | * @privacy: indicates whether privacy-enabled APs should be used |
1468 | * @mfp: indicate whether management frame protection is used | ||
1437 | * @crypto: crypto settings | 1469 | * @crypto: crypto settings |
1438 | * @key_len: length of WEP key for shared key authentication | 1470 | * @key_len: length of WEP key for shared key authentication |
1439 | * @key_idx: index of WEP key for shared key authentication | 1471 | * @key_idx: index of WEP key for shared key authentication |
@@ -1454,6 +1486,7 @@ struct cfg80211_connect_params { | |||
1454 | u8 *ie; | 1486 | u8 *ie; |
1455 | size_t ie_len; | 1487 | size_t ie_len; |
1456 | bool privacy; | 1488 | bool privacy; |
1489 | enum nl80211_mfp mfp; | ||
1457 | struct cfg80211_crypto_settings crypto; | 1490 | struct cfg80211_crypto_settings crypto; |
1458 | const u8 *key; | 1491 | const u8 *key; |
1459 | u8 key_len, key_idx; | 1492 | u8 key_len, key_idx; |
@@ -2092,6 +2125,7 @@ struct ieee80211_iface_limit { | |||
2092 | * @beacon_int_infra_match: In this combination, the beacon intervals | 2125 | * @beacon_int_infra_match: In this combination, the beacon intervals |
2093 | * between infrastructure and AP types must match. This is required | 2126 | * between infrastructure and AP types must match. This is required |
2094 | * only in special cases. | 2127 | * only in special cases. |
2128 | * @radar_detect_widths: bitmap of channel widths supported for radar detection | ||
2095 | * | 2129 | * |
2096 | * These examples can be expressed as follows: | 2130 | * These examples can be expressed as follows: |
2097 | * | 2131 | * |
@@ -2144,6 +2178,7 @@ struct ieee80211_iface_combination { | |||
2144 | u16 max_interfaces; | 2178 | u16 max_interfaces; |
2145 | u8 n_limits; | 2179 | u8 n_limits; |
2146 | bool beacon_int_infra_match; | 2180 | bool beacon_int_infra_match; |
2181 | u8 radar_detect_widths; | ||
2147 | }; | 2182 | }; |
2148 | 2183 | ||
2149 | struct mac_address { | 2184 | struct mac_address { |
@@ -2364,12 +2399,12 @@ struct wiphy { | |||
2364 | struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS]; | 2399 | struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS]; |
2365 | 2400 | ||
2366 | /* Lets us get back the wiphy on the callback */ | 2401 | /* Lets us get back the wiphy on the callback */ |
2367 | int (*reg_notifier)(struct wiphy *wiphy, | 2402 | void (*reg_notifier)(struct wiphy *wiphy, |
2368 | struct regulatory_request *request); | 2403 | struct regulatory_request *request); |
2369 | 2404 | ||
2370 | /* fields below are read-only, assigned by cfg80211 */ | 2405 | /* fields below are read-only, assigned by cfg80211 */ |
2371 | 2406 | ||
2372 | const struct ieee80211_regdomain *regd; | 2407 | const struct ieee80211_regdomain __rcu *regd; |
2373 | 2408 | ||
2374 | /* the item in /sys/class/ieee80211/ points to this, | 2409 | /* the item in /sys/class/ieee80211/ points to this, |
2375 | * you need use set_wiphy_dev() (see below) */ | 2410 | * you need use set_wiphy_dev() (see below) */ |
@@ -2392,7 +2427,7 @@ struct wiphy { | |||
2392 | const struct iw_handler_def *wext; | 2427 | const struct iw_handler_def *wext; |
2393 | #endif | 2428 | #endif |
2394 | 2429 | ||
2395 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); | 2430 | char priv[0] __aligned(NETDEV_ALIGN); |
2396 | }; | 2431 | }; |
2397 | 2432 | ||
2398 | static inline struct net *wiphy_net(struct wiphy *wiphy) | 2433 | static inline struct net *wiphy_net(struct wiphy *wiphy) |
@@ -2409,6 +2444,7 @@ static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) | |||
2409 | * wiphy_priv - return priv from wiphy | 2444 | * wiphy_priv - return priv from wiphy |
2410 | * | 2445 | * |
2411 | * @wiphy: the wiphy whose priv pointer to return | 2446 | * @wiphy: the wiphy whose priv pointer to return |
2447 | * Return: The priv of @wiphy. | ||
2412 | */ | 2448 | */ |
2413 | static inline void *wiphy_priv(struct wiphy *wiphy) | 2449 | static inline void *wiphy_priv(struct wiphy *wiphy) |
2414 | { | 2450 | { |
@@ -2420,6 +2456,7 @@ static inline void *wiphy_priv(struct wiphy *wiphy) | |||
2420 | * priv_to_wiphy - return the wiphy containing the priv | 2456 | * priv_to_wiphy - return the wiphy containing the priv |
2421 | * | 2457 | * |
2422 | * @priv: a pointer previously returned by wiphy_priv | 2458 | * @priv: a pointer previously returned by wiphy_priv |
2459 | * Return: The wiphy of @priv. | ||
2423 | */ | 2460 | */ |
2424 | static inline struct wiphy *priv_to_wiphy(void *priv) | 2461 | static inline struct wiphy *priv_to_wiphy(void *priv) |
2425 | { | 2462 | { |
@@ -2442,6 +2479,7 @@ static inline void set_wiphy_dev(struct wiphy *wiphy, struct device *dev) | |||
2442 | * wiphy_dev - get wiphy dev pointer | 2479 | * wiphy_dev - get wiphy dev pointer |
2443 | * | 2480 | * |
2444 | * @wiphy: The wiphy whose device struct to look up | 2481 | * @wiphy: The wiphy whose device struct to look up |
2482 | * Return: The dev of @wiphy. | ||
2445 | */ | 2483 | */ |
2446 | static inline struct device *wiphy_dev(struct wiphy *wiphy) | 2484 | static inline struct device *wiphy_dev(struct wiphy *wiphy) |
2447 | { | 2485 | { |
@@ -2452,6 +2490,7 @@ static inline struct device *wiphy_dev(struct wiphy *wiphy) | |||
2452 | * wiphy_name - get wiphy name | 2490 | * wiphy_name - get wiphy name |
2453 | * | 2491 | * |
2454 | * @wiphy: The wiphy whose name to return | 2492 | * @wiphy: The wiphy whose name to return |
2493 | * Return: The name of @wiphy. | ||
2455 | */ | 2494 | */ |
2456 | static inline const char *wiphy_name(const struct wiphy *wiphy) | 2495 | static inline const char *wiphy_name(const struct wiphy *wiphy) |
2457 | { | 2496 | { |
@@ -2467,8 +2506,8 @@ static inline const char *wiphy_name(const struct wiphy *wiphy) | |||
2467 | * Create a new wiphy and associate the given operations with it. | 2506 | * Create a new wiphy and associate the given operations with it. |
2468 | * @sizeof_priv bytes are allocated for private use. | 2507 | * @sizeof_priv bytes are allocated for private use. |
2469 | * | 2508 | * |
2470 | * The returned pointer must be assigned to each netdev's | 2509 | * Return: A pointer to the new wiphy. This pointer must be |
2471 | * ieee80211_ptr for proper operation. | 2510 | * assigned to each netdev's ieee80211_ptr for proper operation. |
2472 | */ | 2511 | */ |
2473 | struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv); | 2512 | struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv); |
2474 | 2513 | ||
@@ -2477,7 +2516,7 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv); | |||
2477 | * | 2516 | * |
2478 | * @wiphy: The wiphy to register. | 2517 | * @wiphy: The wiphy to register. |
2479 | * | 2518 | * |
2480 | * Returns a non-negative wiphy index or a negative error code. | 2519 | * Return: A non-negative wiphy index or a negative error code. |
2481 | */ | 2520 | */ |
2482 | extern int wiphy_register(struct wiphy *wiphy); | 2521 | extern int wiphy_register(struct wiphy *wiphy); |
2483 | 2522 | ||
@@ -2626,6 +2665,7 @@ static inline u8 *wdev_address(struct wireless_dev *wdev) | |||
2626 | * wdev_priv - return wiphy priv from wireless_dev | 2665 | * wdev_priv - return wiphy priv from wireless_dev |
2627 | * | 2666 | * |
2628 | * @wdev: The wireless device whose wiphy's priv pointer to return | 2667 | * @wdev: The wireless device whose wiphy's priv pointer to return |
2668 | * Return: The wiphy priv of @wdev. | ||
2629 | */ | 2669 | */ |
2630 | static inline void *wdev_priv(struct wireless_dev *wdev) | 2670 | static inline void *wdev_priv(struct wireless_dev *wdev) |
2631 | { | 2671 | { |
@@ -2643,12 +2683,14 @@ static inline void *wdev_priv(struct wireless_dev *wdev) | |||
2643 | * ieee80211_channel_to_frequency - convert channel number to frequency | 2683 | * ieee80211_channel_to_frequency - convert channel number to frequency |
2644 | * @chan: channel number | 2684 | * @chan: channel number |
2645 | * @band: band, necessary due to channel number overlap | 2685 | * @band: band, necessary due to channel number overlap |
2686 | * Return: The corresponding frequency (in MHz), or 0 if the conversion failed. | ||
2646 | */ | 2687 | */ |
2647 | extern int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band); | 2688 | extern int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band); |
2648 | 2689 | ||
2649 | /** | 2690 | /** |
2650 | * ieee80211_frequency_to_channel - convert frequency to channel number | 2691 | * ieee80211_frequency_to_channel - convert frequency to channel number |
2651 | * @freq: center frequency | 2692 | * @freq: center frequency |
2693 | * Return: The corresponding channel, or 0 if the conversion failed. | ||
2652 | */ | 2694 | */ |
2653 | extern int ieee80211_frequency_to_channel(int freq); | 2695 | extern int ieee80211_frequency_to_channel(int freq); |
2654 | 2696 | ||
@@ -2665,6 +2707,7 @@ extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, | |||
2665 | * ieee80211_get_channel - get channel struct from wiphy for specified frequency | 2707 | * ieee80211_get_channel - get channel struct from wiphy for specified frequency |
2666 | * @wiphy: the struct wiphy to get the channel for | 2708 | * @wiphy: the struct wiphy to get the channel for |
2667 | * @freq: the center frequency of the channel | 2709 | * @freq: the center frequency of the channel |
2710 | * Return: The channel struct from @wiphy at @freq. | ||
2668 | */ | 2711 | */ |
2669 | static inline struct ieee80211_channel * | 2712 | static inline struct ieee80211_channel * |
2670 | ieee80211_get_channel(struct wiphy *wiphy, int freq) | 2713 | ieee80211_get_channel(struct wiphy *wiphy, int freq) |
@@ -2679,10 +2722,10 @@ ieee80211_get_channel(struct wiphy *wiphy, int freq) | |||
2679 | * @basic_rates: bitmap of basic rates | 2722 | * @basic_rates: bitmap of basic rates |
2680 | * @bitrate: the bitrate for which to find the basic rate | 2723 | * @bitrate: the bitrate for which to find the basic rate |
2681 | * | 2724 | * |
2682 | * This function returns the basic rate corresponding to a given | 2725 | * Return: The basic rate corresponding to a given bitrate, that |
2683 | * bitrate, that is the next lower bitrate contained in the basic | 2726 | * is the next lower bitrate contained in the basic rate map, |
2684 | * rate map, which is, for this function, given as a bitmap of | 2727 | * which is, for this function, given as a bitmap of indices of |
2685 | * indices of rates in the band's bitrate table. | 2728 | * rates in the band's bitrate table. |
2686 | */ | 2729 | */ |
2687 | struct ieee80211_rate * | 2730 | struct ieee80211_rate * |
2688 | ieee80211_get_response_rate(struct ieee80211_supported_band *sband, | 2731 | ieee80211_get_response_rate(struct ieee80211_supported_band *sband, |
@@ -2775,18 +2818,21 @@ extern const unsigned char bridge_tunnel_header[6]; | |||
2775 | /** | 2818 | /** |
2776 | * ieee80211_get_hdrlen_from_skb - get header length from data | 2819 | * ieee80211_get_hdrlen_from_skb - get header length from data |
2777 | * | 2820 | * |
2821 | * @skb: the frame | ||
2822 | * | ||
2778 | * Given an skb with a raw 802.11 header at the data pointer this function | 2823 | * Given an skb with a raw 802.11 header at the data pointer this function |
2779 | * returns the 802.11 header length in bytes (not including encryption | 2824 | * returns the 802.11 header length. |
2780 | * headers). If the data in the sk_buff is too short to contain a valid 802.11 | ||
2781 | * header the function returns 0. | ||
2782 | * | 2825 | * |
2783 | * @skb: the frame | 2826 | * Return: The 802.11 header length in bytes (not including encryption |
2827 | * headers). Or 0 if the data in the sk_buff is too short to contain a valid | ||
2828 | * 802.11 header. | ||
2784 | */ | 2829 | */ |
2785 | unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); | 2830 | unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); |
2786 | 2831 | ||
2787 | /** | 2832 | /** |
2788 | * ieee80211_hdrlen - get header length in bytes from frame control | 2833 | * ieee80211_hdrlen - get header length in bytes from frame control |
2789 | * @fc: frame control field in little-endian format | 2834 | * @fc: frame control field in little-endian format |
2835 | * Return: The header length in bytes. | ||
2790 | */ | 2836 | */ |
2791 | unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc); | 2837 | unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc); |
2792 | 2838 | ||
@@ -2794,7 +2840,7 @@ unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc); | |||
2794 | * ieee80211_get_mesh_hdrlen - get mesh extension header length | 2840 | * ieee80211_get_mesh_hdrlen - get mesh extension header length |
2795 | * @meshhdr: the mesh extension header, only the flags field | 2841 | * @meshhdr: the mesh extension header, only the flags field |
2796 | * (first byte) will be accessed | 2842 | * (first byte) will be accessed |
2797 | * Returns the length of the extension header, which is always at | 2843 | * Return: The length of the extension header, which is always at |
2798 | * least 6 bytes and at most 18 if address 5 and 6 are present. | 2844 | * least 6 bytes and at most 18 if address 5 and 6 are present. |
2799 | */ | 2845 | */ |
2800 | unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr); | 2846 | unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr); |
@@ -2812,6 +2858,7 @@ unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr); | |||
2812 | * @skb: the 802.11 data frame | 2858 | * @skb: the 802.11 data frame |
2813 | * @addr: the device MAC address | 2859 | * @addr: the device MAC address |
2814 | * @iftype: the virtual interface type | 2860 | * @iftype: the virtual interface type |
2861 | * Return: 0 on success. Non-zero on error. | ||
2815 | */ | 2862 | */ |
2816 | int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, | 2863 | int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, |
2817 | enum nl80211_iftype iftype); | 2864 | enum nl80211_iftype iftype); |
@@ -2823,6 +2870,7 @@ int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, | |||
2823 | * @iftype: the virtual interface type | 2870 | * @iftype: the virtual interface type |
2824 | * @bssid: the network bssid (used only for iftype STATION and ADHOC) | 2871 | * @bssid: the network bssid (used only for iftype STATION and ADHOC) |
2825 | * @qos: build 802.11 QoS data frame | 2872 | * @qos: build 802.11 QoS data frame |
2873 | * Return: 0 on success, or a negative error code. | ||
2826 | */ | 2874 | */ |
2827 | int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr, | 2875 | int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr, |
2828 | enum nl80211_iftype iftype, u8 *bssid, bool qos); | 2876 | enum nl80211_iftype iftype, u8 *bssid, bool qos); |
@@ -2850,6 +2898,7 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, | |||
2850 | /** | 2898 | /** |
2851 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame | 2899 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame |
2852 | * @skb: the data frame | 2900 | * @skb: the data frame |
2901 | * Return: The 802.1p/1d tag. | ||
2853 | */ | 2902 | */ |
2854 | unsigned int cfg80211_classify8021d(struct sk_buff *skb); | 2903 | unsigned int cfg80211_classify8021d(struct sk_buff *skb); |
2855 | 2904 | ||
@@ -2860,12 +2909,13 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb); | |||
2860 | * @ies: data consisting of IEs | 2909 | * @ies: data consisting of IEs |
2861 | * @len: length of data | 2910 | * @len: length of data |
2862 | * | 2911 | * |
2863 | * This function will return %NULL if the element ID could | 2912 | * Return: %NULL if the element ID could not be found or if |
2864 | * not be found or if the element is invalid (claims to be | 2913 | * the element is invalid (claims to be longer than the given |
2865 | * longer than the given data), or a pointer to the first byte | 2914 | * data), or a pointer to the first byte of the requested |
2866 | * of the requested element, that is the byte containing the | 2915 | * element, that is the byte containing the element ID. |
2867 | * element ID. There are no checks on the element length | 2916 | * |
2868 | * other than having to fit into the given data. | 2917 | * Note: There are no checks on the element length other than |
2918 | * having to fit into the given data. | ||
2869 | */ | 2919 | */ |
2870 | const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len); | 2920 | const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len); |
2871 | 2921 | ||
@@ -2877,12 +2927,13 @@ const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len); | |||
2877 | * @ies: data consisting of IEs | 2927 | * @ies: data consisting of IEs |
2878 | * @len: length of data | 2928 | * @len: length of data |
2879 | * | 2929 | * |
2880 | * This function will return %NULL if the vendor specific element ID | 2930 | * Return: %NULL if the vendor specific element ID could not be found or if the |
2881 | * could not be found or if the element is invalid (claims to be | 2931 | * element is invalid (claims to be longer than the given data), or a pointer to |
2882 | * longer than the given data), or a pointer to the first byte | 2932 | * the first byte of the requested element, that is the byte containing the |
2883 | * of the requested element, that is the byte containing the | 2933 | * element ID. |
2884 | * element ID. There are no checks on the element length | 2934 | * |
2885 | * other than having to fit into the given data. | 2935 | * Note: There are no checks on the element length other than having to fit into |
2936 | * the given data. | ||
2886 | */ | 2937 | */ |
2887 | const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type, | 2938 | const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type, |
2888 | const u8 *ies, int len); | 2939 | const u8 *ies, int len); |
@@ -2915,6 +2966,8 @@ const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type, | |||
2915 | * | 2966 | * |
2916 | * Drivers should check the return value, its possible you can get | 2967 | * Drivers should check the return value, its possible you can get |
2917 | * an -ENOMEM. | 2968 | * an -ENOMEM. |
2969 | * | ||
2970 | * Return: 0 on success. -ENOMEM. | ||
2918 | */ | 2971 | */ |
2919 | extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2); | 2972 | extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2); |
2920 | 2973 | ||
@@ -2938,28 +2991,22 @@ extern void wiphy_apply_custom_regulatory( | |||
2938 | * freq_reg_info - get regulatory information for the given frequency | 2991 | * freq_reg_info - get regulatory information for the given frequency |
2939 | * @wiphy: the wiphy for which we want to process this rule for | 2992 | * @wiphy: the wiphy for which we want to process this rule for |
2940 | * @center_freq: Frequency in KHz for which we want regulatory information for | 2993 | * @center_freq: Frequency in KHz for which we want regulatory information for |
2941 | * @desired_bw_khz: the desired max bandwidth you want to use per | ||
2942 | * channel. Note that this is still 20 MHz if you want to use HT40 | ||
2943 | * as HT40 makes use of two channels for its 40 MHz width bandwidth. | ||
2944 | * If set to 0 we'll assume you want the standard 20 MHz. | ||
2945 | * @reg_rule: the regulatory rule which we have for this frequency | ||
2946 | * | 2994 | * |
2947 | * Use this function to get the regulatory rule for a specific frequency on | 2995 | * Use this function to get the regulatory rule for a specific frequency on |
2948 | * a given wireless device. If the device has a specific regulatory domain | 2996 | * a given wireless device. If the device has a specific regulatory domain |
2949 | * it wants to follow we respect that unless a country IE has been received | 2997 | * it wants to follow we respect that unless a country IE has been received |
2950 | * and processed already. | 2998 | * and processed already. |
2951 | * | 2999 | * |
2952 | * Returns 0 if it was able to find a valid regulatory rule which does | 3000 | * Return: A valid pointer, or, when an error occurs, for example if no rule |
2953 | * apply to the given center_freq otherwise it returns non-zero. It will | 3001 | * can be found, the return value is encoded using ERR_PTR(). Use IS_ERR() to |
2954 | * also return -ERANGE if we determine the given center_freq does not even have | 3002 | * check and PTR_ERR() to obtain the numeric return value. The numeric return |
2955 | * a regulatory rule for a frequency range in the center_freq's band. See | 3003 | * value will be -ERANGE if we determine the given center_freq does not even |
2956 | * freq_in_rule_band() for our current definition of a band -- this is purely | 3004 | * have a regulatory rule for a frequency range in the center_freq's band. |
2957 | * subjective and right now its 802.11 specific. | 3005 | * See freq_in_rule_band() for our current definition of a band -- this is |
3006 | * purely subjective and right now it's 802.11 specific. | ||
2958 | */ | 3007 | */ |
2959 | extern int freq_reg_info(struct wiphy *wiphy, | 3008 | const struct ieee80211_reg_rule *freq_reg_info(struct wiphy *wiphy, |
2960 | u32 center_freq, | 3009 | u32 center_freq); |
2961 | u32 desired_bw_khz, | ||
2962 | const struct ieee80211_reg_rule **reg_rule); | ||
2963 | 3010 | ||
2964 | /* | 3011 | /* |
2965 | * callbacks for asynchronous cfg80211 methods, notification | 3012 | * callbacks for asynchronous cfg80211 methods, notification |
@@ -3006,7 +3053,8 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy); | |||
3006 | * This informs cfg80211 that BSS information was found and | 3053 | * This informs cfg80211 that BSS information was found and |
3007 | * the BSS should be updated/added. | 3054 | * the BSS should be updated/added. |
3008 | * | 3055 | * |
3009 | * NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()! | 3056 | * Return: A referenced struct, must be released with cfg80211_put_bss()! |
3057 | * Or %NULL on error. | ||
3010 | */ | 3058 | */ |
3011 | struct cfg80211_bss * __must_check | 3059 | struct cfg80211_bss * __must_check |
3012 | cfg80211_inform_bss_frame(struct wiphy *wiphy, | 3060 | cfg80211_inform_bss_frame(struct wiphy *wiphy, |
@@ -3031,7 +3079,8 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, | |||
3031 | * This informs cfg80211 that BSS information was found and | 3079 | * This informs cfg80211 that BSS information was found and |
3032 | * the BSS should be updated/added. | 3080 | * the BSS should be updated/added. |
3033 | * | 3081 | * |
3034 | * NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()! | 3082 | * Return: A referenced struct, must be released with cfg80211_put_bss()! |
3083 | * Or %NULL on error. | ||
3035 | */ | 3084 | */ |
3036 | struct cfg80211_bss * __must_check | 3085 | struct cfg80211_bss * __must_check |
3037 | cfg80211_inform_bss(struct wiphy *wiphy, | 3086 | cfg80211_inform_bss(struct wiphy *wiphy, |
@@ -3308,16 +3357,18 @@ void wiphy_rfkill_stop_polling(struct wiphy *wiphy); | |||
3308 | * the testmode command. Since it is intended for a reply, calling | 3357 | * the testmode command. Since it is intended for a reply, calling |
3309 | * it outside of the @testmode_cmd operation is invalid. | 3358 | * it outside of the @testmode_cmd operation is invalid. |
3310 | * | 3359 | * |
3311 | * The returned skb (or %NULL if any errors happen) is pre-filled | 3360 | * The returned skb is pre-filled with the wiphy index and set up in |
3312 | * with the wiphy index and set up in a way that any data that is | 3361 | * a way that any data that is put into the skb (with skb_put(), |
3313 | * put into the skb (with skb_put(), nla_put() or similar) will end | 3362 | * nla_put() or similar) will end up being within the |
3314 | * up being within the %NL80211_ATTR_TESTDATA attribute, so all that | 3363 | * %NL80211_ATTR_TESTDATA attribute, so all that needs to be done |
3315 | * needs to be done with the skb is adding data for the corresponding | 3364 | * with the skb is adding data for the corresponding userspace tool |
3316 | * userspace tool which can then read that data out of the testdata | 3365 | * which can then read that data out of the testdata attribute. You |
3317 | * attribute. You must not modify the skb in any other way. | 3366 | * must not modify the skb in any other way. |
3318 | * | 3367 | * |
3319 | * When done, call cfg80211_testmode_reply() with the skb and return | 3368 | * When done, call cfg80211_testmode_reply() with the skb and return |
3320 | * its error code as the result of the @testmode_cmd operation. | 3369 | * its error code as the result of the @testmode_cmd operation. |
3370 | * | ||
3371 | * Return: An allocated and pre-filled skb. %NULL if any errors happen. | ||
3321 | */ | 3372 | */ |
3322 | struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy, | 3373 | struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy, |
3323 | int approxlen); | 3374 | int approxlen); |
@@ -3327,11 +3378,12 @@ struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy, | |||
3327 | * @skb: The skb, must have been allocated with | 3378 | * @skb: The skb, must have been allocated with |
3328 | * cfg80211_testmode_alloc_reply_skb() | 3379 | * cfg80211_testmode_alloc_reply_skb() |
3329 | * | 3380 | * |
3330 | * Returns an error code or 0 on success, since calling this | 3381 | * Since calling this function will usually be the last thing |
3331 | * function will usually be the last thing before returning | 3382 | * before returning from the @testmode_cmd you should return |
3332 | * from the @testmode_cmd you should return the error code. | 3383 | * the error code. Note that this function consumes the skb |
3333 | * Note that this function consumes the skb regardless of the | 3384 | * regardless of the return value. |
3334 | * return value. | 3385 | * |
3386 | * Return: An error code or 0 on success. | ||
3335 | */ | 3387 | */ |
3336 | int cfg80211_testmode_reply(struct sk_buff *skb); | 3388 | int cfg80211_testmode_reply(struct sk_buff *skb); |
3337 | 3389 | ||
@@ -3345,14 +3397,16 @@ int cfg80211_testmode_reply(struct sk_buff *skb); | |||
3345 | * This function allocates and pre-fills an skb for an event on the | 3397 | * This function allocates and pre-fills an skb for an event on the |
3346 | * testmode multicast group. | 3398 | * testmode multicast group. |
3347 | * | 3399 | * |
3348 | * The returned skb (or %NULL if any errors happen) is set up in the | 3400 | * The returned skb is set up in the same way as with |
3349 | * same way as with cfg80211_testmode_alloc_reply_skb() but prepared | 3401 | * cfg80211_testmode_alloc_reply_skb() but prepared for an event. As |
3350 | * for an event. As there, you should simply add data to it that will | 3402 | * there, you should simply add data to it that will then end up in the |
3351 | * then end up in the %NL80211_ATTR_TESTDATA attribute. Again, you must | 3403 | * %NL80211_ATTR_TESTDATA attribute. Again, you must not modify the skb |
3352 | * not modify the skb in any other way. | 3404 | * in any other way. |
3353 | * | 3405 | * |
3354 | * When done filling the skb, call cfg80211_testmode_event() with the | 3406 | * When done filling the skb, call cfg80211_testmode_event() with the |
3355 | * skb to send the event. | 3407 | * skb to send the event. |
3408 | * | ||
3409 | * Return: An allocated and pre-filled skb. %NULL if any errors happen. | ||
3356 | */ | 3410 | */ |
3357 | struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy, | 3411 | struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy, |
3358 | int approxlen, gfp_t gfp); | 3412 | int approxlen, gfp_t gfp); |
@@ -3533,13 +3587,13 @@ void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr, | |||
3533 | * @len: length of the frame data | 3587 | * @len: length of the frame data |
3534 | * @gfp: context flags | 3588 | * @gfp: context flags |
3535 | * | 3589 | * |
3536 | * Returns %true if a user space application has registered for this frame. | 3590 | * This function is called whenever an Action frame is received for a station |
3591 | * mode interface, but is not processed in kernel. | ||
3592 | * | ||
3593 | * Return: %true if a user space application has registered for this frame. | ||
3537 | * For action frames, that makes it responsible for rejecting unrecognized | 3594 | * For action frames, that makes it responsible for rejecting unrecognized |
3538 | * action frames; %false otherwise, in which case for action frames the | 3595 | * action frames; %false otherwise, in which case for action frames the |
3539 | * driver is responsible for rejecting the frame. | 3596 | * driver is responsible for rejecting the frame. |
3540 | * | ||
3541 | * This function is called whenever an Action frame is received for a station | ||
3542 | * mode interface, but is not processed in kernel. | ||
3543 | */ | 3597 | */ |
3544 | bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm, | 3598 | bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm, |
3545 | const u8 *buf, size_t len, gfp_t gfp); | 3599 | const u8 *buf, size_t len, gfp_t gfp); |
@@ -3631,7 +3685,7 @@ void cfg80211_pmksa_candidate_notify(struct net_device *dev, int index, | |||
3631 | * This function is used in AP mode (only!) to inform userspace that | 3685 | * This function is used in AP mode (only!) to inform userspace that |
3632 | * a spurious class 3 frame was received, to be able to deauth the | 3686 | * a spurious class 3 frame was received, to be able to deauth the |
3633 | * sender. | 3687 | * sender. |
3634 | * Returns %true if the frame was passed to userspace (or this failed | 3688 | * Return: %true if the frame was passed to userspace (or this failed |
3635 | * for a reason other than not having a subscription.) | 3689 | * for a reason other than not having a subscription.) |
3636 | */ | 3690 | */ |
3637 | bool cfg80211_rx_spurious_frame(struct net_device *dev, | 3691 | bool cfg80211_rx_spurious_frame(struct net_device *dev, |
@@ -3647,7 +3701,7 @@ bool cfg80211_rx_spurious_frame(struct net_device *dev, | |||
3647 | * an associated station sent a 4addr frame but that wasn't expected. | 3701 | * an associated station sent a 4addr frame but that wasn't expected. |
3648 | * It is allowed and desirable to send this event only once for each | 3702 | * It is allowed and desirable to send this event only once for each |
3649 | * station to avoid event flooding. | 3703 | * station to avoid event flooding. |
3650 | * Returns %true if the frame was passed to userspace (or this failed | 3704 | * Return: %true if the frame was passed to userspace (or this failed |
3651 | * for a reason other than not having a subscription.) | 3705 | * for a reason other than not having a subscription.) |
3652 | */ | 3706 | */ |
3653 | bool cfg80211_rx_unexpected_4addr_frame(struct net_device *dev, | 3707 | bool cfg80211_rx_unexpected_4addr_frame(struct net_device *dev, |
@@ -3685,8 +3739,8 @@ void cfg80211_report_obss_beacon(struct wiphy *wiphy, | |||
3685 | * @wiphy: the wiphy | 3739 | * @wiphy: the wiphy |
3686 | * @chandef: the channel definition | 3740 | * @chandef: the channel definition |
3687 | * | 3741 | * |
3688 | * This function returns true if there is no secondary channel or the secondary | 3742 | * Return: %true if there is no secondary channel or the secondary channel(s) |
3689 | * channel(s) can be used for beaconing (i.e. is not a radar channel etc.) | 3743 | * can be used for beaconing (i.e. is not a radar channel etc.) |
3690 | */ | 3744 | */ |
3691 | bool cfg80211_reg_can_beacon(struct wiphy *wiphy, | 3745 | bool cfg80211_reg_can_beacon(struct wiphy *wiphy, |
3692 | struct cfg80211_chan_def *chandef); | 3746 | struct cfg80211_chan_def *chandef); |
@@ -3756,9 +3810,9 @@ void cfg80211_unregister_wdev(struct wireless_dev *wdev); | |||
3756 | * The function finds a given P2P attribute in the (vendor) IEs and | 3810 | * The function finds a given P2P attribute in the (vendor) IEs and |
3757 | * copies its contents to the given buffer. | 3811 | * copies its contents to the given buffer. |
3758 | * | 3812 | * |
3759 | * The return value is a negative error code (-%EILSEQ or -%ENOENT) if | 3813 | * Return: A negative error code (-%EILSEQ or -%ENOENT) if the data is |
3760 | * the data is malformed or the attribute can't be found (respectively), | 3814 | * malformed or the attribute can't be found (respectively), or the |
3761 | * or the length of the found attribute (which can be zero). | 3815 | * length of the found attribute (which can be zero). |
3762 | */ | 3816 | */ |
3763 | int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len, | 3817 | int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len, |
3764 | enum ieee80211_p2p_attr_id attr, | 3818 | enum ieee80211_p2p_attr_id attr, |