diff mbox series

[09/10] cfg80211: align documentation style of ieee80211_iface_combination

Message ID 20200221115604.594035-9-Jerome.Pouiller@silabs.com (mailing list archive)
State Rejected
Delegated to: Johannes Berg
Headers show
Series [01/10] cfg80211: drop duplicated documentation of field "probe_resp_offload" | expand

Commit Message

Jérôme Pouiller Feb. 21, 2020, 11:56 a.m. UTC
From: Jérôme Pouiller <jerome.pouiller@silabs.com>

In cfg80211.h, all the structs but ieee80211_iface_combination are
documented above their definition.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 include/net/cfg80211.h | 63 +++++++++++-------------------------------
 1 file changed, 16 insertions(+), 47 deletions(-)

Comments

Johannes Berg Feb. 21, 2020, 12:02 p.m. UTC | #1
On Fri, 2020-02-21 at 12:56 +0100, Jerome Pouiller wrote:
> 
> + *	intervals:
> + *	    * = 0: all beacon intervals for different interface must be same.
> + *	    * > 0: any beacon interval for the interface part of this
> + *	      combination AND GCD of all beacon intervals from beaconing
> + *	      interfaces of this combination must be greater or equal to this
> + *	      value.

Hmm. I have a feeling I actually split this one out because

> -	 * = 0
> -	 *   all beacon intervals for different interface must be same.
> -	 * > 0
> -	 *   any beacon interval for the interface part of this combination AND
> -	 *   GCD of all beacon intervals from beaconing interfaces of this
> -	 *   combination must be greater or equal to this value.

This generates the nicer output, not with bullets but as a definition
list or something.

johannes
Jérôme Pouiller Feb. 21, 2020, 12:38 p.m. UTC | #2
On Friday 21 February 2020 13:02:20 CET Johannes Berg wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
> 
> 
> On Fri, 2020-02-21 at 12:56 +0100, Jerome Pouiller wrote:
> >
> > + *   intervals:
> > + *       * = 0: all beacon intervals for different interface must be same.
> > + *       * > 0: any beacon interval for the interface part of this
> > + *         combination AND GCD of all beacon intervals from beaconing
> > + *         interfaces of this combination must be greater or equal to this
> > + *         value.
> 
> Hmm. I have a feeling I actually split this one out because
> 
> > -      * = 0
> > -      *   all beacon intervals for different interface must be same.
> > -      * > 0
> > -      *   any beacon interval for the interface part of this combination AND
> > -      *   GCD of all beacon intervals from beaconing interfaces of this
> > -      *   combination must be greater or equal to this value.
> 
> This generates the nicer output, not with bullets but as a definition
> list or something.
Indeed.

Unfortunately, I hasn't been able to use the same syntax in struct
description: if sphinx find a blank line, it considers that the rest of
the input is the long description of the struct.
Johannes Berg Feb. 21, 2020, 12:41 p.m. UTC | #3
On Fri, 2020-02-21 at 12:38 +0000, Jérôme Pouiller wrote:
> 
> > > -      * = 0
> > > -      *   all beacon intervals for different interface must be same.
> > > -      * > 0
> > > -      *   any beacon interval for the interface part of this combination AND
> > > -      *   GCD of all beacon intervals from beaconing interfaces of this
> > > -      *   combination must be greater or equal to this value.
> > 
> > This generates the nicer output, not with bullets but as a definition
> > list or something.
> Indeed.
> 
> Unfortunately, I hasn't been able to use the same syntax in struct
> description: if sphinx find a blank line, it considers that the rest of
> the input is the long description of the struct.

So let's just leave it as is. I don't consider using the same style
(inline or header) everywhere to be even nearly as important as the
output :)

johannes
Jérôme Pouiller Feb. 21, 2020, 12:49 p.m. UTC | #4
On Friday 21 February 2020 13:41:34 CET Johannes Berg wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
> 
> 
> On Fri, 2020-02-21 at 12:38 +0000, Jérôme Pouiller wrote:
> >
> > > > -      * = 0
> > > > -      *   all beacon intervals for different interface must be same.
> > > > -      * > 0
> > > > -      *   any beacon interval for the interface part of this combination AND
> > > > -      *   GCD of all beacon intervals from beaconing interfaces of this
> > > > -      *   combination must be greater or equal to this value.
> > >
> > > This generates the nicer output, not with bullets but as a definition
> > > list or something.
> > Indeed.
> >
> > Unfortunately, I hasn't been able to use the same syntax in struct
> > description: if sphinx find a blank line, it considers that the rest of
> > the input is the long description of the struct.
> 
> So let's just leave it as is. I don't consider using the same style
> (inline or header) everywhere to be even nearly as important as the
> output :)
Ok.

Alternatively, the following syntax generate an output close to the
original:

    *   intervals:
    *       := 0: all beacon intervals for different interface must be same.
    *       :> 0: any beacon interval for the interface part of this
    *         combination AND GCD of all beacon intervals from beaconing
    *         interfaces of this combination must be greater or equal to this
    *         value.
diff mbox series

Patch

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 1cc3442b540f..2f8c41993ed2 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4103,62 +4103,31 @@  struct ieee80211_iface_limit {
  *		.num_different_channels = 2,
  *	};
  *
+ * @limits: limits for the given interface types
+ * @num_different_channels: can use up to this many different channels
+ * @max_interfaces:  maximum number of interfaces in total allowed in this group
+ * @n_limits: number of limitations
+ * @beacon_int_infra_match: In this combination, the beacon intervals between
+ *	infrastructure and AP types must match. This is required only in special
+ *	cases.
+ * @radar_detect_widths: bitmap of channel widths supported for radar detection
+ * @radar_detect_regions: bitmap of regions supported for radar detection
+ * @beacon_int_min_gcd: This interface combination supports different beacon
+ *	intervals:
+ *	    * = 0: all beacon intervals for different interface must be same.
+ *	    * > 0: any beacon interval for the interface part of this
+ *	      combination AND GCD of all beacon intervals from beaconing
+ *	      interfaces of this combination must be greater or equal to this
+ *	      value.
  */
 struct ieee80211_iface_combination {
-	/**
-	 * @limits:
-	 * limits for the given interface types
-	 */
 	const struct ieee80211_iface_limit *limits;
-
-	/**
-	 * @num_different_channels:
-	 * can use up to this many different channels
-	 */
 	u32 num_different_channels;
-
-	/**
-	 * @max_interfaces:
-	 * maximum number of interfaces in total allowed in this group
-	 */
 	u16 max_interfaces;
-
-	/**
-	 * @n_limits:
-	 * number of limitations
-	 */
 	u8 n_limits;
-
-	/**
-	 * @beacon_int_infra_match:
-	 * In this combination, the beacon intervals between infrastructure
-	 * and AP types must match. This is required only in special cases.
-	 */
 	bool beacon_int_infra_match;
-
-	/**
-	 * @radar_detect_widths:
-	 * bitmap of channel widths supported for radar detection
-	 */
 	u8 radar_detect_widths;
-
-	/**
-	 * @radar_detect_regions:
-	 * bitmap of regions supported for radar detection
-	 */
 	u8 radar_detect_regions;
-
-	/**
-	 * @beacon_int_min_gcd:
-	 * This interface combination supports different beacon intervals.
-	 *
-	 * = 0
-	 *   all beacon intervals for different interface must be same.
-	 * > 0
-	 *   any beacon interval for the interface part of this combination AND
-	 *   GCD of all beacon intervals from beaconing interfaces of this
-	 *   combination must be greater or equal to this value.
-	 */
 	u32 beacon_int_min_gcd;
 };