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 <[email protected]>
Candela Technologies Inc http://www.candelatech.com
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html