~ubuntu-branches/ubuntu/jaunty/linux-backports-modules-2.6.28/jaunty-security

« back to all changes in this revision

Viewing changes to updates/compat-wireless-2.6/drivers/net/wireless/iwlwifi/iwl-agn-rs.c

  • Committer: Bazaar Package Importer
  • Author(s): Tim Gardner, Tim Gardner
  • Date: 2009-03-16 13:18:35 UTC
  • Revision ID: james.westby@ubuntu.com-20090316131835-e4iz7bsdkzqv4obn
Tags: 2.6.28-10.10
[Tim Gardner]

* Updated compat-wireless/wireless-testing to master-2009-03-11
* Bump ABI

Show diffs side-by-side

added added

removed removed

Lines of Context:
801
801
            !(info->flags & IEEE80211_TX_STAT_AMPDU))
802
802
                return;
803
803
 
804
 
        retries = info->status.rates[0].count - 1;
 
804
        if (info->flags & IEEE80211_TX_STAT_AMPDU)
 
805
                retries = 0;
 
806
        else
 
807
                retries = info->status.rates[0].count - 1;
805
808
 
806
809
        if (retries > 15)
807
810
                retries = 15;
913
916
                        tpt = search_tbl->expected_tpt[rs_index];
914
917
                else
915
918
                        tpt = 0;
916
 
                if (info->flags & IEEE80211_TX_CTL_AMPDU)
 
919
                if (info->flags & IEEE80211_TX_STAT_AMPDU)
917
920
                        rs_collect_tx_data(search_win, rs_index, tpt,
918
921
                                           info->status.ampdu_ack_len,
919
922
                                           info->status.ampdu_ack_map);
929
932
                        tpt = curr_tbl->expected_tpt[rs_index];
930
933
                else
931
934
                        tpt = 0;
932
 
                if (info->flags & IEEE80211_TX_CTL_AMPDU)
 
935
                if (info->flags & IEEE80211_TX_STAT_AMPDU)
933
936
                        rs_collect_tx_data(window, rs_index, tpt,
934
937
                                           info->status.ampdu_ack_len,
935
938
                                           info->status.ampdu_ack_map);
941
944
        /* If not searching for new mode, increment success/failed counter
942
945
         * ... these help determine when to start searching again */
943
946
        if (lq_sta->stay_in_tbl) {
944
 
                if (info->flags & IEEE80211_TX_CTL_AMPDU) {
 
947
                if (info->flags & IEEE80211_TX_STAT_AMPDU) {
945
948
                        lq_sta->total_success += info->status.ampdu_ack_map;
946
949
                        lq_sta->total_failed +=
947
950
                             (info->status.ampdu_ack_len - info->status.ampdu_ack_map);
1700
1703
        u16 high_low;
1701
1704
        s32 sr;
1702
1705
        u8 tid = MAX_TID_COUNT;
 
1706
        struct iwl_tid_data *tid_data;
1703
1707
 
1704
1708
        IWL_DEBUG_RATE(priv, "rate scale calculate new rate for skb\n");
1705
1709
 
1896
1900
                if (high != IWL_RATE_INVALID && sr >= IWL_RATE_INCREASE_TH)
1897
1901
                        scale_action = 1;
1898
1902
                else if (low != IWL_RATE_INVALID)
1899
 
                        scale_action = -1;
 
1903
                        scale_action = 0;
1900
1904
        }
1901
1905
 
1902
1906
        /* Both adjacent throughputs are measured, but neither one has better
1917
1921
                                        sr >= IWL_RATE_INCREASE_TH) {
1918
1922
                                scale_action = 1;
1919
1923
                        } else {
1920
 
                                IWL_DEBUG_RATE(priv,
1921
 
                                    "decrease rate because of high tpt\n");
1922
 
                                scale_action = -1;
 
1924
                                scale_action = 0;
1923
1925
                        }
1924
1926
 
1925
1927
                /* Lower adjacent rate's throughput is measured */
2035
2037
                        if ((lq_sta->last_tpt > IWL_AGG_TPT_THREHOLD) &&
2036
2038
                            (lq_sta->tx_agg_tid_en & (1 << tid)) &&
2037
2039
                            (tid != MAX_TID_COUNT)) {
2038
 
                                IWL_DEBUG_RATE(priv, "try to aggregate tid %d\n", tid);
2039
 
                                rs_tl_turn_on_agg(priv, tid, lq_sta, sta);
 
2040
                                tid_data =
 
2041
                                   &priv->stations[lq_sta->lq.sta_id].tid[tid];
 
2042
                                if (tid_data->agg.state == IWL_AGG_OFF) {
 
2043
                                        IWL_DEBUG_RATE(priv,
 
2044
                                                       "try to aggregate tid %d\n",
 
2045
                                                       tid);
 
2046
                                        rs_tl_turn_on_agg(priv, tid,
 
2047
                                                          lq_sta, sta);
 
2048
                                }
2040
2049
                        }
2041
2050
                        lq_sta->action_counter = 0;
2042
2051
                        rs_set_stay_in_table(priv, 0, lq_sta);
2464
2473
                             u32 *rate_n_flags, int index)
2465
2474
{
2466
2475
        struct iwl_priv *priv;
 
2476
        u8 valid_tx_ant;
 
2477
        u8 ant_sel_tx;
2467
2478
 
2468
2479
        priv = lq_sta->drv;
 
2480
        valid_tx_ant = priv->hw_params.valid_tx_ant;
2469
2481
        if (lq_sta->dbg_fixed_rate) {
2470
 
                if (index < 12) {
 
2482
                ant_sel_tx =
 
2483
                  ((lq_sta->dbg_fixed_rate & RATE_MCS_ANT_ABC_MSK)
 
2484
                  >> RATE_MCS_ANT_POS);
 
2485
                if ((valid_tx_ant & ant_sel_tx) == ant_sel_tx) {
2471
2486
                        *rate_n_flags = lq_sta->dbg_fixed_rate;
 
2487
                        IWL_DEBUG_RATE(priv, "Fixed rate ON\n");
2472
2488
                } else {
2473
 
                        if (lq_sta->band == IEEE80211_BAND_5GHZ)
2474
 
                                *rate_n_flags = 0x800D;
2475
 
                        else
2476
 
                                *rate_n_flags = 0x820A;
 
2489
                        lq_sta->dbg_fixed_rate = 0;
 
2490
                        IWL_ERR(priv,
 
2491
                            "Invalid antenna selection 0x%X, Valid is 0x%X\n",
 
2492
                            ant_sel_tx, valid_tx_ant);
 
2493
                        IWL_DEBUG_RATE(priv, "Fixed rate OFF\n");
2477
2494
                }
2478
 
                IWL_DEBUG_RATE(priv, "Fixed rate ON\n");
2479
2495
        } else {
2480
2496
                IWL_DEBUG_RATE(priv, "Fixed rate OFF\n");
2481
2497
        }
2526
2542
        ssize_t ret;
2527
2543
 
2528
2544
        struct iwl_lq_sta *lq_sta = file->private_data;
 
2545
        struct iwl_priv *priv;
 
2546
        struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
2529
2547
 
 
2548
        priv = lq_sta->drv;
2530
2549
        buff = kmalloc(1024, GFP_KERNEL);
2531
2550
        if (!buff)
2532
2551
                return -ENOMEM;
2537
2556
                        lq_sta->active_legacy_rate);
2538
2557
        desc += sprintf(buff+desc, "fixed rate 0x%X\n",
2539
2558
                        lq_sta->dbg_fixed_rate);
 
2559
        desc += sprintf(buff+desc, "valid_tx_ant %s%s%s\n",
 
2560
            (priv->hw_params.valid_tx_ant & ANT_A) ? "ANT_A," : "",
 
2561
            (priv->hw_params.valid_tx_ant & ANT_B) ? "ANT_B," : "",
 
2562
            (priv->hw_params.valid_tx_ant & ANT_C) ? "ANT_C" : "");
 
2563
        desc += sprintf(buff+desc, "lq type %s\n",
 
2564
           (is_legacy(tbl->lq_type)) ? "legacy" : "HT");
 
2565
        if (is_Ht(tbl->lq_type)) {
 
2566
                desc += sprintf(buff+desc, " %s",
 
2567
                   (is_siso(tbl->lq_type)) ? "SISO" :
 
2568
                   ((is_mimo2(tbl->lq_type)) ? "MIMO2" : "MIMO3"));
 
2569
                   desc += sprintf(buff+desc, " %s",
 
2570
                   (tbl->is_fat) ? "40MHz" : "20MHz");
 
2571
                desc += sprintf(buff+desc, " %s\n", (tbl->is_SGI) ? "SGI" : "");
 
2572
        }
2540
2573
        desc += sprintf(buff+desc, "general:"
2541
2574
                "flags=0x%X mimo-d=%d s-ant0x%x d-ant=0x%x\n",
2542
2575
                lq_sta->lq.general_params.flags,