]> rtime.felk.cvut.cz Git - frescor/fwp.git/blob - patches/ac_param_setup_24-rc3.patch
wme_test: fixed termination under FRSH
[frescor/fwp.git] / patches / ac_param_setup_24-rc3.patch
1 Index: linux2.6-devel/drivers/net/wireless/rt2x00/rt2x00mac.c
2 ===================================================================
3 --- linux2.6-devel.orig/drivers/net/wireless/rt2x00/rt2x00mac.c 2007-12-04 10:47:32.000000000 +0100
4 +++ linux2.6-devel/drivers/net/wireless/rt2x00/rt2x00mac.c      2007-12-04 10:47:57.000000000 +0100
5 @@ -421,6 +421,7 @@
6          * The passed variables are stored as real value ((2^n)-1).
7          * Ralink registers require to know the bit number 'n'.
8          */
9 +#if 0
10         if (params->cw_min)
11                 ring->tx_params.cw_min = fls(params->cw_min);
12         else
13 @@ -435,6 +436,35 @@
14                 ring->tx_params.aifs = params->aifs;
15         else
16                 ring->tx_params.aifs = 2;
17 +#endif
18 +
19 +       switch (queue) {
20 +               case 0:
21 +                       ring->tx_params.aifs = 2;
22 +                       ring->tx_params.cw_max = 4;
23 +                       ring->tx_params.cw_min = 3;
24 +                       break;
25 +               case 1:
26 +                       ring->tx_params.aifs = 2;
27 +                       ring->tx_params.cw_max = 5;
28 +                       ring->tx_params.cw_min = 4;
29 +                       break;
30 +               case 2:
31 +                       ring->tx_params.aifs = 3;
32 +                       ring->tx_params.cw_max = 10;
33 +                       ring->tx_params.cw_min = 5;
34 +                       break;
35 +               case 3:
36 +                       ring->tx_params.aifs = 7;
37 +                       ring->tx_params.cw_max = 10;
38 +                       ring->tx_params.cw_min = 5;
39 +                       break;
40 +               default:
41 +                       ring->tx_params.aifs = 7;
42 +                       ring->tx_params.cw_max = 10;
43 +                       ring->tx_params.cw_min = 5;
44 +                       break;
45 +       }
46  
47         INFO(rt2x00dev,
48              "Configured TX ring %d - CWmin: %d, CWmax: %d, Aifs: %d.\n",