Re: [PATCH] Fix access point rate for trunk and stable
- From: Dan Williams <dcbw redhat com>
- To: Helmut Schaa <hschaa suse de>
- Cc: networkmanager-list gnome org
- Subject: Re: [PATCH] Fix access point rate for trunk and stable
- Date: Fri, 26 Oct 2007 23:02:35 -0400
On Fri, 2007-10-26 at 13:22 +0200, Helmut Schaa wrote:
> Hi Dan,
>
> attached is an adopted version of my patch using a uint32 for the rate
> property. Please have a look at my inline comments.
Applied, thanks!
I also took this opportunity to change the 802-11-wireless device's
'bitrate' property and the 802-3-ethernet device's 'speed' property to
uint32 so that everything here is consistent. The D-Bus API has changed
accordingly (from 'i' -> 'u' for the nm-device-* members).
One inconsistency is that the ethernet device's speed is reported in
Mb/s (directly from ethtool, actually) but wireless speeds are in b/s.
I think that's OK, because we need finer granularity with wireless, but
wired speeds can't be represented in only a uint32. We'll live with it.
Dan
> Am Montag, 8. Oktober 2007 15:58:20 schrieb Dan Williams:
> > Yeah, I think I'd prefer that. If we ever get a rate out of
> > wpa_supplicant that is < 0, NM should just clamp to 0. I think this
> > would only happen in error conditions, and with the D-Bus interface
> > errors are reported through exceptions anyway.
> >
> > So making it UINT32 would be great.
> >
> > As for the divisor, the reason wext and wpa_supplicant (which just
> > passes back what wext tells it) use large numbers is because Jean was
> > trying to write wext for a wide range of hardware, which is fine. But
> > it turns out that it's only used for 802.11 hardware really, which means
> > a certain number of rates starting at 1Mb/s. There does need to be at
> > least .1Mb/s resolution. So I propose the following:
> >
> > 1) Make it a uint32
> > 2) clamp the int to (0, INT_MAX) and cast to uint32 (ie, leave the value
> > as-is with out dividing by 1000000)
>
> The division by 1000000 is only used in nm-tool to convert the rate to Mb/s.
>
> > There certainly are bitrates of 5.5 Mb/s for example, that we need to
> > make available, and the way it was done before with an integer and
> > dividing by 1000000 meant that could not be done.
>
> Thanks,
> Helmut
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]