diff mbox series

wifi: cfg80211: rearrange kernel document for sinfo structure

Message ID 20250107041727.3810446-1-quic_sarishar@quicinc.com (mailing list archive)
State New
Delegated to: Johannes Berg
Headers show
Series wifi: cfg80211: rearrange kernel document for sinfo structure | expand

Commit Message

Sarika Sharma Jan. 7, 2025, 4:17 a.m. UTC
Currently, the sinfo kernel documentation is not aligned with the
order of the sinfo structure elements. Therefore, rearrange the
kernel documentation fields to align correctly with the structure.
No functionality changes added.

Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com>
---
 include/net/cfg80211.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


base-commit: b73e56f16250c6124f8975636f1844472f6fd450

Comments

Johannes Berg Jan. 7, 2025, 8:58 a.m. UTC | #1
On Tue, 2025-01-07 at 09:47 +0530, Sarika Sharma wrote:
> Currently, the sinfo kernel documentation is not aligned with the
> order of the sinfo structure elements. Therefore, rearrange the
> kernel documentation fields to align correctly with the structure.
> No functionality changes added.
> 

Why?

johannes
Sarika Sharma Jan. 7, 2025, 10:33 a.m. UTC | #2
On 1/7/2025 2:28 PM, Johannes Berg wrote:
> On Tue, 2025-01-07 at 09:47 +0530, Sarika Sharma wrote:
>> Currently, the sinfo kernel documentation is not aligned with the
>> order of the sinfo structure elements. Therefore, rearrange the
>> kernel documentation fields to align correctly with the structure.
>> No functionality changes added.
>>
> 
> Why?
> 
> johannes

Actually, there is ongoing work to extend sinfo for link-level details. 
While working on this, I noticed a documentation mismatch and decided to 
correct the existing documentation first, as it's good to have aligned 
structure and documentation.
Since this change is not dependent on anything, sent it separately.
Johannes Berg Jan. 7, 2025, 11:12 a.m. UTC | #3
On Tue, 2025-01-07 at 16:03 +0530, Sarika Sharma wrote:
> Actually, there is ongoing work to extend sinfo for link-level details. 
> While working on this, I noticed a documentation mismatch and decided to 
> correct the existing documentation first, as it's good to have aligned 
> structure and documentation.

Why do you think it's good? I don't even agree with that. The code
should be laid out to minimize holes, but the docs can be laid out to
group functionally related fields.

johannes
Jeff Johnson Jan. 7, 2025, 3:40 p.m. UTC | #4
On 1/7/2025 3:12 AM, Johannes Berg wrote:
> On Tue, 2025-01-07 at 16:03 +0530, Sarika Sharma wrote:
>> Actually, there is ongoing work to extend sinfo for link-level details. 
>> While working on this, I noticed a documentation mismatch and decided to 
>> correct the existing documentation first, as it's good to have aligned 
>> structure and documentation.
> 
> Why do you think it's good? I don't even agree with that. The code
> should be laid out to minimize holes, but the docs can be laid out to
> group functionally related fields.

Without any documented guidance to that effect I had suggested this during
internal review to help minimize the size of the diffs where members are being
refactored out of sinfo into a new per-link struct.

But we can drop this since I think we'll be renaming some of the refactored
members and hence the diff will be big anyway.

/jeff
Johannes Berg Jan. 8, 2025, 9:56 a.m. UTC | #5
On Tue, 2025-01-07 at 07:40 -0800, Jeff Johnson wrote:
> On 1/7/2025 3:12 AM, Johannes Berg wrote:
> > On Tue, 2025-01-07 at 16:03 +0530, Sarika Sharma wrote:
> > > Actually, there is ongoing work to extend sinfo for link-level details. 
> > > While working on this, I noticed a documentation mismatch and decided to 
> > > correct the existing documentation first, as it's good to have aligned 
> > > structure and documentation.
> > 
> > Why do you think it's good? I don't even agree with that. The code
> > should be laid out to minimize holes, but the docs can be laid out to
> > group functionally related fields.
> 
> Without any documented guidance to that effect

Yeah I don't see anything either? Though kernel-doc certainly could
complain about the order if it wanted to. I tend to think it doesn't
need to match though, per above.

> I had suggested this during
> internal review to help minimize the size of the diffs where members are being
> refactored out of sinfo into a new per-link struct.

Fair enough.

> But we can drop this since I think we'll be renaming some of the refactored
> members and hence the diff will be big anyway.

I think we can also apply it if you think it makes things easier, I just
didn't think "it should match" really is a good justification. I don't
care too much about the order in the docs, but also don't see needlessly
changing it as a useful thing.

johannes
diff mbox series

Patch

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 7790af534b7f..01b977fd38c9 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2063,6 +2063,7 @@  struct cfg80211_tid_stats {
  * @tx_failed: number of failed transmissions (MPDUs) (retries exceeded, no ACK)
  * @rx_dropped_misc:  Dropped for un-specified reason.
  * @bss_param: current BSS parameters
+ * @sta_flags: station flags mask & values
  * @generation: generation number for nl80211 dumps.
  *	This number should increase every time the list of stations
  *	changes, i.e. when a station is added or removed, so that
@@ -2072,7 +2073,6 @@  struct cfg80211_tid_stats {
  *	user space MLME/SME implementation. The information is provided for
  *	the cfg80211_new_sta() calls to notify user space of the IEs.
  * @assoc_req_ies_len: Length of assoc_req_ies buffer in octets.
- * @sta_flags: station flags mask & values
  * @beacon_loss_count: Number of times beacon loss event has triggered.
  * @t_offset: Time offset of the station relative to this host.
  * @local_pm: local mesh STA power save mode
@@ -2080,19 +2080,19 @@  struct cfg80211_tid_stats {
  * @nonpeer_pm: non-peer mesh STA power save mode
  * @expected_throughput: expected throughput in kbps (including 802.11 headers)
  *	towards this station.
+ * @rx_duration: aggregate PPDU duration(usecs) for all the frames from a peer
+ * @tx_duration: aggregate PPDU duration(usecs) for all the frames to a peer
  * @rx_beacon: number of beacons received from this peer
  * @rx_beacon_signal_avg: signal strength average (in dBm) for beacons received
  *	from this peer
  * @connected_to_gate: true if mesh STA has a path to mesh gate
- * @rx_duration: aggregate PPDU duration(usecs) for all the frames from a peer
- * @tx_duration: aggregate PPDU duration(usecs) for all the frames to a peer
- * @airtime_weight: current airtime scheduling weight
  * @pertid: per-TID statistics, see &struct cfg80211_tid_stats, using the last
  *	(IEEE80211_NUM_TIDS) index for MSDUs not encapsulated in QoS-MPDUs.
  *	Note that this doesn't use the @filled bit, but is used if non-NULL.
  * @ack_signal: signal strength (in dBm) of the last ACK frame.
  * @avg_ack_signal: average rssi value of ack packet for the no of msdu's has
  *	been sent.
+ * @airtime_weight: current airtime scheduling weight
  * @rx_mpdu_count: number of MPDUs received from this station
  * @fcs_err_count: number of packets (MPDUs) received from this station with
  *	an FCS error. This counter should be incremented only when TA of the