Commit 6ccb5d7c authored by Justin P. Mattock's avatar Justin P. Mattock Committed by Greg Kroah-Hartman

staging: Fix typos in rt2860

Here is a patch that fixes some typos, and comments in  drivers/staging/rt2860
Signed-off-by: default avatarJustin P. Mattock <justinmattock@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1ac58644
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
Abstract: Abstract:
Revision History: Revision History:
Who When What Who When What
Justin P. Mattock 11/07/2010 Fix some typos
--------- ---------- ---------------------------------------------- --------- ---------- ----------------------------------------------
*/ */
...@@ -45,7 +46,7 @@ ...@@ -45,7 +46,7 @@
/* */ /* */
/* Device ID & Vendor ID related definitions, */ /* Device ID & Vendor ID related definitions, */
/* NOTE: you should not add the new VendorID/DeviceID here unless you not sure it belongs to what chip. */ /* NOTE: you should not add the new VendorID/DeviceID here unless you know for sure what chip it belongs too. */
/* */ /* */
#define NIC_PCI_VENDOR_ID 0x1814 #define NIC_PCI_VENDOR_ID 0x1814
#define PCIBUS_INTEL_VENDOR 0x8086 #define PCIBUS_INTEL_VENDOR 0x8086
...@@ -83,7 +84,7 @@ struct PACKED rt_txd { ...@@ -83,7 +84,7 @@ struct PACKED rt_txd {
u32 SDPtr1; u32 SDPtr1;
/*Word3 */ /*Word3 */
u32 rsv2:24; u32 rsv2:24;
u32 WIV:1; /* Wireless Info Valid. 1 if Driver already fill WI, o if DMA needs to copy WI to correctposition */ u32 WIV:1; /* Wireless Info Valid. 1 if Driver already fill WI, o if DMA needs to copy WI to correct position */
u32 QSEL:2; /* select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA */ u32 QSEL:2; /* select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA */
u32 rsv:2; u32 rsv:2;
u32 TCO:1; /* */ u32 TCO:1; /* */
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
Abstract: Abstract:
Revision History: Revision History:
Who When What Who When What
Justin P. Mattock 11/07/2010 Fix a typo
--------- ---------- ---------------------------------------------- --------- ---------- ----------------------------------------------
*/ */
...@@ -93,7 +94,7 @@ struct rt_txinfo { ...@@ -93,7 +94,7 @@ struct rt_txinfo {
/* Word 0 */ /* Word 0 */
u32 USBDMATxPktLen:16; /*used ONLY in USB bulk Aggregation, Total byte counts of all sub-frame. */ u32 USBDMATxPktLen:16; /*used ONLY in USB bulk Aggregation, Total byte counts of all sub-frame. */
u32 rsv:8; u32 rsv:8;
u32 WIV:1; /* Wireless Info Valid. 1 if Driver already fill WI, o if DMA needs to copy WI to correctposition */ u32 WIV:1; /* Wireless Info Valid. 1 if Driver already fill WI, o if DMA needs to copy WI to correct position */
u32 QSEL:2; /* select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA */ u32 QSEL:2; /* select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA */
u32 SwUseLastRound:1; /* Software use. */ u32 SwUseLastRound:1; /* Software use. */
u32 rsv2:2; /* Software use. */ u32 rsv2:2; /* Software use. */
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
Revision History: Revision History:
Who When What Who When What
Justin P. Mattock 11/07/2010 Fix a comments, and typos
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
*/ */
...@@ -43,7 +44,7 @@ ...@@ -43,7 +44,7 @@
/* ================================================================================= */ /* ================================================================================= */
/* the first 24-byte in TXD is called TXINFO and will be DMAed to MAC block through TXFIFO. */ /* the first 24-byte in TXD is called TXINFO and will be DMAed to MAC block through TXFIFO. */
/* MAC block use this TXINFO to control the transmission behavior of this frame. */ /* MAC block uses this TXINFO to control the transmission behavior of this frame. */
#define FIFO_MGMT 0 #define FIFO_MGMT 0
#define FIFO_HCCA 1 #define FIFO_HCCA 1
#define FIFO_EDCA 2 #define FIFO_EDCA 2
...@@ -458,8 +459,8 @@ typedef union _BBP_CSR_CFG_STRUC { ...@@ -458,8 +459,8 @@ typedef union _BBP_CSR_CFG_STRUC {
/* */ /* */
typedef union _RF_CSR_CFG0_STRUC { typedef union _RF_CSR_CFG0_STRUC {
struct { struct {
u32 RegIdAndContent:24; /* Register value to program into BBP */ u32 RegIdAndContent:24; /* Register value to program into BBP */
u32 bitwidth:5; /* Selected BBP register */ u32 bitwidth:5; /* Selected BBP register */
u32 StandbyMode:1; /* 0: high when stand by 1: low when standby */ u32 StandbyMode:1; /* 0: high when stand by 1: low when standby */
u32 Sel:1; /* 0:RF_LE0 activate 1:RF_LE1 activate */ u32 Sel:1; /* 0:RF_LE0 activate 1:RF_LE1 activate */
u32 Busy:1; /* 0: idle 1: 8busy */ u32 Busy:1; /* 0: idle 1: 8busy */
...@@ -469,7 +470,7 @@ typedef union _RF_CSR_CFG0_STRUC { ...@@ -469,7 +470,7 @@ typedef union _RF_CSR_CFG0_STRUC {
#define RF_CSR_CFG1 0x1024 #define RF_CSR_CFG1 0x1024
typedef union _RF_CSR_CFG1_STRUC { typedef union _RF_CSR_CFG1_STRUC {
struct { struct {
u32 RegIdAndContent:24; /* Register value to program into BBP */ u32 RegIdAndContent:24; /* Register value to program into BBP */
u32 RFGap:5; /* Gap between BB_CONTROL_RF and RF_LE. 0: 3 system clock cycle (37.5usec) 1: 5 system clock cycle (62.5usec) */ u32 RFGap:5; /* Gap between BB_CONTROL_RF and RF_LE. 0: 3 system clock cycle (37.5usec) 1: 5 system clock cycle (62.5usec) */
u32 rsv:7; /* 0: idle 1: 8busy */ u32 rsv:7; /* 0: idle 1: 8busy */
} field; } field;
...@@ -478,7 +479,7 @@ typedef union _RF_CSR_CFG1_STRUC { ...@@ -478,7 +479,7 @@ typedef union _RF_CSR_CFG1_STRUC {
#define RF_CSR_CFG2 0x1028 /* */ #define RF_CSR_CFG2 0x1028 /* */
typedef union _RF_CSR_CFG2_STRUC { typedef union _RF_CSR_CFG2_STRUC {
struct { struct {
u32 RegIdAndContent:24; /* Register value to program into BBP */ u32 RegIdAndContent:24; /* Register value to program into BBP */
u32 rsv:8; /* 0: idle 1: 8busy */ u32 rsv:8; /* 0: idle 1: 8busy */
} field; } field;
u32 word; u32 word;
...@@ -490,7 +491,7 @@ typedef union _LED_CFG_STRUC { ...@@ -490,7 +491,7 @@ typedef union _LED_CFG_STRUC {
u32 OffPeriod:8; /* blinking off period unit 1ms */ u32 OffPeriod:8; /* blinking off period unit 1ms */
u32 SlowBlinkPeriod:6; /* slow blinking period. unit:1ms */ u32 SlowBlinkPeriod:6; /* slow blinking period. unit:1ms */
u32 rsv:2; u32 rsv:2;
u32 RLedMode:2; /* red Led Mode 0: off1: blinking upon TX2: periodic slow blinking3: always on */ u32 RLedMode:2; /* red Led Mode 0: off1: blinking upon TX2: periodic slow blinking3: always on */
u32 GLedMode:2; /* green Led Mode */ u32 GLedMode:2; /* green Led Mode */
u32 YLedMode:2; /* yellow Led Mode */ u32 YLedMode:2; /* yellow Led Mode */
u32 LedPolar:1; /* Led Polarity. 0: active low1: active high */ u32 LedPolar:1; /* Led Polarity. 0: active low1: active high */
...@@ -621,9 +622,9 @@ typedef union _TX_TIMEOUT_CFG_STRUC { ...@@ -621,9 +622,9 @@ typedef union _TX_TIMEOUT_CFG_STRUC {
#define TX_RTY_CFG 0x134c #define TX_RTY_CFG 0x134c
typedef union PACKED _TX_RTY_CFG_STRUC { typedef union PACKED _TX_RTY_CFG_STRUC {
struct { struct {
u32 ShortRtyLimit:8; /* short retry limit */ u32 ShortRtyLimit:8; /* short retry limit */
u32 LongRtyLimit:8; /*long retry limit */ u32 LongRtyLimit:8; /* long retry limit */
u32 LongRtyThre:12; /* Long retry threshoold */ u32 LongRtyThre:12; /* Long retry threshold */
u32 NonAggRtyMode:1; /* Non-Aggregate MPDU retry mode. 0:expired by retry limit, 1: expired by mpdu life timer */ u32 NonAggRtyMode:1; /* Non-Aggregate MPDU retry mode. 0:expired by retry limit, 1: expired by mpdu life timer */
u32 AggRtyMode:1; /* Aggregate MPDU retry mode. 0:expired by retry limit, 1: expired by mpdu life timer */ u32 AggRtyMode:1; /* Aggregate MPDU retry mode. 0:expired by retry limit, 1: expired by mpdu life timer */
u32 TxautoFBEnable:1; /* Tx retry PHY rate auto fallback enable */ u32 TxautoFBEnable:1; /* Tx retry PHY rate auto fallback enable */
......
...@@ -28,10 +28,11 @@ ...@@ -28,10 +28,11 @@
rt3090.c rt3090.c
Abstract: Abstract:
Specific funcitons and variables for RT3070 Specific functions and variables for RT3070
Revision History: Revision History:
Who When What Who When What
Justin P. Mattock 11/07/2010 Fix a typo
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
*/ */
......
...@@ -28,10 +28,11 @@ ...@@ -28,10 +28,11 @@
rt30xx.c rt30xx.c
Abstract: Abstract:
Specific funcitons and variables for RT30xx. Specific functions and variables for RT30xx.
Revision History: Revision History:
Who When What Who When What
Justin P. Mattock 11/07/2010 Fix some typos
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
*/ */
...@@ -89,7 +90,7 @@ struct rt_reg_pair RT30xx_RFRegTable[] = { ...@@ -89,7 +90,7 @@ struct rt_reg_pair RT30xx_RFRegTable[] = {
u8 NUM_RF_REG_PARMS = (sizeof(RT30xx_RFRegTable) / sizeof(struct rt_reg_pair)); u8 NUM_RF_REG_PARMS = (sizeof(RT30xx_RFRegTable) / sizeof(struct rt_reg_pair));
/* Antenna divesity use GPIO3 and EESK pin for control */ /* Antenna diversity use GPIO3 and EESK pin for control */
/* Antenna and EEPROM access are both using EESK pin, */ /* Antenna and EEPROM access are both using EESK pin, */
/* Therefor we should avoid accessing EESK at the same time */ /* Therefor we should avoid accessing EESK at the same time */
/* Then restore antenna after EEPROM access */ /* Then restore antenna after EEPROM access */
...@@ -243,7 +244,7 @@ void RTMPFilterCalibration(struct rt_rtmp_adapter *pAd) ...@@ -243,7 +244,7 @@ void RTMPFilterCalibration(struct rt_rtmp_adapter *pAd)
break; break;
} }
/* prevent infinite loop cause driver hang. */ /* prevent infinite loop; causes driver hang. */
if (loopcnt++ > 100) { if (loopcnt++ > 100) {
DBGPRINT(RT_DEBUG_ERROR, DBGPRINT(RT_DEBUG_ERROR,
("RTMPFilterCalibration - can't find a valid value, loopcnt=%d stop calibrating", ("RTMPFilterCalibration - can't find a valid value, loopcnt=%d stop calibrating",
......
...@@ -32,8 +32,9 @@ ...@@ -32,8 +32,9 @@
Revision History: Revision History:
Who When What Who When What
-------- ---------- ------------------------------ -------- ---------- ------------------------------
John Chang 2003-08-28 Created John Chang 2003-08-28 Created
John Chang 2004-09-06 modified for RT2600 John Chang 2004-09-06 modified for RT2600
Justin P. Mattock 11/07/2010 Fix typos in comments
*/ */
#ifndef __MLME_H__ #ifndef __MLME_H__
...@@ -41,7 +42,7 @@ ...@@ -41,7 +42,7 @@
#include "rtmp_dot11.h" #include "rtmp_dot11.h"
/* maximum supported capability information - */ /* maximum supported capability information */
/* ESS, IBSS, Privacy, Short Preamble, Spectrum mgmt, Short Slot */ /* ESS, IBSS, Privacy, Short Preamble, Spectrum mgmt, Short Slot */
#define SUPPORTED_CAPABILITY_INFO 0x0533 #define SUPPORTED_CAPABILITY_INFO 0x0533
...@@ -77,7 +78,7 @@ ...@@ -77,7 +78,7 @@
#define CW_MAX_IN_BITS 10 /* actual CwMax = 2^CW_MAX_IN_BITS - 1 */ #define CW_MAX_IN_BITS 10 /* actual CwMax = 2^CW_MAX_IN_BITS - 1 */
/* Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720). */ /* Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720). */
/* SHould not refer to this constant anymore */ /* Should not refer to this constant anymore */
/*#define RSSI_TO_DBM_OFFSET 120 // for RT2530 RSSI-115 = dBm */ /*#define RSSI_TO_DBM_OFFSET 120 // for RT2530 RSSI-115 = dBm */
#define RSSI_FOR_MID_TX_POWER -55 /* -55 db is considered mid-distance */ #define RSSI_FOR_MID_TX_POWER -55 /* -55 db is considered mid-distance */
#define RSSI_FOR_LOW_TX_POWER -45 /* -45 db is considered very short distance and */ #define RSSI_FOR_LOW_TX_POWER -45 /* -45 db is considered very short distance and */
...@@ -123,7 +124,7 @@ ...@@ -123,7 +124,7 @@
#define TID_MAC_HASH_INDEX(Addr, TID) (TID_MAC_HASH(Addr, TID) % HASH_TABLE_SIZE) #define TID_MAC_HASH_INDEX(Addr, TID) (TID_MAC_HASH(Addr, TID) % HASH_TABLE_SIZE)
/* LED Control */ /* LED Control */
/* assoiation ON. one LED ON. another blinking when TX, OFF when idle */ /* association ON. one LED ON. another blinking when TX, OFF when idle */
/* no association, both LED off */ /* no association, both LED off */
#define ASIC_LED_ACT_ON(pAd) RTMP_IO_WRITE32(pAd, MAC_CSR14, 0x00031e46) #define ASIC_LED_ACT_ON(pAd) RTMP_IO_WRITE32(pAd, MAC_CSR14, 0x00031e46)
#define ASIC_LED_ACT_OFF(pAd) RTMP_IO_WRITE32(pAd, MAC_CSR14, 0x00001e46) #define ASIC_LED_ACT_OFF(pAd) RTMP_IO_WRITE32(pAd, MAC_CSR14, 0x00001e46)
...@@ -284,8 +285,8 @@ struct PACKED rt_ht_capability_ie { ...@@ -284,8 +285,8 @@ struct PACKED rt_ht_capability_ie {
/* 802.11n draft3 related structure definitions. */ /* 802.11n draft3 related structure definitions. */
/* 7.3.2.60 */ /* 7.3.2.60 */
#define dot11OBSSScanPassiveDwell 20 /* in TU. min amount of time that the STA continously scans each channel when performing an active OBSS scan. */ #define dot11OBSSScanPassiveDwell 20 /* in TU. min amount of time that the STA continuously scans each channel when performing an active OBSS scan. */
#define dot11OBSSScanActiveDwell 10 /* in TU.min amount of time that the STA continously scans each channel when performing an passive OBSS scan. */ #define dot11OBSSScanActiveDwell 10 /* in TU.min amount of time that the STA continuously scans each channel when performing an passive OBSS scan. */
#define dot11BSSWidthTriggerScanInterval 300 /* in sec. max interval between scan operations to be performed to detect BSS channel width trigger events. */ #define dot11BSSWidthTriggerScanInterval 300 /* in sec. max interval between scan operations to be performed to detect BSS channel width trigger events. */
#define dot11OBSSScanPassiveTotalPerChannel 200 /* in TU. min total amount of time that the STA scans each channel when performing a passive OBSS scan. */ #define dot11OBSSScanPassiveTotalPerChannel 200 /* in TU. min total amount of time that the STA scans each channel when performing a passive OBSS scan. */
#define dot11OBSSScanActiveTotalPerChannel 20 /*in TU. min total amount of time that the STA scans each channel when performing a active OBSS scan */ #define dot11OBSSScanActiveTotalPerChannel 20 /*in TU. min total amount of time that the STA scans each channel when performing a active OBSS scan */
...@@ -325,7 +326,7 @@ struct rt_trigger_eventa { ...@@ -325,7 +326,7 @@ struct rt_trigger_eventa {
}; };
/* 20/40 trigger event table */ /* 20/40 trigger event table */
/* If one Event A delete or created, or if Event B is detected or not detected, STA should send 2040BSSCoexistence to AP. */ /* If one Event (A) is deleted or created, or if Event (B) is detected or not detected, STA should send 2040BSSCoexistence to AP. */
#define MAX_TRIGGER_EVENT 64 #define MAX_TRIGGER_EVENT 64
struct rt_trigger_event_tab { struct rt_trigger_event_tab {
u8 EventANo; u8 EventANo;
...@@ -357,14 +358,14 @@ struct PACKED rt_bss_2040_intolerant_ch_report { ...@@ -357,14 +358,14 @@ struct PACKED rt_bss_2040_intolerant_ch_report {
u8 ChList[0]; u8 ChList[0];
}; };
/* The structure for channel switch annoucement IE. This is in 802.11n D3.03 */ /* The structure for channel switch announcement IE. This is in 802.11n D3.03 */
struct PACKED rt_cha_switch_announce_ie { struct PACKED rt_cha_switch_announce_ie {
u8 SwitchMode; /*channel switch mode */ u8 SwitchMode; /*channel switch mode */
u8 NewChannel; /* */ u8 NewChannel; /* */
u8 SwitchCount; /* */ u8 SwitchCount; /* */
}; };
/* The structure for channel switch annoucement IE. This is in 802.11n D3.03 */ /* The structure for channel switch announcement IE. This is in 802.11n D3.03 */
struct PACKED rt_sec_cha_offset_ie { struct PACKED rt_sec_cha_offset_ie {
u8 SecondaryChannelOffset; /* 1: Secondary above, 3: Secondary below, 0: no Secondary */ u8 SecondaryChannelOffset; /* 1: Secondary above, 3: Secondary below, 0: no Secondary */
}; };
...@@ -377,7 +378,7 @@ struct rt_ht_phy_info { ...@@ -377,7 +378,7 @@ struct rt_ht_phy_info {
u8 MCSSet[16]; u8 MCSSet[16];
}; };
/*This structure substracts ralink supports from all 802.11n-related features. */ /*This structure subtracts ralink supports from all 802.11n-related features. */
/*Features not listed here but contained in 802.11n spec are not supported in rt2860. */ /*Features not listed here but contained in 802.11n spec are not supported in rt2860. */
struct rt_ht_capability { struct rt_ht_capability {
u16 ChannelWidth:1; u16 ChannelWidth:1;
...@@ -387,14 +388,14 @@ struct rt_ht_capability { ...@@ -387,14 +388,14 @@ struct rt_ht_capability {
u16 ShortGIfor40:1; /*for40MHz */ u16 ShortGIfor40:1; /*for40MHz */
u16 TxSTBC:1; u16 TxSTBC:1;
u16 RxSTBC:2; /* 2 bits */ u16 RxSTBC:2; /* 2 bits */
u16 AmsduEnable:1; /* Enable to transmit A-MSDU. Suggest disable. We should use A-MPDU to gain best benifit of 802.11n */ u16 AmsduEnable:1; /* Enable to transmit A-MSDU. Suggest disable. We should use A-MPDU to gain best benefit of 802.11n */
u16 AmsduSize:1; /* Max receiving A-MSDU size */ u16 AmsduSize:1; /* Max receiving A-MSDU size */
u16 rsv:5; u16 rsv:5;
/*Substract from Addiont HT INFO IE */ /*Substract from Addiont HT INFO IE */
u8 MaxRAmpduFactor:2; u8 MaxRAmpduFactor:2;
u8 MpduDensity:3; u8 MpduDensity:3;
u8 ExtChanOffset:2; /* Please not the difference with following u8 NewExtChannelOffset; from 802.11n */ u8 ExtChanOffset:2; /* Please note the difference with following u8 NewExtChannelOffset; from 802.11n */
u8 RecomWidth:1; u8 RecomWidth:1;
u16 OperaionMode:2; u16 OperaionMode:2;
...@@ -481,7 +482,7 @@ struct PACKED rt_ba_parm { ...@@ -481,7 +482,7 @@ struct PACKED rt_ba_parm {
u16 AMSDUSupported:1; /* 0: not permitted 1: permitted */ u16 AMSDUSupported:1; /* 0: not permitted 1: permitted */
u16 BAPolicy:1; /* 1: immediately BA 0:delayed BA */ u16 BAPolicy:1; /* 1: immediately BA 0:delayed BA */
u16 TID:4; /* value of TC os TS */ u16 TID:4; /* value of TC os TS */
u16 BufSize:10; /* number of buffe of size 2304 octetsr */ u16 BufSize:10; /* number of buffer of size 2304 octetsr */
}; };
/* 2-byte BA Starting Seq CONTROL field */ /* 2-byte BA Starting Seq CONTROL field */
...@@ -551,7 +552,7 @@ struct PACKED rt_frame_mtba_req { ...@@ -551,7 +552,7 @@ struct PACKED rt_frame_mtba_req {
BASEQ_CONTROL BAStartingSeq; BASEQ_CONTROL BAStartingSeq;
}; };
/* Compressed format is mandantory in HT STA */ /* Compressed format is mandatory in HT STA */
struct PACKED rt_frame_mtba { struct PACKED rt_frame_mtba {
struct rt_frame_control FC; struct rt_frame_control FC;
u16 Duration; u16 Duration;
...@@ -647,7 +648,7 @@ struct PACKED rt_frame_ba { ...@@ -647,7 +648,7 @@ struct PACKED rt_frame_ba {
u8 bitmask[8]; u8 bitmask[8];
}; };
/* Radio Measuement Request Frame Format */ /* Radio Measurement Request Frame Format */
struct PACKED rt_frame_rm_req_action { struct PACKED rt_frame_rm_req_action {
struct rt_header_802_11 Hdr; struct rt_header_802_11 Hdr;
u8 Category; u8 Category;
...@@ -709,7 +710,7 @@ struct rt_edca_parm { ...@@ -709,7 +710,7 @@ struct rt_edca_parm {
u8 Cwmin[4]; u8 Cwmin[4];
u8 Cwmax[4]; u8 Cwmax[4];
u16 Txop[4]; /* in unit of 32-us */ u16 Txop[4]; /* in unit of 32-us */
BOOLEAN bACM[4]; /* 1: Admission Control of AC_BK is mandattory */ BOOLEAN bACM[4]; /* 1: Admission Control of AC_BK is mandatory */
}; };
/* QBSS LOAD information from QAP's BEACON/ProbeRsp */ /* QBSS LOAD information from QAP's BEACON/ProbeRsp */
...@@ -757,7 +758,7 @@ struct rt_wpa_ie { ...@@ -757,7 +758,7 @@ struct rt_wpa_ie {
struct rt_bss_entry { struct rt_bss_entry {
u8 Bssid[MAC_ADDR_LEN]; u8 Bssid[MAC_ADDR_LEN];
u8 Channel; u8 Channel;
u8 CentralChannel; /*Store the wide-band central channel for 40MHz. .used in 40MHz AP. Or this is the same as Channel. */ u8 CentralChannel; /*Store the wide-band central channel for 40MHz. used in 40MHz AP. Or this is the same as Channel. */
u8 BssType; u8 BssType;
u16 AtimWin; u16 AtimWin;
u16 BeaconPeriod; u16 BeaconPeriod;
...@@ -855,7 +856,7 @@ struct rt_state_machine { ...@@ -855,7 +856,7 @@ struct rt_state_machine {
STATE_MACHINE_FUNC *TransFunc; STATE_MACHINE_FUNC *TransFunc;
}; };
/* MLME AUX data structure that hold temporarliy settings during a connection attempt. */ /* MLME AUX data structure that holds temporarliy settings during a connection attempt. */
/* Once this attemp succeeds, all settings will be copy to pAd->StaActive. */ /* Once this attemp succeeds, all settings will be copy to pAd->StaActive. */
/* A connection attempt (user set OID, roaming, CCX fast roaming,..) consists of */ /* A connection attempt (user set OID, roaming, CCX fast roaming,..) consists of */
/* several steps (JOIN, AUTH, ASSOC or REASSOC) and may fail at any step. We purposely */ /* several steps (JOIN, AUTH, ASSOC or REASSOC) and may fail at any step. We purposely */
...@@ -996,7 +997,7 @@ struct PACKED rt_rtmp_tx_rate_switch { ...@@ -996,7 +997,7 @@ struct PACKED rt_rtmp_tx_rate_switch {
#define MAC_TABLE_ASSOC_TIMEOUT 5 /* unit: sec */ #define MAC_TABLE_ASSOC_TIMEOUT 5 /* unit: sec */
#define MAC_TABLE_FULL(Tab) ((Tab).size == MAX_LEN_OF_MAC_TABLE) #define MAC_TABLE_FULL(Tab) ((Tab).size == MAX_LEN_OF_MAC_TABLE)
/* AP shall drop the sta if contine Tx fail count reach it. */ /* AP shall drop the sta if continue Tx fail count reach it. */
#define MAC_ENTRY_LIFE_CHECK_CNT 20 /* packet cnt. */ #define MAC_ENTRY_LIFE_CHECK_CNT 20 /* packet cnt. */
/* Value domain of pMacEntry->Sst */ /* Value domain of pMacEntry->Sst */
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
Revision History: Revision History:
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
Name Date Modification logs Name Date Modification logs
Justin P. Mattock 11/07/2010 Fix typos in comments
*/ */
#ifndef _OID_H_ #ifndef _OID_H_
#define _OID_H_ #define _OID_H_
...@@ -78,7 +79,7 @@ ...@@ -78,7 +79,7 @@
#define NDIS_802_11_LENGTH_RATES 8 #define NDIS_802_11_LENGTH_RATES 8
#define NDIS_802_11_LENGTH_RATES_EX 16 #define NDIS_802_11_LENGTH_RATES_EX 16
#define MAC_ADDR_LENGTH 6 #define MAC_ADDR_LENGTH 6
/*#define MAX_NUM_OF_CHS 49 // 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL terminationc */ /*#define MAX_NUM_OF_CHS 49 // 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL termination */
#define MAX_NUM_OF_CHS 54 /* 14 channels @2.4G + 12@UNII(lower/middle) + 16@HiperLAN2 + 11@UNII(upper) + 0 @Japan + 1 as NULL termination */ #define MAX_NUM_OF_CHS 54 /* 14 channels @2.4G + 12@UNII(lower/middle) + 16@HiperLAN2 + 11@UNII(upper) + 0 @Japan + 1 as NULL termination */
#define MAX_NUMBER_OF_EVENT 10 /* entry # in EVENT table */ #define MAX_NUMBER_OF_EVENT 10 /* entry # in EVENT table */
#define MAX_NUMBER_OF_MAC 32 /* if MAX_MBSSID_NUM is 8, this value can't be larger than 211 */ #define MAX_NUMBER_OF_MAC 32 /* if MAX_MBSSID_NUM is 8, this value can't be larger than 211 */
...@@ -610,7 +611,7 @@ struct rt_802_11_event_log { ...@@ -610,7 +611,7 @@ struct rt_802_11_event_log {
struct rt_802_11_event_table { struct rt_802_11_event_table {
unsigned long Num; unsigned long Num;
unsigned long Rsv; /* to align Log[] at LARGE_INEGER boundary */ unsigned long Rsv; /* to align Log[] at LARGE_INTEGER boundary */
struct rt_802_11_event_log Log[MAX_NUMBER_OF_EVENT]; struct rt_802_11_event_log Log[MAX_NUMBER_OF_EVENT];
}; };
...@@ -721,9 +722,9 @@ struct rt_802_11_tx_rates { ...@@ -721,9 +722,9 @@ struct rt_802_11_tx_rates {
#define AUTH_FAIL 0x4 /* Open authentication fail */ #define AUTH_FAIL 0x4 /* Open authentication fail */
#define AUTH_FAIL_KEYS 0x5 /* Shared authentication fail */ #define AUTH_FAIL_KEYS 0x5 /* Shared authentication fail */
#define ASSOC_FAIL 0x6 /* Association failed */ #define ASSOC_FAIL 0x6 /* Association failed */
#define EAP_MIC_FAILURE 0x7 /* Deauthencation because MIC failure */ #define EAP_MIC_FAILURE 0x7 /* Deauthentication because MIC failure */
#define EAP_4WAY_TIMEOUT 0x8 /* Deauthencation on 4-way handshake timeout */ #define EAP_4WAY_TIMEOUT 0x8 /* Deauthentication on 4-way handshake timeout */
#define EAP_GROUP_KEY_TIMEOUT 0x9 /* Deauthencation on group key handshake timeout */ #define EAP_GROUP_KEY_TIMEOUT 0x9 /* Deauthentication on group key handshake timeout */
#define EAP_SUCCESS 0xa /* EAP succeed */ #define EAP_SUCCESS 0xa /* EAP succeed */
#define DETECT_RADAR_SIGNAL 0xb /* Radar signal occur in current channel */ #define DETECT_RADAR_SIGNAL 0xb /* Radar signal occur in current channel */
#define EXTRA_INFO_MAX 0xb /* Indicate Last OID */ #define EXTRA_INFO_MAX 0xb /* Indicate Last OID */
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
Create and register network interface for PCI based chipsets in Linux platform. Create and register network interface for PCI based chipsets in Linux platform.
Revision History: Revision History:
Who When What Who When What
Justin P. Mattock 11/07/2010 Fix typos in some comments
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
*/ */
...@@ -40,8 +41,8 @@ ...@@ -40,8 +41,8 @@
#include <linux/slab.h> #include <linux/slab.h>
/* Following information will be show when you run 'modinfo' */ /* Following information will be show when you run 'modinfo' */
/* *** If you have a solution for the bug in current version of driver, please mail to me. */ /* If you have a solution for a bug in current version of driver, please e-mail me. */
/* Otherwise post to forum in ralinktech's web site(www.ralinktech.com) and let all users help you. *** */ /* Otherwise post to forum in ralinktech's web site(www.ralinktech.com) and let all users help you. */
MODULE_AUTHOR("Jett Chen <jett_chen@ralinktech.com>"); MODULE_AUTHOR("Jett Chen <jett_chen@ralinktech.com>");
MODULE_DESCRIPTION("RT2860/RT3090 Wireless Lan Linux Driver"); MODULE_DESCRIPTION("RT2860/RT3090 Wireless Lan Linux Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -599,7 +600,7 @@ void RTMPInitPCIeLinkCtrlValue(struct rt_rtmp_adapter *pAd) ...@@ -599,7 +600,7 @@ void RTMPInitPCIeLinkCtrlValue(struct rt_rtmp_adapter *pAd)
DBGPRINT_RAW(RT_DEBUG_ERROR, DBGPRINT_RAW(RT_DEBUG_ERROR,
(" AUX_CTRL = 0x%32x\n", MacValue)); (" AUX_CTRL = 0x%32x\n", MacValue));
/* for RT30xx F and after, PCIe infterface, and for power solution 3 */ /* for RT30xx F and after, PCIe interface, and for power solution 3 */
if ((IS_VERSION_AFTER_F(pAd)) if ((IS_VERSION_AFTER_F(pAd))
&& (pAd->StaCfg.PSControl.field.rt30xxPowerMode >= 2) && (pAd->StaCfg.PSControl.field.rt30xxPowerMode >= 2)
&& (pAd->StaCfg.PSControl.field.rt30xxPowerMode <= 3)) { && (pAd->StaCfg.PSControl.field.rt30xxPowerMode <= 3)) {
...@@ -902,7 +903,7 @@ void RTMPPCIeLinkCtrlValueRestore(struct rt_rtmp_adapter *pAd, u8 Level) ...@@ -902,7 +903,7 @@ void RTMPPCIeLinkCtrlValueRestore(struct rt_rtmp_adapter *pAd, u8 Level)
Configuration); Configuration);
if ((Configuration != 0) && (Configuration != 0xFFFF)) { if ((Configuration != 0) && (Configuration != 0xFFFF)) {
Configuration &= 0xfefc; Configuration &= 0xfefc;
/* If call from interface down, restore to orginial setting. */ /* If call from interface down, restore to original setting. */
if (Level == RESTORE_CLOSE) if (Level == RESTORE_CLOSE)
Configuration |= pAd->HostLnkCtrlConfiguration; Configuration |= pAd->HostLnkCtrlConfiguration;
else else
...@@ -924,7 +925,7 @@ void RTMPPCIeLinkCtrlValueRestore(struct rt_rtmp_adapter *pAd, u8 Level) ...@@ -924,7 +925,7 @@ void RTMPPCIeLinkCtrlValueRestore(struct rt_rtmp_adapter *pAd, u8 Level)
Configuration); Configuration);
if ((Configuration != 0) && (Configuration != 0xFFFF)) { if ((Configuration != 0) && (Configuration != 0xFFFF)) {
Configuration &= 0xfefc; Configuration &= 0xfefc;
/* If call from interface down, restore to orginial setting. */ /* If call from interface down, restore to original setting. */
if (Level == RESTORE_CLOSE) if (Level == RESTORE_CLOSE)
Configuration |= pAd->RLnkCtrlConfiguration; Configuration |= pAd->RLnkCtrlConfiguration;
else else
...@@ -1106,12 +1107,12 @@ void RTMPrt3xSetPCIePowerLinkCtrl(struct rt_rtmp_adapter *pAd) ...@@ -1106,12 +1107,12 @@ void RTMPrt3xSetPCIePowerLinkCtrl(struct rt_rtmp_adapter *pAd)
if (pos != 0) if (pos != 0)
pAd->HostLnkCtrlOffset = pos + PCI_EXP_LNKCTL; pAd->HostLnkCtrlOffset = pos + PCI_EXP_LNKCTL;
/* If configurared to turn on L1. */ /* If configured to turn on L1. */
HostConfiguration = 0; HostConfiguration = 0;
if (pAd->StaCfg.PSControl.field.rt30xxForceASPMTest == 1) { if (pAd->StaCfg.PSControl.field.rt30xxForceASPMTest == 1) {
DBGPRINT(RT_DEBUG_TRACE, ("Enter,PSM : Force ASPM\n")); DBGPRINT(RT_DEBUG_TRACE, ("Enter,PSM : Force ASPM\n"));
/* Skip non-exist deice right away */ /* Skip non-exist device right away */
if ((pAd->HostLnkCtrlOffset != 0)) { if ((pAd->HostLnkCtrlOffset != 0)) {
PCI_REG_READ_WORD(pObj->parent_pci_dev, PCI_REG_READ_WORD(pObj->parent_pci_dev,
pAd->HostLnkCtrlOffset, pAd->HostLnkCtrlOffset,
......
...@@ -767,13 +767,13 @@ void send_monitor_packets(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk) ...@@ -767,13 +767,13 @@ void send_monitor_packets(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk)
/* QOS */ /* QOS */
if (pRxBlk->pHeader->FC.SubType & 0x08) { if (pRxBlk->pHeader->FC.SubType & 0x08) {
header_len += 2; header_len += 2;
/* Data skip QOS contorl field */ /* Data skip QOS control field */
pRxBlk->DataSize -= 2; pRxBlk->DataSize -= 2;
} }
/* Order bit: A-Ralink or HTC+ */ /* Order bit: A-Ralink or HTC+ */
if (pRxBlk->pHeader->FC.Order) { if (pRxBlk->pHeader->FC.Order) {
header_len += 4; header_len += 4;
/* Data skip HTC contorl field */ /* Data skip HTC control field */
pRxBlk->DataSize -= 4; pRxBlk->DataSize -= 4;
} }
/* Copy Header */ /* Copy Header */
...@@ -1175,7 +1175,7 @@ int RtmpOSNetDevAddrSet(struct net_device *pNetDev, u8 *pMacAddr) ...@@ -1175,7 +1175,7 @@ int RtmpOSNetDevAddrSet(struct net_device *pNetDev, u8 *pMacAddr)
net_dev = pNetDev; net_dev = pNetDev;
GET_PAD_FROM_NET_DEV(pAd, net_dev); GET_PAD_FROM_NET_DEV(pAd, net_dev);
/* work-around for the SuSE due to it has it's own interface name management system. */ /* work-around for SuSE, due to them having their own interface name management system. */
{ {
NdisZeroMemory(pAd->StaCfg.dev_name, 16); NdisZeroMemory(pAd->StaCfg.dev_name, 16);
NdisMoveMemory(pAd->StaCfg.dev_name, net_dev->name, NdisMoveMemory(pAd->StaCfg.dev_name, net_dev->name,
...@@ -1300,7 +1300,7 @@ int RtmpOSNetDevAttach(struct net_device *pNetDev, ...@@ -1300,7 +1300,7 @@ int RtmpOSNetDevAttach(struct net_device *pNetDev,
int ret, rtnl_locked = FALSE; int ret, rtnl_locked = FALSE;
DBGPRINT(RT_DEBUG_TRACE, ("RtmpOSNetDevAttach()--->\n")); DBGPRINT(RT_DEBUG_TRACE, ("RtmpOSNetDevAttach()--->\n"));
/* If we need hook some callback function to the net device structrue, now do it. */ /* If we need hook some callback function to the net device structure, now do it. */
if (pDevOpHook) { if (pDevOpHook) {
struct rt_rtmp_adapter *pAd = NULL; struct rt_rtmp_adapter *pAd = NULL;
...@@ -1351,10 +1351,10 @@ struct net_device *RtmpOSNetDevCreate(struct rt_rtmp_adapter *pAd, ...@@ -1351,10 +1351,10 @@ struct net_device *RtmpOSNetDevCreate(struct rt_rtmp_adapter *pAd,
return NULL; return NULL;
} }
/* find a available interface name, max 32 interfaces */ /* find an available interface name, max 32 interfaces */
status = RtmpOSNetDevRequestName(pAd, pNetDev, pNamePrefix, devNum); status = RtmpOSNetDevRequestName(pAd, pNetDev, pNamePrefix, devNum);
if (status != NDIS_STATUS_SUCCESS) { if (status != NDIS_STATUS_SUCCESS) {
/* error! no any available ra name can be used! */ /* error! no available ra name can be used! */
DBGPRINT(RT_DEBUG_ERROR, DBGPRINT(RT_DEBUG_ERROR,
("Assign interface name (%s with suffix 0~32) failed...\n", ("Assign interface name (%s with suffix 0~32) failed...\n",
pNamePrefix)); pNamePrefix));
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
Abstract: Abstract:
Revision History: Revision History:
Who When What Who When What
Justin P. Mattock 11/07/2010 Fix typo in a comment
--------- ---------- ---------------------------------------------- --------- ---------- ----------------------------------------------
*/ */
...@@ -726,7 +727,7 @@ void linux_pci_unmap_single(struct rt_rtmp_adapter *pAd, dma_addr_t dma_addr, ...@@ -726,7 +727,7 @@ void linux_pci_unmap_single(struct rt_rtmp_adapter *pAd, dma_addr_t dma_addr,
#define RTMP_GET_PACKET_MOREDATA(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+7]) #define RTMP_GET_PACKET_MOREDATA(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+7])
/* */ /* */
/* Sepcific Pakcet Type definition */ /* Specific Packet Type definition */
/* */ /* */
#define RTMP_PACKET_SPECIFIC_CB_OFFSET 11 #define RTMP_PACKET_SPECIFIC_CB_OFFSET 11
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
Create and register network interface. Create and register network interface.
Revision History: Revision History:
Who When What Who When What
Justin P. Mattock 11/07/2010 Fix typos in comments
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
*/ */
...@@ -234,7 +235,7 @@ int rt28xx_close(struct net_device *dev) ...@@ -234,7 +235,7 @@ int rt28xx_close(struct net_device *dev)
RTMPPCIeLinkCtrlValueRestore(pAd, RESTORE_CLOSE); RTMPPCIeLinkCtrlValueRestore(pAd, RESTORE_CLOSE);
#endif /* RTMP_MAC_PCI // */ #endif /* RTMP_MAC_PCI // */
/* If dirver doesn't wake up firmware here, */ /* If driver doesn't wake up firmware here, */
/* NICLoadFirmware will hang forever when interface is up again. */ /* NICLoadFirmware will hang forever when interface is up again. */
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) { if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) {
AsicForceWakeup(pAd, TRUE); AsicForceWakeup(pAd, TRUE);
...@@ -310,8 +311,8 @@ int rt28xx_close(struct net_device *dev) ...@@ -310,8 +311,8 @@ int rt28xx_close(struct net_device *dev)
RTMP_ASIC_INTERRUPT_DISABLE(pAd); RTMP_ASIC_INTERRUPT_DISABLE(pAd);
} }
/* Receive packets to clear DMA index after disable interrupt. */ /* Receive packets to clear DMA index after disable interrupt. */
/*RTMPHandleRxDoneInterrupt(pAd); */ /* RTMPHandleRxDoneInterrupt(pAd); */
/* put to radio off to save power when driver unload. After radiooff, can't write /read register. So need to finish all */ /* put radio off to save power when driver unloads. After radiooff, can't write/read register, so need to finish all. */
/* register access before Radio off. */ /* register access before Radio off. */
brc = RT28xxPciAsicRadioOff(pAd, RTMP_HALT, 0); brc = RT28xxPciAsicRadioOff(pAd, RTMP_HALT, 0);
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
Create and register network interface. Create and register network interface.
Revision History: Revision History:
Who When What Who When What
Justin P. Mattock 11/07/2010 Fix a typo
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
*/ */
...@@ -356,7 +357,7 @@ static void mgmt_dma_done_tasklet(unsigned long data) ...@@ -356,7 +357,7 @@ static void mgmt_dma_done_tasklet(unsigned long data)
RTMPHandleMgmtRingDmaDoneInterrupt(pAd); RTMPHandleMgmtRingDmaDoneInterrupt(pAd);
/* if you use RTMP_SEM_LOCK, sometimes kernel will hang up, no any */ /* if you use RTMP_SEM_LOCK, sometimes kernel will hang up, without any */
/* bug report output */ /* bug report output */
RTMP_INT_LOCK(&pAd->irq_lock, flags); RTMP_INT_LOCK(&pAd->irq_lock, flags);
/* /*
...@@ -787,7 +788,7 @@ IRQ_HANDLE_TYPE rt2860_interrupt(int irq, void *dev_instance) ...@@ -787,7 +788,7 @@ IRQ_HANDLE_TYPE rt2860_interrupt(int irq, void *dev_instance)
} }
/* /*
* invaild or writeback cache * invalid or writeback cache
* and convert virtual address to physical address * and convert virtual address to physical address
*/ */
dma_addr_t linux_pci_map_single(struct rt_rtmp_adapter *pAd, void *ptr, dma_addr_t linux_pci_map_single(struct rt_rtmp_adapter *pAd, void *ptr,
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
Revision History: Revision History:
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
Name Date Modification logs Name Date Modification logs
Justin P. Mattock 11/07/2010 Fix some typos.
*/ */
...@@ -279,7 +280,7 @@ static void rtusb_dataout_complete(unsigned long data) ...@@ -279,7 +280,7 @@ static void rtusb_dataout_complete(unsigned long data)
&& !RTUSB_TEST_BULK_FLAG(pAd, && !RTUSB_TEST_BULK_FLAG(pAd,
(fRTUSB_BULK_OUT_DATA_FRAG << (fRTUSB_BULK_OUT_DATA_FRAG <<
BulkOutPipeId))) { BulkOutPipeId))) {
/* Indicate There is data avaliable */ /* Indicate There is data available */
RTUSB_SET_BULK_FLAG(pAd, RTUSB_SET_BULK_FLAG(pAd,
(fRTUSB_BULK_OUT_DATA_NORMAL << (fRTUSB_BULK_OUT_DATA_NORMAL <<
BulkOutPipeId)); BulkOutPipeId));
...@@ -335,7 +336,7 @@ static void rtusb_null_frame_done_tasklet(unsigned long data) ...@@ -335,7 +336,7 @@ static void rtusb_null_frame_done_tasklet(unsigned long data)
} }
/* Always call Bulk routine, even reset bulk. */ /* Always call Bulk routine, even reset bulk. */
/* The protectioon of rest bulk should be in BulkOut routine */ /* The protection of rest bulk should be in BulkOut routine */
RTUSBKickBulkOut(pAd); RTUSBKickBulkOut(pAd);
} }
...@@ -383,7 +384,7 @@ static void rtusb_rts_frame_done_tasklet(unsigned long data) ...@@ -383,7 +384,7 @@ static void rtusb_rts_frame_done_tasklet(unsigned long data)
RTMP_SEM_UNLOCK(&pAd->BulkOutLock[pRTSContext->BulkOutPipeId]); RTMP_SEM_UNLOCK(&pAd->BulkOutLock[pRTSContext->BulkOutPipeId]);
/* Always call Bulk routine, even reset bulk. */ /* Always call Bulk routine, even reset bulk. */
/* The protectioon of rest bulk should be in BulkOut routine */ /* The protection of rest bulk should be in BulkOut routine */
RTUSBKickBulkOut(pAd); RTUSBKickBulkOut(pAd);
} }
...@@ -427,7 +428,7 @@ static void rtusb_pspoll_frame_done_tasklet(unsigned long data) ...@@ -427,7 +428,7 @@ static void rtusb_pspoll_frame_done_tasklet(unsigned long data)
RTMP_SEM_UNLOCK(&pAd->BulkOutLock[0]); RTMP_SEM_UNLOCK(&pAd->BulkOutLock[0]);
/* Always call Bulk routine, even reset bulk. */ /* Always call Bulk routine, even reset bulk. */
/* The protectioon of rest bulk should be in BulkOut routine */ /* The protection of rest bulk should be in BulkOut routine */
RTUSBKickBulkOut(pAd); RTUSBKickBulkOut(pAd);
} }
...@@ -575,7 +576,7 @@ static void rtusb_mgmt_dma_done_tasklet(unsigned long data) ...@@ -575,7 +576,7 @@ static void rtusb_mgmt_dma_done_tasklet(unsigned long data)
} else { } else {
/* Always call Bulk routine, even reset bulk. */ /* Always call Bulk routine, even reset bulk. */
/* The protectioon of rest bulk should be in BulkOut routine */ /* The protection of rest bulk should be in BulkOut routine */
if (pAd->MgmtRing.TxSwFreeIdx < if (pAd->MgmtRing.TxSwFreeIdx <
MGMT_RING_SIZE MGMT_RING_SIZE
/* pMLMEContext->bWaitingBulkOut == TRUE */) { /* pMLMEContext->bWaitingBulkOut == TRUE */) {
......
This diff is collapsed.
...@@ -31,10 +31,11 @@ ...@@ -31,10 +31,11 @@
Miniport related definition header Miniport related definition header
Revision History: Revision History:
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
Paul Lin 08-01-2002 created Paul Lin 08-01-2002 created
John Chang 08-05-2003 add definition for 11g & other drafts John Chang 08-05-2003 add definition for 11g & other drafts
Justin P. Mattock 11/07/2010 Fix some typos
*/ */
#ifndef __RTMP_DEF_H__ #ifndef __RTMP_DEF_H__
#define __RTMP_DEF_H__ #define __RTMP_DEF_H__
...@@ -111,11 +112,11 @@ ...@@ -111,11 +112,11 @@
WMM Note: If memory of your system is not much, please reduce the definition; WMM Note: If memory of your system is not much, please reduce the definition;
or when you do WMM test, the queue for low priority AC will be full, i.e. or when you do WMM test, the queue for low priority AC will be full, i.e.
TX_RING_SIZE + MAX_PACKETS_IN_QUEUE packets for the AC will be buffered in TX_RING_SIZE + MAX_PACKETS_IN_QUEUE packets for the AC will be buffered in
WLAN, maybe no any packet buffer can be got in Ethernet driver. WLAN, maybe no packet buffers can get into the Ethernet driver.
Sometimes no packet buffer can be got in Ethernet driver, the system will Sometimes no packet buffer can be get into the Ethernet driver, the system will
send flow control packet to the sender to slow down its sending rate. send flow control packet to the sender to slow down its sending rate.
So no WMM can be saw in the air. So no WMM can be seen in the air.
*/ */
/* /*
...@@ -125,7 +126,7 @@ ...@@ -125,7 +126,7 @@
And in rt_main_end.c, clConfig.clNum = RX_RING_SIZE * 3; is changed to And in rt_main_end.c, clConfig.clNum = RX_RING_SIZE * 3; is changed to
clConfig.clNum = RX_RING_SIZE * 4; clConfig.clNum = RX_RING_SIZE * 4;
*/ */
/* TODO: For VxWorks the size is 256. Shall we cahnge the value as 256 for all OS????? */ /* TODO: For VxWorks the size is 256. Shall we change the value as 256 for all OS? */
#define MAX_PACKETS_IN_QUEUE (512) /*(512) // to pass WMM A5-WPAPSK */ #define MAX_PACKETS_IN_QUEUE (512) /*(512) // to pass WMM A5-WPAPSK */
#define MAX_PACKETS_IN_MCAST_PS_QUEUE 32 #define MAX_PACKETS_IN_MCAST_PS_QUEUE 32
...@@ -171,7 +172,7 @@ ...@@ -171,7 +172,7 @@
#define fRTMP_ADAPTER_SCAN_2040 0x04000000 #define fRTMP_ADAPTER_SCAN_2040 0x04000000
#define fRTMP_ADAPTER_RADIO_MEASUREMENT 0x08000000 #define fRTMP_ADAPTER_RADIO_MEASUREMENT 0x08000000
#define fRTMP_ADAPTER_START_UP 0x10000000 /*Devive already initialized and enabled Tx/Rx. */ #define fRTMP_ADAPTER_START_UP 0x10000000 /*Device already initialized and enabled Tx/Rx. */
#define fRTMP_ADAPTER_MEDIA_STATE_CHANGE 0x20000000 #define fRTMP_ADAPTER_MEDIA_STATE_CHANGE 0x20000000
#define fRTMP_ADAPTER_IDLE_RADIO_OFF 0x40000000 #define fRTMP_ADAPTER_IDLE_RADIO_OFF 0x40000000
...@@ -205,8 +206,8 @@ ...@@ -205,8 +206,8 @@
#define fRTMP_PS_SET_PCI_CLK_OFF_COMMAND 0x00000002 #define fRTMP_PS_SET_PCI_CLK_OFF_COMMAND 0x00000002
/* Indicate driver should disable kick off hardware to send packets from now. */ /* Indicate driver should disable kick off hardware to send packets from now. */
#define fRTMP_PS_DISABLE_TX 0x00000004 #define fRTMP_PS_DISABLE_TX 0x00000004
/* Indicate driver should IMMEDIATELY fo to sleep after receiving AP's beacon in which doesn't indicate unicate nor multicast packets for me */ /* Indicate driver should IMMEDIATELY go to sleep after receiving AP's beacon in which doesn't indicate unicate nor multicast packets for me */
/*. This flag is used ONLY in RTMPHandleRxDoneInterrupt routine. */ /* This flag is used ONLY in RTMPHandleRxDoneInterrupt routine. */
#define fRTMP_PS_GO_TO_SLEEP_NOW 0x00000008 #define fRTMP_PS_GO_TO_SLEEP_NOW 0x00000008
#define fRTMP_PS_TOGGLE_L1 0x00000010 /* Use Toggle L1 mechanism for rt28xx PCIe */ #define fRTMP_PS_TOGGLE_L1 0x00000010 /* Use Toggle L1 mechanism for rt28xx PCIe */
...@@ -303,7 +304,7 @@ ...@@ -303,7 +304,7 @@
/* WDS definition */ /* WDS definition */
#define MAX_WDS_ENTRY 4 #define MAX_WDS_ENTRY 4
#define WDS_PAIRWISE_KEY_OFFSET 60 /* WDS links uses pairwise key#60 ~ 63 in ASIC pairwise key table */ #define WDS_PAIRWISE_KEY_OFFSET 60 /* WDS links use pairwise key#60 ~ 63 in ASIC pairwise key table */
#define WDS_DISABLE_MODE 0 #define WDS_DISABLE_MODE 0
#define WDS_RESTRICT_MODE 1 #define WDS_RESTRICT_MODE 1
...@@ -559,7 +560,7 @@ ...@@ -559,7 +560,7 @@
#define IE_ADD_HT2 53 /* 802.11n d1. ADDITIONAL HT CAPABILITY. ELEMENT ID TBD */ #define IE_ADD_HT2 53 /* 802.11n d1. ADDITIONAL HT CAPABILITY. ELEMENT ID TBD */
/* For 802.11n D3.03 */ /* For 802.11n D3.03 */
/*#define IE_NEW_EXT_CHA_OFFSET 62 // 802.11n d1. New extension channel offset elemet */ /*#define IE_NEW_EXT_CHA_OFFSET 62 // 802.11n d1. New extension channel offset element */
#define IE_SECONDARY_CH_OFFSET 62 /* 802.11n D3.03 Secondary Channel Offset element */ #define IE_SECONDARY_CH_OFFSET 62 /* 802.11n D3.03 Secondary Channel Offset element */
#define IE_WAPI 68 /* WAPI information element */ #define IE_WAPI 68 /* WAPI information element */
#define IE_2040_BSS_COEXIST 72 /* 802.11n D3.0.3 */ #define IE_2040_BSS_COEXIST 72 /* 802.11n D3.0.3 */
...@@ -678,7 +679,7 @@ ...@@ -678,7 +679,7 @@
#define ACT_MACHINE_BASE 0 #define ACT_MACHINE_BASE 0
/*Those PEER_xx_CATE number is based on real Categary value in IEEE spec. Please don'es modify it by your self. */ /*Those PEER_xx_CATE number is based on real Categary value in IEEE spec. Please do not modify it by your self. */
/*Category */ /*Category */
#define MT2_PEER_SPECTRUM_CATE 0 #define MT2_PEER_SPECTRUM_CATE 0
#define MT2_PEER_QOS_CATE 1 #define MT2_PEER_QOS_CATE 1
...@@ -748,7 +749,7 @@ ...@@ -748,7 +749,7 @@
#define ACT_FUNC_SIZE (MAX_ACT_STATE * MAX_ACT_MSG) #define ACT_FUNC_SIZE (MAX_ACT_STATE * MAX_ACT_MSG)
/* */ /* */
/* STA's AUTHENTICATION state machine: states, evvents, total function # */ /* STA's AUTHENTICATION state machine: states, events, total function # */
/* */ /* */
#define AUTH_REQ_IDLE 0 #define AUTH_REQ_IDLE 0
#define AUTH_WAIT_SEQ2 1 #define AUTH_WAIT_SEQ2 1
...@@ -948,7 +949,7 @@ ...@@ -948,7 +949,7 @@
#define BLOCK_ACK 0x60 /* b6:5 = 11 */ #define BLOCK_ACK 0x60 /* b6:5 = 11 */
/* */ /* */
/* rtmp_data.c use these definition */ /* rtmp_data.c uses this definition */
/* */ /* */
#define LENGTH_802_11 24 #define LENGTH_802_11 24
#define LENGTH_802_11_AND_H 30 #define LENGTH_802_11_AND_H 30
...@@ -1288,7 +1289,7 @@ ...@@ -1288,7 +1289,7 @@
#define IW_STA_LINKDOWN_EVENT_FLAG 0x0210 #define IW_STA_LINKDOWN_EVENT_FLAG 0x0210
#define IW_SCAN_COMPLETED_EVENT_FLAG 0x0211 #define IW_SCAN_COMPLETED_EVENT_FLAG 0x0211
#define IW_SCAN_ENQUEUE_FAIL_EVENT_FLAG 0x0212 #define IW_SCAN_ENQUEUE_FAIL_EVENT_FLAG 0x0212
/* if add new system event flag, please upadte the IW_SYS_EVENT_FLAG_END */ /* if add new system event flag, please update the IW_SYS_EVENT_FLAG_END */
#define IW_SYS_EVENT_FLAG_END 0x0212 #define IW_SYS_EVENT_FLAG_END 0x0212
#define IW_SYS_EVENT_TYPE_NUM (IW_SYS_EVENT_FLAG_END - IW_SYS_EVENT_FLAG_START + 1) #define IW_SYS_EVENT_TYPE_NUM (IW_SYS_EVENT_FLAG_END - IW_SYS_EVENT_FLAG_START + 1)
/* For system event - end */ /* For system event - end */
...@@ -1305,7 +1306,7 @@ ...@@ -1305,7 +1306,7 @@
#define IW_SPOOF_DEAUTH_EVENT_FLAG 0x0307 #define IW_SPOOF_DEAUTH_EVENT_FLAG 0x0307
#define IW_SPOOF_UNKNOWN_MGMT_EVENT_FLAG 0x0308 #define IW_SPOOF_UNKNOWN_MGMT_EVENT_FLAG 0x0308
#define IW_REPLAY_ATTACK_EVENT_FLAG 0x0309 #define IW_REPLAY_ATTACK_EVENT_FLAG 0x0309
/* if add new spoof attack event flag, please upadte the IW_SPOOF_EVENT_FLAG_END */ /* if add new spoof attack event flag, please update the IW_SPOOF_EVENT_FLAG_END */
#define IW_SPOOF_EVENT_FLAG_END 0x0309 #define IW_SPOOF_EVENT_FLAG_END 0x0309
#define IW_SPOOF_EVENT_TYPE_NUM (IW_SPOOF_EVENT_FLAG_END - IW_SPOOF_EVENT_FLAG_START + 1) #define IW_SPOOF_EVENT_TYPE_NUM (IW_SPOOF_EVENT_FLAG_END - IW_SPOOF_EVENT_FLAG_START + 1)
/* For spoof attack event - end */ /* For spoof attack event - end */
...@@ -1319,7 +1320,7 @@ ...@@ -1319,7 +1320,7 @@
#define IW_FLOOD_DISASSOC_EVENT_FLAG 0x0404 #define IW_FLOOD_DISASSOC_EVENT_FLAG 0x0404
#define IW_FLOOD_DEAUTH_EVENT_FLAG 0x0405 #define IW_FLOOD_DEAUTH_EVENT_FLAG 0x0405
#define IW_FLOOD_EAP_REQ_EVENT_FLAG 0x0406 #define IW_FLOOD_EAP_REQ_EVENT_FLAG 0x0406
/* if add new flooding attack event flag, please upadte the IW_FLOOD_EVENT_FLAG_END */ /* if add new flooding attack event flag, please update the IW_FLOOD_EVENT_FLAG_END */
#define IW_FLOOD_EVENT_FLAG_END 0x0406 #define IW_FLOOD_EVENT_FLAG_END 0x0406
#define IW_FLOOD_EVENT_TYPE_NUM (IW_FLOOD_EVENT_FLAG_END - IW_FLOOD_EVENT_FLAG_START + 1) #define IW_FLOOD_EVENT_TYPE_NUM (IW_FLOOD_EVENT_FLAG_END - IW_FLOOD_EVENT_FLAG_START + 1)
/* For flooding attack - end */ /* For flooding attack - end */
......
...@@ -28,13 +28,14 @@ ...@@ -28,13 +28,14 @@
rtmp_timer.h rtmp_timer.h
Abstract: Abstract:
Ralink Wireless Driver timer related data structures and delcarations Ralink Wireless Driver timer related data structures and declarations
Revision History: Revision History:
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
Name Date Modification logs Name Date Modification logs
Shiang Tu Aug-28-2008 init version Shiang Tu Aug-28-2008 init version
Justin P. Mattock 11/07/2010 Fix a typo
*/ */
...@@ -51,8 +52,8 @@ ...@@ -51,8 +52,8 @@
/* ----------------- Timer Related MARCO ---------------*/ /* ----------------- Timer Related MARCO ---------------*/
/* In some os or chipset, we have a lot of timer functions and will read/write register, */ /* In some os or chipset, we have a lot of timer functions and will read/write register, */
/* it's not allowed in Linux USB sub-system to do it ( because of sleep issue when */ /* it's not allowed in Linux USB sub-system to do it ( because of sleep issue when */
/* submit to ctrl pipe). So we need a wrapper function to take care it. */ /* submit to ctrl pipe). So we need a wrapper function to take care it. */
#ifdef RTMP_TIMER_TASK_SUPPORT #ifdef RTMP_TIMER_TASK_SUPPORT
typedef void(*RTMP_TIMER_TASK_HANDLE) (void *SystemSpecific1, typedef void(*RTMP_TIMER_TASK_HANDLE) (void *SystemSpecific1,
......
...@@ -37,7 +37,7 @@ char RTMP_GetTxPwr(struct rt_rtmp_adapter *pAd, IN HTTRANSMIT_SETTING HTTxMode); ...@@ -37,7 +37,7 @@ char RTMP_GetTxPwr(struct rt_rtmp_adapter *pAd, IN HTTRANSMIT_SETTING HTTxMode);
========================================================================== ==========================================================================
Description: Description:
Prepare Measurement request action frame and enqueue it into Prepare Measurement request action frame and enqueue it into
management queue waiting for transmition. management queue waiting for transmission.
Parametrs: Parametrs:
1. the destination mac address of the frame. 1. the destination mac address of the frame.
...@@ -60,7 +60,7 @@ void MakeMeasurementReqFrame(struct rt_rtmp_adapter *pAd, ...@@ -60,7 +60,7 @@ void MakeMeasurementReqFrame(struct rt_rtmp_adapter *pAd,
========================================================================== ==========================================================================
Description: Description:
Prepare Measurement report action frame and enqueue it into Prepare Measurement report action frame and enqueue it into
management queue waiting for transmition. management queue waiting for transmission.
Parametrs: Parametrs:
1. the destination mac address of the frame. 1. the destination mac address of the frame.
...@@ -80,7 +80,7 @@ void EnqueueMeasurementRep(struct rt_rtmp_adapter *pAd, ...@@ -80,7 +80,7 @@ void EnqueueMeasurementRep(struct rt_rtmp_adapter *pAd,
========================================================================== ==========================================================================
Description: Description:
Prepare TPC Request action frame and enqueue it into Prepare TPC Request action frame and enqueue it into
management queue waiting for transmition. management queue waiting for transmission.
Parametrs: Parametrs:
1. the destination mac address of the frame. 1. the destination mac address of the frame.
...@@ -94,7 +94,7 @@ void EnqueueTPCReq(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 DialogToken); ...@@ -94,7 +94,7 @@ void EnqueueTPCReq(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 DialogToken);
========================================================================== ==========================================================================
Description: Description:
Prepare TPC Report action frame and enqueue it into Prepare TPC Report action frame and enqueue it into
management queue waiting for transmition. management queue waiting for transmission.
Parametrs: Parametrs:
1. the destination mac address of the frame. 1. the destination mac address of the frame.
...@@ -110,7 +110,7 @@ void EnqueueTPCRep(struct rt_rtmp_adapter *pAd, ...@@ -110,7 +110,7 @@ void EnqueueTPCRep(struct rt_rtmp_adapter *pAd,
========================================================================== ==========================================================================
Description: Description:
Prepare Channel Switch Announcement action frame and enqueue it into Prepare Channel Switch Announcement action frame and enqueue it into
management queue waiting for transmition. management queue waiting for transmission.
Parametrs: Parametrs:
1. the destination mac address of the frame. 1. the destination mac address of the frame.
...@@ -126,7 +126,7 @@ void EnqueueChSwAnn(struct rt_rtmp_adapter *pAd, ...@@ -126,7 +126,7 @@ void EnqueueChSwAnn(struct rt_rtmp_adapter *pAd,
/* /*
========================================================================== ==========================================================================
Description: Description:
Spectrun action frames Handler such as channel switch annoucement, Spectrun action frames Handler such as channel switch announcement,
measurement report, measurement request actions frames. measurement report, measurement request actions frames.
Parametrs: Parametrs:
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
Revision History: Revision History:
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
John 2004-9-3 porting from RT2500 John 2004-9-3 porting from RT2500
Justin P. Mattock 11/07/2010 Fix typos
*/ */
#include "../rt_config.h" #include "../rt_config.h"
...@@ -277,10 +278,10 @@ void MlmeAssocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem * ...@@ -277,10 +278,10 @@ void MlmeAssocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *
u16 VarIesOffset; u16 VarIesOffset;
u16 Status; u16 Status;
/* Block all authentication request durning WPA block period */ /* Block all authentication request during WPA block period */
if (pAd->StaCfg.bBlockAssoc == TRUE) { if (pAd->StaCfg.bBlockAssoc == TRUE) {
DBGPRINT(RT_DEBUG_TRACE, DBGPRINT(RT_DEBUG_TRACE,
("ASSOC - Block Assoc request durning WPA block period!\n")); ("ASSOC - Block Assoc request during WPA block period!\n"));
pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE; pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE;
Status = MLME_STATE_MACHINE_REJECT; Status = MLME_STATE_MACHINE_REJECT;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_ASSOC_CONF, 2, MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_ASSOC_CONF, 2,
...@@ -605,10 +606,10 @@ void MlmeReassocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem ...@@ -605,10 +606,10 @@ void MlmeReassocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem
u8 *pOutBuffer = NULL; u8 *pOutBuffer = NULL;
u16 Status; u16 Status;
/* Block all authentication request durning WPA block period */ /* Block all authentication request during WPA block period */
if (pAd->StaCfg.bBlockAssoc == TRUE) { if (pAd->StaCfg.bBlockAssoc == TRUE) {
DBGPRINT(RT_DEBUG_TRACE, DBGPRINT(RT_DEBUG_TRACE,
("ASSOC - Block ReAssoc request durning WPA block period!\n")); ("ASSOC - Block ReAssoc request during WPA block period!\n"));
pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE; pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE;
Status = MLME_STATE_MACHINE_REJECT; Status = MLME_STATE_MACHINE_REJECT;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_REASSOC_CONF, 2, MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_REASSOC_CONF, 2,
...@@ -1001,7 +1002,7 @@ void AssocPostProc(struct rt_rtmp_adapter *pAd, u8 *pAddr2, u16 CapabilityInfo, ...@@ -1001,7 +1002,7 @@ void AssocPostProc(struct rt_rtmp_adapter *pAd, u8 *pAddr2, u16 CapabilityInfo,
pAd->MlmeAux.CapabilityInfo = pAd->MlmeAux.CapabilityInfo =
CapabilityInfo & SUPPORTED_CAPABILITY_INFO; CapabilityInfo & SUPPORTED_CAPABILITY_INFO;
/* Some HT AP might lost WMM IE. We add WMM ourselves. beacuase HT requires QoS on. */ /* Some HT AP might lost WMM IE. We add WMM ourselves. because HT requires QoS on. */
if ((HtCapabilityLen > 0) && (pEdcaParm->bValid == FALSE)) { if ((HtCapabilityLen > 0) && (pEdcaParm->bValid == FALSE)) {
pEdcaParm->bValid = TRUE; pEdcaParm->bValid = TRUE;
pEdcaParm->Aifsn[0] = 3; pEdcaParm->Aifsn[0] = 3;
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
Revision History: Revision History:
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
John 2004-9-3 porting from RT2500 John 2004-9-3 porting from RT2500
Justin P. Mattock 11/07/2010 Fix typos
*/ */
#include "../rt_config.h" #include "../rt_config.h"
...@@ -455,10 +456,10 @@ BOOLEAN AUTH_ReqSend(struct rt_rtmp_adapter *pAd, ...@@ -455,10 +456,10 @@ BOOLEAN AUTH_ReqSend(struct rt_rtmp_adapter *pAd,
u8 *pOutBuffer = NULL; u8 *pOutBuffer = NULL;
unsigned long FrameLen = 0, tmp = 0; unsigned long FrameLen = 0, tmp = 0;
/* Block all authentication request durning WPA block period */ /* Block all authentication request during WPA block period */
if (pAd->StaCfg.bBlockAssoc == TRUE) { if (pAd->StaCfg.bBlockAssoc == TRUE) {
DBGPRINT(RT_DEBUG_TRACE, DBGPRINT(RT_DEBUG_TRACE,
("%s - Block Auth request durning WPA block period!\n", ("%s - Block Auth request during WPA block period!\n",
pSMName)); pSMName));
pAd->Mlme.AuthMachine.CurrState = AUTH_REQ_IDLE; pAd->Mlme.AuthMachine.CurrState = AUTH_REQ_IDLE;
Status = MLME_STATE_MACHINE_REJECT; Status = MLME_STATE_MACHINE_REJECT;
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
Revision History: Revision History:
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
John 2004-08-08 Major modification from RT2560 John 2004-08-08 Major modification from RT2560
Justin P. Mattock 11/07/2010 Fix typos
*/ */
#include "../rt_config.h" #include "../rt_config.h"
...@@ -64,7 +65,7 @@ u8 CipherSuiteWpaNoneAesLen = ...@@ -64,7 +65,7 @@ u8 CipherSuiteWpaNoneAesLen =
/* The following MACRO is called after 1. starting an new IBSS, 2. successfully JOIN an IBSS, */ /* The following MACRO is called after 1. starting an new IBSS, 2. successfully JOIN an IBSS, */
/* or 3. successfully ASSOCIATE to a BSS, 4. successfully RE_ASSOCIATE to a BSS */ /* or 3. successfully ASSOCIATE to a BSS, 4. successfully RE_ASSOCIATE to a BSS */
/* All settings successfuly negotiated furing MLME state machines become final settings */ /* All settings successfuly negotiated firing MLME state machines become final settings */
/* and are copied to pAd->StaActive */ /* and are copied to pAd->StaActive */
#define COPY_SETTINGS_FROM_MLME_AUX_TO_ACTIVE_CFG(_pAd) \ #define COPY_SETTINGS_FROM_MLME_AUX_TO_ACTIVE_CFG(_pAd) \
{ \ { \
...@@ -553,7 +554,7 @@ void CntlOidRTBssidProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem * ...@@ -553,7 +554,7 @@ void CntlOidRTBssidProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *
NdisMoveMemory(&pAd->MlmeAux.SsidBssTab.BssEntry[0], NdisMoveMemory(&pAd->MlmeAux.SsidBssTab.BssEntry[0],
&pAd->ScanTab.BssEntry[BssIdx], sizeof(struct rt_bss_entry)); &pAd->ScanTab.BssEntry[BssIdx], sizeof(struct rt_bss_entry));
/* Add SSID into MlmeAux for site surey joining hidden SSID */ /* Add SSID into MlmeAux for site survey joining hidden SSID */
pAd->MlmeAux.SsidLen = pAd->ScanTab.BssEntry[BssIdx].SsidLen; pAd->MlmeAux.SsidLen = pAd->ScanTab.BssEntry[BssIdx].SsidLen;
NdisMoveMemory(pAd->MlmeAux.Ssid, pAd->ScanTab.BssEntry[BssIdx].Ssid, NdisMoveMemory(pAd->MlmeAux.Ssid, pAd->ScanTab.BssEntry[BssIdx].Ssid,
pAd->MlmeAux.SsidLen); pAd->MlmeAux.SsidLen);
...@@ -666,7 +667,7 @@ void CntlOidRTBssidProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem * ...@@ -666,7 +667,7 @@ void CntlOidRTBssidProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *
} }
/* Roaming is the only external request triggering CNTL state machine */ /* Roaming is the only external request triggering CNTL state machine */
/* despite of other "SET OID" operation. All "SET OID" related oerations */ /* despite of other "SET OID" operation. All "SET OID" related operations */
/* happen in sequence, because no other SET OID will be sent to this device */ /* happen in sequence, because no other SET OID will be sent to this device */
/* until the the previous SET operation is complete (successful o failed). */ /* until the the previous SET operation is complete (successful o failed). */
/* So, how do we quarantee this ROAMING request won't corrupt other "SET OID"? */ /* So, how do we quarantee this ROAMING request won't corrupt other "SET OID"? */
...@@ -1224,7 +1225,7 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType) ...@@ -1224,7 +1225,7 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
/* Change to AP channel */ /* Change to AP channel */
if ((pAd->CommonCfg.CentralChannel > pAd->CommonCfg.Channel) if ((pAd->CommonCfg.CentralChannel > pAd->CommonCfg.Channel)
&& (pAd->MlmeAux.HtCapability.HtCapInfo.ChannelWidth == BW_40)) { && (pAd->MlmeAux.HtCapability.HtCapInfo.ChannelWidth == BW_40)) {
/* Must using 40MHz. */ /* Must use 40MHz. */
pAd->CommonCfg.BBPCurrentBW = BW_40; pAd->CommonCfg.BBPCurrentBW = BW_40;
AsicSwitchChannel(pAd, pAd->CommonCfg.CentralChannel, FALSE); AsicSwitchChannel(pAd, pAd->CommonCfg.CentralChannel, FALSE);
AsicLockChannel(pAd, pAd->CommonCfg.CentralChannel); AsicLockChannel(pAd, pAd->CommonCfg.CentralChannel);
...@@ -1259,7 +1260,7 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType) ...@@ -1259,7 +1260,7 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
} else if ((pAd->CommonCfg.CentralChannel < pAd->CommonCfg.Channel) } else if ((pAd->CommonCfg.CentralChannel < pAd->CommonCfg.Channel)
&& (pAd->MlmeAux.HtCapability.HtCapInfo.ChannelWidth == && (pAd->MlmeAux.HtCapability.HtCapInfo.ChannelWidth ==
BW_40)) { BW_40)) {
/* Must using 40MHz. */ /* Must use 40MHz. */
pAd->CommonCfg.BBPCurrentBW = BW_40; pAd->CommonCfg.BBPCurrentBW = BW_40;
AsicSwitchChannel(pAd, pAd->CommonCfg.CentralChannel, FALSE); AsicSwitchChannel(pAd, pAd->CommonCfg.CentralChannel, FALSE);
AsicLockChannel(pAd, pAd->CommonCfg.CentralChannel); AsicLockChannel(pAd, pAd->CommonCfg.CentralChannel);
...@@ -1343,12 +1344,12 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType) ...@@ -1343,12 +1344,12 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
AsicSetSlotTime(pAd, TRUE); AsicSetSlotTime(pAd, TRUE);
AsicSetEdcaParm(pAd, &pAd->CommonCfg.APEdcaParm); AsicSetEdcaParm(pAd, &pAd->CommonCfg.APEdcaParm);
/* Call this for RTS protectionfor legacy rate, we will always enable RTS threshold, but normally it will not hit */ /* Call this for RTS protection for legacy rate, we will always enable RTS threshold, but normally it will not hit */
AsicUpdateProtect(pAd, 0, (OFDMSETPROTECT | CCKSETPROTECT), TRUE, AsicUpdateProtect(pAd, 0, (OFDMSETPROTECT | CCKSETPROTECT), TRUE,
FALSE); FALSE);
if ((pAd->StaActive.SupportedPhyInfo.bHtEnable == TRUE)) { if ((pAd->StaActive.SupportedPhyInfo.bHtEnable == TRUE)) {
/* Update HT protectionfor based on AP's operating mode. */ /* Update HT protection for based on AP's operating mode. */
if (pAd->MlmeAux.AddHtInfo.AddHtInfo2.NonGfPresent == 1) { if (pAd->MlmeAux.AddHtInfo.AddHtInfo2.NonGfPresent == 1) {
AsicUpdateProtect(pAd, AsicUpdateProtect(pAd,
pAd->MlmeAux.AddHtInfo.AddHtInfo2. pAd->MlmeAux.AddHtInfo.AddHtInfo2.
...@@ -1530,7 +1531,7 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType) ...@@ -1530,7 +1531,7 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
/* Add BSSID to WCID search table */ /* Add BSSID to WCID search table */
AsicUpdateRxWCIDTable(pAd, BSSID_WCID, pAd->CommonCfg.Bssid); AsicUpdateRxWCIDTable(pAd, BSSID_WCID, pAd->CommonCfg.Bssid);
/* If WEP is enabled, add paiewise and shared key */ /* If WEP is enabled, add pairwise and shared key */
if (((pAd->StaCfg.WpaSupplicantUP) && if (((pAd->StaCfg.WpaSupplicantUP) &&
(pAd->StaCfg.WepStatus == Ndis802_11WEPEnabled) && (pAd->StaCfg.WepStatus == Ndis802_11WEPEnabled) &&
(pAd->StaCfg.PortSecured == WPA_802_1X_PORT_SECURED)) || (pAd->StaCfg.PortSecured == WPA_802_1X_PORT_SECURED)) ||
...@@ -1681,9 +1682,9 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType) ...@@ -1681,9 +1682,9 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
pAd->Mlme.PeriodicRound = 0; pAd->Mlme.PeriodicRound = 0;
pAd->Mlme.OneSecPeriodicRound = 0; pAd->Mlme.OneSecPeriodicRound = 0;
pAd->bConfigChanged = FALSE; /* Reset config flag */ pAd->bConfigChanged = FALSE; /* Reset config flag */
pAd->ExtraInfo = GENERAL_LINK_UP; /* Update extra information to link is up */ pAd->ExtraInfo = GENERAL_LINK_UP; /* Update extra information after link is up */
/* Set asic auto fall back */ /* Set basic auto fall back */
{ {
u8 *pTable; u8 *pTable;
u8 TableSize = 0; u8 TableSize = 0;
...@@ -1854,8 +1855,8 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType) ...@@ -1854,8 +1855,8 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
Note: Note:
We need more information to know it's this requst from AP. We need more information to know it's this requst from AP.
If yes! we need to do extra handling, for example, remove the WPA key. If yes! we need to do extra handling, for example, remove the WPA key.
Otherwise on 4-way handshaking will faied, since the WPA key didn't be Otherwise on 4-way handshaking will fail, since the WPA key didn't get
remove while auto reconnect. removed while auto reconnect.
Disconnect request from AP, it means we will start afresh 4-way handshaking Disconnect request from AP, it means we will start afresh 4-way handshaking
on WPA mode. on WPA mode.
...@@ -1870,9 +1871,9 @@ void LinkDown(struct rt_rtmp_adapter *pAd, IN BOOLEAN IsReqFromAP) ...@@ -1870,9 +1871,9 @@ void LinkDown(struct rt_rtmp_adapter *pAd, IN BOOLEAN IsReqFromAP)
return; return;
RTMP_CLEAR_PSFLAG(pAd, fRTMP_PS_GO_TO_SLEEP_NOW); RTMP_CLEAR_PSFLAG(pAd, fRTMP_PS_GO_TO_SLEEP_NOW);
/*Comment the codes, beasue the line 2291 call the same function. */ /* Comment the codes, because the line 2291 call the same function. */
/*RTMPCancelTimer(&pAd->Mlme.PsPollTimer, &Cancelled); */ /* RTMPCancelTimer(&pAd->Mlme.PsPollTimer, &Cancelled); */
/* Not allow go to sleep within linkdown function. */ /* Not allowed go to sleep within the linkdown function. */
RTMP_CLEAR_PSFLAG(pAd, fRTMP_PS_CAN_GO_SLEEP); RTMP_CLEAR_PSFLAG(pAd, fRTMP_PS_CAN_GO_SLEEP);
if (pAd->CommonCfg.bWirelessEvent) { if (pAd->CommonCfg.bWirelessEvent) {
...@@ -1970,7 +1971,7 @@ void LinkDown(struct rt_rtmp_adapter *pAd, IN BOOLEAN IsReqFromAP) ...@@ -1970,7 +1971,7 @@ void LinkDown(struct rt_rtmp_adapter *pAd, IN BOOLEAN IsReqFromAP)
/* Set LED */ /* Set LED */
RTMPSetLED(pAd, LED_LINK_DOWN); RTMPSetLED(pAd, LED_LINK_DOWN);
pAd->LedIndicatorStrength = 0xF0; pAd->LedIndicatorStrength = 0xF0;
RTMPSetSignalLED(pAd, -100); /* Force signal strength Led to be turned off, firmware is not done it. */ RTMPSetSignalLED(pAd, -100); /* Force signal strength Led to be turned off, firmware has not done it. */
AsicDisableSync(pAd); AsicDisableSync(pAd);
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
Data path subroutines Data path subroutines
Revision History: Revision History:
Who When What Who When What
Justin P. Mattock 11/07/2010 Fix typos
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
*/ */
#include "../rt_config.h" #include "../rt_config.h"
...@@ -257,8 +258,8 @@ void STARxDataFrameAnnounce(struct rt_rtmp_adapter *pAd, ...@@ -257,8 +258,8 @@ void STARxDataFrameAnnounce(struct rt_rtmp_adapter *pAd,
&& (pAd->CommonCfg.bDisableReordering == 0)) { && (pAd->CommonCfg.bDisableReordering == 0)) {
Indicate_AMPDU_Packet(pAd, pRxBlk, FromWhichBSSID); Indicate_AMPDU_Packet(pAd, pRxBlk, FromWhichBSSID);
} else { } else {
/* Determin the destination of the EAP frame */ /* Determine the destination of the EAP frame */
/* to WPA state machine or upper layer */ /* to WPA state machine or upper layer */
STARxEAPOLFrameIndicate(pAd, pEntry, pRxBlk, STARxEAPOLFrameIndicate(pAd, pEntry, pRxBlk,
FromWhichBSSID); FromWhichBSSID);
} }
...@@ -853,7 +854,7 @@ Return Value: ...@@ -853,7 +854,7 @@ Return Value:
NONE NONE
Note: Note:
This function do early checking and classification for send-out packet. This function does early checking and classification for send-out packet.
You only can put OS-depened & STA related code in here. You only can put OS-depened & STA related code in here.
======================================================================== ========================================================================
*/ */
...@@ -943,7 +944,7 @@ int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket) ...@@ -943,7 +944,7 @@ int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket)
DBGPRINT(RT_DEBUG_ERROR, DBGPRINT(RT_DEBUG_ERROR,
("STASendPacket --> pSrcBufVA == NULL !SrcBufLen=%x\n", ("STASendPacket --> pSrcBufVA == NULL !SrcBufLen=%x\n",
SrcBufLen)); SrcBufLen));
/* Resourece is low, system did not allocate virtual address */ /* Resource is low, system did not allocate virtual address */
/* return NDIS_STATUS_FAILURE directly to upper layer */ /* return NDIS_STATUS_FAILURE directly to upper layer */
RELEASE_NDIS_PACKET(pAd, pPacket, NDIS_STATUS_FAILURE); RELEASE_NDIS_PACKET(pAd, pPacket, NDIS_STATUS_FAILURE);
return NDIS_STATUS_FAILURE; return NDIS_STATUS_FAILURE;
...@@ -979,7 +980,7 @@ int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket) ...@@ -979,7 +980,7 @@ int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket)
DBGPRINT(RT_DEBUG_ERROR, DBGPRINT(RT_DEBUG_ERROR,
("STASendPacket->Cannot find pEntry(%pM) in MacTab!\n", ("STASendPacket->Cannot find pEntry(%pM) in MacTab!\n",
pSrcBufVA)); pSrcBufVA));
/* Resourece is low, system did not allocate virtual address */ /* Resource is low, system did not allocate virtual address */
/* return NDIS_STATUS_FAILURE directly to upper layer */ /* return NDIS_STATUS_FAILURE directly to upper layer */
RELEASE_NDIS_PACKET(pAd, pPacket, NDIS_STATUS_FAILURE); RELEASE_NDIS_PACKET(pAd, pPacket, NDIS_STATUS_FAILURE);
return NDIS_STATUS_FAILURE; return NDIS_STATUS_FAILURE;
...@@ -1057,9 +1058,9 @@ int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket) ...@@ -1057,9 +1058,9 @@ int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket)
/* STEP 2. Check the requirement of RTS: */ /* STEP 2. Check the requirement of RTS: */
/* If multiple fragment required, RTS is required only for the first fragment */ /* If multiple fragment required, RTS is required only for the first fragment */
/* if the fragment size large than RTS threshold */ /* if the fragment size is larger than RTS threshold */
/* For RT28xx, Let ASIC send RTS/CTS */ /* For RT28xx, Let ASIC send RTS/CTS */
/* RTMP_SET_PACKET_RTS(pPacket, 0); */ /* RTMP_SET_PACKET_RTS(pPacket, 0); */
if (NumberOfFrag > 1) if (NumberOfFrag > 1)
RTSRequired = RTSRequired =
(pAd->CommonCfg.FragmentThreshold > (pAd->CommonCfg.FragmentThreshold >
...@@ -1171,8 +1172,8 @@ int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket) ...@@ -1171,8 +1172,8 @@ int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket)
======================================================================== ========================================================================
Routine Description: Routine Description:
This subroutine will scan through releative ring descriptor to find This subroutine will scan through relative ring descriptor to find
out avaliable free ring descriptor and compare with request size. out available free ring descriptor and compare with request size.
Arguments: Arguments:
pAd Pointer to our adapter pAd Pointer to our adapter
...@@ -1588,7 +1589,7 @@ static inline u8 *STA_Build_ARalink_Frame_Header(struct rt_rtmp_adapter *pAd, ...@@ -1588,7 +1589,7 @@ static inline u8 *STA_Build_ARalink_Frame_Header(struct rt_rtmp_adapter *pAd,
pHeaderBufPtr += 2; pHeaderBufPtr += 2;
pTxBlk->MpduHeaderLen += 2; pTxBlk->MpduHeaderLen += 2;
} }
/* padding at front of LLC header. LLC header should at 4-bytes aligment. */ /* padding at front of LLC header. LLC header should at 4-bytes alignment. */
pTxBlk->HdrPadLen = (unsigned long)pHeaderBufPtr; pTxBlk->HdrPadLen = (unsigned long)pHeaderBufPtr;
pHeaderBufPtr = (u8 *)ROUND_UP(pHeaderBufPtr, 4); pHeaderBufPtr = (u8 *)ROUND_UP(pHeaderBufPtr, 4);
pTxBlk->HdrPadLen = (unsigned long)(pHeaderBufPtr - pTxBlk->HdrPadLen); pTxBlk->HdrPadLen = (unsigned long)(pHeaderBufPtr - pTxBlk->HdrPadLen);
...@@ -2014,7 +2015,7 @@ void STA_Legacy_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk) ...@@ -2014,7 +2015,7 @@ void STA_Legacy_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk)
pHeaderBufPtr += 2; pHeaderBufPtr += 2;
pTxBlk->MpduHeaderLen += 2; pTxBlk->MpduHeaderLen += 2;
} }
/* The remaining content of MPDU header should locate at 4-octets aligment */ /* The remaining content of MPDU header should locate at 4-octets alignment */
pTxBlk->HdrPadLen = (unsigned long)pHeaderBufPtr; pTxBlk->HdrPadLen = (unsigned long)pHeaderBufPtr;
pHeaderBufPtr = (u8 *)ROUND_UP(pHeaderBufPtr, 4); pHeaderBufPtr = (u8 *)ROUND_UP(pHeaderBufPtr, 4);
pTxBlk->HdrPadLen = (unsigned long)(pHeaderBufPtr - pTxBlk->HdrPadLen); pTxBlk->HdrPadLen = (unsigned long)(pHeaderBufPtr - pTxBlk->HdrPadLen);
...@@ -2114,7 +2115,7 @@ void STA_ARalink_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk) ...@@ -2114,7 +2115,7 @@ void STA_ARalink_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk)
STA_Build_ARalink_Frame_Header(pAd, pTxBlk); STA_Build_ARalink_Frame_Header(pAd, pTxBlk);
/* It's ok write the TxWI here, because the TxWI->MPDUtotalByteCount */ /* It's ok write the TxWI here, because the TxWI->MPDUtotalByteCount */
/* will be updated after final frame was handled. */ /* will be updated after final frame was handled. */
RTMPWriteTxWI_Data(pAd, RTMPWriteTxWI_Data(pAd,
(struct rt_txwi *) (&pTxBlk-> (struct rt_txwi *) (&pTxBlk->
HeaderBuf HeaderBuf
...@@ -2291,8 +2292,8 @@ void STA_Fragment_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk ...@@ -2291,8 +2292,8 @@ void STA_Fragment_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk
pTxBlk->pExtraLlcSnapEncap, pTxBlk->pKey, pTxBlk->pExtraLlcSnapEncap, pTxBlk->pKey,
0); 0);
/* NOTE: DON'T refer the skb->len directly after following copy. Becasue the length is not adjust */ /* NOTE: DON'T refer the skb->len directly after following copy. Because the length is not adjusted */
/* to correct lenght, refer to pTxBlk->SrcBufLen for the packet length in following progress. */ /* to correct length, refer to pTxBlk->SrcBufLen for the packet length in following progress. */
NdisMoveMemory(pTxBlk->pSrcBufData + pTxBlk->SrcBufLen, NdisMoveMemory(pTxBlk->pSrcBufData + pTxBlk->SrcBufLen,
&pAd->PrivateInfo.Tx.MIC[0], 8); &pAd->PrivateInfo.Tx.MIC[0], 8);
/*skb_put((RTPKT_TO_OSPKT(pTxBlk->pPacket))->tail, 8); */ /*skb_put((RTPKT_TO_OSPKT(pTxBlk->pPacket))->tail, 8); */
...@@ -2301,7 +2302,7 @@ void STA_Fragment_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk ...@@ -2301,7 +2302,7 @@ void STA_Fragment_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk
pTxBlk->CipherAlg = CIPHER_TKIP_NO_MIC; pTxBlk->CipherAlg = CIPHER_TKIP_NO_MIC;
} }
/* */ /* */
/* calcuate the overhead bytes that encryption algorithm may add. This */ /* calculate the overhead bytes that encryption algorithm may add. This */
/* affects the calculate of "duration" field */ /* affects the calculate of "duration" field */
/* */ /* */
if ((pTxBlk->CipherAlg == CIPHER_WEP64) if ((pTxBlk->CipherAlg == CIPHER_WEP64)
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
Revision History: Revision History:
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
John Chang 2004-09-01 add WMM support John Chang 2004-09-01 add WMM support
Justin P. Mattock 11/07/2010 Fix typos
*/ */
#include "../rt_config.h" #include "../rt_config.h"
...@@ -118,7 +119,7 @@ BOOLEAN PeerAssocRspSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned lo ...@@ -118,7 +119,7 @@ BOOLEAN PeerAssocRspSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned lo
NdisMoveMemory(pAid, &pFrame->Octet[4], 2); NdisMoveMemory(pAid, &pFrame->Octet[4], 2);
Length += 2; Length += 2;
/* Aid already swaped byte order in RTMPFrameEndianChange() for big endian platform */ /* Aid already swapped byte order in RTMPFrameEndianChange() for big endian platform */
*pAid = (*pAid) & 0x3fff; /* AID is low 14-bit */ *pAid = (*pAid) & 0x3fff; /* AID is low 14-bit */
/* -- get supported rates from payload and advance the pointer */ /* -- get supported rates from payload and advance the pointer */
......
...@@ -32,8 +32,9 @@ ...@@ -32,8 +32,9 @@
Revision History: Revision History:
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
John Chang 2004-09-01 modified for rt2561/2661 John Chang 2004-09-01 modified for rt2561/2661
Jan Lee 2006-08-01 modified for rt2860 for 802.11n Jan Lee 2006-08-01 modified for rt2860 for 802.11n
Justin P. Mattock 11/07/2010 Fix typos
*/ */
#include "../rt_config.h" #include "../rt_config.h"
...@@ -233,9 +234,9 @@ void MlmeScanReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *E ...@@ -233,9 +234,9 @@ void MlmeScanReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *E
RTMPSuspendMsduTransmission(pAd); RTMPSuspendMsduTransmission(pAd);
/* */ /* */
/* To prevent data lost. */ /* To prevent data loss. */
/* Send an NULL data with turned PSM bit on to current associated AP before SCAN progress. */ /* Send a NULL data with turned PSM bit on to current associated AP before SCAN progress. */
/* And should send an NULL data with turned PSM bit off to AP, when scan progress done */ /* And should send a NULL data with turned PSM bit off to AP, when scan progress done */
/* */ /* */
if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED) if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)
&& (INFRA_ON(pAd))) { && (INFRA_ON(pAd))) {
...@@ -750,9 +751,9 @@ void PeerBeaconAtJoinAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_el ...@@ -750,9 +751,9 @@ void PeerBeaconAtJoinAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_el
/* BEACON from desired BSS/IBSS found. We should be able to decide most */ /* BEACON from desired BSS/IBSS found. We should be able to decide most */
/* BSS parameters here. */ /* BSS parameters here. */
/* Q. But what happen if this JOIN doesn't conclude a successful ASSOCIATEION? */ /* Q. But what happen if this JOIN doesn't conclude a successful ASSOCIATION? */
/* Do we need to receover back all parameters belonging to previous BSS? */ /* Do we need to recover back all parameters belonging to previous BSS? */
/* A. Should be not. There's no back-door recover to previous AP. It still need */ /* A. Should be not. There's no back-door recover to previous AP. It still needs */
/* a new JOIN-AUTH-ASSOC sequence. */ /* a new JOIN-AUTH-ASSOC sequence. */
if (MAC_ADDR_EQUAL(pAd->MlmeAux.Bssid, Bssid)) { if (MAC_ADDR_EQUAL(pAd->MlmeAux.Bssid, Bssid)) {
DBGPRINT(RT_DEBUG_TRACE, DBGPRINT(RT_DEBUG_TRACE,
...@@ -876,7 +877,7 @@ void PeerBeaconAtJoinAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_el ...@@ -876,7 +877,7 @@ void PeerBeaconAtJoinAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_el
pAd->MlmeAux.CfpMaxDuration = Cf.CfpMaxDuration; pAd->MlmeAux.CfpMaxDuration = Cf.CfpMaxDuration;
pAd->MlmeAux.APRalinkIe = RalinkIe; pAd->MlmeAux.APRalinkIe = RalinkIe;
/* Copy AP's supported rate to MlmeAux for creating assoication request */ /* Copy AP's supported rate to MlmeAux for creating association request */
/* Also filter out not supported rate */ /* Also filter out not supported rate */
pAd->MlmeAux.SupRateLen = SupRateLen; pAd->MlmeAux.SupRateLen = SupRateLen;
NdisMoveMemory(pAd->MlmeAux.SupRate, SupRate, NdisMoveMemory(pAd->MlmeAux.SupRate, SupRate,
......
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
Jan Lee 03-07-22 Initial Jan Lee 03-07-22 Initial
Paul Lin 03-11-28 Modify for supplicant Paul Lin 03-11-28 Modify for supplicant
Justin P. Mattock 11/07/2010 Fix typos
*/ */
#include "../rt_config.h" #include "../rt_config.h"
...@@ -86,7 +87,7 @@ void RTMPReportMicError(struct rt_rtmp_adapter *pAd, struct rt_cipher_key *pWpaK ...@@ -86,7 +87,7 @@ void RTMPReportMicError(struct rt_rtmp_adapter *pAd, struct rt_cipher_key *pWpaK
/* Violate MIC error counts, MIC countermeasures kicks in */ /* Violate MIC error counts, MIC countermeasures kicks in */
pAd->StaCfg.MicErrCnt++; pAd->StaCfg.MicErrCnt++;
/* We shall block all reception */ /* We shall block all reception */
/* We shall clean all Tx ring and disassoicate from AP after next EAPOL frame */ /* We shall clean all Tx ring and disassociate from AP after next EAPOL frame */
/* */ /* */
/* No necessary to clean all Tx ring, on RTMPHardTransmit will stop sending non-802.1X EAPOL packets */ /* No necessary to clean all Tx ring, on RTMPHardTransmit will stop sending non-802.1X EAPOL packets */
/* if pAd->StaCfg.MicErrCnt greater than 2. */ /* if pAd->StaCfg.MicErrCnt greater than 2. */
......
...@@ -31,10 +31,11 @@ ...@@ -31,10 +31,11 @@
IOCTL related subroutines IOCTL related subroutines
Revision History: Revision History:
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
Rory Chen 01-03-2003 created Rory Chen 01-03-2003 created
Rory Chen 02-14-2005 modify to support RT61 Rory Chen 02-14-2005 modify to support RT61
Justin P. Mattock 11/07/2010 Fix typos
*/ */
#include "rt_config.h" #include "rt_config.h"
...@@ -851,7 +852,7 @@ int rt_ioctl_giwscan(struct net_device *dev, ...@@ -851,7 +852,7 @@ int rt_ioctl_giwscan(struct net_device *dev,
/* /*
Protocol: Protocol:
it will show scanned AP's WirelessMode . it will show scanned AP's WirelessMode.
it might be it might be
802.11a 802.11a
802.11a/n 802.11a/n
...@@ -875,13 +876,13 @@ int rt_ioctl_giwscan(struct net_device *dev, ...@@ -875,13 +876,13 @@ int rt_ioctl_giwscan(struct net_device *dev,
strcpy(iwe.u.name, "802.11a"); strcpy(iwe.u.name, "802.11a");
} else { } else {
/* /*
if one of non B mode rate is set supported rate . it mean G only. if one of non B mode rate is set supported rate, it means G only.
*/ */
for (rateCnt = 0; for (rateCnt = 0;
rateCnt < pBssEntry->SupRateLen; rateCnt < pBssEntry->SupRateLen;
rateCnt++) { rateCnt++) {
/* /*
6Mbps(140) 9Mbps(146) and >=12Mbps(152) are supported rate , it mean G only. 6Mbps(140) 9Mbps(146) and >=12Mbps(152) are supported rate, it means G only.
*/ */
if (pBssEntry->SupRate[rateCnt] == 140 if (pBssEntry->SupRate[rateCnt] == 140
|| pBssEntry->SupRate[rateCnt] == || pBssEntry->SupRate[rateCnt] ==
...@@ -1417,7 +1418,7 @@ int rt_ioctl_siwencode(struct net_device *dev, ...@@ -1417,7 +1418,7 @@ int rt_ioctl_siwencode(struct net_device *dev,
if ((index >= 0) && (index < 4)) { if ((index >= 0) && (index < 4)) {
pAdapter->StaCfg.DefaultKeyId = index; pAdapter->StaCfg.DefaultKeyId = index;
} else } else
/* Don't complain if only change the mode */ /* Don't complain if the mode is only changed */
if (!(erq->flags & IW_ENCODE_MODE)) if (!(erq->flags & IW_ENCODE_MODE))
return -EINVAL; return -EINVAL;
} }
...@@ -2732,8 +2733,8 @@ int Set_NetworkType_Proc(struct rt_rtmp_adapter *pAdapter, char *arg) ...@@ -2732,8 +2733,8 @@ int Set_NetworkType_Proc(struct rt_rtmp_adapter *pAdapter, char *arg)
} }
if (INFRA_ON(pAdapter)) { if (INFRA_ON(pAdapter)) {
/*BOOLEAN Cancelled; */ /*BOOLEAN Cancelled; */
/* Set the AutoReconnectSsid to prevent it reconnect to old SSID */ /* Set the AutoReconnectSsid to prevent it from reconnecting to the old SSID */
/* Since calling this indicate user don't want to connect to that SSID anymore. */ /* Since calling this indicates users don't want to connect to that SSID anymore. */
pAdapter->MlmeAux.AutoReconnectSsidLen = 32; pAdapter->MlmeAux.AutoReconnectSsidLen = 32;
NdisZeroMemory(pAdapter->MlmeAux. NdisZeroMemory(pAdapter->MlmeAux.
AutoReconnectSsid, AutoReconnectSsid,
...@@ -2766,8 +2767,8 @@ int Set_NetworkType_Proc(struct rt_rtmp_adapter *pAdapter, char *arg) ...@@ -2766,8 +2767,8 @@ int Set_NetworkType_Proc(struct rt_rtmp_adapter *pAdapter, char *arg)
LinkDown(pAdapter, FALSE); LinkDown(pAdapter, FALSE);
} }
if (ADHOC_ON(pAdapter)) { if (ADHOC_ON(pAdapter)) {
/* Set the AutoReconnectSsid to prevent it reconnect to old SSID */ /* Set the AutoReconnectSsid to prevent it from reconnecting to the old SSID */
/* Since calling this indicate user don't want to connect to that SSID anymore. */ /* Since calling this indicates users don't want to connect to that SSID anymore. */
pAdapter->MlmeAux.AutoReconnectSsidLen = 32; pAdapter->MlmeAux.AutoReconnectSsidLen = 32;
NdisZeroMemory(pAdapter->MlmeAux. NdisZeroMemory(pAdapter->MlmeAux.
AutoReconnectSsid, AutoReconnectSsid,
...@@ -2884,7 +2885,7 @@ int Set_NetworkType_Proc(struct rt_rtmp_adapter *pAdapter, char *arg) ...@@ -2884,7 +2885,7 @@ int Set_NetworkType_Proc(struct rt_rtmp_adapter *pAdapter, char *arg)
} }
/* Enable Rx with promiscuous reception */ /* Enable Rx with promiscuous reception */
RTMP_IO_WRITE32(pAdapter, RX_FILTR_CFG, 0x3); RTMP_IO_WRITE32(pAdapter, RX_FILTR_CFG, 0x3);
/* ASIC supporsts sniffer function with replacing RSSI with timestamp. */ /* ASIC supports sniffer function with replacing RSSI with timestamp. */
/*RTMP_IO_READ32(pAdapter, MAC_SYS_CTRL, &Value); */ /*RTMP_IO_READ32(pAdapter, MAC_SYS_CTRL, &Value); */
/*Value |= (0x80); */ /*Value |= (0x80); */
/*RTMP_IO_WRITE32(pAdapter, MAC_SYS_CTRL, Value); */ /*RTMP_IO_WRITE32(pAdapter, MAC_SYS_CTRL, Value); */
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
#include "rt_config.h" #include "rt_config.h"
/* Following information will be show when you run 'modinfo' */ /* Following information will be show when you run 'modinfo' */
/* *** If you have a solution for the bug in current version of driver, please mail to me. */ /* If you have a solution for the bug in current version of driver, please e-mail me. */
/* Otherwise post to forum in ralinktech's web site(www.ralinktech.com) and let all users help you. *** */ /* Otherwise post to the forum at ralinktech's web site(www.ralinktech.com) and let all users help you. */
MODULE_AUTHOR("Paul Lin <paul_lin@ralinktech.com>"); MODULE_AUTHOR("Paul Lin <paul_lin@ralinktech.com>");
MODULE_DESCRIPTION("RT2870/RT3070 Wireless Lan Linux Driver"); MODULE_DESCRIPTION("RT2870/RT3070 Wireless Lan Linux Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -882,8 +882,8 @@ static int __devinit rt2870_probe(IN struct usb_interface *intf, ...@@ -882,8 +882,8 @@ static int __devinit rt2870_probe(IN struct usb_interface *intf,
if (net_dev == NULL) if (net_dev == NULL)
goto err_out_free_radev; goto err_out_free_radev;
/* Here are the net_device structure with usb specific parameters. */ /* Here are the net_device structure with usb specific parameters.
/* for supporting Network Manager. * for supporting Network Manager.
* Set the sysfs physical device reference for the network logical device if set prior to registration will * Set the sysfs physical device reference for the network logical device if set prior to registration will
* cause a symlink during initialization. * cause a symlink during initialization.
*/ */
......
...@@ -32,13 +32,14 @@ ...@@ -32,13 +32,14 @@
Revision History: Revision History:
Who When What Who When What
-------- ---------- ---------------------------------------------- -------- ---------- ----------------------------------------------
Name Date Modification logs Name Date Modification logs
Justin P. Mattock 11/07/2010 Fix a typo
*/ */
#ifndef __WPA_H__ #ifndef __WPA_H__
#define __WPA_H__ #define __WPA_H__
/* EAPOL Key descripter frame format related length */ /* EAPOL Key descriptor frame format related length */
#define LEN_KEY_DESC_NONCE 32 #define LEN_KEY_DESC_NONCE 32
#define LEN_KEY_DESC_IV 16 #define LEN_KEY_DESC_IV 16
#define LEN_KEY_DESC_RSC 8 #define LEN_KEY_DESC_RSC 8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment