~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/staging/rtl8192e/ieee80211/ieee80211.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
#define IWEVCUSTOM 0x8c02
48
48
#endif
49
49
 
50
 
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
51
 
#ifndef __bitwise
52
 
#define __bitwise __attribute__((bitwise))
53
 
#endif
54
 
typedef __u16  __le16;
55
 
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,27))
56
 
struct iw_spy_data{
57
 
        /* --- Standard spy support --- */
58
 
        int                     spy_number;
59
 
        u_char                  spy_address[IW_MAX_SPY][ETH_ALEN];
60
 
        struct iw_quality       spy_stat[IW_MAX_SPY];
61
 
        /* --- Enhanced spy support (event) */
62
 
        struct iw_quality       spy_thr_low; /* Low threshold */
63
 
        struct iw_quality       spy_thr_high; /* High threshold */
64
 
        u_char                  spy_thr_under[IW_MAX_SPY];
65
 
};
66
 
#endif
67
 
#endif
68
 
 
69
50
#ifndef container_of
70
51
/**
71
52
 * container_of - cast a member of a structure out to the containing structure
370
351
#define ieee80211_wx_get_scan           ieee80211_wx_get_scan_rsl
371
352
#define ieee80211_wx_set_encode         ieee80211_wx_set_encode_rsl
372
353
#define ieee80211_wx_get_encode         ieee80211_wx_get_encode_rsl
373
 
#if WIRELESS_EXT >= 18
374
354
#define ieee80211_wx_set_mlme           ieee80211_wx_set_mlme_rsl
375
355
#define ieee80211_wx_set_auth           ieee80211_wx_set_auth_rsl
376
356
#define ieee80211_wx_set_encode_ext     ieee80211_wx_set_encode_ext_rsl
377
357
#define ieee80211_wx_get_encode_ext     ieee80211_wx_get_encode_ext_rsl
378
 
#endif
379
358
 
380
359
 
381
360
typedef struct ieee_param {
408
387
}ieee_param;
409
388
 
410
389
 
411
 
#if WIRELESS_EXT < 17
412
 
#define IW_QUAL_QUAL_INVALID   0x10
413
 
#define IW_QUAL_LEVEL_INVALID  0x20
414
 
#define IW_QUAL_NOISE_INVALID  0x40
415
 
#define IW_QUAL_QUAL_UPDATED   0x1
416
 
#define IW_QUAL_LEVEL_UPDATED  0x2
417
 
#define IW_QUAL_NOISE_UPDATED  0x4
418
 
#endif
419
 
 
420
390
// linux under 2.6.9 release may not support it, so modify it for common use
421
391
#define MSECS(t) msecs_to_jiffies(t)
422
392
#define msleep_interruptible_rsl  msleep_interruptible
880
850
 *       information for frames received.  Not setting these will not cause
881
851
 *       any adverse affects. */
882
852
struct ieee80211_rx_stats {
883
 
#if 1
884
853
        u32 mac_time[2];
885
854
        s8 rssi;
886
855
        u8 signal;
895
864
        u32 beacon_time;
896
865
        u8 nic_type;
897
866
        u16       Length;
898
 
        //      u8        DataRate;      // In 0.5 Mbps
899
867
        u8        SignalQuality; // in 0-100 index.
900
868
        s32       RecvSignalPower; // Real power in dBm for this packet, no beautification and aggregation.
901
869
        s8        RxPower; // in dBm Translate from PWdB
924
892
        bool      bIsAMPDU;
925
893
        bool      bFirstMPDU;
926
894
        bool      bContainHTC;
927
 
        bool      RxIs40MHzPacket;
928
895
        u32       RxPWDBAll;
929
896
        u8        RxMIMOSignalStrength[4];        // in 0~100 index
930
897
        s8        RxMIMOSignalQuality[2];
931
898
        bool      bPacketMatchBSSID;
932
899
        bool      bIsCCK;
933
900
        bool      bPacketToSelf;
934
 
        //added by amy
935
901
        u8*       virtual_address;
936
 
        u16          packetlength;              // Total packet length: Must equal to sum of all FragLength
937
 
        u16          fraglength;                        // FragLength should equal to PacketLength in non-fragment case
938
 
        u16          fragoffset;                        // Data offset for this fragment
939
 
        u16          ntotalfrag;
940
 
        bool              bisrxaggrsubframe;
941
902
        bool              bPacketBeacon;        //cosa add for rssi
942
903
        bool              bToSelfBA;            //cosa add for rssi
943
904
        char      cck_adc_pwdb[4];      //cosa add for rx path selection
944
 
        u16               Seq_Num;
945
 
#endif
946
 
 
947
905
};
948
906
 
949
907
/* IEEE 802.11 requires that STA supports concurrent reception of at least
1298
1256
#define QOS_OUI_PARAM_SUB_TYPE          1
1299
1257
#define QOS_VERSION_1                   1
1300
1258
#define QOS_AIFSN_MIN_VALUE             2
1301
 
#if 1
 
1259
 
1302
1260
struct ieee80211_qos_information_element {
1303
1261
        u8 elementID;
1304
1262
        u8 length;
1373
1331
        u16 surp_band_allow;
1374
1332
        u16 medium_time;
1375
1333
}__attribute__((packed));
1376
 
#endif
 
1334
 
1377
1335
enum eap_type {
1378
1336
        EAP_PACKET = 0,
1379
1337
        EAPOL_START,
1495
1453
#define MAX_RECEIVE_BUFFER_SIZE 9100
1496
1454
 
1497
1455
//UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP
1498
 
//#define UP2AC(up)     ((up<3) ? ((up==0)?1:0) : (up>>1))
1499
 
#if 1
1500
1456
#define UP2AC(up) (                \
1501
1457
        ((up) < 1) ? WME_AC_BE : \
1502
1458
        ((up) < 3) ? WME_AC_BK : \
1503
1459
        ((up) < 4) ? WME_AC_BE : \
1504
1460
        ((up) < 6) ? WME_AC_VI : \
1505
1461
        WME_AC_VO)
1506
 
#endif
 
1462
 
1507
1463
//AC Mapping to UP, using in Tx part for selecting the corresponding TX queue
1508
1464
#define AC2UP(_ac)      (       \
1509
1465
        ((_ac) == WME_AC_VO) ? 6 : \
1538
1494
        u16                                     ht_info_len;
1539
1495
 
1540
1496
        HT_SPEC_VER                     ht_spec_ver;
1541
 
        //HT_CAPABILITY_ELE                     bdHTCapEle;
1542
 
        //HT_INFORMATION_ELE            bdHTInfoEle;
1543
1497
 
1544
1498
        bool                            aggregation;
1545
1499
        bool                            long_slot_time;
1559
1513
        /* Ensure null-terminated for any debug msgs */
1560
1514
        u8 ssid[IW_ESSID_MAX_SIZE + 1];
1561
1515
        u8 ssid_len;
1562
 
#if 1
1563
1516
        struct ieee80211_qos_data qos_data;
1564
 
#else
1565
 
       // Qos related. Added by Annie, 2005-11-01.
1566
 
        BSS_QOS   BssQos;
1567
 
#endif
1568
1517
 
1569
1518
        //added by amy for LEAP
1570
1519
        bool    bWithAironetIE;
1631
1580
        struct list_head list;
1632
1581
};
1633
1582
 
1634
 
#if 1
1635
1583
enum ieee80211_state {
1636
1584
 
1637
1585
        /* the card is not linked at all */
1670
1618
        IEEE80211_LINKED_SCANNING,
1671
1619
 
1672
1620
};
1673
 
#else
1674
 
enum ieee80211_state {
1675
 
        IEEE80211_UNINITIALIZED = 0,
1676
 
        IEEE80211_INITIALIZED,
1677
 
        IEEE80211_ASSOCIATING,
1678
 
        IEEE80211_ASSOCIATED,
1679
 
        IEEE80211_AUTHENTICATING,
1680
 
        IEEE80211_AUTHENTICATED,
1681
 
        IEEE80211_SHUTDOWN
1682
 
};
1683
 
#endif
1684
1621
 
1685
1622
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
1686
1623
#define DEFAULT_FTS 2346
1730
1667
        SW_Fsync
1731
1668
}Fsync_State;
1732
1669
 
1733
 
// Power save mode configured.
1734
 
typedef enum _RT_PS_MODE
1735
 
{
1736
 
        eActive,        // Active/Continuous access.
1737
 
        eMaxPs,         // Max power save mode.
1738
 
        eFastPs         // Fast power save mode.
1739
 
}RT_PS_MODE;
1740
 
 
1741
 
typedef enum _IPS_CALLBACK_FUNCION
1742
 
{
1743
 
        IPS_CALLBACK_NONE = 0,
1744
 
        IPS_CALLBACK_MGNT_LINK_REQUEST = 1,
1745
 
        IPS_CALLBACK_JOIN_REQUEST = 2,
1746
 
}IPS_CALLBACK_FUNCION;
1747
 
 
1748
 
typedef enum _RT_JOIN_ACTION{
1749
 
        RT_JOIN_INFRA   = 1,
1750
 
        RT_JOIN_IBSS  = 2,
1751
 
        RT_START_IBSS = 3,
1752
 
        RT_NO_ACTION  = 4,
1753
 
}RT_JOIN_ACTION;
1754
 
 
1755
1670
typedef struct _IbssParms{
1756
1671
        u16   atimWin;
1757
1672
}IbssParms, *PIbssParms;
1758
1673
#define MAX_NUM_RATES   264 // Max num of support rates element: 8,  Max num of ext. support rate: 255. 061122, by rcnjko.
1759
1674
 
1760
 
// RF state.
1761
 
typedef enum _RT_RF_POWER_STATE
1762
 
{
1763
 
        eRfOn,
1764
 
        eRfSleep,
1765
 
        eRfOff
1766
 
}RT_RF_POWER_STATE;
1767
 
 
1768
 
typedef struct _RT_POWER_SAVE_CONTROL
1769
 
{
1770
 
 
1771
 
        //
1772
 
        // Inactive Power Save(IPS) : Disable RF when disconnected
1773
 
        //
1774
 
        bool                            bInactivePs;
1775
 
        bool                            bIPSModeBackup;
1776
 
        bool                            bSwRfProcessing;
1777
 
        RT_RF_POWER_STATE       eInactivePowerState;
1778
 
        struct work_struct      InactivePsWorkItem;
1779
 
        struct timer_list       InactivePsTimer;
1780
 
 
1781
 
        // Return point for join action
1782
 
        IPS_CALLBACK_FUNCION    ReturnPoint;
1783
 
 
1784
 
        // Recored Parameters for rescheduled JoinRequest
1785
 
        bool                            bTmpBssDesc;
1786
 
        RT_JOIN_ACTION          tmpJoinAction;
1787
 
        struct ieee80211_network tmpBssDesc;
1788
 
 
1789
 
        // Recored Parameters for rescheduled MgntLinkRequest
1790
 
        bool                            bTmpScanOnly;
1791
 
        bool                            bTmpActiveScan;
1792
 
        bool                            bTmpFilterHiddenAP;
1793
 
        bool                            bTmpUpdateParms;
1794
 
        u8                                      tmpSsidBuf[33];
1795
 
        OCTET_STRING                    tmpSsid2Scan;
1796
 
        bool                            bTmpSsid2Scan;
1797
 
        u8                                      tmpNetworkType;
1798
 
        u8                                      tmpChannelNumber;
1799
 
        u16                                     tmpBcnPeriod;
1800
 
        u8                                      tmpDtimPeriod;
1801
 
        u16                                     tmpmCap;
1802
 
        OCTET_STRING                    tmpSuppRateSet;
1803
 
        u8                                      tmpSuppRateBuf[MAX_NUM_RATES];
1804
 
        bool                            bTmpSuppRate;
1805
 
        IbssParms                               tmpIbpm;
1806
 
        bool                            bTmpIbpm;
1807
 
 
1808
 
        //
1809
 
        // Leisre Poswer Save : Disable RF if connected but traffic is not busy
1810
 
        //
1811
 
        bool                            bLeisurePs;
1812
 
        u32                             PowerProfile;
1813
 
        u8                              LpsIdleCount;
1814
 
        u8                              RegMaxLPSAwakeIntvl;
1815
 
        u8                              LPSAwakeIntvl;
1816
 
 
1817
 
        u32                             CurPsLevel;
1818
 
        u32                             RegRfPsLevel;
1819
 
 
1820
 
        bool                            bFwCtrlLPS;
1821
 
        u8                              FWCtrlPSMode;
1822
 
 
1823
 
        bool                            LinkReqInIPSRFOffPgs;
1824
 
        bool                            BufConnectinfoBefore;
1825
 
 
1826
 
}RT_POWER_SAVE_CONTROL,*PRT_POWER_SAVE_CONTROL;
1827
 
 
1828
 
typedef u32 RT_RF_CHANGE_SOURCE;
1829
 
#define RF_CHANGE_BY_SW BIT31
1830
 
#define RF_CHANGE_BY_HW BIT30
1831
 
#define RF_CHANGE_BY_PS BIT29
1832
 
#define RF_CHANGE_BY_IPS BIT28
1833
 
#define RF_CHANGE_BY_INIT       0       // Do not change the RFOff reason. Defined by Bruce, 2008-01-17.
1834
 
 
1835
1675
#ifdef ENABLE_DOT11D
1836
1676
typedef enum
1837
1677
{
1919
1759
        HW_VAR_RATR_0,
1920
1760
        HW_VAR_RRSR,
1921
1761
        HW_VAR_CPU_RST,
1922
 
        HW_VAR_CECHK_BSSID,
 
1762
        HW_VAR_CHECK_BSSID,
1923
1763
        HW_VAR_LBK_MODE,                        // Set lookback mode, 2008.06.11. added by Roger.
1924
1764
        // Set HW related setting for 11N AES bug.
1925
1765
        HW_VAR_AES_11N_FIX,
1963
1803
        u8  LPSDelayCnt;
1964
1804
        bool bIsAggregateFrame;
1965
1805
        bool polling;
1966
 
        void (*LeisurePSLeave)(struct net_device *dev);
 
1806
        void (*LeisurePSLeave)(struct ieee80211_device *ieee);
1967
1807
#endif
1968
1808
 
1969
1809
#ifdef ENABLE_IPS
1971
1811
        bool wx_set_enc;
1972
1812
        struct semaphore ips_sem;
1973
1813
        struct work_struct ips_leave_wq;
1974
 
        void (*ieee80211_ips_leave_wq) (struct net_device *dev);
1975
 
        void (*ieee80211_ips_leave)(struct net_device *dev);
 
1814
        void (*ieee80211_ips_leave_wq) (struct ieee80211_device *ieee);
 
1815
        void (*ieee80211_ips_leave)(struct ieee80211_device *ieee);
1976
1816
#endif
1977
 
        void (*SetHwRegHandler)(struct net_device *dev,u8 variable,u8* val);
 
1817
        void (*SetHwRegHandler)(struct ieee80211_device *ieee, u8 variable, u8 *val);
1978
1818
        u8   (*rtllib_ap_sec_type)(struct ieee80211_device *ieee);
1979
1819
 
1980
1820
        //hw security related
1981
 
//      u8 hwsec_support; //support?
1982
1821
        u8 hwsec_active;  //hw security active.
1983
1822
        bool is_silent_reset;
1984
1823
        bool is_roaming;
1985
1824
        bool ieee_up;
1986
 
        //added by amy
1987
1825
        bool bSupportRemoteWakeUp;
1988
 
        RT_PS_MODE      dot11PowerSaveMode; // Power save mode configured.
1989
1826
        bool actscanning;
1990
1827
        bool beinretry;
1991
 
        RT_RF_POWER_STATE               eRFPowerState;
1992
 
        RT_RF_CHANGE_SOURCE     RfOffReason;
1993
1828
        bool is_set_key;
1994
1829
        //11n spec related I wonder if These info structure need to be moved out of ieee80211_device
1995
1830
 
1996
1831
        //11n HT below
1997
1832
        PRT_HIGH_THROUGHPUT     pHTInfo;
1998
 
        //struct timer_list             SwBwTimer;
1999
 
//      spinlock_t chnlop_spinlock;
2000
1833
        spinlock_t bw_spinlock;
2001
1834
 
2002
1835
        spinlock_t reorder_spinlock;
2012
1845
        u8      bTxUseDriverAssingedRate;
2013
1846
        atomic_t        atm_chnlop;
2014
1847
        atomic_t        atm_swbw;
2015
 
//      u8      HTHighestOperaRate;
2016
 
//      u8      HTCurrentOperaRate;
2017
1848
 
2018
1849
        // 802.11e and WMM Traffic Stream Info (TX)
2019
1850
        struct list_head                Tx_TS_Admit_List;
2025
1856
        struct list_head                Rx_TS_Pending_List;
2026
1857
        struct list_head                Rx_TS_Unused_List;
2027
1858
        RX_TS_RECORD            RxTsRecord[TOTAL_TS_NUM];
2028
 
//#ifdef TO_DO_LIST
2029
1859
        RX_REORDER_ENTRY        RxReorderEntry[128];
2030
1860
        struct list_head                RxReorder_Unused_List;
2031
 
//#endif
2032
 
        // Qos related. Added by Annie, 2005-11-01.
2033
 
//      PSTA_QOS                        pStaQos;
2034
1861
        u8                              ForcedPriority;         // Force per-packet priority 1~7. (default: 0, not to force it.)
2035
1862
 
2036
1863
 
2140
1967
        u16 prev_seq_ctl;       /* used to drop duplicate frames */
2141
1968
 
2142
1969
        /* map of allowed channels. 0 is dummy */
2143
 
        // FIXME: remeber to default to a basic channel plan depending of the PHY type
 
1970
        // FIXME: remember to default to a basic channel plan depending of the PHY type
2144
1971
#ifdef ENABLE_DOT11D
2145
1972
        void* pDot11dInfo;
2146
1973
        bool bGlobalDomain;
2209
2036
 
2210
2037
        /* for PS mode */
2211
2038
        unsigned long last_rx_ps_time;
 
2039
        u8 LPSAwakeIntvl;
 
2040
        u8 RegMaxLPSAwakeIntvl;
2212
2041
 
2213
2042
        /* used if IEEE_SOFTMAC_SINGLE_QUEUE is set */
2214
2043
        struct sk_buff *mgmt_queue_ring[MGMT_QUEUE_NUM];
2215
2044
        int mgmt_queue_head;
2216
2045
        int mgmt_queue_tail;
2217
 
//{ added for rtl819x
2218
2046
#define IEEE80211_QUEUE_LIMIT 128
2219
2047
        u8 AsocRetryCount;
2220
2048
        unsigned int hw_header;
2251
2079
 
2252
2080
        //added by amy for AP roaming
2253
2081
        RT_LINK_DETECT_T        LinkDetectInfo;
2254
 
        //added by amy for ps
2255
 
        RT_POWER_SAVE_CONTROL   PowerSaveControl;
2256
 
//}
 
2082
 
2257
2083
        /* used if IEEE_SOFTMAC_TX_QUEUE is set */
2258
2084
        struct  tx_pending_t tx_pending;
2259
2085
 
2268
2094
        struct delayed_work associate_retry_wq;
2269
2095
         struct delayed_work start_ibss_wq;
2270
2096
         struct delayed_work hw_wakeup_wq;
2271
 
        struct delayed_work hw_sleep_wq;
2272
2097
 
2273
2098
        struct work_struct wx_sync_scan_wq;
2274
2099
        struct workqueue_struct *wq;
2275
 
        // Qos related. Added by Annie, 2005-11-01.
2276
 
        //STA_QOS  StaQos;
2277
 
 
2278
 
        //u32 STA_EDCA_PARAM[4];
2279
 
        //CHANNEL_ACCESS_SETTING ChannelAccessSetting;
2280
 
 
2281
2100
 
2282
2101
        /* Callback functions */
2283
 
        void (*set_security)(struct net_device *dev,
 
2102
        void (*set_security)(struct ieee80211_device *ieee,
2284
2103
                             struct ieee80211_security *sec);
2285
2104
 
2286
2105
        /* Used to TX data frame by using txb structs.
2288
2107
         * is set the flag IEEE_SOFTMAC_TX_QUEUE
2289
2108
         */
2290
2109
        int (*hard_start_xmit)(struct ieee80211_txb *txb,
2291
 
                               struct net_device *dev);
2292
 
 
2293
 
        int (*reset_port)(struct net_device *dev);
2294
 
        int (*is_queue_full) (struct net_device * dev, int pri);
2295
 
 
2296
 
        int (*handle_management) (struct net_device * dev,
 
2110
                               struct ieee80211_device *ieee);
 
2111
 
 
2112
        int (*reset_port)(struct ieee80211_device *ieee);
 
2113
        int (*is_queue_full) (struct ieee80211_device *ieee, int pri);
 
2114
 
 
2115
        int (*handle_management) (struct ieee80211_device *ieee,
2297
2116
                                  struct ieee80211_network * network, u16 type);
2298
 
        int (*is_qos_active) (struct net_device *dev, struct sk_buff *skb);
 
2117
        int (*is_qos_active) (struct ieee80211_device *ieee, struct sk_buff *skb);
2299
2118
 
2300
2119
        /* Softmac-generated frames (mamagement) are TXed via this
2301
2120
         * callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is
2302
2121
         * not set. As some cards may have different HW queues that
2303
2122
         * one might want to use for data and management frames
2304
2123
         * the option to have two callbacks might be useful.
2305
 
         * This fucntion can't sleep.
 
2124
         * This function can't sleep.
2306
2125
         */
2307
2126
        int (*softmac_hard_start_xmit)(struct sk_buff *skb,
2308
 
                               struct net_device *dev);
 
2127
                               struct ieee80211_device *ieee80211);
2309
2128
 
2310
2129
        /* used instead of hard_start_xmit (not softmac_hard_start_xmit)
2311
2130
         * if the IEEE_SOFTMAC_TX_QUEUE feature is used to TX data
2314
2133
         * This function can't sleep.
2315
2134
         */
2316
2135
        void (*softmac_data_hard_start_xmit)(struct sk_buff *skb,
2317
 
                               struct net_device *dev,int rate);
 
2136
                               struct ieee80211_device *ieee80211, int rate);
2318
2137
 
2319
2138
        /* stops the HW queue for DATA frames. Useful to avoid
2320
2139
         * waste time to TX data frame when we are reassociating
2321
2140
         * This function can sleep.
2322
2141
         */
2323
 
        void (*data_hard_stop)(struct net_device *dev);
 
2142
        void (*data_hard_stop)(struct ieee80211_device *ieee80211);
2324
2143
 
2325
2144
        /* OK this is complementar to data_poll_hard_stop */
2326
 
        void (*data_hard_resume)(struct net_device *dev);
 
2145
        void (*data_hard_resume)(struct ieee80211_device *ieee80211);
2327
2146
 
2328
2147
        /* ask to the driver to retune the radio .
2329
2148
         * This function can sleep. the driver should ensure
2330
2149
         * the radio has been swithced before return.
2331
2150
         */
2332
 
        void (*set_chan)(struct net_device *dev,short ch);
 
2151
        void (*set_chan)(struct ieee80211_device *ieee80211, short ch);
2333
2152
 
2334
2153
        /* These are not used if the ieee stack takes care of
2335
2154
         * scanning (IEEE_SOFTMAC_SCAN feature set).
2341
2160
         * it is called in a work_queue when swithcing to ad-hoc mode
2342
2161
         * or in behalf of iwlist scan when the card is associated
2343
2162
         * and root user ask for a scan.
2344
 
         * the fucntion stop_scan should stop both the syncro and
 
2163
         * the function stop_scan should stop both the syncro and
2345
2164
         * background scanning and can sleep.
2346
 
         * The fucntion start_scan should initiate the background
 
2165
         * The function start_scan should initiate the background
2347
2166
         * scanning and can't sleep.
2348
2167
         */
2349
 
        void (*scan_syncro)(struct net_device *dev);
2350
 
        void (*start_scan)(struct net_device *dev);
2351
 
        void (*stop_scan)(struct net_device *dev);
 
2168
        void (*scan_syncro)(struct ieee80211_device *ieee80211);
 
2169
        void (*start_scan)(struct ieee80211_device *ieee80211);
 
2170
        void (*stop_scan)(struct ieee80211_device *ieee80211);
2352
2171
 
2353
2172
        /* indicate the driver that the link state is changed
2354
2173
         * for example it may indicate the card is associated now.
2355
2174
         * Driver might be interested in this to apply RX filter
2356
2175
         * rules or simply light the LINK led
2357
2176
         */
2358
 
        void (*link_change)(struct net_device *dev);
 
2177
        void (*link_change)(struct ieee80211_device *ieee80211);
2359
2178
 
2360
2179
        /* these two function indicates to the HW when to start
2361
2180
         * and stop to send beacons. This is used when the
2363
2182
         * stop_send_bacons is NOT guaranteed to be called only
2364
2183
         * after start_send_beacons.
2365
2184
         */
2366
 
        void (*start_send_beacons) (struct net_device *dev);
2367
 
        void (*stop_send_beacons) (struct net_device *dev);
 
2185
        void (*start_send_beacons) (struct ieee80211_device *dev);
 
2186
        void (*stop_send_beacons) (struct ieee80211_device *dev);
2368
2187
 
2369
2188
        /* power save mode related */
2370
 
        void (*sta_wake_up) (struct net_device *dev);
2371
 
//      void (*ps_request_tx_ack) (struct net_device *dev);
2372
 
        void (*enter_sleep_state) (struct net_device *dev, u32 th, u32 tl);
2373
 
        short (*ps_is_queue_empty) (struct net_device *dev);
2374
 
#if 0
2375
 
        /* Typical STA methods */
2376
 
        int (*handle_auth) (struct net_device * dev,
2377
 
                            struct ieee80211_auth * auth);
2378
 
        int (*handle_deauth) (struct net_device * dev,
2379
 
                              struct ieee80211_deauth * auth);
2380
 
        int (*handle_action) (struct net_device * dev,
2381
 
                              struct ieee80211_action * action,
2382
 
                              struct ieee80211_rx_stats * stats);
2383
 
        int (*handle_disassoc) (struct net_device * dev,
2384
 
                                struct ieee80211_disassoc * assoc);
2385
 
#endif
2386
 
        int (*handle_beacon) (struct net_device * dev, struct ieee80211_beacon * beacon, struct ieee80211_network * network);
2387
 
#if 0
2388
 
        int (*handle_probe_response) (struct net_device * dev,
2389
 
                                      struct ieee80211_probe_response * resp,
2390
 
                                      struct ieee80211_network * network);
2391
 
        int (*handle_probe_request) (struct net_device * dev,
2392
 
                                     struct ieee80211_probe_request * req,
2393
 
                                     struct ieee80211_rx_stats * stats);
2394
 
#endif
2395
 
        int (*handle_assoc_response) (struct net_device * dev, struct ieee80211_assoc_response_frame * resp, struct ieee80211_network * network);
2396
 
 
2397
 
#if 0
2398
 
        /* Typical AP methods */
2399
 
        int (*handle_assoc_request) (struct net_device * dev);
2400
 
        int (*handle_reassoc_request) (struct net_device * dev,
2401
 
                                       struct ieee80211_reassoc_request * req);
2402
 
#endif
 
2189
        void (*sta_wake_up) (struct ieee80211_device *ieee80211);
 
2190
        void (*enter_sleep_state) (struct ieee80211_device *ieee80211, u32 th, u32 tl);
 
2191
        short (*ps_is_queue_empty) (struct ieee80211_device *ieee80211);
 
2192
        int (*handle_beacon) (struct ieee80211_device *ieee80211, struct ieee80211_beacon *beacon, struct ieee80211_network *network);
 
2193
        int (*handle_assoc_response) (struct ieee80211_device *ieee80211, struct ieee80211_assoc_response_frame *resp, struct ieee80211_network *network);
2403
2194
 
2404
2195
        /* check whether Tx hw resouce available */
2405
 
        short (*check_nic_enough_desc)(struct net_device *dev, int queue_index);
 
2196
        short (*check_nic_enough_desc)(struct ieee80211_device *ieee80211, int queue_index);
2406
2197
        //added by wb for HT related
2407
 
//      void (*SwChnlByTimerHandler)(struct net_device *dev, int channel);
2408
 
        void (*SetBWModeHandler)(struct net_device *dev, HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET Offset);
2409
 
//      void (*UpdateHalRATRTableHandler)(struct net_device* dev, u8* pMcsRate);
2410
 
        bool (*GetNmodeSupportBySecCfg)(struct net_device* dev);
2411
 
        void (*SetWirelessMode)(struct net_device* dev, u8 wireless_mode);
2412
 
        bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device* dev);
2413
 
        void (*InitialGainHandler)(struct net_device *dev, u8 Operation);
 
2198
        void (*SetBWModeHandler)(struct ieee80211_device *ieee80211, HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET Offset);
 
2199
        bool (*GetNmodeSupportBySecCfg)(struct ieee80211_device *ieee80211);
 
2200
        void (*SetWirelessMode)(struct ieee80211_device *ieee80211, u8 wireless_mode);
 
2201
        bool (*GetHalfNmodeSupportByAPsHandler)(struct ieee80211_device *ieee80211);
 
2202
        void (*InitialGainHandler)(struct ieee80211_device *ieee80211, u8 Operation);
2414
2203
 
2415
2204
        /* This must be the last item so that it points to the data
2416
2205
         * allocated beyond this structure by alloc_ieee80211 */
2587
2376
 
2588
2377
 
2589
2378
/* ieee80211.c */
2590
 
extern void free_ieee80211(struct net_device *dev);
2591
 
extern struct net_device *alloc_ieee80211(int sizeof_priv);
 
2379
void free_ieee80211(struct net_device *dev);
 
2380
struct net_device *alloc_ieee80211(int sizeof_priv);
2592
2381
 
2593
 
extern int ieee80211_set_encryption(struct ieee80211_device *ieee);
 
2382
int ieee80211_set_encryption(struct ieee80211_device *ieee);
2594
2383
 
2595
2384
/* ieee80211_tx.c */
2596
2385
 
2597
 
extern int ieee80211_encrypt_fragment(
 
2386
int ieee80211_encrypt_fragment(
2598
2387
        struct ieee80211_device *ieee,
2599
2388
        struct sk_buff *frag,
2600
2389
        int hdr_len);
2601
2390
 
2602
 
extern int ieee80211_rtl_xmit(struct sk_buff *skb,
 
2391
int ieee80211_rtl_xmit(struct sk_buff *skb,
2603
2392
                          struct net_device *dev);
2604
 
extern void ieee80211_txb_free(struct ieee80211_txb *);
 
2393
void ieee80211_txb_free(struct ieee80211_txb *);
2605
2394
 
2606
2395
 
2607
2396
/* ieee80211_rx.c */
2608
 
extern int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 
2397
int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
2609
2398
                        struct ieee80211_rx_stats *rx_stats);
2610
 
extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
 
2399
void ieee80211_rx_mgt(struct ieee80211_device *ieee,
2611
2400
                             struct ieee80211_hdr_4addr *header,
2612
2401
                             struct ieee80211_rx_stats *stats);
2613
2402
 
2614
2403
/* ieee80211_wx.c */
2615
 
extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
 
2404
int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
2616
2405
                                 struct iw_request_info *info,
2617
2406
                                 union iwreq_data *wrqu, char *key);
2618
 
extern int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
2619
 
                                   struct iw_request_info *info,
2620
 
                                   union iwreq_data *wrqu, char *key);
2621
 
extern int ieee80211_wx_get_encode(struct ieee80211_device *ieee,
2622
 
                                   struct iw_request_info *info,
2623
 
                                   union iwreq_data *wrqu, char *key);
2624
 
#if WIRELESS_EXT >= 18
2625
 
extern int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee,
2626
 
                            struct iw_request_info *info,
2627
 
                            union iwreq_data* wrqu, char *extra);
2628
 
extern int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
2629
 
                            struct iw_request_info *info,
2630
 
                            union iwreq_data* wrqu, char *extra);
2631
 
extern int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
 
2407
int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
 
2408
                                   struct iw_request_info *info,
 
2409
                                   union iwreq_data *wrqu, char *key);
 
2410
int ieee80211_wx_get_encode(struct ieee80211_device *ieee,
 
2411
                                   struct iw_request_info *info,
 
2412
                                   union iwreq_data *wrqu, char *key);
 
2413
int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee,
 
2414
                            struct iw_request_info *info,
 
2415
                            union iwreq_data* wrqu, char *extra);
 
2416
int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
 
2417
                            struct iw_request_info *info,
 
2418
                            union iwreq_data* wrqu, char *extra);
 
2419
int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
2632
2420
                               struct iw_request_info *info,
2633
2421
                               struct iw_param *data, char *extra);
2634
 
extern int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
 
2422
int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
2635
2423
                               struct iw_request_info *info,
2636
2424
                               union iwreq_data *wrqu, char *extra);
2637
 
#endif
2638
 
extern int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len);
 
2425
int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len);
2639
2426
 
2640
2427
/* ieee80211_softmac.c */
2641
 
extern short ieee80211_is_54g(struct ieee80211_network net);
2642
 
extern short ieee80211_is_shortslot(struct ieee80211_network net);
2643
 
extern int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
 
2428
short ieee80211_is_54g(struct ieee80211_network net);
 
2429
short ieee80211_is_shortslot(struct ieee80211_network net);
 
2430
int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
2644
2431
                        struct ieee80211_rx_stats *rx_stats, u16 type,
2645
2432
                        u16 stype);
2646
 
extern void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee80211_network *net);
 
2433
void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee80211_network *net);
2647
2434
 
2648
2435
void SendDisassociation(struct ieee80211_device *ieee, u8* asSta, u8 asRsn);
2649
 
extern void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *ieee);
2650
 
 
2651
 
extern void ieee80211_stop_send_beacons(struct ieee80211_device *ieee);
2652
 
extern void notify_wx_assoc_event(struct ieee80211_device *ieee);
2653
 
extern void ieee80211_softmac_check_all_nets(struct ieee80211_device *ieee);
2654
 
extern void ieee80211_start_bss(struct ieee80211_device *ieee);
2655
 
extern void ieee80211_start_master_bss(struct ieee80211_device *ieee);
2656
 
extern void ieee80211_start_ibss(struct ieee80211_device *ieee);
2657
 
extern void ieee80211_softmac_init(struct ieee80211_device *ieee);
2658
 
extern void ieee80211_softmac_free(struct ieee80211_device *ieee);
2659
 
extern void ieee80211_associate_abort(struct ieee80211_device *ieee);
2660
 
extern void ieee80211_disassociate(struct ieee80211_device *ieee);
2661
 
extern void ieee80211_stop_scan(struct ieee80211_device *ieee);
2662
 
extern void ieee80211_start_scan_syncro(struct ieee80211_device *ieee);
2663
 
extern void ieee80211_check_all_nets(struct ieee80211_device *ieee);
2664
 
extern void ieee80211_start_protocol(struct ieee80211_device *ieee);
2665
 
extern void ieee80211_stop_protocol(struct ieee80211_device *ieee,u8 shutdown);
2666
 
extern void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee);
2667
 
extern void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee,u8 shutdown);
2668
 
extern void ieee80211_reset_queue(struct ieee80211_device *ieee);
2669
 
extern void ieee80211_rtl_wake_queue(struct ieee80211_device *ieee);
2670
 
extern void ieee80211_rtl_stop_queue(struct ieee80211_device *ieee);
2671
 
extern struct sk_buff *ieee80211_get_beacon(struct ieee80211_device *ieee);
2672
 
extern void ieee80211_start_send_beacons(struct ieee80211_device *ieee);
2673
 
extern void ieee80211_stop_send_beacons(struct ieee80211_device *ieee);
2674
 
extern int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_point *p);
2675
 
extern void notify_wx_assoc_event(struct ieee80211_device *ieee);
2676
 
extern void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success);
2677
 
 
2678
 
extern void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee);
 
2436
void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *ieee);
 
2437
 
 
2438
void ieee80211_stop_send_beacons(struct ieee80211_device *ieee);
 
2439
void notify_wx_assoc_event(struct ieee80211_device *ieee);
 
2440
void ieee80211_softmac_check_all_nets(struct ieee80211_device *ieee);
 
2441
void ieee80211_start_bss(struct ieee80211_device *ieee);
 
2442
void ieee80211_start_master_bss(struct ieee80211_device *ieee);
 
2443
void ieee80211_start_ibss(struct ieee80211_device *ieee);
 
2444
void ieee80211_softmac_init(struct ieee80211_device *ieee);
 
2445
void ieee80211_softmac_free(struct ieee80211_device *ieee);
 
2446
void ieee80211_associate_abort(struct ieee80211_device *ieee);
 
2447
void ieee80211_disassociate(struct ieee80211_device *ieee);
 
2448
void ieee80211_stop_scan(struct ieee80211_device *ieee);
 
2449
void ieee80211_start_scan_syncro(struct ieee80211_device *ieee);
 
2450
void ieee80211_check_all_nets(struct ieee80211_device *ieee);
 
2451
void ieee80211_start_protocol(struct ieee80211_device *ieee);
 
2452
void ieee80211_stop_protocol(struct ieee80211_device *ieee,u8 shutdown);
 
2453
void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee);
 
2454
void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee,u8 shutdown);
 
2455
void ieee80211_reset_queue(struct ieee80211_device *ieee);
 
2456
void ieee80211_rtl_wake_queue(struct ieee80211_device *ieee);
 
2457
void ieee80211_rtl_stop_queue(struct ieee80211_device *ieee);
 
2458
struct sk_buff *ieee80211_get_beacon(struct ieee80211_device *ieee);
 
2459
void ieee80211_start_send_beacons(struct ieee80211_device *ieee);
 
2460
void ieee80211_stop_send_beacons(struct ieee80211_device *ieee);
 
2461
int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_point *p);
 
2462
void notify_wx_assoc_event(struct ieee80211_device *ieee);
 
2463
void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success);
 
2464
 
 
2465
void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee);
2679
2466
 
2680
2467
/* ieee80211_crypt_ccmp&tkip&wep.c */
2681
 
extern void ieee80211_tkip_null(void);
2682
 
extern void ieee80211_wep_null(void);
2683
 
extern void ieee80211_ccmp_null(void);
 
2468
void ieee80211_tkip_null(void);
 
2469
void ieee80211_wep_null(void);
 
2470
void ieee80211_ccmp_null(void);
2684
2471
 
2685
2472
/* ieee80211_softmac_wx.c */
2686
2473
 
2687
 
extern int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
 
2474
int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
2688
2475
                            struct iw_request_info *info,
2689
2476
                            union iwreq_data *wrqu, char *ext);
2690
2477
 
2691
 
extern int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
 
2478
int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
2692
2479
                         struct iw_request_info *info,
2693
2480
                         union iwreq_data *awrq,
2694
2481
                         char *extra);
2695
2482
 
2696
 
extern int ieee80211_wx_get_essid(struct ieee80211_device *ieee, struct iw_request_info *a,union iwreq_data *wrqu,char *b);
2697
 
 
2698
 
extern int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
2699
 
                             struct iw_request_info *info,
2700
 
                             union iwreq_data *wrqu, char *extra);
2701
 
 
2702
 
extern int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
2703
 
                             struct iw_request_info *info,
2704
 
                             union iwreq_data *wrqu, char *extra);
2705
 
 
2706
 
extern int ieee80211_wx_set_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
2707
 
                             union iwreq_data *wrqu, char *b);
2708
 
 
2709
 
extern int ieee80211_wx_set_scan(struct ieee80211_device *ieee, struct iw_request_info *a,
2710
 
                             union iwreq_data *wrqu, char *b);
2711
 
 
2712
 
extern int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
 
2483
int ieee80211_wx_get_essid(struct ieee80211_device *ieee, struct iw_request_info *a,union iwreq_data *wrqu,char *b);
 
2484
 
 
2485
int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
 
2486
                             struct iw_request_info *info,
 
2487
                             union iwreq_data *wrqu, char *extra);
 
2488
 
 
2489
int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
 
2490
                             struct iw_request_info *info,
 
2491
                             union iwreq_data *wrqu, char *extra);
 
2492
 
 
2493
int ieee80211_wx_set_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
 
2494
                             union iwreq_data *wrqu, char *b);
 
2495
 
 
2496
int ieee80211_wx_set_scan(struct ieee80211_device *ieee, struct iw_request_info *a,
 
2497
                             union iwreq_data *wrqu, char *b);
 
2498
 
 
2499
int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
2713
2500
                              struct iw_request_info *a,
2714
2501
                              union iwreq_data *wrqu, char *extra);
2715
2502
 
2716
 
extern int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
2717
 
                             union iwreq_data *wrqu, char *b);
2718
 
 
2719
 
extern int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
2720
 
                             union iwreq_data *wrqu, char *b);
2721
 
 
2722
 
extern int ieee80211_wx_get_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
2723
 
                             union iwreq_data *wrqu, char *b);
2724
 
 
2725
 
//extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee);
2726
 
extern void ieee80211_wx_sync_scan_wq(struct work_struct *work);
2727
 
 
2728
 
 
2729
 
extern int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
 
2503
int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
 
2504
                             union iwreq_data *wrqu, char *b);
 
2505
 
 
2506
int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
 
2507
                             union iwreq_data *wrqu, char *b);
 
2508
 
 
2509
int ieee80211_wx_get_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
 
2510
                             union iwreq_data *wrqu, char *b);
 
2511
 
 
2512
void ieee80211_wx_sync_scan_wq(struct work_struct *work);
 
2513
 
 
2514
int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
2730
2515
                               struct iw_request_info *info,
2731
2516
                               union iwreq_data *wrqu, char *extra);
2732
2517
 
2733
 
extern int ieee80211_wx_get_name(struct ieee80211_device *ieee,
2734
 
                             struct iw_request_info *info,
2735
 
                             union iwreq_data *wrqu, char *extra);
2736
 
 
2737
 
extern int ieee80211_wx_set_power(struct ieee80211_device *ieee,
2738
 
                                 struct iw_request_info *info,
2739
 
                                 union iwreq_data *wrqu, char *extra);
2740
 
 
2741
 
extern int ieee80211_wx_get_power(struct ieee80211_device *ieee,
2742
 
                                 struct iw_request_info *info,
2743
 
                                 union iwreq_data *wrqu, char *extra);
2744
 
 
2745
 
extern int ieee80211_wx_set_rts(struct ieee80211_device *ieee,
2746
 
                             struct iw_request_info *info,
2747
 
                             union iwreq_data *wrqu, char *extra);
2748
 
 
2749
 
extern int ieee80211_wx_get_rts(struct ieee80211_device *ieee,
 
2518
int ieee80211_wx_get_name(struct ieee80211_device *ieee,
 
2519
                             struct iw_request_info *info,
 
2520
                             union iwreq_data *wrqu, char *extra);
 
2521
 
 
2522
int ieee80211_wx_set_power(struct ieee80211_device *ieee,
 
2523
                                 struct iw_request_info *info,
 
2524
                                 union iwreq_data *wrqu, char *extra);
 
2525
 
 
2526
int ieee80211_wx_get_power(struct ieee80211_device *ieee,
 
2527
                                 struct iw_request_info *info,
 
2528
                                 union iwreq_data *wrqu, char *extra);
 
2529
 
 
2530
int ieee80211_wx_set_rts(struct ieee80211_device *ieee,
 
2531
                             struct iw_request_info *info,
 
2532
                             union iwreq_data *wrqu, char *extra);
 
2533
 
 
2534
int ieee80211_wx_get_rts(struct ieee80211_device *ieee,
2750
2535
                             struct iw_request_info *info,
2751
2536
                             union iwreq_data *wrqu, char *extra);
2752
2537
//HT
2753
 
#define MAX_RECEIVE_BUFFER_SIZE 9100  //
2754
 
extern void HTDebugHTCapability(u8* CapIE, u8* TitleString );
2755
 
extern void HTDebugHTInfo(u8*  InfoIE, u8* TitleString);
 
2538
#define MAX_RECEIVE_BUFFER_SIZE 9100
 
2539
void HTDebugHTCapability(u8 *CapIE, u8 *TitleString );
 
2540
void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString);
2756
2541
 
2757
 
void HTSetConnectBwMode(struct ieee80211_device* ieee, HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET    Offset);
2758
 
extern void HTUpdateDefaultSetting(struct ieee80211_device* ieee);
2759
 
extern void HTConstructCapabilityElement(struct ieee80211_device* ieee, u8* posHTCap, u8* len, u8 isEncrypt);
2760
 
extern void HTConstructInfoElement(struct ieee80211_device* ieee, u8* posHTInfo, u8* len, u8 isEncrypt);
2761
 
extern void HTConstructRT2RTAggElement(struct ieee80211_device* ieee, u8* posRT2RTAgg, u8* len);
2762
 
extern void HTOnAssocRsp(struct ieee80211_device *ieee);
2763
 
extern void HTInitializeHTInfo(struct ieee80211_device* ieee);
2764
 
extern void HTInitializeBssDesc(PBSS_HT pBssHT);
2765
 
extern void HTResetSelfAndSavePeerSetting(struct ieee80211_device* ieee, struct ieee80211_network * pNetwork);
2766
 
extern void HTUpdateSelfAndPeerSetting(struct ieee80211_device* ieee,   struct ieee80211_network * pNetwork);
2767
 
extern u8 HTGetHighestMCSRate(struct ieee80211_device* ieee, u8* pMCSRateSet, u8* pMCSFilter);
 
2542
void HTSetConnectBwMode(struct ieee80211_device *ieee, HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET Offset);
 
2543
void HTUpdateDefaultSetting(struct ieee80211_device *ieee);
 
2544
void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u8 *len, u8 isEncrypt);
 
2545
void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *len, u8 isEncrypt);
 
2546
void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg, u8 *len);
 
2547
void HTOnAssocRsp(struct ieee80211_device *ieee);
 
2548
void HTInitializeHTInfo(struct ieee80211_device *ieee);
 
2549
void HTInitializeBssDesc(PBSS_HT pBssHT);
 
2550
void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee, struct ieee80211_network *pNetwork);
 
2551
void HTUpdateSelfAndPeerSetting(struct ieee80211_device *ieee, struct ieee80211_network *pNetwork);
 
2552
u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSFilter);
2768
2553
extern u8 MCS_FILTER_ALL[];
2769
2554
extern u16 MCS_DATA_RATE[2][2][77] ;
2770
 
extern u8 HTCCheck(struct ieee80211_device* ieee, u8*   pFrame);
2771
 
//extern void HTSetConnectBwModeCallback(unsigned long data);
2772
 
extern void HTResetIOTSetting(PRT_HIGH_THROUGHPUT  pHTInfo);
2773
 
extern bool IsHTHalfNmodeAPs(struct ieee80211_device* ieee);
2774
 
extern u16 HTHalfMcsToDataRate(struct ieee80211_device* ieee,  u8      nMcsRate);
2775
 
extern u16 HTMcsToDataRate( struct ieee80211_device* ieee, u8 nMcsRate);
2776
 
extern u16  TxCountToDataRate( struct ieee80211_device* ieee, u8 nDataRate);
2777
 
//function in BAPROC.c
2778
 
extern int ieee80211_rx_ADDBAReq( struct ieee80211_device* ieee, struct sk_buff *skb);
2779
 
extern int ieee80211_rx_ADDBARsp( struct ieee80211_device* ieee, struct sk_buff *skb);
2780
 
extern int ieee80211_rx_DELBA(struct ieee80211_device* ieee,struct sk_buff *skb);
2781
 
extern void TsInitAddBA( struct ieee80211_device* ieee, PTX_TS_RECORD   pTS, u8 Policy, u8 bOverwritePending);
2782
 
extern void TsInitDelBA( struct ieee80211_device* ieee, PTS_COMMON_INFO pTsCommonInfo, TR_SELECT TxRxSelect);
2783
 
extern void BaSetupTimeOut(unsigned long data);
2784
 
extern void TxBaInactTimeout(unsigned long data);
2785
 
extern void RxBaInactTimeout(unsigned long data);
2786
 
extern void ResetBaEntry( PBA_RECORD pBA);
 
2555
 
 
2556
u8 HTCCheck(struct ieee80211_device *ieee, u8 *pFrame);
 
2557
void HTResetIOTSetting(PRT_HIGH_THROUGHPUT pHTInfo);
 
2558
bool IsHTHalfNmodeAPs(struct ieee80211_device *ieee);
 
2559
u16 HTHalfMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate);
 
2560
u16 HTMcsToDataRate( struct ieee80211_device *ieee, u8 nMcsRate);
 
2561
u16  TxCountToDataRate( struct ieee80211_device *ieee, u8 nDataRate);
 
2562
int ieee80211_rx_ADDBAReq( struct ieee80211_device *ieee, struct sk_buff *skb);
 
2563
int ieee80211_rx_ADDBARsp( struct ieee80211_device *ieee, struct sk_buff *skb);
 
2564
int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb);
 
2565
void TsInitAddBA( struct ieee80211_device *ieee, PTX_TS_RECORD pTS, u8 Policy, u8 bOverwritePending);
 
2566
void TsInitDelBA( struct ieee80211_device *ieee, PTS_COMMON_INFO pTsCommonInfo, TR_SELECT TxRxSelect);
 
2567
void BaSetupTimeOut(unsigned long data);
 
2568
void TxBaInactTimeout(unsigned long data);
 
2569
void RxBaInactTimeout(unsigned long data);
 
2570
void ResetBaEntry( PBA_RECORD pBA);
2787
2571
//function in TS.c
2788
 
extern bool GetTs(
 
2572
bool GetTs(
2789
2573
        struct ieee80211_device*        ieee,
2790
2574
        PTS_COMMON_INFO                 *ppTS,
2791
2575
        u8*                             Addr,
2793
2577
        TR_SELECT                       TxRxSelect,  //Rx:1, Tx:0
2794
2578
        bool                            bAddNewTs
2795
2579
        );
2796
 
extern void TSInitialize(struct ieee80211_device *ieee);
2797
 
extern  void TsStartAddBaProcess(struct ieee80211_device* ieee, PTX_TS_RECORD   pTxTS);
2798
 
extern void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr);
2799
 
extern void RemoveAllTS(struct ieee80211_device* ieee);
 
2580
void TSInitialize(struct ieee80211_device *ieee);
 
2581
void TsStartAddBaProcess(struct ieee80211_device *ieee, PTX_TS_RECORD pTxTS);
 
2582
void RemovePeerTS(struct ieee80211_device *ieee, u8 *Addr);
 
2583
void RemoveAllTS(struct ieee80211_device *ieee);
2800
2584
void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee);
2801
2585
 
2802
2586
extern const long ieee80211_wlan_frequencies[];
2838
2622
/* For the function is more related to hardware setting, it's better to use the
2839
2623
 * ieee handler to refer to it.
2840
2624
 */
2841
 
extern short check_nic_enough_desc(struct net_device *dev, int queue_index);
2842
 
extern int ieee80211_data_xmit(struct sk_buff *skb, struct net_device *dev);
2843
 
extern int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 
2625
int ieee80211_data_xmit(struct sk_buff *skb, struct net_device *dev);
 
2626
int ieee80211_parse_info_param(struct ieee80211_device *ieee,
2844
2627
                struct ieee80211_info_element *info_element,
2845
2628
                u16 length,
2846
2629
                struct ieee80211_network *network,