All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Maxim Altshul <maxim.altshul@ti.com>, kvalo@codeaurora.org
Cc: eliad@wizery.com, yanivma@ti.com, guym@ti.com, arik@wizery.com,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	davem@davemloft.net
Subject: Re: [PATCH 3/3] mac80211: mesh: Add support for HW RC implementation
Date: Tue, 21 Jun 2016 11:18:19 +0200	[thread overview]
Message-ID: <1466500699.3170.7.camel@sipsolutions.net> (raw)
In-Reply-To: <1466427622-5953-4-git-send-email-maxim.altshul@ti.com>

> -	if (sta->mesh->fail_avg >= 100)
> -		return MAX_METRIC;
> +	/* try to get rate based on HW RC algorithm */
> +	rate = drv_get_expected_throughput(local, &sta->sta);

This doesn't look correct, since you should use the rate control op if
available, to get data from rate control algorithms.

You should call sta_set_sinfo(), but that's far too much, so more
likely you should factor out the last few lines of that into a new
function and call that new function in both places.

johannes

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: Maxim Altshul <maxim.altshul-l0cyMroinI0@public.gmane.org>,
	kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
Cc: eliad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org,
	yanivma-l0cyMroinI0@public.gmane.org,
	guym-l0cyMroinI0@public.gmane.org,
	arik-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org
Subject: Re: [PATCH 3/3] mac80211: mesh: Add support for HW RC implementation
Date: Tue, 21 Jun 2016 11:18:19 +0200	[thread overview]
Message-ID: <1466500699.3170.7.camel@sipsolutions.net> (raw)
In-Reply-To: <1466427622-5953-4-git-send-email-maxim.altshul-l0cyMroinI0@public.gmane.org>

> -	if (sta->mesh->fail_avg >= 100)
> -		return MAX_METRIC;
> +	/* try to get rate based on HW RC algorithm */
> +	rate = drv_get_expected_throughput(local, &sta->sta);

This doesn't look correct, since you should use the rate control op if
available, to get data from rate control algorithms.

You should call sta_set_sinfo(), but that's far too much, so more
likely you should factor out the last few lines of that into a new
function and call that new function in both places.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-06-21  9:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20 13:00 [PATCH 0/3] *** Mesh Path Selection Metric Calculation *** Maxim Altshul
2016-06-20 13:00 ` Maxim Altshul
2016-06-20 13:00 ` [PATCH 1/3] wlcore/wl18xx: Add functionality to accept TX rate per link Maxim Altshul
2016-06-20 13:00   ` [PATCH 2/3] wlcore: Add support for get_expected_throughput opcode Maxim Altshul
2016-06-20 13:00     ` Maxim Altshul
2016-06-20 13:00     ` [PATCH 3/3] mac80211: mesh: Add support for HW RC implementation Maxim Altshul
2016-06-21  9:18       ` Johannes Berg [this message]
2016-06-21  9:18         ` Johannes Berg
2016-06-21  0:10 ` [PATCH 0/3] *** Mesh Path Selection Metric Calculation *** Peter Oh
2016-06-21  0:10   ` Peter Oh
2016-06-21  6:18   ` Kalle Valo
2016-06-21 12:19 ` Bob Copeland
2016-06-21 12:19   ` Bob Copeland
2016-06-21 12:23   ` Machani, Yaniv
2016-06-21 12:23     ` Machani, Yaniv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466500699.3170.7.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arik@wizery.com \
    --cc=davem@davemloft.net \
    --cc=eliad@wizery.com \
    --cc=guym@ti.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=maxim.altshul@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=yanivma@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.