Changeset 1980

Show
Ignore:
Timestamp:
01/18/07 20:59:57 (2 years ago)
Author:
proski
Message:

Allow choosing multiple rate control algorithms when embedded into kernel

When MadWifi is integrated into Linux tree, allow selecting more rate
control algorithms in addition to the default one.

Select the default rate control algorithm based on the kernel
configuration if it's available.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ath/if_ath.c

    r1977 r1980  
    103103          (((u_int8_t *)(p))[2] << 16) | (((u_int8_t *)(p))[3] << 24))) 
    104104 
     105/* Default rate control algorithm */ 
     106#ifdef CONFIG_ATHEROS_RATE_DEFAULT 
     107#define DEF_RATE_CTL CONFIG_ATHEROS_RATE_DEFAULT 
     108#else 
     109#define DEF_RATE_CTL "sample" 
     110#endif 
     111 
    105112enum { 
    106113        ATH_LED_TX, 
     
    254261static int ath_xchanmode = AH_TRUE;             /* enable extended channels */ 
    255262static char *autocreate = NULL; 
    256 static char *ratectl = "sample"
     263static char *ratectl = DEF_RATE_CTL
    257264static int rfkill = -1; 
    258265static int countrycode = -1; 
     
    304311MODULE_PARM_DESC(rfkill, "Enable/disable RFKILL capability"); 
    305312MODULE_PARM_DESC(autocreate, "Create ath device in [sta|ap|wds|adhoc|ahdemo|monitor] mode. defaults to sta, use 'none' to disable"); 
    306 MODULE_PARM_DESC(ratectl, "Rate control algorithm [amrr|onoe|sample], defaults to 'sample'"); 
     313MODULE_PARM_DESC(ratectl, "Rate control algorithm [amrr|onoe|sample], defaults to '" DEF_RATE_CTL "'"); 
    307314 
    308315static int      ath_debug = 0; 
  • trunk/patches/2.4/Config.in

    r1968 r1980  
    11dep_bool '   Atheros 802.11(a/b/g) PCI/Cardbus support' CONFIG_ATHEROS $CONFIG_PCI $CONFIG_NET_RADIO 
    22if [ "$CONFIG_ATHEROS" = "y" ]; then 
    3    choice '    Atheros: Rate Control Algorithm'    \ 
    4         "Sample         CONFIG_ATHEROS_RATE_SAMPLE \ 
    5          Onoe           CONFIG_ATHEROS_RATE_ONOE   \ 
    6          AMRR           CONFIG_ATHEROS_RATE_AMRR" Sample 
     3 
     4   choice '    Atheros: Default Transmission Rate Control Algorithm'    \ 
     5        "Sample         CONFIG_ATHEROS_RATE_DEFAULT_SAMPLE \ 
     6         Onoe           CONFIG_ATHEROS_RATE_DEFAULT_ONOE   \ 
     7         AMRR           CONFIG_ATHEROS_RATE_DEFAULT_AMRR" Sample 
     8 
     9  if [ "$CONFIG_ATHEROS_RATE_DEFAULT_AMRR" = "y" ]; then 
     10    define_bool CONFIG_ATHEROS_RATE_AMRR y 
     11    define_string CONFIG_ATHEROS_RATE_DEFAULT "amrr" 
     12  else 
     13    dep_bool '    Adaptive Multi-Rate Retry control algorithm' \ 
     14        CONFIG_ATHEROS_RATE_AMRR $CONFIG_ATHEROS 
     15  fi 
     16 
     17  if [ "$CONFIG_ATHEROS_RATE_DEFAULT_ONOE" = "y" ]; then 
     18    define_bool CONFIG_ATHEROS_RATE_ONOE y 
     19    define_string CONFIG_ATHEROS_RATE_DEFAULT "onoe" 
     20  else 
     21    dep_bool '    Atsushi Onoe rate control algorithm' \ 
     22        CONFIG_ATHEROS_RATE_ONOE $CONFIG_ATHEROS 
     23  fi 
     24 
     25  if [ "$CONFIG_ATHEROS_RATE_DEFAULT_SAMPLE" = "y" ]; then 
     26    define_bool CONFIG_ATHEROS_RATE_SAMPLE y 
     27    define_string CONFIG_ATHEROS_RATE_DEFAULT "sample" 
     28  else 
     29    dep_bool '    Sample Rate control algorithm' \ 
     30        CONFIG_ATHEROS_RATE_SAMPLE $CONFIG_ATHEROS 
     31  fi 
     32 
    733fi 
  • trunk/patches/2.6/Kconfig

    r1968 r1980  
    1818 
    1919choice 
    20         prompt "Atheros: Transmission Rate Control Algorithm" 
     20        prompt "Atheros: Default Transmission Rate Control Algorithm" 
    2121        depends on ATHEROS 
    22         default ATHEROS_RATE_SAMPLE 
     22        default ATHEROS_RATE_DEFAULT_SAMPLE 
    2323        help 
    24           Rate control algorithms determine how the transmission rate is 
    25           selected based on the quality of the connection. 
     24          Select the rate control algorithm to be used by default.  You 
     25          can select additional algorithms below. 
     26 
     27        config ATHEROS_RATE_DEFAULT_AMRR 
     28                bool "AMRR" 
     29                select ATHEROS_RATE_AMRR 
     30 
     31        config ATHEROS_RATE_DEFAULT_ONOE 
     32                bool "Onoe" 
     33                select ATHEROS_RATE_ONOE 
     34 
     35        config ATHEROS_RATE_DEFAULT_SAMPLE 
     36                bool "Sample" 
     37                select ATHEROS_RATE_SAMPLE 
     38 
     39endchoice 
     40 
     41config ATHEROS_RATE_DEFAULT 
     42        string 
     43        default "amrr" if ATHEROS_RATE_DEFAULT_AMRR 
     44        default "onoe" if ATHEROS_RATE_DEFAULT_ONOE 
     45        default "sample" if ATHEROS_RATE_DEFAULT_SAMPLE 
     46 
     47config ATHEROS_RATE_AMRR 
     48        bool "Adaptive Multi-Rate Retry control algorithm" 
     49        depends on ATHEROS 
     50        default y 
     51        help 
     52          Enable Adaptive Multi-Rate Retry control algorithm. 
     53 
     54config ATHEROS_RATE_ONOE 
     55        bool "Atsushi Onoe's rate control algorithm" 
     56        depends on ATHEROS 
     57        default y 
     58        help 
     59          Enable Atsushi Onoe's rate control algorithm. 
    2660 
    2761config ATHEROS_RATE_SAMPLE 
    28         bool "Sample" 
     62        bool "Sample Rate control algorithm" 
     63        depends on ATHEROS 
     64        default y 
    2965        help 
    3066          SampleRate chooses the bitrate it predicts will provide the 
     
    4076          a bitrate if it experiences several successive losses. 
    4177 
    42 config ATHEROS_RATE_ONOE 
    43         bool "Onoe" 
    44         help 
    45           Use Atsushi Onoe's rate control algorithm. 
    46  
    47 config ATHEROS_RATE_AMRR 
    48         bool "AMRR" 
    49         help 
    50           Adaptive Multi Rate Retry control algorithm. 
    51  
    52 endchoice