Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Aug 2005 13:46:20 +0200
From:      =?iso-8859-2?Q?Daniel_Dvo=F8=E1k?= <dandee@hellteam.net>
To:        "'Milan Obuch'" <current@dino.sk>, <freebsd-current@freebsd.org>
Subject:   RE: ATHCTRL for ATH
Message-ID:  <20050821114623.C47CD4E704@pipa.profix.cz>
In-Reply-To: <200508210809.57257.current@dino.sk>

next in thread | previous in thread | raw e-mail | index | archive | help
" Computed values need=20
to be set per hand with sysctl, but it is really simple."

Do you think that it is right way ? If S. Long said this:

"One of primary reasons for improving wireless support is to give =
companies
the tools to put FreeBSD into their wireless devices - the guy at =
FreeBSD
who is adding wireless support is under contract from wireless companies =
to
do the work," said Long.

Wireless device manufacturers may prefer to use FreeBSD rather than the
rival open source operating system, Linux, because of features such as =
its
support for fine-grained access controls and security policies, =
according to
Long.

Source:
http://news.zdnet.co.uk/software/linuxunix/0,39020390,39214098,00.htm

If I were a wireless device manufacturer and found out that there is no =
way
how the BFU without knowledge source code for formula about distance =
could
put these ACKTIMEOUT and CTSTIMEOUT values into wireless devices, I =
wouldn=B4t
probably choose the FreeBSD as a suitable OS and I would stay supporting
Linux in my wireless devices because it has been supporting athctrl for =
a
long time.

In wireless devices as ASUS AirBOX and others which use linux, the user
doesn=B4t have to face the task of counting these values on the basis of
distance.

Dan
-----Original Message-----
From: owner-freebsd-current@freebsd.org
[mailto:owner-freebsd-current@freebsd.org] On Behalf Of Milan Obuch
Sent: Sunday, August 21, 2005 8:10 AM
To: freebsd-current@freebsd.org
Subject: Re: ATHCTRL for ATH

On Sunday 21 August 2005 03:32, Daniel Dvorak wrote:
> Hi all,
>
> I have one question for you. My friend use Linux Debian and he use =
atheros
> cards with madwifi drivers. Sam work together with others developers =
and I
> found out that he committed interesting tool for linux users.
>
> This tool is athctrl, which you know "athctrl program that sets the
ack+cts
> timeouts based on the distance between two stations". And I think that
this
> feature is useful not only for linux users but of course for users of
> others os like FreeBSD etc.
>
> So, I do not know why the tool is not in main tree fbsd, maybe there =
is
> reason for this and I do not know. Which it is my mistake, so if it is
> true, I am sorry. Of course, I could not imagine how much work =
somebody
has
> to do for this, but I would like to only ask if possible now before =
final
> release 6.0 or in the future.
>
> Does somebody think somebody could commit this tool for FreeBSD users =
?
>
> Thank you for your attention and time.
>
> Bye
>
> Daniel
>

While I do not think this will be in FreeBSD's tree, you could test
following=20
simple program to check if it meets your expectations. Computed values =
need=20
to be set per hand with sysctl, but it is really simple.

Milan

/*-
 * Copyright (c) 2002-2004 Gunter Burchardt, Local-Web AG
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer,
 *    without modification.
 * 2. Redistributions in binary form must reproduce at minimum a =
disclaimer
 *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and =
any
 *    redistribution must be conditioned upon including a substantially
 *    similar Disclaimer requirement for further binary redistribution.
 * 3. Neither the names of the above-listed copyright holders nor the =
names
 *    of any contributors may be used to endorse or promote products =
derived
 *    from this software without specific prior written permission.
 *
 * Alternatively, this software may be distributed under the terms of =
the
 * GNU General Public License ("GPL") version 2 as published by the Free
 * Software Foundation.
 *
 * NO WARRANTY
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, =
MERCHANTIBILITY
 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT =
SHALL
 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, =
EXEMPLARY,
 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT =
OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR =
BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED =
OF
 * THE POSSIBILITY OF SUCH DAMAGES.
 *
 */

/*
 * Simple Atheros-specific tool to inspect and set atheros specific =
values
 * athctrl [-i interface] [-d distance]
 * (default interface is ath0).
 */

#include <stdio.h>
#include <unistd.h>


static void usage(void)
{
    fprintf(stderr,
        "Atheros driver control\n"
        "Copyright (c) 2002-2004 Gunter Burchardt, Local-Web AG\n"
        "\n"
        "usage: athctrl [-i interface] [-d distance]\n"
        "\n"
        "options:\n"
        "   -h   show this usage\n"
        "   -d   specify the maximum distance of a sta or the =
distance\n"
                "        of the master\n");

    exit(1);
}

int
main(int argc, char *argv[])
{
        int distance =3D -1;
        int c;

        for (;;) {
        c =3D getopt(argc, argv, "d:h");
        if (c < 0)
            break;
        switch (c) {
        case 'h':
            usage();
            break;
        case 'd':
                        distance =3D atoi(optarg);
            break;

        default:
            usage();
            break;
        }
    }

        if(distance >=3D 0){
        int slottime =3D 9+(distance/300)+((distance%300)?1:0);
                int acktimeout =3D slottime*2+3;
                int ctstimeout =3D slottime*2+3;

                printf("Setting distance on interface ath to %i =
meters\n",=20
distance);
                fprintf(stdout, "slottime: %d\n", slottime);
                fprintf(stdout, "acktimeout: %d\n", acktimeout);
                fprintf(stdout, "ctstimeout: %d\n", ctstimeout);
        }else{
                usage();
        }
}
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to =
"freebsd-current-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050821114623.C47CD4E704>