~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/net/wireless/rtlwifi/rtl8192ce/def.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
#define CHIP_92C                        0x01
122
122
#define CHIP_88C                        0x00
123
123
 
 
124
/* Add vendor information into chip version definition.
 
125
 * Add UMC B-Cut and RTL8723 chip info definition.
 
126
 *
 
127
 * BIT 7        Reserved
 
128
 * BIT 6        UMC BCut
 
129
 * BIT 5        Manufacturer(TSMC/UMC)
 
130
 * BIT 4        TEST/NORMAL
 
131
 * BIT 3        8723 Version
 
132
 * BIT 2        8723?
 
133
 * BIT 1        1T2R?
 
134
 * BIT 0        88C/92C
 
135
*/
 
136
 
124
137
enum version_8192c {
125
138
        VERSION_A_CHIP_92C = 0x01,
126
139
        VERSION_A_CHIP_88C = 0x00,
127
140
        VERSION_B_CHIP_92C = 0x11,
128
141
        VERSION_B_CHIP_88C = 0x10,
 
142
        VERSION_TEST_CHIP_88C = 0x00,
 
143
        VERSION_TEST_CHIP_92C = 0x01,
 
144
        VERSION_NORMAL_TSMC_CHIP_88C = 0x10,
 
145
        VERSION_NORMAL_TSMC_CHIP_92C = 0x11,
 
146
        VERSION_NORMAL_TSMC_CHIP_92C_1T2R = 0x13,
 
147
        VERSION_NORMAL_UMC_CHIP_88C_A_CUT = 0x30,
 
148
        VERSION_NORMAL_UMC_CHIP_92C_A_CUT = 0x31,
 
149
        VERSION_NORMAL_UMC_CHIP_92C_1T2R_A_CUT = 0x33,
 
150
        VERSION_NORMA_UMC_CHIP_8723_1T1R_A_CUT = 0x34,
 
151
        VERSION_NORMA_UMC_CHIP_8723_1T1R_B_CUT = 0x3c,
 
152
        VERSION_NORMAL_UMC_CHIP_88C_B_CUT = 0x70,
 
153
        VERSION_NORMAL_UMC_CHIP_92C_B_CUT = 0x71,
 
154
        VERSION_NORMAL_UMC_CHIP_92C_1T2R_B_CUT = 0x73,
129
155
        VERSION_UNKNOWN = 0x88,
130
156
};
131
157
 
254
280
        u8 *p_cmdbuffer;
255
281
};
256
282
 
 
283
static inline u8 _rtl92c_get_chnl_group(u8 chnl)
 
284
{
 
285
        u8 group = 0;
 
286
 
 
287
        if (chnl < 3)
 
288
                group = 0;
 
289
        else if (chnl < 9)
 
290
                group = 1;
 
291
        else
 
292
                group = 2;
 
293
 
 
294
        return group;
 
295
}
 
296
 
 
297
/* NOTE: reference to rtl8192c_rates struct */
 
298
static inline int _rtl92c_rate_mapping(struct ieee80211_hw *hw, bool isHT,
 
299
                                       u8 desc_rate, bool first_ampdu)
 
300
{
 
301
        struct rtl_priv *rtlpriv = rtl_priv(hw);
 
302
        int rate_idx = 0;
 
303
 
 
304
        if (first_ampdu) {
 
305
                if (false == isHT) {
 
306
                        switch (desc_rate) {
 
307
                        case DESC92C_RATE1M:
 
308
                                rate_idx = 0;
 
309
                                break;
 
310
                        case DESC92C_RATE2M:
 
311
                                rate_idx = 1;
 
312
                                break;
 
313
                        case DESC92C_RATE5_5M:
 
314
                                rate_idx = 2;
 
315
                                break;
 
316
                        case DESC92C_RATE11M:
 
317
                                rate_idx = 3;
 
318
                                break;
 
319
                        case DESC92C_RATE6M:
 
320
                                rate_idx = 4;
 
321
                                break;
 
322
                        case DESC92C_RATE9M:
 
323
                                rate_idx = 5;
 
324
                                break;
 
325
                        case DESC92C_RATE12M:
 
326
                                rate_idx = 6;
 
327
                                break;
 
328
                        case DESC92C_RATE18M:
 
329
                                rate_idx = 7;
 
330
                                break;
 
331
                        case DESC92C_RATE24M:
 
332
                                rate_idx = 8;
 
333
                                break;
 
334
                        case DESC92C_RATE36M:
 
335
                                rate_idx = 9;
 
336
                                break;
 
337
                        case DESC92C_RATE48M:
 
338
                                rate_idx = 10;
 
339
                                break;
 
340
                        case DESC92C_RATE54M:
 
341
                                rate_idx = 11;
 
342
                                break;
 
343
                        default:
 
344
                                RT_TRACE(rtlpriv, COMP_ERR, DBG_DMESG,
 
345
                                         ("Rate %d is not support, set to "
 
346
                                        "1M rate.\n", desc_rate));
 
347
                                rate_idx = 0;
 
348
                                break;
 
349
                        }
 
350
                } else {
 
351
                        rate_idx = 11;
 
352
                }
 
353
                return rate_idx;
 
354
        }
 
355
        switch (desc_rate) {
 
356
        case DESC92C_RATE1M:
 
357
                rate_idx = 0;
 
358
                break;
 
359
        case DESC92C_RATE2M:
 
360
                rate_idx = 1;
 
361
                break;
 
362
        case DESC92C_RATE5_5M:
 
363
                rate_idx = 2;
 
364
                break;
 
365
        case DESC92C_RATE11M:
 
366
                rate_idx = 3;
 
367
                break;
 
368
        case DESC92C_RATE6M:
 
369
                rate_idx = 4;
 
370
                break;
 
371
        case DESC92C_RATE9M:
 
372
                rate_idx = 5;
 
373
                break;
 
374
        case DESC92C_RATE12M:
 
375
                rate_idx = 6;
 
376
                break;
 
377
        case DESC92C_RATE18M:
 
378
                rate_idx = 7;
 
379
                break;
 
380
        case DESC92C_RATE24M:
 
381
                rate_idx = 8;
 
382
                break;
 
383
        case DESC92C_RATE36M:
 
384
                rate_idx = 9;
 
385
                break;
 
386
        case DESC92C_RATE48M:
 
387
                rate_idx = 10;
 
388
                break;
 
389
        case DESC92C_RATE54M:
 
390
                rate_idx = 11;
 
391
                break;
 
392
        /* TODO: How to mapping MCS rate? */
 
393
        /*  NOTE: referenc to __ieee80211_rx */
 
394
        default:
 
395
                rate_idx = 11;
 
396
                break;
 
397
        }
 
398
        return rate_idx;
 
399
}
 
400
 
257
401
#endif