From: Ben Greear <greearb@candelatech.com>
To: Arend van Spriel <arend@broadcom.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: mac80211-hwsim and tx-rates.
Date: Wed, 11 Mar 2015 15:06:18 -0700 [thread overview]
Message-ID: <5500BC5A.9040809@candelatech.com> (raw)
In-Reply-To: <5500B417.9070307@broadcom.com>
On 03/11/2015 02:31 PM, Arend van Spriel wrote:
> On 03/11/15 22:07, Ben Greear wrote:
>> When using the user-space transport, the netlink frame sent to user-space
>> has a rate index and retry count, and nothing else. Is there a
>> reliable way to know in user-space what index maps to what actual rate?
>
> Not sure what you are exactly looking for, but maybe the function cfg80211_calculate_bitrate() in net/wireless/util.c may provide you some answers.
Well, that would be useful in the kernel, but in user-space w/hardware sim,
as far as I can tell we only have this rate info:
/**
* struct hwsim_tx_rate - rate selection/status
*
* @idx: rate index to attempt to send with
* @count: number of tries in this rate before going to the next rate
*
* A value of -1 for @idx indicates an invalid rate and, if used
* in an array of retry rates, that no more rates should be tried.
*
* When used for transmit status reporting, the driver should
* always report the rate and number of retries used.
*
*/
struct hwsim_tx_rate {
s8 idx;
u8 count;
} __packed;
I don't see a good way to tie that idx to an actual rate (which involves
flags, nss, mcs values, etc).
Maybe I should also just send the info I care about, which is a 'bps' rate,
channel-width indication, SGI, etc as separate netlink attributes....
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2015-03-11 22:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 21:07 mac80211-hwsim and tx-rates Ben Greear
2015-03-11 21:31 ` Arend van Spriel
2015-03-11 22:06 ` Ben Greear [this message]
2015-03-14 10:47 ` Bob Copeland
2015-03-14 16:14 ` Ben Greear
2015-03-14 17:48 ` Bob Copeland
2015-03-14 18:04 ` Ben Greear
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=5500BC5A.9040809@candelatech.com \
--to=greearb@candelatech.com \
--cc=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).