ARM: debug: qcom: add UART addresses to Kconfig help for APQ8084
[pandora-kernel.git] / drivers / staging / rtl8187se / r8180.h
1 /*
2  * This is part of rtl8180 OpenSource driver.
3  * Copyright (C) Andrea Merello 2004-2005  <andrea.merello@gmail.com>
4  * Released under the terms of GPL (General Public Licence)
5  *
6  * Parts of this driver are based on the GPL part of the official realtek driver
7  *
8  * Parts of this driver are based on the rtl8180 driver skeleton from Patric
9  * Schenke & Andres Salomon
10  *
11  * Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver
12  *
13  * We want to thanks the Authors of those projects and the Ndiswrapper project
14  * Authors.
15  */
16
17 #ifndef R8180H
18 #define R8180H
19
20 #include <linux/interrupt.h>
21
22 #define RTL8180_MODULE_NAME "r8180"
23 #define DMESG(x, a...) printk(KERN_INFO RTL8180_MODULE_NAME ": " x "\n", ## a)
24 #define DMESGW(x, a...) printk(KERN_WARNING RTL8180_MODULE_NAME ": WW:" x "\n", ## a)
25 #define DMESGE(x, a...) printk(KERN_WARNING RTL8180_MODULE_NAME ": EE:" x "\n", ## a)
26
27 #include <linux/module.h>
28 #include <linux/kernel.h>
29 #include <linux/ioport.h>
30 #include <linux/sched.h>
31 #include <linux/types.h>
32 #include <linux/slab.h>
33 #include <linux/netdevice.h>
34 #include <linux/pci.h>
35 #include <linux/etherdevice.h>
36 #include <linux/delay.h>
37 #include <linux/rtnetlink.h> /* for rtnl_lock() */
38 #include <linux/wireless.h>
39 #include <linux/timer.h>
40 #include <linux/proc_fs.h> /* Necessary because we use the proc fs. */
41 #include <linux/if_arp.h>
42 #include "ieee80211/ieee80211.h"
43 #include <asm/io.h>
44
45 #define EPROM_93c46 0
46 #define EPROM_93c56 1
47
48 #define RTL_IOCTL_WPA_SUPPLICANT (SIOCIWFIRSTPRIV + 30)
49
50 #define DEFAULT_FRAG_THRESHOLD 2342U
51 #define MIN_FRAG_THRESHOLD 256U
52 #define DEFAULT_RTS_THRESHOLD 2342U
53 #define MIN_RTS_THRESHOLD 0U
54 #define MAX_RTS_THRESHOLD 2342U
55 #define DEFAULT_BEACONINTERVAL 0x64U
56
57 #define DEFAULT_RETRY_RTS 7
58 #define DEFAULT_RETRY_DATA 7
59
60 #define BEACON_QUEUE 6
61
62 #define aSifsTime 10
63
64 #define sCrcLng 4
65 #define sAckCtsLng 112 /* bits in ACK and CTS frames. */
66 /* +by amy 080312. */
67 #define RATE_ADAPTIVE_TIMER_PERIOD 300
68
69 enum wireless_mode {
70         WIRELESS_MODE_UNKNOWN = 0x00,
71         WIRELESS_MODE_A = 0x01,
72         WIRELESS_MODE_B = 0x02,
73         WIRELESS_MODE_G = 0x04,
74         WIRELESS_MODE_AUTO = 0x08,
75 };
76
77 struct chnl_access_setting {
78         u16 sifs_timer;
79         u16 difs_timer;
80         u16 slot_time_timer;
81         u16 eifs_timer;
82         u16 cwmin_index;
83         u16 cwmax_index;
84 };
85
86 enum nic_t {
87         NIC_8185 = 1,
88         NIC_8185B
89 };
90
91 typedef u32 AC_CODING;
92 #define AC0_BE  0 /* ACI: 0x00 */ /* Best Effort. */
93 #define AC1_BK  1 /* ACI: 0x01 */ /* Background. */
94 #define AC2_VI  2 /* ACI: 0x10 */ /* Video. */
95 #define AC3_VO  3 /* ACI: 0x11 */ /* Voice. */
96 #define AC_MAX  4 /* Max: define total number; Should not to be used as a real
97                    * enum.
98                    */
99
100 /*
101  * ECWmin/ECWmax field.
102  * Ref: WMM spec 2.2.2: WME Parameter Element, p.13.
103  */
104 typedef union _ECW {
105         u8 charData;
106         struct {
107                 u8 ECWmin:4;
108                 u8 ECWmax:4;
109         } f;    /* Field */
110 } ECW, *PECW;
111
112 /*
113  * ACI/AIFSN Field. Ref: WMM spec 2.2.2: WME Parameter Element, p.12.
114  */
115 typedef union _ACI_AIFSN {
116         u8 charData;
117
118         struct {
119                 u8 AIFSN:4;
120                 u8 ACM:1;
121                 u8 ACI:2;
122                 u8 Reserved:1;
123         } f;    /* Field */
124 } ACI_AIFSN, *PACI_AIFSN;
125
126 /*
127  * AC Parameters Record Format.
128  * Ref: WMM spec 2.2.2: WME Parameter Element, p.12.
129  */
130 typedef union _AC_PARAM {
131         u32 longData;
132         u8 charData[4];
133
134         struct {
135                 ACI_AIFSN AciAifsn;
136                 ECW Ecw;
137                 u16 TXOPLimit;
138         } f;    /* Field */
139 } AC_PARAM, *PAC_PARAM;
140
141 struct buffer {
142         struct buffer *next;
143         u32 *buf;
144         dma_addr_t dma;
145 };
146
147 /* YJ,modified,080828. */
148 struct stats {
149         unsigned long txrdu;
150         unsigned long rxrdu;
151         unsigned long rxnolast;
152         unsigned long rxnodata;
153         unsigned long rxnopointer;
154         unsigned long txnperr;
155         unsigned long txresumed;
156         unsigned long rxerr;
157         unsigned long rxoverflow;
158         unsigned long rxint;
159         unsigned long txbkpokint;
160         unsigned long txbepoking;
161         unsigned long txbkperr;
162         unsigned long txbeperr;
163         unsigned long txnpokint;
164         unsigned long txhpokint;
165         unsigned long txhperr;
166         unsigned long ints;
167         unsigned long shints;
168         unsigned long txoverflow;
169         unsigned long rxdmafail;
170         unsigned long txbeacon;
171         unsigned long txbeaconerr;
172         unsigned long txlpokint;
173         unsigned long txlperr;
174         unsigned long txretry; /* retry number tony 20060601 */
175         unsigned long rxcrcerrmin; /* crc error (0-500) */
176         unsigned long rxcrcerrmid; /* crc error (500-1000) */
177         unsigned long rxcrcerrmax; /* crc error (>1000) */
178         unsigned long rxicverr; /* ICV error */
179 };
180
181 #define MAX_LD_SLOT_NUM 10
182 #define KEEP_ALIVE_INTERVAL 20 /* in seconds. */
183 #define CHECK_FOR_HANG_PERIOD 2 /* be equal to watchdog check time. */
184 #define DEFAULT_KEEP_ALIVE_LEVEL 1
185 #define DEFAULT_SLOT_NUM 2
186 #define POWER_PROFILE_AC 0
187 #define POWER_PROFILE_BATTERY 1
188
189 struct link_detect_t {
190         u32 rx_frame_num[MAX_LD_SLOT_NUM]; /* number of Rx Frame.
191                                             * CheckForHang_period  to determine
192                                             * link status.
193                                             */
194         u16 slot_num; /* number of CheckForHang period to determine link status,
195                        * default is 2.
196                        */
197         u16 slot_index;
198         u32 num_tx_ok_in_period; /* number of packet transmitted during
199                                   * CheckForHang.
200                                   */
201         u32 num_rx_ok_in_period; /* number of packet received during
202                                   * CheckForHang.
203                                   */
204         u8 idle_count; /* (KEEP_ALIVE_INTERVAL / CHECK_FOR_HANG_PERIOD) */
205         u32 last_num_tx_unicast;
206         u32 last_num_rx_unicast;
207
208         bool b_busy_traffic; /* when it is set to 1, UI cann't scan at will. */
209 };
210
211 /* YJ,modified,080828,end */
212
213 /* by amy for led
214  * ==========================================================================
215  * LED customization.
216  * ==========================================================================
217  */
218 enum led_strategy_8185 {
219         SW_LED_MODE0,
220         SW_LED_MODE1,
221         HW_LED, /* HW control 2 LEDs, LED0 and LED1 (there are 4 different
222                  * control modes). */
223 };
224
225 enum rt_rf_power_state {
226         RF_ON,
227         RF_SLEEP,
228         RF_OFF
229 };
230
231 enum _ReasonCode {
232         unspec_reason = 0x1,
233         auth_not_valid = 0x2,
234         deauth_lv_ss = 0x3,
235         inactivity = 0x4,
236         ap_overload = 0x5,
237         class2_err = 0x6,
238         class3_err = 0x7,
239         disas_lv_ss = 0x8,
240         asoc_not_auth = 0x9,
241
242         /* ----MIC_CHECK */
243         mic_failure = 0xe,
244         /* ----END MIC_CHECK */
245
246         /* Reason code defined in 802.11i D10.0 p.28. */
247         invalid_IE = 0x0d,
248         four_way_tmout = 0x0f,
249         two_way_tmout = 0x10,
250         IE_dismatch = 0x11,
251         invalid_Gcipher = 0x12,
252         invalid_Pcipher = 0x13,
253         invalid_AKMP = 0x14,
254         unsup_RSNIEver = 0x15,
255         invalid_RSNIE = 0x16,
256         auth_802_1x_fail = 0x17,
257         ciper_reject = 0x18,
258
259         /* Reason code defined in 7.3.1.7, 802.1e D13.0, p.42. Added by Annie,
260          * 2005-11-15.
261          */
262         QoS_unspec = 0x20, /* 32 */
263         QAP_bandwidth = 0x21, /* 33 */
264         poor_condition = 0x22, /* 34 */
265         no_facility = 0x23, /* 35 */
266         /* Where is 36??? */
267         req_declined = 0x25, /* 37 */
268         invalid_param = 0x26, /* 38 */
269         req_not_honored = 0x27, /* 39 */
270         TS_not_created = 0x2F, /* 47 */
271         DL_not_allowed = 0x30, /* 48 */
272         dest_not_exist = 0x31, /* 49 */
273         dest_not_QSTA = 0x32, /* 50 */
274 };
275
276 enum rt_ps_mode {
277         ACTIVE, /* Active/Continuous access. */
278         MAX_PS, /* Max power save mode. */
279         FAST_PS /* Fast power save mode. */
280 };
281
282 /* by amy for power save. */
283 struct r8180_priv {
284         struct pci_dev *pdev;
285
286         short epromtype;
287         int irq;
288         struct ieee80211_device *ieee80211;
289
290         short plcp_preamble_mode; /* 0:auto 1:short 2:long */
291
292         spinlock_t irq_th_lock;
293         spinlock_t tx_lock;
294         spinlock_t ps_lock;
295         spinlock_t rf_ps_lock;
296
297         u16 irq_mask;
298         short irq_enabled;
299         struct net_device *dev;
300         short chan;
301         short sens;
302         short max_sens;
303         u8 chtxpwr[15]; /* channels from 1 to 14, 0 not used. */
304         u8 chtxpwr_ofdm[15]; /* channels from 1 to 14, 0 not used. */
305         u8 channel_plan;  /* it's the channel plan index. */
306         short up;
307         short crcmon; /* if 1 allow bad crc frame reception in monitor mode. */
308
309         struct timer_list scan_timer;
310         spinlock_t scan_lock;
311         u8 active_probe;
312         struct semaphore wx_sem;
313         short hw_wep;
314
315         short digphy;
316         short antb;
317         short diversity;
318         u32 key0[4];
319         short (*rf_set_sens)(struct net_device *dev, short sens);
320         void (*rf_set_chan)(struct net_device *dev, short ch);
321         void (*rf_close)(struct net_device *dev);
322         void (*rf_init)(struct net_device *dev);
323         void (*rf_sleep)(struct net_device *dev);
324         void (*rf_wakeup)(struct net_device *dev);
325         /* short rate; */
326         short promisc;
327         /* stats */
328         struct stats stats;
329         struct link_detect_t link_detect; /* YJ,add,080828 */
330         struct iw_statistics wstats;
331
332         /* RX stuff. */
333         u32 *rxring;
334         u32 *rxringtail;
335         dma_addr_t rxringdma;
336         struct buffer *rxbuffer;
337         struct buffer *rxbufferhead;
338         int rxringcount;
339         u16 rxbuffersize;
340
341         struct sk_buff *rx_skb;
342
343         short rx_skb_complete;
344
345         u32 rx_prevlen;
346
347         u32 *txmapring;
348         u32 *txbkpring;
349         u32 *txbepring;
350         u32 *txvipring;
351         u32 *txvopring;
352         u32 *txhpring;
353         dma_addr_t txmapringdma;
354         dma_addr_t txbkpringdma;
355         dma_addr_t txbepringdma;
356         dma_addr_t txvipringdma;
357         dma_addr_t txvopringdma;
358         dma_addr_t txhpringdma;
359         u32 *txmapringtail;
360         u32 *txbkpringtail;
361         u32 *txbepringtail;
362         u32 *txvipringtail;
363         u32 *txvopringtail;
364         u32 *txhpringtail;
365         u32 *txmapringhead;
366         u32 *txbkpringhead;
367         u32 *txbepringhead;
368         u32 *txvipringhead;
369         u32 *txvopringhead;
370         u32 *txhpringhead;
371         struct buffer *txmapbufs;
372         struct buffer *txbkpbufs;
373         struct buffer *txbepbufs;
374         struct buffer *txvipbufs;
375         struct buffer *txvopbufs;
376         struct buffer *txhpbufs;
377         struct buffer *txmapbufstail;
378         struct buffer *txbkpbufstail;
379         struct buffer *txbepbufstail;
380         struct buffer *txvipbufstail;
381         struct buffer *txvopbufstail;
382         struct buffer *txhpbufstail;
383
384         int txringcount;
385         int txbuffsize;
386         struct tasklet_struct irq_rx_tasklet;
387         u8 dma_poll_mask;
388
389         /* adhoc/master mode stuff. */
390         u32 *txbeaconringtail;
391         dma_addr_t txbeaconringdma;
392         u32 *txbeaconring;
393         int txbeaconcount;
394         struct buffer *txbeaconbufs;
395         struct buffer *txbeaconbufstail;
396
397         u8 retry_data;
398         u8 retry_rts;
399         u16 rts;
400
401         /* by amy for led. */
402         enum led_strategy_8185 led_strategy;
403         /* by amy for led. */
404
405         /* by amy for power save. */
406         struct timer_list watch_dog_timer;
407         bool bInactivePs;
408         bool bSwRfProcessing;
409         enum rt_rf_power_state eInactivePowerState;
410         enum rt_rf_power_state eRFPowerState;
411         u32 RfOffReason;
412         bool RFChangeInProgress;
413         bool SetRFPowerStateInProgress;
414         u8 RFProgType;
415         bool bLeisurePs;
416         enum rt_ps_mode dot11PowerSaveMode;
417         u8 TxPollingTimes;
418
419         bool bApBufOurFrame; /* TRUE if AP buffer our unicast data , we will
420                               * keep eAwake until receive data or timeout.
421                               */
422         u8 WaitBufDataBcnCount;
423         u8 WaitBufDataTimeOut;
424
425         /* by amy for power save. */
426         /* by amy for antenna. */
427         u8 EEPROMSwAntennaDiversity;
428         bool EEPROMDefaultAntenna1;
429         u8 RegSwAntennaDiversityMechanism;
430         bool bSwAntennaDiverity;
431         u8 RegDefaultAntenna;
432         bool bDefaultAntenna1;
433         u8 SignalStrength;
434         long Stats_SignalStrength;
435         long LastSignalStrengthInPercent; /* In percentage, used for smoothing,
436                                            * e.g. Moving Average.
437                                            */
438         u8 SignalQuality; /* in 0-100 index. */
439         long Stats_SignalQuality;
440         long RecvSignalPower; /* in dBm. */
441         long Stats_RecvSignalPower;
442         u8 LastRxPktAntenna; /* +by amy 080312 Antenna which received the lasted
443                               * packet. 0: Aux, 1:Main. Added by Roger,
444                               * 2008.01.25.
445                               */
446         u32 AdRxOkCnt;
447         long AdRxSignalStrength;
448         u8 CurrAntennaIndex; /* Index to current Antenna (both Tx and Rx). */
449         u8 AdTickCount; /* Times of SwAntennaDiversityTimer happened. */
450         u8 AdCheckPeriod; /* # of period SwAntennaDiversityTimer to check Rx
451                            * signal strength for SW Antenna Diversity.
452                            */
453         u8 AdMinCheckPeriod; /* Min value of AdCheckPeriod. */
454         u8 AdMaxCheckPeriod; /* Max value of AdCheckPeriod. */
455         long AdRxSsThreshold; /* Signal strength threshold to switch antenna. */
456         long AdMaxRxSsThreshold; /* Max value of AdRxSsThreshold. */
457         bool bAdSwitchedChecking; /* TRUE if we shall shall check Rx signal
458                                    * strength for last time switching antenna.
459                                    */
460         long AdRxSsBeforeSwitched; /* Rx signal strength before we switched
461                                     * antenna.
462                                     */
463         struct timer_list SwAntennaDiversityTimer;
464         /* by amy for antenna {by amy 080312 */
465
466         /* Crystal calibration. Added by Roger, 2007.12.11. */
467
468         bool bXtalCalibration; /* Crystal calibration.*/
469         u8 XtalCal_Xin; /* Crystal calibration for Xin. 0~7.5pF */
470         u8 XtalCal_Xout; /* Crystal calibration for Xout. 0~7.5pF */
471
472         /* Tx power tracking with thermal meter indication.
473          * Added by Roger, 2007.12.11.
474          */
475
476         bool bTxPowerTrack; /* Tx Power tracking. */
477         u8 ThermalMeter; /* Thermal meter reference indication. */
478
479         /* Dynamic Initial Gain Adjustment Mechanism. Added by Bruce,
480          * 2007-02-14.
481          */
482         bool bDigMechanism; /* TRUE if DIG is enabled, FALSE ow. */
483         bool bRegHighPowerMechanism; /* For High Power Mechanism. 061010,
484                                       * by rcnjko.
485                                       */
486         u32 FalseAlarmRegValue;
487         u8 RegDigOfdmFaUpTh; /* Upper threshold of OFDM false alarm, which is
488                               * used in DIG.
489                               */
490         u8 DIG_NumberFallbackVote;
491         u8 DIG_NumberUpgradeVote;
492         /* For HW antenna diversity, added by Roger, 2008.01.30. */
493         u32 AdMainAntennaRxOkCnt; /* Main antenna Rx OK count. */
494         u32 AdAuxAntennaRxOkCnt; /* Aux antenna Rx OK count. */
495         bool bHWAdSwitched; /* TRUE if we has switched default antenna by HW
496                              * evaluation.
497                              */
498         /* RF High Power upper/lower threshold. */
499         u8 RegHiPwrUpperTh;
500         u8 RegHiPwrLowerTh;
501         /* RF RSSI High Power upper/lower Threshold. */
502         u8 RegRSSIHiPwrUpperTh;
503         u8 RegRSSIHiPwrLowerTh;
504         /* Current CCK RSSI value to determine CCK high power, asked by SD3 DZ,
505          * by Bruce, 2007-04-12.
506          */
507         u8 CurCCKRSSI;
508         bool bCurCCKPkt;
509         /* High Power Mechanism. Added by amy, 080312. */
510         bool bToUpdateTxPwr;
511         long UndecoratedSmoothedSS;
512         long UndecoratedSmoothedRxPower;
513         u8 RSSI;
514         char RxPower;
515         u8 InitialGain;
516         /* For adjust Dig Threshold during Legacy/Leisure Power Save Mode. */
517         u32 DozePeriodInPast2Sec;
518         /* Don't access BB/RF under disable PLL situation. */
519         u8 InitialGainBackUp;
520         u8 RegBModeGainStage;
521         /* by amy for rate adaptive */
522         struct timer_list rateadapter_timer;
523         u32 RateAdaptivePeriod;
524         bool bEnhanceTxPwr;
525         bool bUpdateARFR;
526         int ForcedDataRate; /* Force Data Rate. 0: Auto, 0x02: 1M ~ 0x6C: 54M.)
527                              */
528         u32 NumTxUnicast; /* YJ,add,080828,for keep alive. */
529         u8 keepAliveLevel; /*YJ,add,080828,for KeepAlive. */
530         unsigned long NumTxOkTotal;
531         u16 LastRetryCnt;
532         u16 LastRetryRate;
533         unsigned long LastTxokCnt;
534         unsigned long LastRxokCnt;
535         u16 CurrRetryCnt;
536         unsigned long LastTxOKBytes;
537         unsigned long NumTxOkBytesTotal;
538         u8 LastFailTxRate;
539         long LastFailTxRateSS;
540         u8 FailTxRateCount;
541         u32 LastTxThroughput;
542         /* for up rate. */
543         unsigned short bTryuping;
544         u8 CurrTxRate; /* the rate before up. */
545         u16 CurrRetryRate;
546         u16 TryupingCount;
547         u8 TryDownCountLowData;
548         u8 TryupingCountNoData;
549
550         u8 CurrentOperaRate;
551         struct work_struct reset_wq;
552         struct work_struct watch_dog_wq;
553         short ack_tx_to_ieee;
554
555         u8 dma_poll_stop_mask;
556
557         u16 ShortRetryLimit;
558         u16 LongRetryLimit;
559         u16 EarlyRxThreshold;
560         u32 TransmitConfig;
561         u32 ReceiveConfig;
562         u32 IntrMask;
563
564         struct chnl_access_setting ChannelAccessSetting;
565 };
566
567 #define MANAGE_PRIORITY 0
568 #define BK_PRIORITY 1
569 #define BE_PRIORITY 2
570 #define VI_PRIORITY 3
571 #define VO_PRIORITY 4
572 #define HI_PRIORITY 5
573 #define BEACON_PRIORITY 6
574
575 #define LOW_PRIORITY VI_PRIORITY
576 #define NORM_PRIORITY VO_PRIORITY
577 /* AC2Queue mapping. */
578 #define AC2Q(_ac) (((_ac) == WME_AC_VO) ? VO_PRIORITY : \
579                 ((_ac) == WME_AC_VI) ? VI_PRIORITY : \
580                 ((_ac) == WME_AC_BK) ? BK_PRIORITY : \
581                 BE_PRIORITY)
582
583 short rtl8180_tx(struct net_device *dev, u8 *skbuf, int len, int priority,
584                  bool morefrag, short fragdesc, int rate);
585
586 u8 read_nic_byte(struct net_device *dev, int x);
587 u32 read_nic_dword(struct net_device *dev, int x);
588 u16 read_nic_word(struct net_device *dev, int x);
589 void write_nic_byte(struct net_device *dev, int x, u8 y);
590 void write_nic_word(struct net_device *dev, int x, u16 y);
591 void write_nic_dword(struct net_device *dev, int x, u32 y);
592 void force_pci_posting(struct net_device *dev);
593
594 void rtl8180_rtx_disable(struct net_device *);
595 void rtl8180_set_anaparam(struct net_device *dev, u32 a);
596 void rtl8185_set_anaparam2(struct net_device *dev, u32 a);
597 void rtl8180_set_hw_wep(struct net_device *dev);
598 void rtl8180_no_hw_wep(struct net_device *dev);
599 void rtl8180_update_msr(struct net_device *dev);
600 void rtl8180_beacon_tx_disable(struct net_device *dev);
601 void rtl8180_beacon_rx_disable(struct net_device *dev);
602 int rtl8180_down(struct net_device *dev);
603 int rtl8180_up(struct net_device *dev);
604 void rtl8180_commit(struct net_device *dev);
605 void rtl8180_set_chan(struct net_device *dev, short ch);
606 void write_phy(struct net_device *dev, u8 adr, u8 data);
607 void write_phy_cck(struct net_device *dev, u8 adr, u32 data);
608 void write_phy_ofdm(struct net_device *dev, u8 adr, u32 data);
609 void rtl8185_tx_antenna(struct net_device *dev, u8 ant);
610 void rtl8185_rf_pins_enable(struct net_device *dev);
611 void IPSEnter(struct net_device *dev);
612 void IPSLeave(struct net_device *dev);
613 int get_curr_tx_free_desc(struct net_device *dev, int priority);
614 void UpdateInitialGain(struct net_device *dev);
615 bool SetAntennaConfig87SE(struct net_device *dev, u8 DefaultAnt,
616                           bool bAntDiversity);
617
618 void rtl8185b_adapter_start(struct net_device *dev);
619 void rtl8185b_rx_enable(struct net_device *dev);
620 void rtl8185b_tx_enable(struct net_device *dev);
621 void rtl8180_reset(struct net_device *dev);
622 void rtl8185b_irq_enable(struct net_device *dev);
623 void fix_rx_fifo(struct net_device *dev);
624 void fix_tx_fifo(struct net_device *dev);
625 void rtl8225z2_SetTXPowerLevel(struct net_device *dev, short ch);
626 void rtl8180_rate_adapter(struct work_struct *work);
627 bool MgntActSet_RF_State(struct net_device *dev, enum rt_rf_power_state StateToSet,
628                          u32 ChangeSource);
629
630 #endif
631
632 /* fun with the built-in ieee80211 stack... */
633 extern int ieee80211_crypto_init(void);
634 extern void ieee80211_crypto_deinit(void);
635 extern int ieee80211_crypto_tkip_init(void);
636 extern void ieee80211_crypto_tkip_exit(void);
637 extern int ieee80211_crypto_ccmp_init(void);
638 extern void ieee80211_crypto_ccmp_exit(void);
639 extern int ieee80211_crypto_wep_init(void);
640 extern void ieee80211_crypto_wep_exit(void);