Re: [PATCH] batman-adv: Use wifi rx/tx as fallback throughput

Sven Eckelmann
2019-06-09T10:41:25Z

[-- Attachment #1: Type: text/plain, Size: 1973 bytes --]

On Sunday, 9 June 2019 12:19:22 CEST René Treffer wrote:
> From: rtreffer <treffer@measite.de>
>
> Some wifi drivers (e.g. ath10k) provide per-station rx/tx values but no
> estimated throughput. Setting a better estimate than the default 1MBit
> makes these devices work well with BATMAN V.
>
> Signed-off-by: René Treffer <treffer@measite.de>
> ---

Please use checkpatch before sending a patch:

WARNING: braces {} are not necessary for single statement blocks
#113: FILE: net/batman-adv/bat_v_elp.c:111:
+ if (sinfo.filled & BIT(NL80211_STA_INFO_EXPECTED_THROUGHPUT)) {
+ return sinfo.expected_throughput / 100;
+ }

WARNING: line over 80 characters
#117: FILE: net/batman-adv/bat_v_elp.c:115:
+ // try to estimate en expected throughput based on reported rx/tx rates

WARNING: line over 80 characters
#118: FILE: net/batman-adv/bat_v_elp.c:116:
+ // 1/3 of tx or 1/3 of the average of rx and tx, whichever is smaller

WARNING: braces {} are not necessary for single statement blocks
#123: FILE: net/batman-adv/bat_v_elp.c:121:
+ if (rx < tx) {
+ return (rx + tx) / 6;
+ }

WARNING: Missing Signed-off-by: line by nominal patch author 'rtreffer <treffer@measite.de>'

total: 0 errors, 5 warnings, 0 checks, 36 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

/home/sven/[PATCH] batman-adv_Use wifi rx_tx as fallback throughput.mbox has style problems, please review.

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS

Kind regards,
Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]