Skip to content

Commit

Permalink
staging: Fix typos in rt2860
Browse files Browse the repository at this point in the history
Here is a patch that fixes some typos, and comments in  drivers/staging/rt2860

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Justin P. Mattock authored and Greg Kroah-Hartman committed Nov 10, 2010
1 parent 1ac5864 commit 6ccb5d7
Show file tree
Hide file tree
Showing 27 changed files with 236 additions and 212 deletions.
7 changes: 4 additions & 3 deletions drivers/staging/rt2860/chip/mac_pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
Abstract:
Revision History:
Who When What
Who When What
Justin P. Mattock 11/07/2010 Fix some typos
--------- ---------- ----------------------------------------------
*/

Expand All @@ -45,7 +46,7 @@

/* */
/* 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 PCIBUS_INTEL_VENDOR 0x8086
Expand Down Expand Up @@ -83,7 +84,7 @@ struct PACKED rt_txd {
u32 SDPtr1;
/*Word3 */
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 rsv:2;
u32 TCO:1; /* */
Expand Down
5 changes: 3 additions & 2 deletions drivers/staging/rt2860/chip/mac_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
Abstract:
Revision History:
Who When What
Who When What
Justin P. Mattock 11/07/2010 Fix a typo
--------- ---------- ----------------------------------------------
*/

Expand Down Expand Up @@ -93,7 +94,7 @@ struct rt_txinfo {
/* Word 0 */
u32 USBDMATxPktLen:16; /*used ONLY in USB bulk Aggregation, Total byte counts of all sub-frame. */
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 SwUseLastRound:1; /* Software use. */
u32 rsv2:2; /* Software use. */
Expand Down
19 changes: 10 additions & 9 deletions drivers/staging/rt2860/chip/rtmp_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
Revision History:
Who When What
Justin P. Mattock 11/07/2010 Fix a comments, and typos
-------- ---------- ----------------------------------------------
*/

Expand All @@ -43,7 +44,7 @@
/* ================================================================================= */

/* 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_HCCA 1
#define FIFO_EDCA 2
Expand Down Expand Up @@ -458,8 +459,8 @@ typedef union _BBP_CSR_CFG_STRUC {
/* */
typedef union _RF_CSR_CFG0_STRUC {
struct {
u32 RegIdAndContent:24; /* Register value to program into BBP */
u32 bitwidth:5; /* Selected BBP register */
u32 RegIdAndContent:24; /* Register value to program into BBP */
u32 bitwidth:5; /* Selected BBP register */
u32 StandbyMode:1; /* 0: high when stand by 1: low when standby */
u32 Sel:1; /* 0:RF_LE0 activate 1:RF_LE1 activate */
u32 Busy:1; /* 0: idle 1: 8busy */
Expand All @@ -469,7 +470,7 @@ typedef union _RF_CSR_CFG0_STRUC {
#define RF_CSR_CFG1 0x1024
typedef union _RF_CSR_CFG1_STRUC {
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 rsv:7; /* 0: idle 1: 8busy */
} field;
Expand All @@ -478,7 +479,7 @@ typedef union _RF_CSR_CFG1_STRUC {
#define RF_CSR_CFG2 0x1028 /* */
typedef union _RF_CSR_CFG2_STRUC {
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 */
} field;
u32 word;
Expand All @@ -490,7 +491,7 @@ typedef union _LED_CFG_STRUC {
u32 OffPeriod:8; /* blinking off period unit 1ms */
u32 SlowBlinkPeriod:6; /* slow blinking period. unit:1ms */
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 YLedMode:2; /* yellow Led Mode */
u32 LedPolar:1; /* Led Polarity. 0: active low1: active high */
Expand Down Expand Up @@ -621,9 +622,9 @@ typedef union _TX_TIMEOUT_CFG_STRUC {
#define TX_RTY_CFG 0x134c
typedef union PACKED _TX_RTY_CFG_STRUC {
struct {
u32 ShortRtyLimit:8; /* short retry limit */
u32 LongRtyLimit:8; /*long retry limit */
u32 LongRtyThre:12; /* Long retry threshoold */
u32 ShortRtyLimit:8; /* short retry limit */
u32 LongRtyLimit:8; /* long retry limit */
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 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 */
Expand Down
5 changes: 3 additions & 2 deletions drivers/staging/rt2860/chips/rt3090.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
rt3090.c
Abstract:
Specific funcitons and variables for RT3070
Specific functions and variables for RT3070
Revision History:
Who When What
Who When What
Justin P. Mattock 11/07/2010 Fix a typo
-------- ---------- ----------------------------------------------
*/

Expand Down
9 changes: 5 additions & 4 deletions drivers/staging/rt2860/chips/rt30xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
rt30xx.c
Abstract:
Specific funcitons and variables for RT30xx.
Specific functions and variables for RT30xx.
Revision History:
Who When What
Who When What
Justin P. Mattock 11/07/2010 Fix some typos
-------- ---------- ----------------------------------------------
*/

Expand Down Expand Up @@ -89,7 +90,7 @@ struct rt_reg_pair RT30xx_RFRegTable[] = {

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, */
/* Therefor we should avoid accessing EESK at the same time */
/* Then restore antenna after EEPROM access */
Expand Down Expand Up @@ -243,7 +244,7 @@ void RTMPFilterCalibration(struct rt_rtmp_adapter *pAd)
break;
}

/* prevent infinite loop cause driver hang. */
/* prevent infinite loop; causes driver hang. */
if (loopcnt++ > 100) {
DBGPRINT(RT_DEBUG_ERROR,
("RTMPFilterCalibration - can't find a valid value, loopcnt=%d stop calibrating",
Expand Down
41 changes: 21 additions & 20 deletions drivers/staging/rt2860/mlme.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@
Revision History:
Who When What
-------- ---------- ------------------------------
John Chang 2003-08-28 Created
John Chang 2004-09-06 modified for RT2600
John Chang 2003-08-28 Created
John Chang 2004-09-06 modified for RT2600
Justin P. Mattock 11/07/2010 Fix typos in comments
*/
#ifndef __MLME_H__
#define __MLME_H__

#include "rtmp_dot11.h"

/* maximum supported capability information - */
/* maximum supported capability information */
/* ESS, IBSS, Privacy, Short Preamble, Spectrum mgmt, Short Slot */
#define SUPPORTED_CAPABILITY_INFO 0x0533

Expand Down Expand Up @@ -77,7 +78,7 @@
#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). */
/* 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_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 */
Expand Down Expand Up @@ -123,7 +124,7 @@
#define TID_MAC_HASH_INDEX(Addr, TID) (TID_MAC_HASH(Addr, TID) % HASH_TABLE_SIZE)

/* 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 */
#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)
Expand Down Expand Up @@ -284,8 +285,8 @@ struct PACKED rt_ht_capability_ie {

/* 802.11n draft3 related structure definitions. */
/* 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 dot11OBSSScanActiveDwell 10 /* in TU.min amount of time that the STA continously scans each channel when performing an passive 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 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 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 */
Expand Down Expand Up @@ -325,7 +326,7 @@ struct rt_trigger_eventa {
};

/* 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
struct rt_trigger_event_tab {
u8 EventANo;
Expand Down Expand Up @@ -357,14 +358,14 @@ struct PACKED rt_bss_2040_intolerant_ch_report {
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 {
u8 SwitchMode; /*channel switch mode */
u8 NewChannel; /* */
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 {
u8 SecondaryChannelOffset; /* 1: Secondary above, 3: Secondary below, 0: no Secondary */
};
Expand All @@ -377,7 +378,7 @@ struct rt_ht_phy_info {
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. */
struct rt_ht_capability {
u16 ChannelWidth:1;
Expand All @@ -387,14 +388,14 @@ struct rt_ht_capability {
u16 ShortGIfor40:1; /*for40MHz */
u16 TxSTBC:1;
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 rsv:5;

/*Substract from Addiont HT INFO IE */
u8 MaxRAmpduFactor:2;
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;

u16 OperaionMode:2;
Expand Down Expand Up @@ -481,7 +482,7 @@ struct PACKED rt_ba_parm {
u16 AMSDUSupported:1; /* 0: not permitted 1: permitted */
u16 BAPolicy:1; /* 1: immediately BA 0:delayed BA */
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 */
Expand Down Expand Up @@ -551,7 +552,7 @@ struct PACKED rt_frame_mtba_req {
BASEQ_CONTROL BAStartingSeq;
};

/* Compressed format is mandantory in HT STA */
/* Compressed format is mandatory in HT STA */
struct PACKED rt_frame_mtba {
struct rt_frame_control FC;
u16 Duration;
Expand Down Expand Up @@ -647,7 +648,7 @@ struct PACKED rt_frame_ba {
u8 bitmask[8];
};

/* Radio Measuement Request Frame Format */
/* Radio Measurement Request Frame Format */
struct PACKED rt_frame_rm_req_action {
struct rt_header_802_11 Hdr;
u8 Category;
Expand Down Expand Up @@ -709,7 +710,7 @@ struct rt_edca_parm {
u8 Cwmin[4];
u8 Cwmax[4];
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 */
Expand Down Expand Up @@ -757,7 +758,7 @@ struct rt_wpa_ie {
struct rt_bss_entry {
u8 Bssid[MAC_ADDR_LEN];
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;
u16 AtimWin;
u16 BeaconPeriod;
Expand Down Expand Up @@ -855,7 +856,7 @@ struct rt_state_machine {
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. */
/* 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 */
Expand Down Expand Up @@ -996,7 +997,7 @@ struct PACKED rt_rtmp_tx_rate_switch {
#define MAC_TABLE_ASSOC_TIMEOUT 5 /* unit: sec */
#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. */

/* Value domain of pMacEntry->Sst */
Expand Down
13 changes: 7 additions & 6 deletions drivers/staging/rt2860/oid.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
Revision History:
Who When What
-------- ---------- ----------------------------------------------
Name Date Modification logs
Name Date Modification logs
Justin P. Mattock 11/07/2010 Fix typos in comments
*/
#ifndef _OID_H_
#define _OID_H_
Expand Down Expand Up @@ -78,7 +79,7 @@
#define NDIS_802_11_LENGTH_RATES 8
#define NDIS_802_11_LENGTH_RATES_EX 16
#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_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 */
Expand Down Expand Up @@ -610,7 +611,7 @@ struct rt_802_11_event_log {

struct rt_802_11_event_table {
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];
};

Expand Down Expand Up @@ -721,9 +722,9 @@ struct rt_802_11_tx_rates {
#define AUTH_FAIL 0x4 /* Open authentication fail */
#define AUTH_FAIL_KEYS 0x5 /* Shared authentication fail */
#define ASSOC_FAIL 0x6 /* Association failed */
#define EAP_MIC_FAILURE 0x7 /* Deauthencation because MIC failure */
#define EAP_4WAY_TIMEOUT 0x8 /* Deauthencation on 4-way handshake timeout */
#define EAP_GROUP_KEY_TIMEOUT 0x9 /* Deauthencation on group key handshake timeout */
#define EAP_MIC_FAILURE 0x7 /* Deauthentication because MIC failure */
#define EAP_4WAY_TIMEOUT 0x8 /* Deauthentication on 4-way handshake timeout */
#define EAP_GROUP_KEY_TIMEOUT 0x9 /* Deauthentication on group key handshake timeout */
#define EAP_SUCCESS 0xa /* EAP succeed */
#define DETECT_RADAR_SIGNAL 0xb /* Radar signal occur in current channel */
#define EXTRA_INFO_MAX 0xb /* Indicate Last OID */
Expand Down
Loading

0 comments on commit 6ccb5d7

Please sign in to comment.