aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorYacine Belkadi <yacine.belkadi.1@gmail.com>2013-01-12 07:54:14 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-16 09:14:18 -0500
commit0ae997dc75efb60d47f0c71890f1e972f7d462c1 (patch)
tree3c1cae75c2c630947f876c8d09afa6b69beb6367 /include/net/cfg80211.h
parent0c0280bd0ba410326eecdaeb1b936696eda6381d (diff)
{cfg,mac}80211.h: fix some kernel-doc warnings
When building the 80211 DocBook, scripts/kernel-doc reports the following type of warnings: Warning(include/net/cfg80211.h:334): No description found for return value of 'cfg80211_get_chandef_type' These warnings are only reported when scripts/kernel-doc runs in verbose mode. To fix these use "Return:" to describe function return values. Signed-off-by: Yacine Belkadi <yacine.belkadi.1@gmail.com> [adjust for freq_reg_info() change] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h159
1 files changed, 93 insertions, 66 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 4275127da05a..3d8717a0d3b2 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -326,7 +326,7 @@ struct cfg80211_chan_def {
326 * cfg80211_get_chandef_type - return old channel type from chandef 326 * cfg80211_get_chandef_type - return old channel type from chandef
327 * @chandef: the channel definition 327 * @chandef: the channel definition
328 * 328 *
329 * Returns the old channel type (NOHT, HT20, HT40+/-) from a given 329 * Return: The old channel type (NOHT, HT20, HT40+/-) from a given
330 * chandef, which must have a bandwidth allowing this conversion. 330 * chandef, which must have a bandwidth allowing this conversion.
331 */ 331 */
332static inline enum nl80211_channel_type 332static inline enum nl80211_channel_type
@@ -364,7 +364,7 @@ void cfg80211_chandef_create(struct cfg80211_chan_def *chandef,
364 * @chandef1: first channel definition 364 * @chandef1: first channel definition
365 * @chandef2: second channel definition 365 * @chandef2: second channel definition
366 * 366 *
367 * Returns %true if the channels defined by the channel definitions are 367 * Return: %true if the channels defined by the channel definitions are
368 * identical, %false otherwise. 368 * identical, %false otherwise.
369 */ 369 */
370static inline bool 370static inline bool
@@ -382,7 +382,7 @@ cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1,
382 * @chandef1: first channel definition 382 * @chandef1: first channel definition
383 * @chandef2: second channel definition 383 * @chandef2: second channel definition
384 * 384 *
385 * Returns %NULL if the given channel definitions are incompatible, 385 * Return: %NULL if the given channel definitions are incompatible,
386 * chandef1 or chandef2 otherwise. 386 * chandef1 or chandef2 otherwise.
387 */ 387 */
388const struct cfg80211_chan_def * 388const struct cfg80211_chan_def *
@@ -392,6 +392,7 @@ cfg80211_chandef_compatible(const struct cfg80211_chan_def *chandef1,
392/** 392/**
393 * cfg80211_chandef_valid - check if a channel definition is valid 393 * cfg80211_chandef_valid - check if a channel definition is valid
394 * @chandef: the channel definition to check 394 * @chandef: the channel definition to check
395 * Return: %true if the channel definition is valid. %false otherwise.
395 */ 396 */
396bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef); 397bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef);
397 398
@@ -399,7 +400,8 @@ bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef);
399 * cfg80211_chandef_usable - check if secondary channels can be used 400 * cfg80211_chandef_usable - check if secondary channels can be used
400 * @wiphy: the wiphy to validate against 401 * @wiphy: the wiphy to validate against
401 * @chandef: the channel definition to check 402 * @chandef: the channel definition to check
402 * @prohibited_flags: the regulatory chanenl flags that must not be set 403 * @prohibited_flags: the regulatory channel flags that must not be set
404 * Return: %true if secondary channels are usable. %false otherwise.
403 */ 405 */
404bool cfg80211_chandef_usable(struct wiphy *wiphy, 406bool cfg80211_chandef_usable(struct wiphy *wiphy,
405 const struct cfg80211_chan_def *chandef, 407 const struct cfg80211_chan_def *chandef,
@@ -1266,7 +1268,7 @@ struct cfg80211_bss {
1266 * 1268 *
1267 * Note that the return value is an RCU-protected pointer, so 1269 * Note that the return value is an RCU-protected pointer, so
1268 * rcu_read_lock() must be held when calling this function. 1270 * rcu_read_lock() must be held when calling this function.
1269 * Returns %NULL if not found. 1271 * Return: %NULL if not found.
1270 */ 1272 */
1271const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie); 1273const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie);
1272 1274
@@ -2409,6 +2411,7 @@ static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net)
2409 * wiphy_priv - return priv from wiphy 2411 * wiphy_priv - return priv from wiphy
2410 * 2412 *
2411 * @wiphy: the wiphy whose priv pointer to return 2413 * @wiphy: the wiphy whose priv pointer to return
2414 * Return: The priv of @wiphy.
2412 */ 2415 */
2413static inline void *wiphy_priv(struct wiphy *wiphy) 2416static inline void *wiphy_priv(struct wiphy *wiphy)
2414{ 2417{
@@ -2420,6 +2423,7 @@ static inline void *wiphy_priv(struct wiphy *wiphy)
2420 * priv_to_wiphy - return the wiphy containing the priv 2423 * priv_to_wiphy - return the wiphy containing the priv
2421 * 2424 *
2422 * @priv: a pointer previously returned by wiphy_priv 2425 * @priv: a pointer previously returned by wiphy_priv
2426 * Return: The wiphy of @priv.
2423 */ 2427 */
2424static inline struct wiphy *priv_to_wiphy(void *priv) 2428static inline struct wiphy *priv_to_wiphy(void *priv)
2425{ 2429{
@@ -2442,6 +2446,7 @@ static inline void set_wiphy_dev(struct wiphy *wiphy, struct device *dev)
2442 * wiphy_dev - get wiphy dev pointer 2446 * wiphy_dev - get wiphy dev pointer
2443 * 2447 *
2444 * @wiphy: The wiphy whose device struct to look up 2448 * @wiphy: The wiphy whose device struct to look up
2449 * Return: The dev of @wiphy.
2445 */ 2450 */
2446static inline struct device *wiphy_dev(struct wiphy *wiphy) 2451static inline struct device *wiphy_dev(struct wiphy *wiphy)
2447{ 2452{
@@ -2452,6 +2457,7 @@ static inline struct device *wiphy_dev(struct wiphy *wiphy)
2452 * wiphy_name - get wiphy name 2457 * wiphy_name - get wiphy name
2453 * 2458 *
2454 * @wiphy: The wiphy whose name to return 2459 * @wiphy: The wiphy whose name to return
2460 * Return: The name of @wiphy.
2455 */ 2461 */
2456static inline const char *wiphy_name(const struct wiphy *wiphy) 2462static inline const char *wiphy_name(const struct wiphy *wiphy)
2457{ 2463{
@@ -2467,8 +2473,8 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
2467 * Create a new wiphy and associate the given operations with it. 2473 * Create a new wiphy and associate the given operations with it.
2468 * @sizeof_priv bytes are allocated for private use. 2474 * @sizeof_priv bytes are allocated for private use.
2469 * 2475 *
2470 * The returned pointer must be assigned to each netdev's 2476 * Return: A pointer to the new wiphy. This pointer must be
2471 * ieee80211_ptr for proper operation. 2477 * assigned to each netdev's ieee80211_ptr for proper operation.
2472 */ 2478 */
2473struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv); 2479struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv);
2474 2480
@@ -2477,7 +2483,7 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv);
2477 * 2483 *
2478 * @wiphy: The wiphy to register. 2484 * @wiphy: The wiphy to register.
2479 * 2485 *
2480 * Returns a non-negative wiphy index or a negative error code. 2486 * Return: A non-negative wiphy index or a negative error code.
2481 */ 2487 */
2482extern int wiphy_register(struct wiphy *wiphy); 2488extern int wiphy_register(struct wiphy *wiphy);
2483 2489
@@ -2626,6 +2632,7 @@ static inline u8 *wdev_address(struct wireless_dev *wdev)
2626 * wdev_priv - return wiphy priv from wireless_dev 2632 * wdev_priv - return wiphy priv from wireless_dev
2627 * 2633 *
2628 * @wdev: The wireless device whose wiphy's priv pointer to return 2634 * @wdev: The wireless device whose wiphy's priv pointer to return
2635 * Return: The wiphy priv of @wdev.
2629 */ 2636 */
2630static inline void *wdev_priv(struct wireless_dev *wdev) 2637static inline void *wdev_priv(struct wireless_dev *wdev)
2631{ 2638{
@@ -2643,12 +2650,14 @@ static inline void *wdev_priv(struct wireless_dev *wdev)
2643 * ieee80211_channel_to_frequency - convert channel number to frequency 2650 * ieee80211_channel_to_frequency - convert channel number to frequency
2644 * @chan: channel number 2651 * @chan: channel number
2645 * @band: band, necessary due to channel number overlap 2652 * @band: band, necessary due to channel number overlap
2653 * Return: The corresponding frequency (in MHz), or 0 if the conversion failed.
2646 */ 2654 */
2647extern int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band); 2655extern int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band);
2648 2656
2649/** 2657/**
2650 * ieee80211_frequency_to_channel - convert frequency to channel number 2658 * ieee80211_frequency_to_channel - convert frequency to channel number
2651 * @freq: center frequency 2659 * @freq: center frequency
2660 * Return: The corresponding channel, or 0 if the conversion failed.
2652 */ 2661 */
2653extern int ieee80211_frequency_to_channel(int freq); 2662extern int ieee80211_frequency_to_channel(int freq);
2654 2663
@@ -2665,6 +2674,7 @@ extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
2665 * ieee80211_get_channel - get channel struct from wiphy for specified frequency 2674 * ieee80211_get_channel - get channel struct from wiphy for specified frequency
2666 * @wiphy: the struct wiphy to get the channel for 2675 * @wiphy: the struct wiphy to get the channel for
2667 * @freq: the center frequency of the channel 2676 * @freq: the center frequency of the channel
2677 * Return: The channel struct from @wiphy at @freq.
2668 */ 2678 */
2669static inline struct ieee80211_channel * 2679static inline struct ieee80211_channel *
2670ieee80211_get_channel(struct wiphy *wiphy, int freq) 2680ieee80211_get_channel(struct wiphy *wiphy, int freq)
@@ -2679,10 +2689,10 @@ ieee80211_get_channel(struct wiphy *wiphy, int freq)
2679 * @basic_rates: bitmap of basic rates 2689 * @basic_rates: bitmap of basic rates
2680 * @bitrate: the bitrate for which to find the basic rate 2690 * @bitrate: the bitrate for which to find the basic rate
2681 * 2691 *
2682 * This function returns the basic rate corresponding to a given 2692 * Return: The basic rate corresponding to a given bitrate, that
2683 * bitrate, that is the next lower bitrate contained in the basic 2693 * is the next lower bitrate contained in the basic rate map,
2684 * rate map, which is, for this function, given as a bitmap of 2694 * which is, for this function, given as a bitmap of indices of
2685 * indices of rates in the band's bitrate table. 2695 * rates in the band's bitrate table.
2686 */ 2696 */
2687struct ieee80211_rate * 2697struct ieee80211_rate *
2688ieee80211_get_response_rate(struct ieee80211_supported_band *sband, 2698ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
@@ -2775,18 +2785,21 @@ extern const unsigned char bridge_tunnel_header[6];
2775/** 2785/**
2776 * ieee80211_get_hdrlen_from_skb - get header length from data 2786 * ieee80211_get_hdrlen_from_skb - get header length from data
2777 * 2787 *
2788 * @skb: the frame
2789 *
2778 * Given an skb with a raw 802.11 header at the data pointer this function 2790 * 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 2791 * 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 * 2792 *
2783 * @skb: the frame 2793 * Return: The 802.11 header length in bytes (not including encryption
2794 * headers). Or 0 if the data in the sk_buff is too short to contain a valid
2795 * 802.11 header.
2784 */ 2796 */
2785unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); 2797unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);
2786 2798
2787/** 2799/**
2788 * ieee80211_hdrlen - get header length in bytes from frame control 2800 * ieee80211_hdrlen - get header length in bytes from frame control
2789 * @fc: frame control field in little-endian format 2801 * @fc: frame control field in little-endian format
2802 * Return: The header length in bytes.
2790 */ 2803 */
2791unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc); 2804unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc);
2792 2805
@@ -2794,7 +2807,7 @@ unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc);
2794 * ieee80211_get_mesh_hdrlen - get mesh extension header length 2807 * ieee80211_get_mesh_hdrlen - get mesh extension header length
2795 * @meshhdr: the mesh extension header, only the flags field 2808 * @meshhdr: the mesh extension header, only the flags field
2796 * (first byte) will be accessed 2809 * (first byte) will be accessed
2797 * Returns the length of the extension header, which is always at 2810 * 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. 2811 * least 6 bytes and at most 18 if address 5 and 6 are present.
2799 */ 2812 */
2800unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr); 2813unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr);
@@ -2812,6 +2825,7 @@ unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr);
2812 * @skb: the 802.11 data frame 2825 * @skb: the 802.11 data frame
2813 * @addr: the device MAC address 2826 * @addr: the device MAC address
2814 * @iftype: the virtual interface type 2827 * @iftype: the virtual interface type
2828 * Return: 0 on success. Non-zero on error.
2815 */ 2829 */
2816int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, 2830int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
2817 enum nl80211_iftype iftype); 2831 enum nl80211_iftype iftype);
@@ -2823,6 +2837,7 @@ int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
2823 * @iftype: the virtual interface type 2837 * @iftype: the virtual interface type
2824 * @bssid: the network bssid (used only for iftype STATION and ADHOC) 2838 * @bssid: the network bssid (used only for iftype STATION and ADHOC)
2825 * @qos: build 802.11 QoS data frame 2839 * @qos: build 802.11 QoS data frame
2840 * Return: 0 on success, or a negative error code.
2826 */ 2841 */
2827int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr, 2842int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr,
2828 enum nl80211_iftype iftype, u8 *bssid, bool qos); 2843 enum nl80211_iftype iftype, u8 *bssid, bool qos);
@@ -2850,6 +2865,7 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
2850/** 2865/**
2851 * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame 2866 * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame
2852 * @skb: the data frame 2867 * @skb: the data frame
2868 * Return: The 802.1p/1d tag.
2853 */ 2869 */
2854unsigned int cfg80211_classify8021d(struct sk_buff *skb); 2870unsigned int cfg80211_classify8021d(struct sk_buff *skb);
2855 2871
@@ -2860,12 +2876,13 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb);
2860 * @ies: data consisting of IEs 2876 * @ies: data consisting of IEs
2861 * @len: length of data 2877 * @len: length of data
2862 * 2878 *
2863 * This function will return %NULL if the element ID could 2879 * 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 2880 * the element is invalid (claims to be longer than the given
2865 * longer than the given data), or a pointer to the first byte 2881 * data), or a pointer to the first byte of the requested
2866 * of the requested element, that is the byte containing the 2882 * element, that is the byte containing the element ID.
2867 * element ID. There are no checks on the element length 2883 *
2868 * other than having to fit into the given data. 2884 * Note: There are no checks on the element length other than
2885 * having to fit into the given data.
2869 */ 2886 */
2870const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len); 2887const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len);
2871 2888
@@ -2877,12 +2894,13 @@ const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len);
2877 * @ies: data consisting of IEs 2894 * @ies: data consisting of IEs
2878 * @len: length of data 2895 * @len: length of data
2879 * 2896 *
2880 * This function will return %NULL if the vendor specific element ID 2897 * 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 2898 * 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 2899 * the first byte of the requested element, that is the byte containing the
2883 * of the requested element, that is the byte containing the 2900 * element ID.
2884 * element ID. There are no checks on the element length 2901 *
2885 * other than having to fit into the given data. 2902 * Note: There are no checks on the element length other than having to fit into
2903 * the given data.
2886 */ 2904 */
2887const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type, 2905const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type,
2888 const u8 *ies, int len); 2906 const u8 *ies, int len);
@@ -2915,6 +2933,8 @@ const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type,
2915 * 2933 *
2916 * Drivers should check the return value, its possible you can get 2934 * Drivers should check the return value, its possible you can get
2917 * an -ENOMEM. 2935 * an -ENOMEM.
2936 *
2937 * Return: 0 on success. -ENOMEM.
2918 */ 2938 */
2919extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2); 2939extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2);
2920 2940
@@ -2944,13 +2964,13 @@ extern void wiphy_apply_custom_regulatory(
2944 * it wants to follow we respect that unless a country IE has been received 2964 * it wants to follow we respect that unless a country IE has been received
2945 * and processed already. 2965 * and processed already.
2946 * 2966 *
2947 * When an error occurs, for example if no rule can be found, the return value 2967 * Return: A valid pointer, or, when an error occurs, for example if no rule
2948 * is encoded using ERR_PTR(). Use IS_ERR() to check and PTR_ERR() to obtain 2968 * can be found, the return value is encoded using ERR_PTR(). Use IS_ERR() to
2949 * the numeric return value. The numeric return value will be -ERANGE if we 2969 * check and PTR_ERR() to obtain the numeric return value. The numeric return
2950 * determine the given center_freq does not even have a regulatory rule for a 2970 * value will be -ERANGE if we determine the given center_freq does not even
2951 * frequency range in the center_freq's band. See freq_in_rule_band() for our 2971 * have a regulatory rule for a frequency range in the center_freq's band.
2952 * current definition of a band -- this is purely subjective and right now it's 2972 * See freq_in_rule_band() for our current definition of a band -- this is
2953 * 802.11 specific. 2973 * purely subjective and right now it's 802.11 specific.
2954 */ 2974 */
2955const struct ieee80211_reg_rule *freq_reg_info(struct wiphy *wiphy, 2975const struct ieee80211_reg_rule *freq_reg_info(struct wiphy *wiphy,
2956 u32 center_freq); 2976 u32 center_freq);
@@ -3000,7 +3020,8 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy);
3000 * This informs cfg80211 that BSS information was found and 3020 * This informs cfg80211 that BSS information was found and
3001 * the BSS should be updated/added. 3021 * the BSS should be updated/added.
3002 * 3022 *
3003 * NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()! 3023 * Return: A referenced struct, must be released with cfg80211_put_bss()!
3024 * Or %NULL on error.
3004 */ 3025 */
3005struct cfg80211_bss * __must_check 3026struct cfg80211_bss * __must_check
3006cfg80211_inform_bss_frame(struct wiphy *wiphy, 3027cfg80211_inform_bss_frame(struct wiphy *wiphy,
@@ -3025,7 +3046,8 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
3025 * This informs cfg80211 that BSS information was found and 3046 * This informs cfg80211 that BSS information was found and
3026 * the BSS should be updated/added. 3047 * the BSS should be updated/added.
3027 * 3048 *
3028 * NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()! 3049 * Return: A referenced struct, must be released with cfg80211_put_bss()!
3050 * Or %NULL on error.
3029 */ 3051 */
3030struct cfg80211_bss * __must_check 3052struct cfg80211_bss * __must_check
3031cfg80211_inform_bss(struct wiphy *wiphy, 3053cfg80211_inform_bss(struct wiphy *wiphy,
@@ -3302,16 +3324,18 @@ void wiphy_rfkill_stop_polling(struct wiphy *wiphy);
3302 * the testmode command. Since it is intended for a reply, calling 3324 * the testmode command. Since it is intended for a reply, calling
3303 * it outside of the @testmode_cmd operation is invalid. 3325 * it outside of the @testmode_cmd operation is invalid.
3304 * 3326 *
3305 * The returned skb (or %NULL if any errors happen) is pre-filled 3327 * The returned skb is pre-filled with the wiphy index and set up in
3306 * with the wiphy index and set up in a way that any data that is 3328 * a way that any data that is put into the skb (with skb_put(),
3307 * put into the skb (with skb_put(), nla_put() or similar) will end 3329 * nla_put() or similar) will end up being within the
3308 * up being within the %NL80211_ATTR_TESTDATA attribute, so all that 3330 * %NL80211_ATTR_TESTDATA attribute, so all that needs to be done
3309 * needs to be done with the skb is adding data for the corresponding 3331 * with the skb is adding data for the corresponding userspace tool
3310 * userspace tool which can then read that data out of the testdata 3332 * which can then read that data out of the testdata attribute. You
3311 * attribute. You must not modify the skb in any other way. 3333 * must not modify the skb in any other way.
3312 * 3334 *
3313 * When done, call cfg80211_testmode_reply() with the skb and return 3335 * When done, call cfg80211_testmode_reply() with the skb and return
3314 * its error code as the result of the @testmode_cmd operation. 3336 * its error code as the result of the @testmode_cmd operation.
3337 *
3338 * Return: An allocated and pre-filled skb. %NULL if any errors happen.
3315 */ 3339 */
3316struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy, 3340struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy,
3317 int approxlen); 3341 int approxlen);
@@ -3321,11 +3345,12 @@ struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy,
3321 * @skb: The skb, must have been allocated with 3345 * @skb: The skb, must have been allocated with
3322 * cfg80211_testmode_alloc_reply_skb() 3346 * cfg80211_testmode_alloc_reply_skb()
3323 * 3347 *
3324 * Returns an error code or 0 on success, since calling this 3348 * Since calling this function will usually be the last thing
3325 * function will usually be the last thing before returning 3349 * before returning from the @testmode_cmd you should return
3326 * from the @testmode_cmd you should return the error code. 3350 * the error code. Note that this function consumes the skb
3327 * Note that this function consumes the skb regardless of the 3351 * regardless of the return value.
3328 * return value. 3352 *
3353 * Return: An error code or 0 on success.
3329 */ 3354 */
3330int cfg80211_testmode_reply(struct sk_buff *skb); 3355int cfg80211_testmode_reply(struct sk_buff *skb);
3331 3356
@@ -3339,14 +3364,16 @@ int cfg80211_testmode_reply(struct sk_buff *skb);
3339 * This function allocates and pre-fills an skb for an event on the 3364 * This function allocates and pre-fills an skb for an event on the
3340 * testmode multicast group. 3365 * testmode multicast group.
3341 * 3366 *
3342 * The returned skb (or %NULL if any errors happen) is set up in the 3367 * The returned skb is set up in the same way as with
3343 * same way as with cfg80211_testmode_alloc_reply_skb() but prepared 3368 * cfg80211_testmode_alloc_reply_skb() but prepared for an event. As
3344 * for an event. As there, you should simply add data to it that will 3369 * there, you should simply add data to it that will then end up in the
3345 * then end up in the %NL80211_ATTR_TESTDATA attribute. Again, you must 3370 * %NL80211_ATTR_TESTDATA attribute. Again, you must not modify the skb
3346 * not modify the skb in any other way. 3371 * in any other way.
3347 * 3372 *
3348 * When done filling the skb, call cfg80211_testmode_event() with the 3373 * When done filling the skb, call cfg80211_testmode_event() with the
3349 * skb to send the event. 3374 * skb to send the event.
3375 *
3376 * Return: An allocated and pre-filled skb. %NULL if any errors happen.
3350 */ 3377 */
3351struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy, 3378struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy,
3352 int approxlen, gfp_t gfp); 3379 int approxlen, gfp_t gfp);
@@ -3527,13 +3554,13 @@ void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr,
3527 * @len: length of the frame data 3554 * @len: length of the frame data
3528 * @gfp: context flags 3555 * @gfp: context flags
3529 * 3556 *
3530 * Returns %true if a user space application has registered for this frame. 3557 * This function is called whenever an Action frame is received for a station
3558 * mode interface, but is not processed in kernel.
3559 *
3560 * Return: %true if a user space application has registered for this frame.
3531 * For action frames, that makes it responsible for rejecting unrecognized 3561 * For action frames, that makes it responsible for rejecting unrecognized
3532 * action frames; %false otherwise, in which case for action frames the 3562 * action frames; %false otherwise, in which case for action frames the
3533 * driver is responsible for rejecting the frame. 3563 * driver is responsible for rejecting the frame.
3534 *
3535 * This function is called whenever an Action frame is received for a station
3536 * mode interface, but is not processed in kernel.
3537 */ 3564 */
3538bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm, 3565bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm,
3539 const u8 *buf, size_t len, gfp_t gfp); 3566 const u8 *buf, size_t len, gfp_t gfp);
@@ -3625,7 +3652,7 @@ void cfg80211_pmksa_candidate_notify(struct net_device *dev, int index,
3625 * This function is used in AP mode (only!) to inform userspace that 3652 * This function is used in AP mode (only!) to inform userspace that
3626 * a spurious class 3 frame was received, to be able to deauth the 3653 * a spurious class 3 frame was received, to be able to deauth the
3627 * sender. 3654 * sender.
3628 * Returns %true if the frame was passed to userspace (or this failed 3655 * Return: %true if the frame was passed to userspace (or this failed
3629 * for a reason other than not having a subscription.) 3656 * for a reason other than not having a subscription.)
3630 */ 3657 */
3631bool cfg80211_rx_spurious_frame(struct net_device *dev, 3658bool cfg80211_rx_spurious_frame(struct net_device *dev,
@@ -3641,7 +3668,7 @@ bool cfg80211_rx_spurious_frame(struct net_device *dev,
3641 * an associated station sent a 4addr frame but that wasn't expected. 3668 * an associated station sent a 4addr frame but that wasn't expected.
3642 * It is allowed and desirable to send this event only once for each 3669 * It is allowed and desirable to send this event only once for each
3643 * station to avoid event flooding. 3670 * station to avoid event flooding.
3644 * Returns %true if the frame was passed to userspace (or this failed 3671 * Return: %true if the frame was passed to userspace (or this failed
3645 * for a reason other than not having a subscription.) 3672 * for a reason other than not having a subscription.)
3646 */ 3673 */
3647bool cfg80211_rx_unexpected_4addr_frame(struct net_device *dev, 3674bool cfg80211_rx_unexpected_4addr_frame(struct net_device *dev,
@@ -3679,8 +3706,8 @@ void cfg80211_report_obss_beacon(struct wiphy *wiphy,
3679 * @wiphy: the wiphy 3706 * @wiphy: the wiphy
3680 * @chandef: the channel definition 3707 * @chandef: the channel definition
3681 * 3708 *
3682 * This function returns true if there is no secondary channel or the secondary 3709 * Return: %true if there is no secondary channel or the secondary channel(s)
3683 * channel(s) can be used for beaconing (i.e. is not a radar channel etc.) 3710 * can be used for beaconing (i.e. is not a radar channel etc.)
3684 */ 3711 */
3685bool cfg80211_reg_can_beacon(struct wiphy *wiphy, 3712bool cfg80211_reg_can_beacon(struct wiphy *wiphy,
3686 struct cfg80211_chan_def *chandef); 3713 struct cfg80211_chan_def *chandef);
@@ -3750,9 +3777,9 @@ void cfg80211_unregister_wdev(struct wireless_dev *wdev);
3750 * The function finds a given P2P attribute in the (vendor) IEs and 3777 * The function finds a given P2P attribute in the (vendor) IEs and
3751 * copies its contents to the given buffer. 3778 * copies its contents to the given buffer.
3752 * 3779 *
3753 * The return value is a negative error code (-%EILSEQ or -%ENOENT) if 3780 * Return: A negative error code (-%EILSEQ or -%ENOENT) if the data is
3754 * the data is malformed or the attribute can't be found (respectively), 3781 * malformed or the attribute can't be found (respectively), or the
3755 * or the length of the found attribute (which can be zero). 3782 * length of the found attribute (which can be zero).
3756 */ 3783 */
3757int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len, 3784int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len,
3758 enum ieee80211_p2p_attr_id attr, 3785 enum ieee80211_p2p_attr_id attr,