aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/net/cfg80211.h159
-rw-r--r--include/net/mac80211.h74
2 files changed, 153 insertions, 80 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,
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 23daed3c78ed..79bc8709e83b 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1522,6 +1522,8 @@ struct ieee80211_hw {
1522 * structure can then access it via hw->priv. Note that mac802111 drivers should 1522 * structure can then access it via hw->priv. Note that mac802111 drivers should
1523 * not use wiphy_priv() to try to get their private driver structure as this 1523 * not use wiphy_priv() to try to get their private driver structure as this
1524 * is already used internally by mac80211. 1524 * is already used internally by mac80211.
1525 *
1526 * Return: The mac80211 driver hw struct of @wiphy.
1525 */ 1527 */
1526struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy); 1528struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy);
1527 1529
@@ -2673,6 +2675,8 @@ struct ieee80211_ops {
2673 * 2675 *
2674 * @priv_data_len: length of private data 2676 * @priv_data_len: length of private data
2675 * @ops: callbacks for this device 2677 * @ops: callbacks for this device
2678 *
2679 * Return: A pointer to the new hardware device, or %NULL on error.
2676 */ 2680 */
2677struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, 2681struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
2678 const struct ieee80211_ops *ops); 2682 const struct ieee80211_ops *ops);
@@ -2685,6 +2689,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
2685 * need to fill the contained wiphy's information. 2689 * need to fill the contained wiphy's information.
2686 * 2690 *
2687 * @hw: the device to register as returned by ieee80211_alloc_hw() 2691 * @hw: the device to register as returned by ieee80211_alloc_hw()
2692 *
2693 * Return: 0 on success. An error code otherwise.
2688 */ 2694 */
2689int ieee80211_register_hw(struct ieee80211_hw *hw); 2695int ieee80211_register_hw(struct ieee80211_hw *hw);
2690 2696
@@ -2731,6 +2737,8 @@ extern char *__ieee80211_create_tpt_led_trigger(
2731 * of the trigger so you can automatically link the LED device. 2737 * of the trigger so you can automatically link the LED device.
2732 * 2738 *
2733 * @hw: the hardware to get the LED trigger name for 2739 * @hw: the hardware to get the LED trigger name for
2740 *
2741 * Return: The name of the LED trigger. %NULL if not configured for LEDs.
2734 */ 2742 */
2735static inline char *ieee80211_get_tx_led_name(struct ieee80211_hw *hw) 2743static inline char *ieee80211_get_tx_led_name(struct ieee80211_hw *hw)
2736{ 2744{
@@ -2750,6 +2758,8 @@ static inline char *ieee80211_get_tx_led_name(struct ieee80211_hw *hw)
2750 * of the trigger so you can automatically link the LED device. 2758 * of the trigger so you can automatically link the LED device.
2751 * 2759 *
2752 * @hw: the hardware to get the LED trigger name for 2760 * @hw: the hardware to get the LED trigger name for
2761 *
2762 * Return: The name of the LED trigger. %NULL if not configured for LEDs.
2753 */ 2763 */
2754static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw) 2764static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw)
2755{ 2765{
@@ -2769,6 +2779,8 @@ static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw)
2769 * of the trigger so you can automatically link the LED device. 2779 * of the trigger so you can automatically link the LED device.
2770 * 2780 *
2771 * @hw: the hardware to get the LED trigger name for 2781 * @hw: the hardware to get the LED trigger name for
2782 *
2783 * Return: The name of the LED trigger. %NULL if not configured for LEDs.
2772 */ 2784 */
2773static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw) 2785static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw)
2774{ 2786{
@@ -2788,6 +2800,8 @@ static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw)
2788 * of the trigger so you can automatically link the LED device. 2800 * of the trigger so you can automatically link the LED device.
2789 * 2801 *
2790 * @hw: the hardware to get the LED trigger name for 2802 * @hw: the hardware to get the LED trigger name for
2803 *
2804 * Return: The name of the LED trigger. %NULL if not configured for LEDs.
2791 */ 2805 */
2792static inline char *ieee80211_get_radio_led_name(struct ieee80211_hw *hw) 2806static inline char *ieee80211_get_radio_led_name(struct ieee80211_hw *hw)
2793{ 2807{
@@ -2805,9 +2819,10 @@ static inline char *ieee80211_get_radio_led_name(struct ieee80211_hw *hw)
2805 * @blink_table: the blink table -- needs to be ordered by throughput 2819 * @blink_table: the blink table -- needs to be ordered by throughput
2806 * @blink_table_len: size of the blink table 2820 * @blink_table_len: size of the blink table
2807 * 2821 *
2808 * This function returns %NULL (in case of error, or if no LED 2822 * Return: %NULL (in case of error, or if no LED triggers are
2809 * triggers are configured) or the name of the new trigger. 2823 * configured) or the name of the new trigger.
2810 * This function must be called before ieee80211_register_hw(). 2824 *
2825 * Note: This function must be called before ieee80211_register_hw().
2811 */ 2826 */
2812static inline char * 2827static inline char *
2813ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, unsigned int flags, 2828ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, unsigned int flags,
@@ -2940,10 +2955,10 @@ static inline void ieee80211_rx_ni(struct ieee80211_hw *hw,
2940 * Calls to this function for a single hardware must be synchronized against 2955 * Calls to this function for a single hardware must be synchronized against
2941 * each other. 2956 * each other.
2942 * 2957 *
2943 * The function returns -EINVAL when the requested PS mode is already set.
2944 *
2945 * @sta: currently connected sta 2958 * @sta: currently connected sta
2946 * @start: start or stop PS 2959 * @start: start or stop PS
2960 *
2961 * Return: 0 on success. -EINVAL when the requested PS mode is already set.
2947 */ 2962 */
2948int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start); 2963int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start);
2949 2964
@@ -2957,6 +2972,8 @@ int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start);
2957 * 2972 *
2958 * @sta: currently connected sta 2973 * @sta: currently connected sta
2959 * @start: start or stop PS 2974 * @start: start or stop PS
2975 *
2976 * Return: Like ieee80211_sta_ps_transition().
2960 */ 2977 */
2961static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta, 2978static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
2962 bool start) 2979 bool start)
@@ -3094,6 +3111,8 @@ void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets);
3094 * according to the current DTIM parameters/TIM bitmap. 3111 * according to the current DTIM parameters/TIM bitmap.
3095 * 3112 *
3096 * The driver is responsible for freeing the returned skb. 3113 * The driver is responsible for freeing the returned skb.
3114 *
3115 * Return: The beacon template. %NULL on error.
3097 */ 3116 */
3098struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, 3117struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
3099 struct ieee80211_vif *vif, 3118 struct ieee80211_vif *vif,
@@ -3105,6 +3124,8 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
3105 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 3124 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3106 * 3125 *
3107 * See ieee80211_beacon_get_tim(). 3126 * See ieee80211_beacon_get_tim().
3127 *
3128 * Return: See ieee80211_beacon_get_tim().
3108 */ 3129 */
3109static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, 3130static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
3110 struct ieee80211_vif *vif) 3131 struct ieee80211_vif *vif)
@@ -3121,6 +3142,8 @@ static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
3121 * hardware. The destination address should be set by the caller. 3142 * hardware. The destination address should be set by the caller.
3122 * 3143 *
3123 * Can only be called in AP mode. 3144 * Can only be called in AP mode.
3145 *
3146 * Return: The Probe Response template. %NULL on error.
3124 */ 3147 */
3125struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw, 3148struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw,
3126 struct ieee80211_vif *vif); 3149 struct ieee80211_vif *vif);
@@ -3136,6 +3159,8 @@ struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw,
3136 * 3159 *
3137 * Note: Caller (or hardware) is responsible for setting the 3160 * Note: Caller (or hardware) is responsible for setting the
3138 * &IEEE80211_FCTL_PM bit. 3161 * &IEEE80211_FCTL_PM bit.
3162 *
3163 * Return: The PS Poll template. %NULL on error.
3139 */ 3164 */
3140struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw, 3165struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
3141 struct ieee80211_vif *vif); 3166 struct ieee80211_vif *vif);
@@ -3151,6 +3176,8 @@ struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
3151 * 3176 *
3152 * Note: Caller (or hardware) is responsible for setting the 3177 * Note: Caller (or hardware) is responsible for setting the
3153 * &IEEE80211_FCTL_PM bit as well as Duration and Sequence Control fields. 3178 * &IEEE80211_FCTL_PM bit as well as Duration and Sequence Control fields.
3179 *
3180 * Return: The nullfunc template. %NULL on error.
3154 */ 3181 */
3155struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw, 3182struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
3156 struct ieee80211_vif *vif); 3183 struct ieee80211_vif *vif);
@@ -3165,6 +3192,8 @@ struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
3165 * 3192 *
3166 * Creates a Probe Request template which can, for example, be uploaded to 3193 * Creates a Probe Request template which can, for example, be uploaded to
3167 * hardware. 3194 * hardware.
3195 *
3196 * Return: The Probe Request template. %NULL on error.
3168 */ 3197 */
3169struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw, 3198struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
3170 struct ieee80211_vif *vif, 3199 struct ieee80211_vif *vif,
@@ -3200,6 +3229,8 @@ void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
3200 * If the RTS is generated in firmware, but the host system must provide 3229 * If the RTS is generated in firmware, but the host system must provide
3201 * the duration field, the low-level driver uses this function to receive 3230 * the duration field, the low-level driver uses this function to receive
3202 * the duration field value in little-endian byteorder. 3231 * the duration field value in little-endian byteorder.
3232 *
3233 * Return: The duration.
3203 */ 3234 */
3204__le16 ieee80211_rts_duration(struct ieee80211_hw *hw, 3235__le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
3205 struct ieee80211_vif *vif, size_t frame_len, 3236 struct ieee80211_vif *vif, size_t frame_len,
@@ -3235,6 +3266,8 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw,
3235 * If the CTS-to-self is generated in firmware, but the host system must provide 3266 * If the CTS-to-self is generated in firmware, but the host system must provide
3236 * the duration field, the low-level driver uses this function to receive 3267 * the duration field, the low-level driver uses this function to receive
3237 * the duration field value in little-endian byteorder. 3268 * the duration field value in little-endian byteorder.
3269 *
3270 * Return: The duration.
3238 */ 3271 */
3239__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, 3272__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
3240 struct ieee80211_vif *vif, 3273 struct ieee80211_vif *vif,
@@ -3251,6 +3284,8 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
3251 * 3284 *
3252 * Calculate the duration field of some generic frame, given its 3285 * Calculate the duration field of some generic frame, given its
3253 * length and transmission rate (in 100kbps). 3286 * length and transmission rate (in 100kbps).
3287 *
3288 * Return: The duration.
3254 */ 3289 */
3255__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, 3290__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
3256 struct ieee80211_vif *vif, 3291 struct ieee80211_vif *vif,
@@ -3267,9 +3302,10 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
3267 * hardware/firmware does not implement buffering of broadcast/multicast 3302 * hardware/firmware does not implement buffering of broadcast/multicast
3268 * frames when power saving is used, 802.11 code buffers them in the host 3303 * frames when power saving is used, 802.11 code buffers them in the host
3269 * memory. The low-level driver uses this function to fetch next buffered 3304 * memory. The low-level driver uses this function to fetch next buffered
3270 * frame. In most cases, this is used when generating beacon frame. This 3305 * frame. In most cases, this is used when generating beacon frame.
3271 * function returns a pointer to the next buffered skb or NULL if no more 3306 *
3272 * buffered frames are available. 3307 * Return: A pointer to the next buffered skb or NULL if no more buffered
3308 * frames are available.
3273 * 3309 *
3274 * Note: buffered frames are returned only after DTIM beacon frame was 3310 * Note: buffered frames are returned only after DTIM beacon frame was
3275 * generated with ieee80211_beacon_get() and the low-level driver must thus 3311 * generated with ieee80211_beacon_get() and the low-level driver must thus
@@ -3449,6 +3485,8 @@ void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue);
3449 * @queue: queue number (counted from zero). 3485 * @queue: queue number (counted from zero).
3450 * 3486 *
3451 * Drivers should use this function instead of netif_stop_queue. 3487 * Drivers should use this function instead of netif_stop_queue.
3488 *
3489 * Return: %true if the queue is stopped. %false otherwise.
3452 */ 3490 */
3453 3491
3454int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue); 3492int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue);
@@ -3646,7 +3684,9 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
3646 * @vif: virtual interface to look for station on 3684 * @vif: virtual interface to look for station on
3647 * @addr: station's address 3685 * @addr: station's address
3648 * 3686 *
3649 * This function must be called under RCU lock and the 3687 * Return: The station, if found. %NULL otherwise.
3688 *
3689 * Note: This function must be called under RCU lock and the
3650 * resulting pointer is only valid under RCU lock as well. 3690 * resulting pointer is only valid under RCU lock as well.
3651 */ 3691 */
3652struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif, 3692struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif,
@@ -3659,7 +3699,9 @@ struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif,
3659 * @addr: remote station's address 3699 * @addr: remote station's address
3660 * @localaddr: local address (vif->sdata->vif.addr). Use NULL for 'any'. 3700 * @localaddr: local address (vif->sdata->vif.addr). Use NULL for 'any'.
3661 * 3701 *
3662 * This function must be called under RCU lock and the 3702 * Return: The station, if found. %NULL otherwise.
3703 *
3704 * Note: This function must be called under RCU lock and the
3663 * resulting pointer is only valid under RCU lock as well. 3705 * resulting pointer is only valid under RCU lock as well.
3664 * 3706 *
3665 * NOTE: You may pass NULL for localaddr, but then you will just get 3707 * NOTE: You may pass NULL for localaddr, but then you will just get
@@ -3789,7 +3831,9 @@ void ieee80211_iter_chan_contexts_atomic(
3789 * information. This function must only be called from within the 3831 * information. This function must only be called from within the
3790 * .bss_info_changed callback function and only in managed mode. The function 3832 * .bss_info_changed callback function and only in managed mode. The function
3791 * is only useful when the interface is associated, otherwise it will return 3833 * is only useful when the interface is associated, otherwise it will return
3792 * NULL. 3834 * %NULL.
3835 *
3836 * Return: The Probe Request template. %NULL on error.
3793 */ 3837 */
3794struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw, 3838struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
3795 struct ieee80211_vif *vif); 3839 struct ieee80211_vif *vif);
@@ -4136,12 +4180,14 @@ void ieee80211_enable_rssi_reports(struct ieee80211_vif *vif,
4136void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif); 4180void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif);
4137 4181
4138/** 4182/**
4139 * ieee80211_ave_rssi - report the average rssi for the specified interface 4183 * ieee80211_ave_rssi - report the average RSSI for the specified interface
4140 * 4184 *
4141 * @vif: the specified virtual interface 4185 * @vif: the specified virtual interface
4142 * 4186 *
4143 * This function return the average rssi value for the requested interface. 4187 * Note: This function assumes that the given vif is valid.
4144 * It assumes that the given vif is valid. 4188 *
4189 * Return: The average RSSI value for the requested interface, or 0 if not
4190 * applicable.
4145 */ 4191 */
4146int ieee80211_ave_rssi(struct ieee80211_vif *vif); 4192int ieee80211_ave_rssi(struct ieee80211_vif *vif);
4147 4193